Issue with configure events

I am trying to set up a button to save my data but the button is not working. Even the simple script is not showing the output in console when I click the button in browser (Live mode).could someone please help

ot saving anything.

Perspective scripts are run in the gateway, not on the client PC. Your print output is trying to print on the gateway.

Use https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-print instead.

Use your browser's Web Developer Tools (F12) console to view the output.

2 Likes

In addition to what @Transistor already mentioned, keep in mind that Ignition's scripting engine is Jython, which uses Python 2.7 syntax, where print is a statement, not a function.

So you should print something, not print(something). I believe the latter works in this case because the syntax essentially ignores the parentheses, but if you keep trying to use Python 3 syntax you're going to run into other problems.

1 Like