# Multi State Button controlling to separate boolean tags

**URL:** <https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 28, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524 "2024-02-28T16:09:58Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 2, 2024, 9:51am UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/21 "2024-03-02T09:51:39Z")

</div>

Project Browser | right-click on the component | Configure Events | onActionPerformed.

---

<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:** [March 2, 2024, 2:23pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/22 "2024-03-02T14:23:28Z")

</div>

With my recommended approach, there would be no script.

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/23 "2024-03-02T15:13:20Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/354412d4fa95b33d66c54c58b35149b19ab3586d.png)  
here is the script. It's built in to the button. when i turn it off the error goes away, but then then the binding stops working and the button becomes momentary. the control value changes but then defaults back to 0 and there is no change of state on the tag.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 2, 2024, 3:50pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/24 "2024-03-02T15:50:48Z")

</div>

Your code does nothing. You've referenced some application properties but haven't set their values.

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 3:52pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/25 "2024-03-02T15:52:30Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e892f4e664294a3ae0bb90e0ad094a6d96d70a79.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e45a373ffa7c1f25ab987caf1fffa8e9a2c38410.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/29e9d8abda2e04b1a79b349be70fd9ad18b6dce1.png)  
I add to the code and the error went away, but now it giving me a configuration error on the tag.

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 3:54pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/26 "2024-03-02T15:54:08Z")

</div>

the code came from Designer, it is part of the multi state button

---

<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:** [March 2, 2024, 4:01pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/27 "2024-03-02T16:01:11Z")

</div>

Delete the script and delete the custom properties. They are not needed for the standard use of this component with an integer control value and matching indicator value.

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 4:33pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/28 "2024-03-02T16:33:24Z")

</div>

all errors have gone away, but the switch is operating as a momentary switch and the values are not changing on D1500 of the indicator value. I'm assuming because the value is not holding on the control value. Thank for the help by the way.

---

<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:** [March 2, 2024, 5:11pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/29 "2024-03-02T17:11:15Z")

</div>

Did you make the control value tag binding bidirectional?

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 5:13pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/30 "2024-03-02T17:13:12Z")

</div>

yes

---

<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:** [March 2, 2024, 5:21pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/31 "2024-03-02T17:21:45Z")

</div>

Is there any PLC code that can overwrite D1500?

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 6:03pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/32 "2024-03-02T18:03:02Z")

</div>

Found it, the button is functioning correctly now. Thanks again.

---

<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:** [March 2, 2024, 6:24pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/33 "2024-03-02T18:24:27Z")

</div>

> [@Lance\_Moore](#):
>
> Found it

Share the solution for others' benefit. Or mark the advice above that most helped you solve it.

---

<div class="post-metadata">

**Author:** ![Lance\_Moore](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@Lance\_Moore](https://forum.inductiveautomation.com/u/Lance_Moore)\
**Post date:** [March 2, 2024, 6:25pm UTC](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524/34 "2024-03-02T18:25:21Z")

</div>

Will do

[Previous page](https://forum.inductiveautomation.com/t/multi-state-button-controlling-to-separate-boolean-tags/86524.md?page=1)
