# Multi State Indicator

**URL:** <https://forum.inductiveautomation.com/t/multi-state-indicator/5526>\
**Category:** Ignition\
**Created:** [December 4, 2012, 5:32pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526 "2012-12-04T17:32:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cacordova](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@cacordova](https://forum.inductiveautomation.com/u/cacordova)\
**Post date:** [December 4, 2012, 5:32pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/1 "2012-12-04T17:32:10Z")

</div>

I have 2 states for one multi-state indicator, when the value changed i want it to change to that second style how do i do that?

thanks

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [December 4, 2012, 5:40pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/2 "2012-12-04T17:40:21Z")

</div>

Using the customizer should allow you to properly change what the selected and unselected styles are for each state. You can access this by double clicking the component, or right-clicking the component and selecting “multi-state button customizer”.

---

<div class="post-metadata">

**Author:** ![cacordova](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@cacordova](https://forum.inductiveautomation.com/u/cacordova)\
**Post date:** [December 4, 2012, 5:50pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/3 "2012-12-04T17:50:01Z")

</div>

What i mean is by code. I already have 2 styles for the multi-state indicator. One is on and the other is off. What I want to happen is that when the value is greater than 0 the multi-state indicator will change to the second style which is On

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [December 4, 2012, 6:55pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/4 "2012-12-04T18:55:09Z")

</div>

How many states do you have for this tag? Is it too many to be entered individually?

---

<div class="post-metadata">

**Author:** ![cacordova](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@cacordova](https://forum.inductiveautomation.com/u/cacordova)\
**Post date:** [December 4, 2012, 9:26pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/5 "2012-12-04T21:26:22Z")

</div>

i have 1 state for this tag and 2 styles one is if the tag is equal to 0 and one is if the tag is greater than 0.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [December 4, 2012, 10:49pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/6 "2012-12-04T22:49:42Z")

</div>

I guess I should’ve been clearer with the question, what is the range of possible tag values? Is it 0 to infinity? Or is there a finite upper bound?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 5, 2012, 1:56am UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/7 "2012-12-05T01:56:21Z")

</div>

I see. All you need to do is bind the state property to an expression like this:`if({Path/To/Tag} > 0, 1, 0)`Of course replace the {Path/To/Tag} with your tag path.

---

<div class="post-metadata">

**Author:** ![cacordova](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@cacordova](https://forum.inductiveautomation.com/u/cacordova)\
**Post date:** [December 6, 2012, 4:43pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/8 "2012-12-06T16:43:12Z")

</div>

yes i guess you can say that the value of the tags can be infinite i guess that’s why what i did was greater than 0.

```auto
if({Path/To/Tag} > 0, 1, 0)
```

what is 0,1,0?

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [December 6, 2012, 7:38pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/9 "2012-12-06T19:38:35Z")

</div>

```auto
if({Path/To/Tag} > 0, 1, 0)
```

They're parts of the parameters of the if function. The first is the condition that checks if the tag value is greater than 0. The next returns a 1 if the condition is true. The final 0 returns the value of zero if the condition is not true.

> [@cacordova](#):
>
> what is 0,1,0?

---

<div class="post-metadata">

**Author:** ![cacordova](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@cacordova](https://forum.inductiveautomation.com/u/cacordova)\
**Post date:** [December 13, 2012, 5:02pm UTC](https://forum.inductiveautomation.com/t/multi-state-indicator/5526/10 "2012-12-13T17:02:34Z")

</div>

oh ok. got it thanks 🙂
