# Expression Tag Erratic Behavior - get unexpected result value

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149>\
**Category:** Ignition\
**Created:** [October 1, 2025, 11:13pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149 "2025-10-01T23:13:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [October 1, 2025, 11:13pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149/1 "2025-10-01T23:13:44Z")

</div>

Hi,

I have an expression integer tag with a very simple logic. I realized recently that the result tag is completely wrong and does not follow in realtime expression conditional logic. I mean, when the input condition is true and I expect the tag value to be 1, it is getting another random value and opposite. I checked by reviewing historian values for all tags involved and made sure they are using same tag groups and storing at same rate. Also, know that the historian is not the issue because used sepasoft OEE engine to collect this tag value and it collects the wrong values.

I also tried the three different methods of expression execution with same bad results

I also searched everywhere in my project to make sure no other view, binding or script is writing on my tag

Is there a known issue or watchout with these expression tags or has anyone had similar issue?

Thanks

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/8/5854774b0efd4024ef07fdb5d7f94e3c2c8cbb7f.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 1, 2025, 11:19pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149/2 "2025-10-01T23:19:05Z")

</div>

Is `{[.]LineRunning}` an integer or a boolean?  
If it's a boolean then try,

```python
if({[.]LineRunning},
    1,
    {[.]../PLC Tags/current_fault_capture}
)

```

Line 1 of the expression will return a `true`or `false`.

What scan class have you got on the two tags? (i.e., how often do they update?)

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [October 2, 2025, 12:21pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149/3 "2025-10-02T12:21:59Z")

</div>

LineRunning is boolean and I had that logic before with same issue, this is why I tried =1 instead with no changes.

They are all on default scan class, 1 second.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [October 2, 2025, 6:22pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149/4 "2025-10-02T18:22:27Z")

</div>

As a test, create custom properties and bind line running and the fault code tags. Use the custom properties in the if expression. See if the behaviour changes.

Edit: nm….glossed over the first sentence that it was an expression tag and not an expression binding in the UI.

---

<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:** [October 2, 2025, 6:31pm UTC](https://forum.inductiveautomation.com/t/expression-tag-erratic-behavior-get-unexpected-result-value/111149/5 "2025-10-02T18:31:39Z")

</div>

> [@robertm](#):
>
> create custom properties

This an expression tag, not an expression in a UI.
