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

AVEVA™ Work Tasks

Behavior

  • Last UpdatedJun 25, 2024
  • 1 minute read

Use scripts for the Behavior property to manage records and edit values at run-time on a Base Form container.

To manage records and edit values at run-time on a Base Form container

  • Code the script as follows for the Behavior property of a Base Form container:

Task

Script

  • Allow a user to add or delete records for the control, and to edit values of the child controls.

readEditBehaviourEnum.editable;

  • Deny a user to add or delete records for the control, and deny to edit values of the child controls.

readEditBehaviourEnum.readOnly;

  • Allow a user to  add or delete records for the control, but deny to edit values of the child controls.

readEditBehaviourEnum.allowOnlyAdd;

To manage records and edit values at run-time on a Base Form container based on the value of another control

You can manage records and edit values at run-time on a Base Form container based on the value of another control.

Example

If you want to manage records and edit values at run-time on the Employee Details (B1) container as per the selection in the Edit Information (R1) control, then you can code the script for the Behavior property of the Employee Details (B1) container as follows:

if(control.findById("R1").value === "0")

{

readEditBehaviourEnum.editable;

}

else if(control.findById("R1").value === "1")

{

readEditBehaviourEnum.readOnly;

}

else

{

readEditBehaviourEnum.allowOnlyAdd;

}

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