Unable to hide one field on Catalog item form

deepikagang
Tera Contributor

Hi All,

There is one field with multiple options , It should not visible by default when form loads, It should only visible when someone selects "yes" as an option on another field.

deepikagang_0-1738594926071.png

I have tried creating Catalog UI policy and catalog Client script but still still it is showing by default on the form.

 

Thank you in advance for your help!

 

Thank you

Deepika 

12 REPLIES 12

Sandeep Rajput
Tera Patron
Tera Patron

@deepikagang Looks like either you have not configured your UI Policy correctly or this field is mandatory due to which it is visible all the time.

 

Please be informed that mandatory field on the form can't be hidden via a UI policy or a client script. 

 

Please share the screenshot of your UI Policy.

Hi @Sandeep Rajput 

Thank you for your response!
No its not mandatory field. Please see the UI policy and Client script:

deepikagang_0-1738645051505.png

deepikagang_1-1738645101533.png

Thanks

Deepika

Hi @deepikagang ,

Your UI policy looks good but you need to do both Visible and Mandatory as true. 

Then when the condition is met -
Mandatory and Visible will be true and user be able to see the field on form.

Reverse if false: helps to make Mandatory and Visible false - so that the field be hided on form.

Please try this and mark my response helpful it worked.


Thanks & Best Regards,
Koteswara Vara Prasad M

Hi @deepikagang ,

 

Two mistake are there in UI Policy.

 

First, Reverse if false Checkbox should be checked

2nd, While making field mandatory you can not hide the filed, so make visible true

 

RunjayPatel_0-1738646790058.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------