Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Clear radio buttons

servicenow14710
Tera Expert

Hello developers, i need a suggestion . I have an implementation where i unselect radio buttons which are selected(I used multiple choice) without any default selection when another field requested for is changed.Img of radio buttons is attached.

 

Any help is appreciated, Thanks!

1 REPLY 1

Tai Vu
Kilo Patron
Kilo Patron

Hi @servicenow14710 

Let's have an OnChange Client Script on the requested for variable. And you can use the clearValue(String fieldName) to remove the selected option.

Sample.

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        g_form.clearValue('request_type');
        return;
    }

}

Screenshot 2024-01-25 at 21.41.26.png

 

Cheers,

Tai Vu