# Gateway tag change script - entire folder/provider

**URL:** <https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593>\
**Category:** Ignition\
**Created:** [February 14, 2019, 9:22pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593 "2019-02-14T21:22:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 14, 2019, 9:22pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/1 "2019-02-14T21:22:56Z")

</div>

I’m trying to see if any tag in a tag provider (its small) changes and run a script when that happens. But when I enter just the provider name, it says it doesn’t exist as a tag, which I guess is correct. Anyone have any suggestions on how I can do this?

---

<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:** [February 14, 2019, 10:02pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/2 "2019-02-14T22:02:26Z")

</div>

Is the list of tags static? If so, just list all the tag paths on the event and you’re done. The actual tags that change will be identified in the event object.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 14, 2019, 10:03pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/3 "2019-02-14T22:03:07Z")

</div>

They are… for now. I was hoping to capture any new tags that may be added later.

---

<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:** [February 14, 2019, 10:03pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/4 "2019-02-14T22:03:29Z")

</div>

If dynamic, you’re stuck. You’d have to both listen for changes to the structure of the tag tree and place listeners on every tag. All via scripting.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [February 14, 2019, 10:04pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/5 "2019-02-14T22:04:08Z")

</div>

Alright, no problem. The backup here is to just have this script run every few hours or whenever needed, which is fine for this situation.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 15, 2019, 12:31am UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-script-entire-folder-provider/22593/6 "2019-02-15T00:31:33Z")

</div>

Are they all numeric?  
You could create a memory tag that adds them all up and then watch for a value change?  
Or a script to get the tags into a list, run a system.opc.readValues, add them all up and write a single memory tag and then watch that one for a changed value.
