Service Catalog form - Make a field mandatory


I have a form on a Service Catalog form that was developed by someone else. I am making changes to the form and one change is to make a reference field mandatory. I check the "mandatory" box but the field does not change to mandatory. Any other solutions for this issue?


Just a quick note here:

Just a quick note here: Scripts or UI policies are not running in the forms on the background, while the checkbox still works when the variables become visible in the back.

For instance, you have an item for user creation and modification. On creation, a first and last name are mandatory. On modification, a reference to the sys_user table field is made mandatory. If creation is selected, the modification fields are removed from vision and vice versa.

The reference field should only be mandatory when dropdown is modification. You have multiple options:
1. Write a client script, that makes the field mandatory onChange/onSubmit.
2. Create a UI policy, that sets the field to mandatory, when the condition is met.
3. Set the checkbox on the variable itself, and make it not-mandatory with Client script/Ui policy when modification is not selected.

Client scripts and UI policies both work only on the front-end (the service catalog form) while the checkbox also works on the back-end. So in situation 3, your field is mandatory on the back-end, even if the dropdown is not set to modification, making it impossible for the handler of the request to make any changes to the forms, unless the field is filled.

Assuming that in most cases, handlers of tickets at the back-end will not be required to fill out the forms' variables, it is often better to use policies or client scripts to make fields mandatory on forms, instead of using the mandatory checkbox.

Regards,

Wesley

ServiceNow Partner

It's hard to say for sure

It's hard to say for sure with that much detail. A couple of screenshots might help if you can attach them here. You should also check any catalog UI policies or catalog client scripts running against that catalog item (or its variable sets) to see if they are setting mandatory on the variable in any way.

__________________

Mark Stanger | Cofounder/Chief Architect
CrossFuze
SNCGuru.com
Follow me on Twitter
SNCGuru Facebook Page
Linkedin Profile

Contact Us to discuss how we can help make your ServiceNow project a success!

ServiceNow Partner

thank you, it was in a

thank you, it was in a catalog client script. i am a newbie catalog administrator and not from the technical side so thanks for pointing me in that direction.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.