- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:07 PM
Hi, I have a field called 'Request classification' on the form which should be made Mandatory. It has two options 1)Prod 2) Non prod either one of those has to be selected and by default column will have none option. If form saved without filling either of the two options it should display an error message as 'Mandatory fields are not filled' and also should n't allow the user to save the record without selecting one option. How to achieve this..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:39 PM
Hello,
If you make a field mandatory using UI policy it will not allow the user to submit form without one of the option being selected.
Also on portal it will show an error message as below:-
On Native UI it will show an error message as below:-
Please mark my answer as correct based on Impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:18 PM
Hello,
Please Create a UI policy on the table.
And add Request Classification as mandatory in the UI policy action.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:34 PM
Thanks but another requirement is ....If form saved without filling either of the two options it should display an error message as 'Mandatory fields are not filled' and also should n't allow the user to save the record without selecting one option. How to apply this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:39 PM
Hello,
If you make a field mandatory using UI policy it will not allow the user to submit form without one of the option being selected.
Also on portal it will show an error message as below:-
On Native UI it will show an error message as below:-
Please mark my answer as correct based on Impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:22 PM
@GUSNOW13 Configure the dictionary and make the field mandatory. That will take care of all the scenarios you mentioned.
Right click on the field label on the form and click on 'Configure dictionary' and make the field mandatory by checking the mandatory checkbox
Please mark as correct answer if this helped you
ServiceNow Community Rising Star, Class of 2023