I would like to be able to open some pages using a drop down menu, created a drop down and in data set viewer, added the name of the pages and gave them a value, now I assume I need to use scripting under drop down component scripting? something like:
if event.source.selectedValue = 0
elif event.source.selectedValue = 1
Add an additional column named “Path” to the dropdown’s dataset. This will hold the path to the window.
Then add the following to the dropdown propertyChange
if event.propertyName == "selectedIndex":
if event.newValue != -1:
data = event.source.data
path = data.getValueAt(event.newValue,"Path")
but if i include that in my drop down dataset then it will be visible every time the drop down is selected.
I tried it anyway and i get this error:
Traceback (most recent call last):
File "<event:propertyChange>", line 4, in <module>
java.lang.ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: Column 'Path' doesn't exist in this dataset.
caused by ArrayIndexOutOfBoundsException: Column 'Path' doesn't exist in this dataset.
Ignition v7.7.0 (b2014071516)
Java: Oracle Corporation 1.8.0_45
I guess the idea was to create a new column instead of a new row. Your dataset should then look like the attached screenshot.