Variable Set

dev_K
Tera Contributor

Hello!

 

 

I created a variable set that consist of 5 different variables that are often used in catalog items I create.

 

Now, I am working on a catalog item but this one only requires 4 from those 5 variables, so when add that varaiable set and then try to modify it by removing the unwanted variable, then this variable is removed from all the catalog items that use this variable set .

 

Can we somehow configure this that it is adapted only for a specific catalog items and does not affect others?

3 REPLIES 3

Maddysunil
Kilo Sage

@dev_K 

when you create a variable set and associate it with catalog items, any changes made to that variable set will reflect across all catalog items that use it. However, you can customize variable sets for specific catalog items without affecting others by following these steps:

  1. Duplicate the Variable Set: Create a duplicate of the original variable set. This duplicate will be customized for the specific catalog item.

  2. Modify the Duplicate: Remove the unwanted variable from the duplicated variable set. This modification will only affect the duplicated set, leaving the original set and other catalog items unchanged.

  3. Associate the Duplicate with the Specific Catalog Item: Associate the duplicated variable set with the catalog item that requires the modified set. This ensures that only this specific catalog item uses the customized variables.

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

jMarshal
Mega Sage
Mega Sage

Yes, you can @dev_K ! Use a UI Policy on the Variable Set to hide the specific variable that you don't want to see on that particular catalog item.

jMarshal_0-1713882160437.png


Set the condition where "item = <item name>" and add a UI Policy Action to hide the variable, but then "reverse on false" so that it will show for all other items.

jMarshal_0-1713880410358.png


UI Policies | ServiceNow Developers
Create a UI policy for catalog items (servicenow.com)
UI policies (servicenow.com)

AshishKM
Kilo Patron
Kilo Patron

Hi @dev_K

You can use catalog client scipt ( at catalog item level ) to set the visibility= false, this catalog item level update will not impact other catalog item form.

 

-Thanks,
AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution