I have a named query returning a dataset that I am using as a parameter in a popup window. I can pull values out of the dataset, and do a transform to get the individual values within the view, but I am having issues when I try and get the individual values out using my event script for when the popup is closing.
Here is my base script for now:
data = self.getSibling("EmbeddedView").props.params.datasource
newOrEdit = self.view.params.newRecipe
PN = self.view.params.PN
Rev = system.db.runNamedQuery('AeroDef', 'GetMaxRevision', {"PN":PN}).getValueAt(0,0)+1
log=system.util.getLogger("Garrett Logger")
log.warn("%s"%data)
i=0
ribNo1 = data[0][2]
dispRate1 = data[0][3]
dispSpeed1 = data[0][4]
beadH1 = data[0][5]
beadW1 = data[0][6]
log.warn("%s"%ribNo1)
If I run it as it is there, it throws an error saying the following.
Caused by: org.python.core.PyException: Traceback (most recent call last): File "", line 10, in runAction TypeError: 'com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$MapWrapper' object is unsubscriptable
The data type as an array, so I tried pop, which will give me the row, but it returns as an âcom.inductiveautomation.perspective.common.Immutabâ and I canât get any data out of that easily it seems.
Any ideas on what the best way to approach this is?