I don’t understand what is happening:
- The script created when navigation - open - pass parameters is selected:
# This script was generated automatically by the navigation
# script builder. You may modify this script, but if you do,
# you will not be able to use the navigation builder to update
# this script without overwriting your changes.
param1 = event.source.path2
window = system.nav.openWindowInstance('Common/vfdPowerFlex525', {'vfdTagPathAndName' : param1})
system.nav.centerWindow(window)
- I want to open different popup windows based on a value, so I tried making the first parameter a variable that contains the name of the desired popup window:
param1 = event.source.path2
vfdpopupwin = "'Common/" + event.source.parent.getComponent('vfdpopupname').text +"'"
window = system.nav.openWindowInstance(vfdpopupwin, {'vfdTagPathAndName' : param1})
system.nav.centerWindow(window)
and this gives me the error:
17:58:48.928 [AWT-EventQueue-2] ERROR com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter - <HTML>Error executing script for event: <code><b>actionPerformed</b></code><BR>on component: <code><b>VFD button</b></code>.
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last):
File "<event:actionPerformed>", line 15, in <module>
ValueError: Window 'Common/vfdPowerFlex525' does not exist.
- Can anyone help me understand what is happening and how to accomplish this (simple) task. I think I might need to designate that I want the value of the variable evaluated, but I’m not sure that is the problem.