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

AVEVA™ Work Tasks

Forms Parameters for Invoke Form Activity

  • Last UpdatedJun 25, 2024
  • 1 minute read

Forms parameters are form-level variables used in workflows at run-time to store data from a workflow and display the data in a form. The value of a forms parameter is used when the form is rendered.

Forms parameters are specifically used in Invoke Form scenarios where a form is populated as a Work Item and the parameters work within the boundaries of the Invoke Form activity.

Default Forms Parameters

The default parameters that can be obtained from the forms parameters in Invoke Form scenario using JavaScript are:

Forms Parameters

Script

Execution ID

control.topLevelForm.formParameters["variable.executionId"].value

Execution Details ID

control.topLevelForm.formParameters["variable.executionDetailsId"].value

Submitted User ID

control.toplevelForm.formParameters["submittedById"].value

Work Item ID

control.topLevelForm.formParameters["variable.workItemId"].value

Workflow Name

control.topLevelForm.formParameters["variable.workflowName"].value

Accessing Forms Parameters through scripts

// Script for the On Data Change event.

// GetWFName is a forms parameter set from an external system (Workflow).

// Gets the workflow name on data change of the control.

var getwfname = control.topLevelForm.formParameters["GetWFName"];

if(getwfname !== undefined && getwfname !== null){

 return (getwfname.value);

}

// Script for the Visible property.

// GetWFName is forms parameter set from an external system (Workflow).

// Hides the control based on the forms parameter value.

var getwfname = control.topLevelForm.formParameters["GetWFName"];

if(getwfname !== undefined && getwfname !== null){

 return (getwfname.value !== null?false:true);

}

Accessing Default Forms Parameters through scripts

// Accesses the default forms parameter - Workflow name.

var getwfname = control.topLevelForm.formParameters["variable.workflowName"];

if(getwfname !== undefined && getwfname !== null){

 if(getwfname.value !== null){

 return getwfname.value;

 }

}

Note: When a forms parameter of type date is set through a workflow variable of type date in the Invoke Form activity, the forms parameter will contain a "T" separator between date and time.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in