Project saves, affecting gateway events or tag browser scripts

So, the issue I have is whenever I save my project after making changes, all the gateway tag change scripts will be fired off checking conditions again... (something I don't want happening).

So far, I have scripts in the tag browser...

When I save a project will all the scripts in the tag browser execute or does it not because it is separate from the gateway.
I would assume we can use the initialChange parameter as a way to resolve this if it does execute.

As for the gateway tag change scripts I always see them fire off...

I don't have access to the inititalChange parameter but I would assume we can use the event.currentValue.value != event.previousValue.value?

But sometimes I notice I won't have a previousValue to even extract the value from...

Is there a safe and guarantee way to prevent these scripts from firing off whenever a project is saved? This is for both gateway tag change scripts and tag browser tag change scripts.

Both types signal initialChange, and that is its purpose. previousValue doesn't exist when initialChange is true.

Consider using multiple projects, perhaps with inheritance, to keep your tag changes from firing when you are editing user interfaces.

3 Likes