- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2023 07:39 AM
Hello team,
I've been trying the hide the Incident.approval field. I'm trying to have the field only populate when these condition are met. Would a UI policy or client script be best practice?
Category is Security
Subcategory is Risk assissment
Assignment group is Security
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2023 08:29 AM - edited ‎03-06-2023 08:30 AM
Hi,
Write what properly?
There is no code needed for a UI Policy. You create one via the related list on the record this is about, then build the condition(s), much like what you did in your original post, then at the bottom, in the UI Policy actions related list, create a new record there choosing the field involved and that you want to show it.
That's it 🙂
UI Policy documentation to assist: https://developer.servicenow.com/dev.do#!/learn/courses/tokyo/app_store_learnv2_scripting_tokyo_scri...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2023 07:54 AM
Hi,
"Populate" or show?
If it's determining when it should show, then yes, a UI Policy is where you'd want to begin.
Anything you can do with a UI Policy is first before ever going to Client Script.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2023 08:04 AM
Okay, thank you for the advice. I apologize to ask another question but how would you write that properly?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2023 08:29 AM - edited ‎03-06-2023 08:30 AM
Hi,
Write what properly?
There is no code needed for a UI Policy. You create one via the related list on the record this is about, then build the condition(s), much like what you did in your original post, then at the bottom, in the UI Policy actions related list, create a new record there choosing the field involved and that you want to show it.
That's it 🙂
UI Policy documentation to assist: https://developer.servicenow.com/dev.do#!/learn/courses/tokyo/app_store_learnv2_scripting_tokyo_scri...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!