Hide / show fields on record producer

Jess Larsen1
Tera Expert

Hi.

 

IĀ“m trying to make a record producer where the users can check a field and then and only if that checkbox is marked then it should show more options / fields. 

If the checkbox "create wish" is choosen then it should show the next 3 fields that only has something to do with that.

Hope someone can help.

 

Best regards

Jess

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Jess Larsen 

For simpler logic such as variable readonly, visibility and mandatory you can use Catalog UI Policies.

For complex logic use onChange client script

Service catalog UI policy

Create a Service Catalog client script

Regards
Ankur

View solution in original post

6 REPLIES 6

Pranav Bhagat
Kilo Sage

Did you tried Catalog UI Policies.

You have to create a UI Policy on the create wish on variable.

 

Example

find_real_file.png

 

Reference Document

https://docs.servicenow.com/bundle/newyork-it-service-management/page/product/service-catalog-management/task/t_CreatUIPolicyForSvcCalgIt.html#t_CreatUIPolicyForSvcCalgIt

 

Regards

Pranav

Ankur Bawiskar
Tera Patron

@Jess Larsen 

For simpler logic such as variable readonly, visibility and mandatory you can use Catalog UI Policies.

For complex logic use onChange client script

Service catalog UI policy

Create a Service Catalog client script

Regards
Ankur

@Ankur Bawiskar 

 

I have tried to use the Catalog UI policy but it does not seem to work regardless of what settings i choose. I have in this poast the settings that I am currently testing, but when checking the box in the record producer item it“s not showing the fields:

I hope you can guide me in the right direction or help me to figure out what I am missing. 

I was trying the catalog UI policy before your post but thought I was looking in the wrong place since nothing works. 

 

Best Regards

Jess

Hi,

condition looks fine.

Are you using the correct variable name in the UI policy action

Regards
Ankur