UI Builder Clear a Radio Button Set

Velma
Tera Guru

How can one clear a radio button set in UI Builder? Now that I've learned that populating the blank Identifier property leads to the radio UI basically working (not giving the appearance of multi-selecting), I need to clear the radio when the record changes or reset it to its initial state (which in my case is nothing selected), presumably in client script or through data binding. Nothing I've tried so far has worked. Nor have searches brought up anything. I suspect this might again related to the Identifier, but although I read something about these somewhere sometime, I can't find anything through Search or skimming. What is the Identifier for and how do you use it? Anybody have a link?

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Have you tried binding a client state parameter to the value property for that component (assuming it has one) and then clearing out the CSP?

Thanks. Yes. I have tried that. I think (not 100%) it again clears the value underlying, but is not clearing the UI. That's why I think I have to use the Identifier somehow, but I don't know how. I can't use refresh directly on a component can I, other than Containers and List components? (In case it would show as cleared if I could refresh it after modifying the CSP--but that should not be necessary I would think.) 

Okay, I did more testing, @Brad Tilton . It seems that binding a CSP to Selected option doesn't work at all in my world. It says Number or String--neither of these works, not just for clearing, for anything. Component documentation shows a "manageValue" property to manage the value in code (as I understand it), but I don't have that property or it is not visible--could be it's just available via the API. I think I have to give up on the radio and see what I can do with creating a single select checkbox set or toggle button set.

Velma
Tera Guru

I am unable to get the radio buttons to data bind at all. I deleted them and built a single-select checkbox group--three checkboxes, a client state parameter bound to each, a fourth client state parameter holding the currently selected for easy reference, a handled event setting all of them depending what is checked or unchecked. It all works fine. Seems absurd. But moving on.