- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2019 07:53 AM
Hello All,
I am trying to make label for check boxes mandatory. I have checked the mandatory check box for that field but it is not working on itil view but working on portal view. So I wrote a UI policy even it is working on Portal but not on ITIL view and so I wrote Client script even its the same. Does anyone know what might be the issue that stopping them triggering on ITIL view.
Portal view --
Itil view --
Regards,
Chipsy.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2019 08:00 AM
Hi,
To make a label mandatory above checkboxes you need to first add the label, choose no other setting.
Then add your checkboxes with an order to where they'd appear next to each other right under the label variable.
In the first checkbox that appears after label, check the "selection required" / "mandatory" box in the top-right corner of the variable settings.
Then....on your form, it will look like this:
then select one:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2019 08:04 AM
Hello Allen
You answer worked like a magic. But I want to know how come it is triggering in that way but not with scripts. Can you please explain.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2019 08:05 AM
Hi,
Unfortunately, without seeing your scripts and settings and such, I can't speak for that. My method uses no client script or UI policy. If you can share what you have specifically set and the associated script, we can take a peek.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2020 04:05 AM
Oh boy, thank you Allen.
Wish I had seen this post sooner than all the other so called 'solutions'. Could ve saved me 2 hours..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2021 07:13 AM
Hi Allen,
Would we be able to accomplish this if we used Macro with Label field?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2021 07:34 AM
Hi,
Yeah, this one is a tricky one.
So out of box there is no mandatory setting for macro with label field type variables. When you select this type of variable the mandatory checkbox that is normally seen on the variable settings page, disappears. If you override it and bring it back, and check the box, the asterisk, I believe will show, but it will not enforce that mandatory nature on submit.
If you try to use a UI Policy to make it mandatory, that macro with label field isn't even a valid selection.
If you try to use a client script to g_form.setMandatory on that variable, that too...doesn't work.
The only option left is to check that that field has a selection/value on submit via client script. Use this thread for working script as an example: https://community.servicenow.com/community?id=community_question&sys_id=32e1cba9db98dbc01dcaf3231f96...
Please mark reply as Helpful, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!