Catalog UI Policy Struggle - Say Goodbye to Complex UI Policies

Chris Doernbra1
Tera Guru

Have you ever found yourself with a catalog item that has so many variables you have to expand your list to view to see them all? Some may argue that if your catalog item has too many variables you probably need to create a few catalog items but the reality is that it happens and is often necessary.

 

Quite possibly the biggest nightmare with these kind of catalog items is developing the UI policies along with the client scripts to ensure the end user sees the correct fields. Often times there are overlaps with what should and should not be shown. And how will the form behave when they change their selections?

 

If you are like me you have probably spent days tearing out your hair trying to get a catalog item UI to behave. Managing dozens of UI policy rules can be extremely challenging especially when you introduce client scripts on top of them. This solution aims to put an end to that experience. It uses a single onLoad catalog client script that contains a JSON object that holds UI configuration in 1 place. This makes it super easy to maintain and it's by far more flexible.

 

The video goes over the solution and the setup. I have also included the update set for your use. 

 

EDIT: Just a follow up on this. Though this solution works great on the catalog item view I found it to have issues post submission on the RITMs. It has trouble with variables that are not supposed to be shown. To get around this I used a solution in this article to hide variables which are not filled out. This is actually a win in general because it will hide information that fulfillers don't need. https://servicenowguru.com/client-scripts-scripting/hide-empty-variables-standard-form/

1 ACCEPTED SOLUTION

Not applicable

This is extremely helpful! Thanks for sharing.

View solution in original post

2 REPLIES 2

Not applicable

This is extremely helpful! Thanks for sharing.

Chris Doernbra1
Tera Guru

Just a follow up on this. Though this solution works great on the catalog item view I found it to have issues post submission on the RITMs. It has trouble with variables that are not supposed to be shown. To get around this I used a solution in this article to hide variables which are not filled out. This is actually a win in general because it will hide information that fulfillers don't need. https://servicenowguru.com/client-scripts-scripting/hide-empty-variables-standard-form/