# Match string issue

**URL:** <https://forum.inductiveautomation.com/t/match-string-issue/26943>\
**Category:** Ignition\
**Created:** [July 29, 2019, 5:02am UTC](https://forum.inductiveautomation.com/t/match-string-issue/26943 "2019-07-29T05:02:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [July 29, 2019, 5:02am UTC](https://forum.inductiveautomation.com/t/match-string-issue/26943/1 "2019-07-29T05:02:12Z")

</div>

ignition 8.0.2

Hi All.

I have a template called "Analog Input". It has a custom property for the tag path and it displays the value of the tag and auto populates the mouse over text. This all works great.

I am struggling with the syntax for colouring the background based upon the tag quality.

I have added the following expression to the background colour of the object in question. The code compiles but does not work.The code is supposed to colour the object grey if the "Quality" string is equal to "Good". However, the value is always red regardless of the status.

> if(tag({Analogue\_Input.TagPath}+".Quality")="Good","223,222,222","255,0,0")

Please can someone explain why this doesn't work?

Best regards.

---

<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:** [July 29, 2019, 12:00pm UTC](https://forum.inductiveautomation.com/t/match-string-issue/26943/2 "2019-07-29T12:00:35Z")

</div>

Because quality is an object, not a string. It gets converted to string when displayed, giving that impression, but comparison doesn’t implicitly convert to string. Consider using the [IsGood()](https://docs.inductiveautomation.com/display/DOC80/isGood) expression function.

---

<div class="post-metadata">

**Author:** ![john.eichler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.eichler/32/24632_2.png) [@john.eichler](https://forum.inductiveautomation.com/u/john.eichler)\
**Post date:** [July 29, 2019, 7:38pm UTC](https://forum.inductiveautomation.com/t/match-string-issue/26943/3 "2019-07-29T19:38:17Z")

</div>

Perfect! Thank you.
