I have a global script library setup. I can call the scripts from it fine in tag change events and SFC from other projects. I am using the onClick Script action for a Perspective button, but when I try to call a script from the Script Library Project named NH-ScriptLibrary, I get an error.
Error running action 'dom.onClick' on P70X RD AUTO@D/root/Button: Traceback (most recent call last): File "<function:runAction>", line 35, in runAction NameError: global name 'plexAPI' is not defined
The code is
response = plexAPI.setJob(checkJob, workcenterKey)
plexAPI is the name of the script in the Project NH-ScriptLibrary that is set as the Gateway Scripting Project.
I tried using the Project name, but the get "NameError: global name 'NH' is not defined".
I could be wrong, but it seems like in this scope it does not like the '-' in the project name. Or I am just missing something obvious.
Thanks,
Jon