How to make a field mandatory on a form?

waseemahmed
Kilo Explorer

Hi Community!

I am new to ServiceNow. please help me in understanding this.

Regards

Waseem Ahmed

3 REPLIES 3

Mark Stanger
Giga Sage

There are a couple of ways to do this, but the best, most flexible approach is UI policies.   They allow you to evaluate certain conditions and then make fields readonly, mandatory, or visible based on those conditions.   Here's a documentation link.



Creating a UI Policy - ServiceNow Wiki


swamyk
Mega Expert

Hi Mr.Waseem,


If you want to make the field mandatory for a particular condition you should go for UI policies like Mr Mark said.


another way of making the field permanently mandatory is


go the form(incident,change or problem)


Right click on the particular field which you want to make mandatory, click on "configure dictionary"


There you can see the check boxes for making field "mandatory","read only" or "Display".


just select the mandatory check-box and click on "update".


then that will mandatory at every time.



Regards,


KKSwamy.


Mike Allen
Mega Sage

You could also use client script, with g_form.setMandatory('field_name'); or, with my personal favorite, data policies that are converted to UI Policies, but I'm an absolutists, and only siths deal in absolutes.