Hi pturmel, after some more palying around, I got stuck on another problem: now my function looks similar to
if not isClientScope():
#force clients to open a specific popup by sending a message
#open a specific popup directly, because this is Client scope
where isClientScope() implements the code you suggested to find if the function is running in the client or in the gateway scope.
When this function is run from a button click event, no problem. Whereas if it gets executed on a tag value changed event I get the following error:
AttributeError: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'gui'.
As of my understading, Ignition is trying to load a module that is not defined in the Gateway scope: is there no way to tell Ignition not to consider the
Thanks in advance
First off I found that the error message was due to another module that is loaded when executing
foo(). In that module I placed the following instruction in the global space:
to have a shortcut to the
system.gui.confirm function. That was not good for Ignition. Moreover I had to place the call to
system.nav.openWindow in a separate function, which I call from the
Now it’s working pretty good.
Could you please confirm that this is a good practice, or do you have anything better to suggest me from your valuable experience?