Changing tag values on click action

Hi,

When I run this script in the console, the tag values change as expected.

However, when I use the exact same script in an ‘onClick’ mouse event, the tag values do not change. These are just memory tags without any write security permissions set.

What am I missing here?

Thank you,
Ali

In that picture, it doesn’t look like your changes have been applied. When you click the apply button, does the asterisk by onClick go away?

Your navigation action is navigating away from the page and cancelling your script. Actions are started in order but are executed asynchronously; they do not wait for the previous to finish before running. Script actions have to be sent to the gateway and are thus the slowest to run, and I believe they're terminated if the owner is closed. I actually started a topic about this exact situation

3 Likes

I assuming there is no workaround at this time. It kind of defeats the purpose of ordering the actions. I wish there was an option to make the second action start only after the first has completed or at least add a timer.

Sure there are workarounds, you can write the script to do the actions in the manner and order that you want. Do navigation in the script.

1 Like