# Script on momentory button

**URL:** <https://forum.inductiveautomation.com/t/script-on-momentory-button/33651>\
**Category:** Ignition\
**Created:** [April 3, 2020, 5:05am UTC](https://forum.inductiveautomation.com/t/script-on-momentory-button/33651 "2020-04-03T05:05:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [April 3, 2020, 11:19am UTC](https://forum.inductiveautomation.com/t/script-on-momentory-button/33651/2 "2020-04-03T11:19:07Z")

</div>

Don't use a script. The momentary button drives it's `.controlValue` property, which you are expected to bidirectionally bind to the tag you want to control. In your case, with an indirect binding incorporating that tagpath property.

But beware, there are gotchas with momentary buttons in general, where you can lose the "off" operation. You generally need PLC code of some kind to mitigate this. See this topic and the linked topics within:

> [@HMI Momentary button Gets stuck with N/O Bit of PLC](http://forum.inductiveautomation.com/t/hmi-momentary-button-gets-stuck-with-n-o-bit-of-plc/21388/4):
>
> This thread, going back some years, is the most detailed discussion of the problem: Another thread on this issue – somewhat heated at points:

---

_[View the full topic](https://forum.inductiveautomation.com/t/script-on-momentory-button/33651)._
