# Rookie Question-Animation multi state

**URL:** <https://forum.inductiveautomation.com/t/rookie-question-animation-multi-state/11477>\
**Category:** Ignition\
**Created:** [April 6, 2016, 5:49pm UTC](https://forum.inductiveautomation.com/t/rookie-question-animation-multi-state/11477 "2016-04-06T17:49:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellcap](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@ellcap](https://forum.inductiveautomation.com/u/ellcap)\
**Post date:** [April 6, 2016, 5:49pm UTC](https://forum.inductiveautomation.com/t/rookie-question-animation-multi-state/11477/1 "2016-04-06T17:49:45Z")

</div>

new to igntion, no to hmi in general.

Created UDT for an analog data type. It has 4 Alarms, generated from the PLC, in it’s structure. (H,HH,L,LL)

Using the NumericLabel component, I want turn foreground color yellow on L/H, red on LL/HH and leave it black when none are true.

I tired creating a Custom Property of AlarmState, I used 3 states for black/yellow/red.

I wanted  
if HH|LL, 1 elseif H|L, 2 else 0.

But I can’t use the expression editor to return 3 different values based 3 different evaluations. I’m sure there is a more slick way to do this.

Thanks in advance for any advice.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [April 6, 2016, 5:56pm UTC](https://forum.inductiveautomation.com/t/rookie-question-animation-multi-state/11477/2 "2016-04-06T17:56:40Z")

</div>

Bind your AlarmState property to expression:

`if(HH||LL,
1,
if(H||L,
2,
0))`
