The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to hide/show fields in the incident record until certain conditions

Community Alums
Not applicable

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 

1 ACCEPTED SOLUTION

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!

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

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!

Community Alums
Not applicable

Okay, thank you for the advice. I apologize to ask another question but how would you write that properly? 

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!