- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2022 11:38 PM
I have a catalog item with multiple groups of label+checkboxes. Is there a way to make the user check at least one of the boxes in any of the groups? This is easy when we have only one group, but it is possible to make a UI policy that will work across the groups?
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 11:20 PM
Hi,
you will have to use onSubmit catalog client script and verify that
function onSubmit() {
var value1 = g_form.getValue('variable_1');
var value2 = g_form.getValue('variable_2');
var value3 = g_form.getValue('variable_3');
var value4 = g_form.getValue('variable_4');
var value5 = g_form.getValue('variable_5');
var value6 = g_form.getValue('variable_6');
var value7 = g_form.getValue('variable_7');
if(!value1 && !value2 && !value3 && !value3 && !value4 && !value5 && !value6 && !value7) {
g_form.addErrorMessage("Please select at least 1 variabel");
return false;
}
return true;
}
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
‎06-15-2022 09:42 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
‎06-16-2022 08:08 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
‎06-07-2022 11:06 PM
please create an on submit client script and use below script ,, make sure to replace the checkbox with your checkbox names
function onSubmit() {
var checkboxes = ['checkbox1', 'checkbox2', 'checkbox3', 'checkbox4'];
var isSelected = false;
for (var i = 0; i < checkboxes.length; i++) {
if (g_form.getValue(checkboxes[i]) == 'true') {
isSelected = true;
break;
}
}
if (isSelected == false) {
g_form.addErrorMessage('At least one checkbox is required');
return false;
}
}
This is tested in My instance and working.
Regards,
Vaishnavi Lathkar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 09:47 PM
Hey
Refer to below article and solution provided by
No scripting is required for this:
How to make a group of checkboxes mandatory
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 10:33 PM
Instead of using getValue(), use g_form.getBooleanValue().
getValue function returns string