# Expression Tag defaulting to fallback

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-defaulting-to-fallback/52959>\
**Category:** Ignition\
**Created:** [November 11, 2021, 10:33am UTC](https://forum.inductiveautomation.com/t/expression-tag-defaulting-to-fallback/52959 "2021-11-11T10:33:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IA\_old\_forum](https://avatars.discourse-cdn.com/v4/letter/i/7ab992/32.png) [@IA\_old\_forum](https://forum.inductiveautomation.com/u/IA_old_forum)\
**Post date:** [November 11, 2021, 10:33am UTC](https://forum.inductiveautomation.com/t/expression-tag-defaulting-to-fallback/52959/1 "2021-11-11T10:33:47Z")

</div>

Hello everyone,

I made an expression tag that checks the values from an OPC array tag. Depending on which element of the array is active (bool values), the expression tag will return a defined string with the output/error name.

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

The thing is that every time an array element is active, the expression tag returns the fallback value instead of the respective case. I tried a polling rate of 500 ms, with my tag group and event driven but the same continues to happen: every time any one of the array elements change, the tag will get the default value for the switch function but with the newest time stamp.

Is there something in the expression I can't see or doing wrong?

Thanks in advance

I forgot to mention that 90% of the times, only 1 array element will be fired at a time; it is highly unlikely for 2 or more to change state at the same time or for the same "clock cycle"

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 11, 2021, 11:33am UTC](https://forum.inductiveautomation.com/t/expression-tag-defaulting-to-fallback/52959/2 "2021-11-11T11:33:23Z")

</div>

I’d start by putting the bincEnc in s separate expression so that you can see the value.

---

<div class="post-metadata">

**Author:** ![IA\_old\_forum](https://avatars.discourse-cdn.com/v4/letter/i/7ab992/32.png) [@IA\_old\_forum](https://forum.inductiveautomation.com/u/IA_old_forum)\
**Post date:** [November 11, 2021, 12:00pm UTC](https://forum.inductiveautomation.com/t/expression-tag-defaulting-to-fallback/52959/3 "2021-11-11T12:00:55Z")

</div>

I saw what I did wrong in my original code. I was using as path Bool\_array\*\*.value\*\*[n]

do you have any idea on what I could do to retain the last value of the encoder output/switch return? maybe a delayed timer on the fallback, or should I create a function and use the runScript command?
