# Can a script be triggered on a specific tag name Tag Change events?

**URL:** <https://forum.inductiveautomation.com/t/can-a-script-be-triggered-on-a-specific-tag-name-tag-change-events/40085>\
**Category:** Ignition\
**Created:** [October 28, 2020, 9:06am UTC](https://forum.inductiveautomation.com/t/can-a-script-be-triggered-on-a-specific-tag-name-tag-change-events/40085 "2020-10-28T09:06:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aamrc](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@aamrc](https://forum.inductiveautomation.com/u/aamrc)\
**Post date:** [October 28, 2020, 9:06am UTC](https://forum.inductiveautomation.com/t/can-a-script-be-triggered-on-a-specific-tag-name-tag-change-events/40085/1 "2020-10-28T09:06:38Z")

</div>

Hi,

I’d like to have a script in designer which gets triggered on all tags with a specific name (each device would have one).

Is this possible using the Gateway Event Scripts → Tag Change ?

My script triggers on a specific tag, or all tags with `[MQTT Engine]*`, but I need some kind of blanket rule or wildcard selection that allows me to trigger on a specific tag name.

Ideally I’d like to specify something along the lines of `[MQTT Engine]*/*/*/*/ExecCommand`, this did not appear to work, should it?

I’m planning to use it to filter comand requests depending on permissions.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/d/7d7fff2d0a5a8fd4eb6586fb557e1f2367b63d35.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 28, 2020, 3:22pm UTC](https://forum.inductiveautomation.com/t/can-a-script-be-triggered-on-a-specific-tag-name-tag-change-events/40085/2 "2020-10-28T15:22:26Z")

</div>

No, you can’t configure the listener that way. What you _could_ do (I’d be wary of the performance ramifications, though) is configure a broad listener, and then _immediately_ in your script do the check for the final element in the tagpath - and if it’s not found, finish execution. I’d recommend using `if event.tagPath.itemName == "ExecCommand":` or something similar.

[https://docs.inductiveautomation.com/display/DOC80/Gateway+Event+Scripts#GatewayEventScripts-TagChangeObjects](https://docs.inductiveautomation.com/display/DOC80/Gateway+Event+Scripts#GatewayEventScripts-TagChangeObjects)
