# Tag Value Change Event Issue

**URL:** <https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871>\
**Category:** Ignition\
**Created:** [September 29, 2023, 7:34pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871 "2023-09-29T19:34:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Killen](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Chris\_Killen](https://forum.inductiveautomation.com/u/Chris_Killen)\
**Post date:** [September 29, 2023, 7:34pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871/1 "2023-09-29T19:34:19Z")

</div>

I've recently ran into an issue where a tag script (value changed) is triggering when I didn't expect. I have a simple script that stores the value of the tag, along with a couple other pieces of relevant info, into a database for a report. It seems that the script is running when the quality of the tag changes from 192 to 202 but the value has remained the same. I had assumed the quality changes would only activate under the quality change script and wouldn't effect the value change script. Or is there something else I'm missing?

I am trying to figure out why I'm getting the 202 value at all. I looked it up and it says it represents good data that is being sampled slower than requested due to a resource limitation. However I don't have access to the PLC another team handles that.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 29, 2023, 7:39pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871/2 "2023-09-29T19:39:47Z")

</div>

I think you should be able to check the tag's quality and exit the script if isGood is false.

> [@How to read tag's quality on change event?](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/4):
>
> isGood and other methods are available (in some circumstances, at least) in autocompletion in 8.1.18:

---

<div class="post-metadata">

**Author:** ![Chris\_Killen](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Chris\_Killen](https://forum.inductiveautomation.com/u/Chris_Killen)\
**Post date:** [September 29, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871/3 "2023-09-29T20:25:08Z")

</div>

The issue is that the value is 0 and I'm getting a tag event for quality when it changes to 202 then another when it changes back to 192. I don't want either of these events because the value still hasn't changed from 0. I know I can check the previousValue.value vs currentValue.value, but I'm more wondering if this is working as intended as the value isn't changing or if I'm missing something else.

---

<div class="post-metadata">

**Author:** ![zbinder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zbinder/32/28918_2.png) [@zbinder](https://forum.inductiveautomation.com/u/zbinder)\
**Post date:** [September 29, 2023, 9:01pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871/4 "2023-09-29T21:01:22Z")

</div>

In version 8.1.31 it explicitly states that the script triggers on value or quality. Seems like this is the intended behavior.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb1be1a92e3d22ad9a986811d4044e1bc01e1f89.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Killen](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Chris\_Killen](https://forum.inductiveautomation.com/u/Chris_Killen)\
**Post date:** [September 29, 2023, 9:22pm UTC](https://forum.inductiveautomation.com/t/tag-value-change-event-issue/79871/5 "2023-09-29T21:22:19Z")

</div>

I didn't notice that. I was going off [Tag Event Scripts - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Tag+Event+Scripts) where it states just the value. I'll update my scripts to include a check if the previous value doesn't equal the current. Thanks.
