# \[Bug-12928 Bug-13541\]Perspective Radio Group works in designer but not at runtime

**URL:** <https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907>\
**Category:** Ignition Early Access\
**Created:** [February 27, 2019, 5:57am UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907 "2019-02-27T05:57:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [February 27, 2019, 5:57am UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/1 "2019-02-27T05:57:34Z")

</div>

I have created a simple radio group in perspective, which has two radio options: Hz and %. I want to use it to toggle a boolean tag on and off; on when Hz is selected and off when % is selected. So, I’ve created my two radios, and bidirectionally bound the “selected” property of the Hz radio to the Boolean tag. When I test in the designer, it works as expected - select Hz and the tag turns on; select % and the tag turns off.

At runtime, though (have tried launching a perspective web session through designer, and running on an iPad through the app), when I select either option, it deselects both radios and writes a null value to the bound tag.

Am I doing something wrong? Should this be working?

---

<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 27, 2019, 3:25pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/2 "2019-02-27T15:25:41Z")

</div>

Ah, you’ve found a hidden danger of binding to a property which doesn’t drive a component!

Here’s the issue:  
A Radio Group is driven by the selected index, or value; when one index is selected, all other values are set to “not selected”. But the first rule of a Radio Group is SOMETHING MUST ALWAYS BE SELECTED.

Now, when you bi-directionally bind a Radio Group index’s `selected` property to an external factor, you’re violating the rules of the component, because the moment you set that selected property to False, then the Radio Group has no current selection.

Instead of binding to RadioGroup.radio[x].selected, you should bind against either props.value or props.index.

Try setting the “Hz” index to have a value of “true” and the “%” index to have a value of “false”, and then make your bi-directional binding against props.value; this should be the easiest solution.

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [February 27, 2019, 9:47pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/3 "2019-02-27T21:47:32Z")

</div>

I tried that approach as well - that works even less! When testing in designer, the radio appears to toggle correctly, but whenever I select an index which has a value of `false`, props.value becomes null. If I change it to anything other than false, props.value mirrors the value - e.g. if I make it true, or a text string, or a number - but false seems to break it.

At runtime, it either refuses to select one radio option, or deselects them both.

---

<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 28, 2019, 3:08pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/4 "2019-02-28T15:08:54Z")

</div>

For what its worth, the solution I provided _should_ work… It just doesn’t. I’m opening an internal ticket because it seems like we are either not “writing” to Radio groups when a binding on their value or index changes, or we are writing but failing to take action.

The reason it “works” in just a Designer (no open Session) is because the value of the Radio Group changes, which updates the tag, which then has to take no action on the Radio Group because the value is already correct. As soon as a second instance of the bound Radio Group is introduced, the “write” to the second Radio group fails, and it short-circuits the bindings because one tag is now bound to two different values.

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [April 10, 2019, 9:29pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/5 "2019-04-10T21:29:46Z")

</div>

This issue was fixed in the build uploaded today (4/10).

Normally we have the nightly builds accessible via [https://inductiveautomation.com/downloads/ignition](https://inductiveautomation.com/downloads/ignition), but in the meantime you can find it via this post:  
[8.0.1 Nightlies - Temporary Place to Download the Latest Builds](http://forum.inductiveautomation.com/t/8-0-1-nightlies-temporary-place-to-download-the-latest-builds/24014/2)

Let us know if you have any issues.

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [April 11, 2019, 2:37am UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/6 "2019-04-11T02:37:05Z")

</div>

Still seems to be having the same issue for me? If I select either radio button, the tag bound bidirectionally to the “value” connection is set to null.

edit: I re-created the object and it’s _mostly_ working now. Switching between states at runtime results in the bound tag toggling between true and false. If I directly manipulate the tag from false to true, the radio group updates. But if I directly manipulate the tag from true to false, the radio group doesn’t update.

---

<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:** [April 11, 2019, 6:16pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/7 "2019-04-11T18:16:41Z")

</div>

You are right, it looks like the bidirectional binding with a radio group doesn’t like when the tag goes to a value of false on its own. It looks like it also affects numeric tags that change their value to 0. I’ll create a new ticket to get this fixed.

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [April 24, 2019, 3:47pm UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/8 "2019-04-24T15:47:45Z")

</div>

Hi @ASF,

The second ticket mentioned by Oscar has been fixed in the 8.0.1-rc1 that was uploaded yesterday (4/23).

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [May 3, 2019, 6:09am UTC](https://forum.inductiveautomation.com/t/bug-12928-bug-13541-perspective-radio-group-works-in-designer-but-not-at-runtime/22907/9 "2019-05-03T06:09:14Z")

</div>

Thanks, yes, it’s working correctly now.
