I need to use radio buttons in a gallery to select a single item. I am wondering if this can work correctly. I have it set up as follows: I have given the items a collection with the respective row item. On the OnSelect of the radio button I set a variable with the selected item. If this variable is filled, the button is enabled for further clicks. Otherwise the button is disabled. The problem now is that although I get the variable filled properly, you can also unselect a checkbox by clicking around and then still click on the button because the variable with the item is logically still filled. I need to somehow check that none of the checkboxes in the gallery are filled and then clear the variable.
My idea would be to somehow check in the OnChange of the RadioButton whether the RadioButton has been deselected and then empty the variable. But this does not really work.
OnChange:
If(IsBlank(rbXXX.Selected.XXXX),
UpdateContext({locvarXXXX: Blank()}))
OnSelect:
UpdateContext({locvarXXXX: ThisItem});
Thank you