# Expression Binding not working in 7.9

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317>\
**Category:** Ignition\
**Created:** [June 2, 2022, 7:23pm UTC](https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317 "2022-06-02T19:23:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anita.Shinde](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Anita.Shinde](https://forum.inductiveautomation.com/u/Anita.Shinde)\
**Post date:** [June 2, 2022, 7:23pm UTC](https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317/1 "2022-06-02T19:23:44Z")

</div>

Hi Team,

I am binding an expression to multistate Indicator component in 7.9 version and It is not working but same expression is working in 7.3 version.  
I am unable to figure out what’s wrong here.  
Can anyone please help me with this?

Thanks.

ResultNumber=27  
RLSL=10  
RUSL=0

7.3 application returns 1 value and 7.9 version returns 2 value.

Expected value is 1

below is my expression-

if({Root Container.Container 4.Range}=1 && {Root Container.Container 4.Actual.text}!=’’,  
if({Root Container.Container 4.Actual.ResultNumber}!=-999,  
if({Root Container.Container 4.Actual.ResultNumber}\>  
{Root Container.Container 4.RUSL}  
||{Root Container.Container 4.Actual.ResultNumber}\<  
{Root Container.Container 4.RLSL},  
2,1),  
if({Root Container.Container 4.Actual.ResultPass}\>  
{Root Container.Container 4.RUSL}||  
{Root Container.Container 4.Actual.ResultPass}\<  
{Root Container.Container 4.RUSL},2,1)),0)

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [June 2, 2022, 7:48pm UTC](https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317/2 "2022-06-02T19:48:50Z")

</div>

Please highlight code and use the \</\> button to make it more readable.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [June 2, 2022, 8:25pm UTC](https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317/3 "2022-06-02T20:25:39Z")

</div>

1. format your scripts when you post using the `</>` button.
2. how is anyone supposed to debug this rats nest of an expression?

I would break this up into smaller expressions, then use a parent expression that uses the smaller child expressions to make it easier to read and debug.

For starters, the inner `if` should probably be (using short names)

```auto
if(ResultPass != RUSL ,1,2)

```

Full simplified version

```auto
if(Range = 1 && len(Actual.text), if(ResultNumber != -999, if(ResultNumber > RUSL || ResultNumber < RLSL,2,1), if(ResultPass != RUSL ,1,2)),0)

```

With value replacements

```auto
if(Range = 1 && len(Actual.text), if(27 != -999, if(27 > 0 || 27 < 10,2,1), if(ResultPass != 0 ,1,2)),0)

```

This logic returns 2 based on your numbers

---

<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:** [June 2, 2022, 8:44pm UTC](https://forum.inductiveautomation.com/t/expression-binding-not-working-in-7-9/60317/4 "2022-06-02T20:44:37Z")

</div>

> [@Anita.Shinde](#):
>
> if({Root Container.Container 4.Actual.ResultPass}\>  
> {Root Container.Container 4.RUSL}||  
> {Root Container.Container 4.Actual.ResultPass}\<  
> {Root Container.Container 4.RUSL},2,1)),0)

If this was a copy and paste consider using the lower limit in one of your compares.
