How can I replace multiple variables with one variable set for multiple catalog items?

Guna Shalini
Tera Contributor

There are multiple variables with the name 'comment' or 'comments' and every variable has been created under different catalog items. I could see 332 variables under the same name. I need to replace all these variables with one variable set under the name comments. Please help regarding this.

7 REPLIES 7

Are there any shortcuts for adding a variable set to multiple items?

Saurav11
Kilo Patron
Kilo Patron

Hello,

If you want to add one variable set to multiple catalog items please follow the below thread:-

https://community.servicenow.com/community?id=community_question&sys_id=772f7beadb7d98107d3e02d5ca9619b7

Please mark answer correct/helpful based on Impact.

shloke04
Kilo Patron

Hi,

Please find the steps below to achieve your requirement:

1) You can create a Variable Set as mentioned by others as well in the forum. 

2) Once the Variable set has been created, under Catalog Item Related List click on Edit and add all the catalog item on which you want to add this variable to.

find_real_file.png

Note: You need to be mindful before doing this activity would suggest to find out all the Scripts or UI Policy or any server component which you have written using these two variables. Because you need to replace back the new Variable which you will be creating in these scripts as it will fail and cause issues.

To help you find the scripts where you may have used the existing comment or comments variable, type in "sys_metadata.LIST" in Application Navigator search as shown below:

find_real_file.png

Now search in the box shown in Red below with text as "comment" or "comments" as shown below:

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke