# Assigning integer values in an expression

**URL:** <https://forum.inductiveautomation.com/t/assigning-integer-values-in-an-expression/10620>\
**Category:** Ignition\
**Created:** [October 14, 2015, 1:25am UTC](https://forum.inductiveautomation.com/t/assigning-integer-values-in-an-expression/10620 "2015-10-14T01:25:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [October 14, 2015, 1:25am UTC](https://forum.inductiveautomation.com/t/assigning-integer-values-in-an-expression/10620/1 "2015-10-14T01:25:00Z")

</div>

Hi

I made a custom property in my root container. To simplify I want to change the value of the custom property to either 1 or 2:

({tag1} = 1) = 1  
({tag2} = 1) = 2

This is how I wrote it, but it doesn’t like it. Throws errors no matter what I try to change the syntax

What am I doing wrong? It’s probably something simple but has evaded me for days.

({LS2/Alarms/HLF\_ALM} || {LS2/Alarms/PWR\_ALM} || {LS2/Alarms/LSH\_ALM} || {LS2/Alarms/LSL\_ALM} || {LS2/Alarms/LSS\_ALM} || {LS2/Alarms/P1\_FAIL} || {LS2/Alarms/P2\_FAIL} || {LS2/Alarms/PHS\_ALM} || {LS2/Alarms/PWR\_ALM} = 1) = 1  
{LS2/Alarms/P2\_FAIL.AlarmActiveAckCount} \> 0 = 2

This is really how I wrote it. It accepts the first string of confundity but as soon as I throw in that last line it has a fit.

---

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [October 14, 2015, 1:51am UTC](https://forum.inductiveautomation.com/t/assigning-integer-values-in-an-expression/10620/2 "2015-10-14T01:51:21Z")

</div>

I tried this too and it didn’t work.  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5135d720981019dacfe8591dd04a849b7339f813.JPG)

---

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [October 14, 2015, 3:25am UTC](https://forum.inductiveautomation.com/t/assigning-integer-values-in-an-expression/10620/3 "2015-10-14T03:25:19Z")

</div>

if ({LS2/Alarms/P2\_FAIL.AlarmActiveUnackCount}, 1,  
if ({LS2/Alarms/P2\_FAIL.AlarmActiveAckCount}, 2, 0))

I got it!!! Nested if statement!
