client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:18 AM
how to make short description field mandatory in table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:21 AM
Hello Soniya,
Write a onload script by adding below line of code to mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:22 AM
Hi you can use
g_form.setMandatory("short_description", true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:26 AM
Hello @PA001 ,
Please create a UI policy. Mark your conditions if any ang using its action make the field mandatory.
This is the standard practice.
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:38 AM - edited 08-25-2023 03:40 AM
Hello Soniya,
You can make field mandatory by
1. UI Policies : Adding UI Policy Action - Field Name + Mandatory is True
2. Data Policies : Adding Data Policy Rule - Field Name + Mandatory is True [Data Policy only works for server side]
3. By Client Script using below line of code :
g_form.setMandatory('short_description', true);
4. From Field dictionary, refer below ss and make True Mandatory field