# Accessing tag values in Gateway Tag Change Script

**URL:** <https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159>\
**Category:** Ignition\
**Created:** [February 27, 2018, 8:48pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159 "2018-02-27T20:48:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew.brauer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.brauer/32/34853_2.png) [@andrew.brauer](https://forum.inductiveautomation.com/u/andrew.brauer)\
**Post date:** [February 27, 2018, 8:48pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159/1 "2018-02-27T20:48:40Z")

</div>

I am new to Ignition. I have been unable to find an example to help. I have created a Gateway Tag Change Script, this script has 5 tags defined for the change event. In the body of the script I want to compare the tags. Is there an method for referencing the tags defined to trigger the change event?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9d287aba9b523b0e3ad77a412c114b9e28a5236a.png)

---

<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 27, 2018, 9:12pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159/2 "2018-02-27T21:12:15Z")

</div>

system.tag.read("[default]PathToYourTag").value

[https://docs.inductiveautomation.com/display/DOC79/system.tag.read?src=sidebar](https://docs.inductiveautomation.com/display/DOC79/system.tag.read?src=sidebar)

---

<div class="post-metadata">

**Author:** ![andrew.brauer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.brauer/32/34853_2.png) [@andrew.brauer](https://forum.inductiveautomation.com/u/andrew.brauer)\
**Post date:** [February 27, 2018, 9:56pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159/3 "2018-02-27T21:56:59Z")

</div>

I am familiar with the system.tag.read function. I was hoping for a response that would expose a function to return the tag paths defined in the script change triggers. Do I need to maintain the same tag path list in the script and walk through it?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 27, 2018, 10:10pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159/4 "2018-02-27T22:10:48Z")

</div>

You can’t get the whole list, but you can get the `tagPath` that triggered the script to execute out of the `event` object.

---

<div class="post-metadata">

**Author:** ![andrew.brauer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.brauer/32/34853_2.png) [@andrew.brauer](https://forum.inductiveautomation.com/u/andrew.brauer)\
**Post date:** [February 27, 2018, 10:17pm UTC](https://forum.inductiveautomation.com/t/accessing-tag-values-in-gateway-tag-change-script/17159/5 "2018-02-27T22:17:19Z")

</div>

Got it, I wanted to make sure I wasn’t missing a feature known to experienced users. Thanks, Kevin.
