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

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?

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.

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.

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.

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


Any updates on this bug?

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