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

AVEVA™ Work Tasks

Hierarchical List

  • Last UpdatedJun 25, 2024
  • 4 minute read

Use scripts to set and get values for the properties of the Hierarchical List control.

Basic

Property

Scripting Supported

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;

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;

Lookup Source

No

Not Applicable

Appearance

Property

Scripting Supported

Script

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

Width

No

Not Applicable

Height

No

Not Applicable

Retain Space

No

Not Applicable

Custom Style Sheet Identifier

No

Not Applicable

Advanced

Property

Scripting Supported

Example

ID

No

Not Applicable

Default Number of Records

No

Not Applicable

Scripts

Property

Scripting Supported

Example

Name

Yes

return "Value for Name";

Description

Yes

return "Value for Description";

Visible

Yes

return true;

For more information, see scripting guidelines for Visible property.

On Hierarchical List

Load

Yes

For example, to apply a filter after the hierarchical list is loaded, code as follows:

control.findByXmlNode("Hierarchicallist1").applyFilter(

function(recordValue){

if(recordValue.Progress > 50)

{

return true;

}

else

{

return false;

}

});

On Level 1 List Load

Yes

To set the Level 1 Indicator Color

control.level1IndicatorColor = "#5482ab";

OR

control.level1IndicatorColor = "rgb(84,130,171)";

OR

control.level1IndicatorColor = currentRecord.IndiCol;

Note: Here, IndiCol is the column containing indicator color.

To set the Level 1 Progress Color

control.level1ProgressColor = "#5482ab";

OR

control.level1ProgressColor = "rgb(84,130,171)";

OR

control.level1ProgressColor = currentRecord.ProCol;

Note: Here, ProCol is the column containing progress color.

To set the Level 1 Progress Value

control.level1ProgressValue = 70;

OR

control.level1ProgressValue = currentRecord.ProVal;

Note:
- Here, ProVal is the column containing progress value.
- Progress value should be between 0 and 100.
- Float values are rounded to the nearest integer.

To set the Level 1 Progress Description

control.level1ProgressDescription = "Value for Description";

OR

control.level1ProgressDescription = currentRecord.ProDesc;

Note: Here, ProDesc is the column containing progress description.

On Level 2 List Load

Yes

To set the Level 2 Indicator Color

control.level2IndicatorColor = "#5482ab";

OR

control.level2IndicatorColor = "rgb(84,130,171)";

OR

control.level2IndicatorColor = currentRecord.IndiCol;

Note: Here, IndiCol is the column containing indicator color.

To set the Level 2 Progress Color

control.level2ProgressColor = "#5482ab";

OR

control.level2ProgressColor = "rgb(84,130,171)";

OR

control.level2ProgressColor = currentRecord.ProCol;

Note: Here, ProCol is the column containing progress color.

To set the Level 2 Progress Value

control.level2ProgressValue = 70;

OR

control.level2ProgressValue = currentRecord.ProVal;

Note:
- Here, ProVal is the column containing progress value.
- Progress value should be between 0 and 100.
- Float values are rounded to the nearest integer.

To set the Level 2 Progress Description

control.level2ProgressDescription = "Value for Description";

OR

control.level2ProgressDescription = currentRecord.ProDesc;

Note:
- Here, ProDesc is the column containing progress description.
- On some devices, progress description with more than 5 characters may get truncated.

On Level 3 List Load

Yes

To set the Level 3 Indicator Color

control.level3IndicatorColor = "#5482ab";

OR

control.level3IndicatorColor = "rgb(84,130,171)";

OR

control.level3IndicatorColor = currentRecord.IndiCol;

Note: Here, IndiCol is the column containing indicator color.

To set the Level 3 Progress Color

control.level3ProgressColor = "#5482ab";

OR

control.level3ProgressColor = "rgb(84,130,171)";

OR

control.level3ProgressColor = currentRecord.ProCol;

Note: Here, ProCol is the column containing progress color.

To set the Level 3 Progress Value

control.level3ProgressValue = 70;

OR

control.level3ProgressValue = currentRecord.ProVal;

Note:
- Here, ProVal is the column containing progress value.
- Progress value should be between 0 and 100.
- Float values are rounded to the nearest integer.

To set the Level 3 Progress Description

control.level3ProgressDescription = "Value for Description";

OR

control.level3ProgressDescription = currentRecord.ProDesc;

Note:
- Here, ProDesc is the column containing progress description.
- On some devices, progress description with more than 5 characters may get truncated.

On Level 1 Progress Click

Yes

To set the property

SFU.showAlert(currentRecord.ProDesc);

Note: Here, ProDesc is the column containing progress description. On clicking the progress, the description is shown as an alert message.

On Level 2 Progress Click

Yes

To set the property

SFU.showAlert(currentRecord.ProDesc);

SFU.showAlert(parentRecord.ProDesc);

Note:
- Here, ProDesc is the column containing progress description. On clicking the progress, the description is shown as an alert message.
- On some devices, progress description with more than 5 characters may get truncated.

On Level 3 Progress Click

Yes

To set the property

SFU.showAlert(rootRecord.ProDesc);

SFU.showAlert(currentRecord.ProDesc);

SFU.showAlert(parentRecord.ProDesc);

Note:
- Here, ProDesc is the column containing progress description. On clicking the progress, the description is shown as an alert message.
- On some devices, progress description with more than 5 characters may get truncated.

On Level 2 Toggle

Yes

To set the property

if(toggleValue == true)

{

control.level1ProgressValue = 100;

}

else

{

control.level1ProgressValue = 50;

}

// Access above siblings

selectItem.aboveSiblingValue = true;

// Access all siblings

selectItem.aboveSiblingValue = true;

// Access below siblings

selectItem.belowSiblingValue = true;

// Select each of the sibling and enable slide-toggle and set the progress color to red

for(var i=0; i<selectItem.siblings.length; i++)

{

selectItem.siblings.toggle[i].level2ToggleEnable = true;

selectItem.siblings.progress[i].progressColor= "red";

}

Note: Setting level 3 properties using On Level 2 Toggle script is not supported.

On Level 3 Toggle

Yes

To set the property

if(toggleValue == true)

{

control.level1ProgressValue = 100;

}

else

{

control.level1ProgressValue = 50;

}

// Access above siblings

selectItem.aboveSiblingValue = true;

// Access all siblings

selectItem.aboveSiblingValue = true;

// Access below siblings

selectItem.belowSiblingValue = true;

// Select each of the sibling and enable slide-toggle and set the progress color to red

for(var i=0; i<selectItem.siblings.length; i++)

{

selectItem.siblings.toggle[i].level3ToggleEnable = true;

selectItem.siblings.progress[i].progressColor= "red";

}

Note: Setting level 2 properties using On Level 3 Toggle script is only supported for Enable.

Note: You can specify search criteria on the hierarchical list. For more information, see control.applyFilter() and control.clearFilter() methods.

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