# Gateway Events: Tag Change

**URL:** <https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499>\
**Category:** Ignition\
**Created:** [January 6, 2025, 8:29pm UTC](https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499 "2025-01-06T20:29:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas.gutt](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.gutt/32/25670_2.png) [@nicholas.gutt](https://forum.inductiveautomation.com/u/nicholas.gutt)\
**Post date:** [January 6, 2025, 8:29pm UTC](https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499/1 "2025-01-06T20:29:38Z")

</div>

I am building a tag provider which will synchronize to a SQL data model. UDT instances will be created dynamically when valid entries are made into the data model. The tag provider will perform different database operations using Gateway Event Tag Change scripts.

As of now there is one way to batch tag paths which will trigger a Gateway Event/Tag Change script. My understanding is we can use a '\*' at the end of a path only.

Since I am scripting UDT instance creation and those instances could have predictable names like 0001-9999 I had a thought of adding a bunch of tag paths to the tag change script that do not exist, yet. Once the instance creation script creates an instance of that name the gateway event tag change will just work instead of manually adding instances to the list each time one is created.

I have 2 questions:  
Does this make sense?  
If so is it a bad idea?

I did a test and the gateway does not complain outside of the diagnostics box where the tag paths are setup.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 6, 2025, 8:40pm UTC](https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499/2 "2025-01-06T20:40:41Z")

</div>

Give an example of a full tag path in this scenario.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 6, 2025, 9:29pm UTC](https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499/3 "2025-01-06T21:29:19Z")

</div>

This is one of the situations where I recommend the combination of tag valueChange events that delegate to a queue drained by one or more timer events. As described here:

> [@Java concurrent queue for tag change scripts](https://forum.inductiveautomation.com/t/java-concurrent-queue-for-tag-change-scripts/82044):
>
> Continuing the discussion from [[SOLVED] Are tag Value Changed scripts running asynchronously?](https://forum.inductiveautomation.com/t/solved-are-tag-value-changed-scripts-running-asynchronously/68704/5): We've got code in our standard library that I need to log a value change on a tag and then associate various data points with that value change. The value is located in a UDT, and because this is part of our "standard" library we use for our customers, the number of tags is variable and quite possibly numerous so having a gateway tag event script isn't feasible for this solution. I was reading up on …

---

<div class="post-metadata">

**Author:** ![nicholas.gutt](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.gutt/32/25670_2.png) [@nicholas.gutt](https://forum.inductiveautomation.com/u/nicholas.gutt)\
**Post date:** [January 7, 2025, 1:45pm UTC](https://forum.inductiveautomation.com/t/gateway-events-tag-change/100499/4 "2025-01-07T13:45:56Z")

</div>

Thank you. I will give queueUtil.py a go.
