List Component Questions

I’m trying to use a List component to allow for multiple selections of items. These items are then used to trigger the update of corresponding rows in a table. The update is based on a timed event. That event gets the currently selected items in the list and then compiles the table data for the selected items. To keep this brief, there are occasions where the script needs to repopulate the list and then programmatically select the items in the list. I’ve tried using the .setSelectedValue() and passing it a list of items in the table.

myList = ['Node 02', 'Node 04', 'Node 05', 'Node 07']

Where the list contains items ‘Node 01’…‘Node 10’

This does not seem to work for me. How can the list selection be set using multiple selection items from a script?

Additionally, I want to have 2 columns in my data set for the list: 1 - the text the user sees, 2 - tag path to the base tag where the values are sourced.
To use the tag path column, is there an easier way to access that information than parsing through the selected items or indices and then pulling the values from the data set based on indices to row relationships? That is not difficult, but if there is a more direct way to do it I’d like to employ that instead.


1 Like

I also have the need to mark multiple items by script. Due to that the selection can be done manually or by database query.

Did you solve this?

Actually the scripting function


solves the problem:
for example:

listComp=event.source.parent.getComponent('List 1')
listComp.addSelectionInterval(1, 2)
listComp.addSelectionInterval(4, 5)