Hello, I have a JSON formatted table that I'm trying to read a value from a specific column, on the selected row and write that value back to a tag that is failing.
Current event script:
def runAction(self, event):
val=self.props.data[selectedRow]['MPAID'].value
#self.props.selection.selectedRow
tag="[default]Perspective/MPAID"
system.tag.writeBlocking(tag,val)
The first column in this table is a column titled "MPAID" that I'm trying to reference in a seperate embedded view, when I click on this table however I get the following error back:
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
File "function:runAction", line 2, in runAction
NameError: global name 'selectedRow' is not defined
caused by org.python.core.PyException
Traceback (most recent call last):
File "function:runAction", line 2, in runAction
NameError: global name 'selectedRow' is not defined
I'm assuming that "selectedRow" is not the right usage here, but I'm not sure what else to use here, any advice? Thanks in advance!