# Multi-state indicator + Quality indicator?

**URL:** <https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505>\
**Category:** Ignition\
**Created:** [June 10, 2020, 2:52pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505 "2020-06-10T14:52:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeran.cadorette](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jeran.cadorette](https://forum.inductiveautomation.com/u/jeran.cadorette)\
**Post date:** [June 10, 2020, 2:52pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505/1 "2020-06-10T14:52:54Z")

</div>

I have Multi-state indicators setup…

0=Green  
1=Red

But I’m also needing to change color for bad tag quality, say gray. How do I make this happen? I keep poking around and I’ve been unsuccessful. A bad/offline tag will not have a value so I can’t figure this out.

---

<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:** [June 10, 2020, 9:37pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505/2 "2020-06-10T21:37:34Z")

</div>

You can use the quality property of the tag, or more simply, the [isGood](https://docs.inductiveautomation.com/display/DOC80/isGood) expression function

---

<div class="post-metadata">

**Author:** ![jeran.cadorette](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jeran.cadorette](https://forum.inductiveautomation.com/u/jeran.cadorette)\
**Post date:** [June 10, 2020, 10:02pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505/3 "2020-06-10T22:02:03Z")

</div>

Any good write-ups for this? I haven’t been able to find any. I think I’m close but it’s not quite working now I need it to.

---

<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:** [June 10, 2020, 10:31pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator-quality-indicator/35505/4 "2020-06-10T22:31:52Z")

</div>

If you want to be explicit, you can use [`binEnc`](https://docs.inductiveautomation.com/display/DOC80/binEnc) - `binEnc(isGood({tag}), {tag})`. It’ll return an integer value that’s the binary complement of the booleans provided; so your truth table becomes:

| Quality | Tag | Binary | Integer |
| --- | --- | --- | --- |
| bad (0) | 0 | 00 | 0 |
| bad (0) | 1 | 01 | 1 |
| good (1) | 0 | 10 | 2 |
| good (1) | 1 | 11 | 3 |

Then you can explicitly specify the rendering in the style customizer for any of the possible states.
