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

AVEVA™ Work Tasks

Set forms parameters

  • Last UpdatedFeb 03, 2026
  • 2 minute read

Set forms parameters to manage controls on a form at run-time.

  • When you create a Form Link, you can select and type values for the parameters. For more information,see Creating Forms Links.

Set forms parameters through pop-up control

  • When you create a Pop-Up control, you can select parameters and map it to parent form controls. For more information, see To add Form Details for the Control under Form Details property in Pop-Up.

Set forms parameters through external systems

The forms parameter must be specified in JSON (JavaScript Object Notation) string format with attribute–value pairs. Multiple forms parameters can be specified by separating them with commas.

Syntax

// extForParam is the global variable used for setting Forms Parameters.

window.extFormParam = { "<formsParameterName>": { "id": <idValue>, "mappedParentControl": "<mappedParentControlValue>", "name": "<formsParameterName>", "type": "<formsParameterType>", "value": "<formsParameterValue>" } };

Value

Description

<formsParameterName>

Name of the forms parameter.

<idValue>

Value of the forms parameter ID.

This value is optional. Use null if no value is used.

<mappedParentControlValue>

Value of the forms parameter mapped to the parent control.

This value is optional. Use "" if no value is used.

<formsParameterType>

Type of the forms parameter.

For more information about, see Types of Forms Parameters.

<formsParameterValue>

Value of the Forms Parameter.

Example

Set forms parameters through an HTML page

If you want to populate the First Name and the Last Name text controls on the Employee form using the FName and the LName forms parameters, you can do so by coding the form and the HTML page as follows:

Script the On Form Load property of the Employee form to assign values to the text controls using the forms parameters.

Note: Assign the values to the controls inside a setTimeout function as shown in the example below.

Example:


setTimeout(function(){

// T1and T2 are the Text controls for the First Name and the Last Name respectively.

control.findById("T1").value = control.topLevelForm.formParameters["FName"].value;

control.findById("T2").value = control.topLevelForm.formParameters["LName"].value;

}, 0);


Code the HTML page to set the values for the forms parameters.

// John and Doe are values set to FName and LName respectively.

// extForParam is the variable used for setting Forms Parameters.

// This code must appear before the loadViewAndViewModelFromServer() function.

window.extFormParam = { "FName": { "name": "FName", "type": "STRING", "value": "John" }, "LName": { "name": "LName", "type": "STRING", "value": "Doe" } };

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