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

Using variable sets in a Catalog Task

Carl Murray
Mega Expert

Has anyone been able to develop a way to create variable sets in a Catalog item, then in task, pull just that variable set?

So if I have 3 predefined tasks for 3 groups, I want to be able to quickly tell the system to show the variable set I create for that group's task, rather than removing all the variables, then adding in the needed ones one by one.

9 REPLIES 9

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Carl,



You can show or hide the complete variable set(as per your logic) via Catalog UI policy.


Please let me know if you have any questions.


Pradeep,



I understand adding a UI Policy that can make entire variable sets visible only on Tasks and Requested Items. But what I am trying to do it have the following:



Variable Set A - Visible on Catalog Task A, not visible on Task B


Variable Set B - Visible on Catalog Task B, not visible on Task A


Thanks for the details Carl. This can be done via Client script/UI policy if you have a unique way to identify Task A/ Task B at script level.


Pradeep,



Still new to ServiceNow. Not sure what to put in a client script for this or the UI policy. I know your can call variables with current.variables.name, but not sure how you can do that with variable sets. Any info or examples would be wonderful.