How to make field mandatory in form and LIST View as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 04:52 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 04:54 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 05:05 AM
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.
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 07:02 AM
Create data policy instead od UI policy or client script.
Go with data policy its a good and best way