# Tag change event not working

**URL:** <https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 20, 2019, 5:10pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991 "2019-06-20T17:10:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyg](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@andyg](https://forum.inductiveautomation.com/u/andyg)\
**Post date:** [June 20, 2019, 5:10pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991/1 "2019-06-20T17:10:04Z")

</div>

Hi,  
I am having trouble with tag change events. It doesn’t seem like the code is incorrect, but when the tag value changes, the script is not executing.  
Every time the value of DAY SHIFT CURRENT PARTS changes, the value of StatusTag should change to either 1 or 2, but it doesn’t.  
Any suggestions?

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9d721d74fed3a6a83d7a6490d6dc5c14aa77d20f.jpeg)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 20, 2019, 5:20pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991/2 "2019-06-20T17:20:20Z")

</div>

If you look at your Gateway logs, I’m betting you’ll find that the script is failing to run because you are performing mathematical operations on Strings.

If you want tag values, you need to use system.tag.read(tag\_path).value or readAsync(tag\_path).value

```auto
0.8 * "Some String" 

```

will fail every time.

---

<div class="post-metadata">

**Author:** ![andyg](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@andyg](https://forum.inductiveautomation.com/u/andyg)\
**Post date:** [June 20, 2019, 5:43pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991/3 "2019-06-20T17:43:06Z")

</div>

Thanks for your help! I tried using readAsync and system.tag.read, as well as tried without the multiplication, but it still doesnt seem to be running.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c24108ea2971006230d0a08905a8c5ea713aa661.png)

---

<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:** [June 20, 2019, 5:49pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991/4 "2019-06-20T17:49:23Z")

</div>

```auto
system.tag.read('YourTag').value

```

---

<div class="post-metadata">

**Author:** ![andyg](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@andyg](https://forum.inductiveautomation.com/u/andyg)\
**Post date:** [June 20, 2019, 5:52pm UTC](https://forum.inductiveautomation.com/t/tag-change-event-not-working/25991/5 "2019-06-20T17:52:09Z")

</div>

Oh! Thank you very much!!!
