Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Scripting Scenarios

  • Last UpdatedMar 12, 2021
  • 1 minute read

Example scripts provided in this section can be used independently in the Card control's On Click event and Action Script properties.

Scenario 1: Calling a popup

Use the following script to call a popup through the On Click event property in the Advanced tab of the control properties page.

// Shows the Pop-Up control.

var popupCtr = control.findByXmlNode("Popupform2");

SFU.showPopupControl(popupCtr);

Scenario 2: Calling a workflow

Use the following script to call a workflow through the Action Script properties in the Scripts tab of the control properties page.

// Triggers the Click event of the invoke workflow control.

var gridControl = control.findByXmlNode("Grid1");

if(gridControl)

{

gridSelectedValue = gridControl.selectedValue;

if(gridSelectedValue)

{

control.findByXmlNode("hfGridEntID").value = gridSelectedValue.entID;

}

}

var invokeWorkflowControl = control.findById("I1");

SFU.invokeWorkflow(invokeWorkflowControl);

Scenario 3: Calling a form

Use the following script to call a form through the Action Script properties in the Scripts tab of the control properties page.

// Gets the form that has to be embedded in the current form.

var formsURL=SFU.getFormUrl("MDMTestForm","1");

control.findById("E1").url = formsURL;

TitleResults for “How to create a CRG?”Also Available in