# Try logic doesn't work for invalid tags in expressions

**URL:** <https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424>\
**Category:** Ignition\
**Created:** [October 12, 2011, 9:40pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424 "2011-10-12T21:40:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [October 12, 2011, 9:40pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/1 "2011-10-12T21:40:54Z")

</div>

It looks like invalid tags don’t resort to the failover case when using the `try` statement.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 12, 2011, 9:57pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/2 "2011-10-12T21:57:19Z")

</div>

You can either look at the quality value of the tag in an if block or use the forceQuality function.

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [October 12, 2011, 10:07pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/3 "2011-10-12T22:07:47Z")

</div>

The quality of the tag will still not exist if the tag doesn’t exist…

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 12, 2011, 10:23pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/4 "2011-10-12T22:23:10Z")

</div>

No, it does have a quality which is 300. For example:`if(toInteger({Sine/Sine10.Quality}) = 300, toDouble(-2), toDouble({Sine/Sine10}))`

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [October 12, 2011, 10:29pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/5 "2011-10-12T22:29:11Z")

</div>

So quality is assumed even if the tag is does not exist?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 12, 2011, 10:30pm UTC](https://forum.inductiveautomation.com/t/try-logic-doesnt-work-for-invalid-tags-in-expressions/3424/6 "2011-10-12T22:30:00Z")

</div>

Yes
