How to make label field mandatory-catalog form.

Community Alums
Not applicable

Hi,

We have a requirement to create the Label Variable and under it, there are multiple checkboxes.


We don't want the checkbox to become mandatory instead we want the label variable.The requirement is to make the label as mandatory instead of each checkbox.

Please help with your suggestions.

Regards,

Rafmine.

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Not sure about the question. Label do not have input so label itself can't not be made mandatory. If the question is to just put a red asterisk to the front of the label, just follow Akif's advice. Making the first checkbox field under the label mandatory will put the red asterisk on the label and make at least one checkbox selection mandatory (not necessary just the first checkbox).

For example, I've defined 3 checkboxes underneath a label.

find_real_file.png

Created a UI Policy to set the first check box mandatory.

find_real_file.png

This will result in putting a red asterisk next to the label and make at least on select mandatory.

find_real_file.png

When at least one checkbox is checked, the asterisk becomes black to indicate the mandatory condition has been satisfied (note that it does not have to be the check box set mandatory by the UI Policy).

find_real_file.png

 

View solution in original post

9 REPLIES 9

It worked by making one of the checkbox as "selection required"

Hitoshi Ozawa
Giga Sage
Giga Sage

Not sure about the question. Label do not have input so label itself can't not be made mandatory. If the question is to just put a red asterisk to the front of the label, just follow Akif's advice. Making the first checkbox field under the label mandatory will put the red asterisk on the label and make at least one checkbox selection mandatory (not necessary just the first checkbox).

For example, I've defined 3 checkboxes underneath a label.

find_real_file.png

Created a UI Policy to set the first check box mandatory.

find_real_file.png

This will result in putting a red asterisk next to the label and make at least on select mandatory.

find_real_file.png

When at least one checkbox is checked, the asterisk becomes black to indicate the mandatory condition has been satisfied (note that it does not have to be the check box set mandatory by the UI Policy).

find_real_file.png

 

Community Alums
Not applicable

Thank-you Ozawa

Ankur Bawiskar
Tera Patron
Tera Patron

@Rafmine 

Glad that you found the approach.

Did you mistakenly mark other answer as correct?

As I see same approach/solution was provided first from @Akif Shah and then by me.

You can only mark 1 response as correct.

So please mark the appropriate response as correct.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Waldo Lavaut
Tera Contributor

@Hitoshi Ozawa hi there, thanks for the superb detailed response. I just learned I don't need any catalog client script to do this by applying this "trick"...

 

Is this part of the ServiceNow documentation?