How to make field mandatory in form and LIST View as well.

vinod9
Tera Expert

Hello Team,

 

I have requirement when state == Inuse and substate == non then location has to be mandatory in form and also list view.
How can I do it using client script or UI policy? Please help.

 

@Gunjan Kiratkar 
@Mohith Devatte 

3 REPLIES 3

RaghavSh
Kilo Patron

Client script and UI policy will work only on form view.

You need to create data policy, it will work on both form and list.


Raghav
MVP 2023

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @vinod9 ,

Create Data policy in that case.

UI policy only works on client side and that on form. If you go with client script then you will have to create 2 client script one is onload and other one is oncellEdit.

Better approach is data policy as below. Use proper condition and field.

GunjanKiratkar_0-1670936719096.png

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

SuhasPSalunkhe
Kilo Guru

Create data policy instead od UI policy or client script.

 

Go with data policy its a good and best way