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

AVEVA™ Work Tasks

Widget

  • Last UpdatedApr 22, 2022
  • 2 minute read

Use scripts to set and get values for the properties of the Data Grid control.

Use Widget control to create reusable graphical components. You can maintain a library of widgets for the other users to use.

Properties

The properties for the control are grouped under the following tabs:

Basic

Property

Scripting

Example

Name

Yes

Writable

Readable

To set the property

control.findById("ID").tagName =
"Value for Name";

To get the value of the property

control.findById("ID").tagName;

XML Node

Yes

Readable

To get the value of the property

control.findById("ID").xmlNodeBoundTo;

Description

Yes

Writable

Readable

To set the property

control.findById("ID").description = "Value for Description";

To get the value of the property

control.findById("ID").description;

Widget Type

No

Not Applicable

Widget

Yes

Readable

To get the value of the property

control.findByXmlNode("Widget1").widgetName;

Configuration

Yes

Readable

Writable

To get the value of the property

control.findByXmlNode("Widget1").confName;

Form Details

No

Not Applicable

Appearance

Property

Scripting
Supported

Example

Style

No

Not Applicable

In Designer

No

Not Applicable

Visible

Yes

Writable

Readable

To set the property

control.findById("ID").visible = true;

To get the value of the property

control.findById("ID").visible;

Label Position

No

Not Applicable

Label-Control Area

No

Not Applicable

Retain Space

No

Not Applicable

Custom Style Sheet Identifier

No

Not Applicable

Advanced

Property

Scripting
Supported

Example

On Data Change

Yes

For more information, see scripting guidelines for On Data Change property.

ID

No

Not Applicable

Add Values as Url

No

Not Applicable

Widget Properties

Yes

To get the value of the property

control.findByXmlNode("Widget1").widgetProperties;

The properties are listed based on the Widget selected in the control. For more information, see the respective Widget documentation.

  • Grid Widget

  • Hierarchy Selector Widget

    Note: Form Parameters are considered as Widget Properties for the Widget control irrespective of the data type. The Widget Properties are always represented as String data type.

Scripts

Property

Scripting
Supported

Example

Name

Yes

return "Value for Name";

Description

Yes

return "Value for Description";

Visible

Yes

Writable

Readable

return true;

Default Value

Yes

return "Default value for the control";

Note: The Value script takes precedence over the Default Value script.

Value

Yes

return "Value for the control";

Validate

Yes

return new ValidationOptions(false, "Error Message");

OR

return new ValidationOptions(true, "");

For more information, see scripting guidelines for Validate property.

Widget Scripts

Yes

The dynamic scripts are listed based on the Widget selected in the control.

For more information, see the respective Widget documentation on the dynamic scripts.

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