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

AVEVA™ Work Tasks

Visible

  • Last UpdatedJun 25, 2024
  • 1 minute read

Use scripts for the Visible property to show or hide a control.

To show or hide a control

  • Code the script as follows for the Visible property of a control:

Task

Script

  • Show the control.

return true;

  • Hide the control.

return false;

To show or hide a control based on the value of another control

You can show or hide a control based on the value of another control.

Example

If you want to show the Last Name (T2) control only when a name is entered in the First Name (T1) control, then you can code the script for the Visible property of the Last Name (T2) control as follows:

if(control.findById("T1").value !== "")

{

return true;

}

else

{

return false;

}

Note:
- The currentValue method returns the value for the current property of a control.
- For the Visible property, the value is true when the control is shown and the value is false when the control is hidden.

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