# \[Bug-1929\]How to use on shot button for Boolean tag

**URL:** <https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 25, 2021, 6:14pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836 "2021-02-25T18:14:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 25, 2021, 6:14pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/1 "2021-02-25T18:14:37Z")

</div>

In 8.1.1 the value props no longer accept boolean tags and only accept the numeric tag.  
Even when I set the setValue to true after clicking on the button it writes back 1 on the value property so it can never go to writing state. I want like before when I click the button it writes whatever in setValue to value property.  
In 8.0 the button works as it should be but now in 8.1.x, this behavior doesn’t let me use this button for the boolean tag.  
Is any workaround for this?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 25, 2021, 7:24pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/2 "2021-02-25T19:24:04Z")

</div>

Is behavior breaking, or are you just seeing a schema warning in the property editor about an expected type?

While using 8.1.3 I had `props.setValue` as `false`, and when I clicked the One-Shot Button my value became `false` as expected.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 25, 2021, 7:51pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/3 "2021-02-25T19:51:05Z")

</div>

I use 8.1.1 and it’s schema warning. In my case when I click the button the value change to 1 first and after 2 sec it back to true. and interestingly while both setValue and value are the same value the writingState doesn’t show.  
If I press F5 again to go design mode the writingState work again but as soon as I go to preview mode it break.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/e/fe7cd19a556ef9c713c53b5b4272037568dab08e.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 25, 2021, 9:16pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/4 "2021-02-25T21:16:33Z")

</div>

Ah, okay, we found what’s happening. I’ve opened an internal ticket to get it fixed.

I have a workaround until the fix is in place, but it requires a removal of the binding:  
Switch from booleans back to using the `0`/`1` approach and instead of using a binding, use a change script to write to the tag in use.

```auto
system.tag.writeBlocking(['[<provider>]<tagPath>/<TagName>'], [currentValue.value])

```

---

<div class="post-metadata">

**Author:** ![jesusdeleon.rd](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesusdeleon.rd](https://forum.inductiveautomation.com/u/jesusdeleon.rd)\
**Post date:** [March 25, 2021, 10:11pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/5 "2021-03-25T22:11:24Z")

</div>

Hello,

Any updates on this bug?

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [March 25, 2021, 11:04pm UTC](https://forum.inductiveautomation.com/t/bug-1929-how-to-use-on-shot-button-for-boolean-tag/43836/6 "2021-03-25T23:04:41Z")

</div>

This fix for this bug will be included as part of the upcoming 8.1.4 release.
