# Synthax proof reading for if statement on integer type

**URL:** <https://forum.inductiveautomation.com/t/synthax-proof-reading-for-if-statement-on-integer-type/49081>\
**Category:** General Discussion\
**Tags:** ignition80, vision, scripting\
**Created:** [July 22, 2021, 12:34pm UTC](https://forum.inductiveautomation.com/t/synthax-proof-reading-for-if-statement-on-integer-type/49081 "2021-07-22T12:34:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trishadx](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@trishadx](https://forum.inductiveautomation.com/u/trishadx)\
**Post date:** [July 22, 2021, 12:34pm UTC](https://forum.inductiveautomation.com/t/synthax-proof-reading-for-if-statement-on-integer-type/49081/1 "2021-07-22T12:34:27Z")

</div>

Hi guys, a very simple one here… I’ve got a type Integer tag, and to write it into an if statement whenever the value is 5. But the expression in the property binding just doesnt like it.

am I writing in the wrong language?

`if({Root Container.UDT_Instance::status.status} == "5"), value=true , value=false)`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cf3b75713fe8f2a76979de9821fbbde2909f5a19.png)

---

<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 22, 2021, 12:46pm UTC](https://forum.inductiveautomation.com/t/synthax-proof-reading-for-if-statement-on-integer-type/49081/2 "2021-07-22T12:46:57Z")

</div>

You are comparing to a string, because you quoted the digit. You also are using `==`, which isn’t appropriate in expressions. (Python uses that.)

Also, you can’t make assignments in an expression, so your trailing use of `value` won’t do what you think. Finally, any comparison yields a boolean, so you don’t need the `if()` expression function at all. Just use this:

```auto
{Root Container.UDT_Instance::status.status} = 5

```

---

<div class="post-metadata">

**Author:** ![trishadx](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@trishadx](https://forum.inductiveautomation.com/u/trishadx)\
**Post date:** [July 22, 2021, 3:09pm UTC](https://forum.inductiveautomation.com/t/synthax-proof-reading-for-if-statement-on-integer-type/49081/3 "2021-07-22T15:09:06Z")

</div>

I see!  
Thank you!
