Make locations visible only when external is selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 01:39 AM
Hi
How to create a location field that will be displayed only when the external option is selected in the contract type field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 01:41 AM
Hi @New user1212
Create a UI Policy. Condition Contract type is not external. UI Policy Action Location Visible True
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 02:04 AM
you need to have a location field and then use UI policy or onChange client script.
what did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 02:18 AM
Hi @New user1212,
You can use UI policy for this.
P/s: You can not hide a mandatory field. Please make sure that you set its madatory to false before make it disapear. 😊
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 03:57 AM
Hi,
Its always recommended to prefer UI policy over client scripts.
However, please create an UI policy with condition Contract type= External and 'save' it.
After that you can create one UI policy action under same UI policy for 'location' field and put Visible=true. That's it! you're good now.