Not Understanding InitialChange Logic

Hello,

Can I get clarity on the initialChange documentation? It mentions that its purpose is to capture the first execution after a Tag update. However, the list of reasons why it triggers does not seem to capture all situations where that event would occur.

As an example, if I send tags from one Ignition project to another via an Agent Task, where all existing tags are to be overwritten, I notice that the initialChange flag does not trigger, even if the value that I have pushed differs from what was previously on that tag.

However, if I make a change to the tag's ValueChange scripting, then the initialChange flag does trigger. My goal was to use initialChange as a way clear values that exist in the tags of the project I'm sending as they come into the target.

Am I misunderstanding the purpose of initialCHange's functionality? And if so, what would be the suggested way to acheive my goal of not having a value be overwritten (or, at the least, be set to a known value) when pushing all of the tags from one project to another?

Thank you.

Documentation of initialChange:

If you aren't changing a tag's configuration in a way that invalidates the previous value, or invalidates the previous code, then the change event will run normally. The point of the initialChange flag is to signal when previousValue doesn't exist. That is true on tag startup and configuration changes that affect value (scaling, at least), and on anything that affects the event code, including gateway scripting project restart.

What you are trying to achieve is not reliable as a script side effect.

If you need something that reliably performs a known tag action from another gateway, use a message handler.