# How to read tag's quality on change event?

**URL:** <https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813>\
**Category:** General Discussion\
**Tags:** ignition81, scripting\
**Created:** [May 19, 2022, 9:34pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813 "2022-05-19T21:34:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvaught](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rvaught](https://forum.inductiveautomation.com/u/rvaught)\
**Post date:** [May 19, 2022, 9:34pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/1 "2022-05-19T21:34:16Z")

</div>

when I add this line of code (below) the script stops working.  
`if currentValue.quality != 'Good':`

When I check the data type I get this below?  
`com.inductiveautomation.ignition.common.model.values.QualityCode`

What type is currentValue.quality?  
How do you check its value via scripting?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 19, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/2 "2022-05-19T21:37:30Z")

</div>

You can always use

```auto
currentValue.quality.good

```

You are trying to compare a QualityCode to a string, and theyre not equal

[https://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.0-beta/com/inductiveautomation/ignition/common/model/values/QualityCode.html](https://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.0-beta/com/inductiveautomation/ignition/common/model/values/QualityCode.html)

---

<div class="post-metadata">

**Author:** ![rvaught](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rvaught](https://forum.inductiveautomation.com/u/rvaught)\
**Post date:** [May 19, 2022, 9:42pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/3 "2022-05-19T21:42:37Z")

</div>

Yes that seems to work

---

<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:** [May 19, 2022, 10:06pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/4 "2022-05-19T22:06:05Z")

</div>

`isGood` and other methods are available (in some circumstances, at least) in autocompletion in 8.1.18:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e4750e63667aed3e4352b4df683968bf39318e2a.png)

---

<div class="post-metadata">

**Author:** ![rvaught](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rvaught](https://forum.inductiveautomation.com/u/rvaught)\
**Post date:** [May 19, 2022, 10:30pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/5 "2022-05-19T22:30:32Z")

</div>

oh my! excellent thank you!

---

<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:** [May 20, 2022, 1:03am UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/6 "2022-05-20T01:03:05Z")

</div>

> [@paul-griffith](#):
>
> `isGood` and other methods

Consider offering the property instead of the method for NetBeans-compliant getters. They are slightly more efficient. (One fewer jython-java thunk in each case: One property lookup instead of method lookup followed by function operator invocation.)

---

<div class="post-metadata">

**Author:** ![rvaught](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rvaught](https://forum.inductiveautomation.com/u/rvaught)\
**Post date:** [May 20, 2022, 2:22pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/7 "2022-05-20T14:22:24Z")

</div>

Ignition 8.1.1  
I’m working in a UDT tag, Value Changed event. I cannot get the intellisense code completion dropdown like the one in your pic. I’m pressing (Ctrl)(Space) but it doesn’t present the enum?

Edit: I see where you mentioned v 8.1.18. It must be specific that newer version?

---

<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:** [May 20, 2022, 2:25pm UTC](https://forum.inductiveautomation.com/t/how-to-read-tags-quality-on-change-event/59813/8 "2022-05-20T14:25:52Z")

</div>

~~8.1.18 is still currently a pre-release “nightly” build - you’re sure that’s the version you downloaded?~~

> **[Current Ignition Release | Inductive Automation](https://inductiveautomation.com/downloads/ignition/8.1.18-SNAPSHOT)**
>
> Download and start using the world's most powerful SCADA software in just minutes. Cross-platform, with installers
> available for multiple operating systems.

Yes, you must be on 8.1.18, since that’s when this improved code completion landed. Full release is scheduled for ~mid June.
