- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 08:51 PM
how to show/hide a variable set on change of selection of radio buttons (multiple choice type variable ) on a record producer? can someone help me with the script
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 09:15 PM
You can have catalog client script onChange of that multiple choice variable
sample script below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'your radio button value'){
g_form.setDisplay('variableSetName', false);
}
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 09:04 PM
Hello,
write a onChange client script or Ui Policy.
ui policy:
check box field is true
make visibility of those fields true.
client script:
if (g_form.getValue('checkbox_field') =='true'){
g_form.setDisplay('variable_name',true);
else{
g_form.setDisplay('variable_name',true);
}
Please Mark it as Helpful/Correct if it Helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 09:09 PM
You can use Catalog UI Policy with no code configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 09:15 PM
You can have catalog client script onChange of that multiple choice variable
sample script below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'your radio button value'){
g_form.setDisplay('variableSetName', false);
}
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2021 11:42 PM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader