How to hide a field defined in a variable set in a service catalog

johannes5
Giga Expert

Hi ServiceNow Community Developers,

I have the following situation: I added a field in a variable set that is used by several items however I only want this field to be visible in one specific catalog item but right now its visible on all the catalog items. It looks like the UI policies that I am familiar with on incidents and other modules don't seem to apply the same way to the Service Catalog. Would you please advise as to what do I need to do in order to get this variable to display in the catalog item the way I want it to.

Thanks,

Johannes

1 ACCEPTED SOLUTION

Subhajit1
Giga Guru

The easiest and IMO, the correct way would be to remove this particular Variable from the Variable Set and add it to the list of variables on the Catalog Item on which you would like to see this.


Otherwise, you can write a OnLoad Catalog Client Script to hide the variable on each Catalog Item save the one in which you would like to see it.


View solution in original post

9 REPLIES 9

Subhajit1
Giga Guru

The easiest and IMO, the correct way would be to remove this particular Variable from the Variable Set and add it to the list of variables on the Catalog Item on which you would like to see this.


Otherwise, you can write a OnLoad Catalog Client Script to hide the variable on each Catalog Item save the one in which you would like to see it.


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Johannes,



You may find the below thread as helpful.


https://community.servicenow.com/thread/162949


johannes5
Giga Expert

Thanks guys for your advice, I removed the variable from the variable set and defined it as a standalone variable as Subhajit Das recommended. It's working fine.


Subhajit1
Giga Guru

bianca.vaccarini Could you please mark this as a Question.


Johannes Mweli Can you mark my response as the correct/helpful answer if that really helped you solve your issue.