- 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
‎01-11-2023 11:39 PM
Really helpful. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
THIS is what I needed. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 11:03 PM
I know that. But that is not what I am asking. I have several such groups of label+checkboxes:
Label A
Box 1
Box 2
Box 3
Label B
Box 4
Box 5
Label C
Box 6
Box 7
I want to enforce at least one of the boxes 1-7 to be checked, regardless of which group it's in. If Box 7 is ticked, ticket can be submitted, even if none of the boxes under Label A or Label B are checked.
- 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-08-2022 12:04 AM
You can follow the approach suggested by
Thanks and regards,
Kartik