Will changing the question in a variable set, change question everywhere?

snow_beginner
Mega Guru

Hello,

I have story requirement to change the questions on a catalog item from for example 'What is your name?' to 'Name'.

Thing is I have noticed that there are no variables in the catalog item, but all the questions are coming from a variable set. If I change the question in there, I am assuming it will get changed everywhere the variable set is used. Is there a way around this, that it only changes in the catalog item mentioned. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@snow_beginner 

As mentioned by other members it would impact other catalog items as well where that variable set is used.

One workaround would be to use onLoad catalog client script on your catalog item only and change the label for your respective variables

I had shared solution on how to change the label 1 year ago and it works well for both Native + Portal

Remember it uses DOM manipulation which is not recommended.

Change label for catalog variable

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Yes, it will affect everywhere, you can hide using client script DOM manipulation but it is not recommended so you can hide that variable only for that item by writing simple UI policy whereas you can create new variable only for that Item. make sense ?

Please hit like and mark my response as correct if that helps

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

SumanthDosapati
Mega Sage
Mega Sage

Hi,

Yes. If you change in variable set then it will be affected in all catalog items that are using variable set.

If you want for particular item then only option is to have new variable as 'Name' at catalog item level and hide the 'What is your name' variable only for that catalog item.

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth

Feel free to reach out if you have further questions or else you can mark an answer as correct and helpful to close the thread so that it benefits future visitors also.

Regards,
Sumanth

Ankur Bawiskar
Tera Patron
Tera Patron

@snow_beginner 

As mentioned by other members it would impact other catalog items as well where that variable set is used.

One workaround would be to use onLoad catalog client script on your catalog item only and change the label for your respective variables

I had shared solution on how to change the label 1 year ago and it works well for both Native + Portal

Remember it uses DOM manipulation which is not recommended.

Change label for catalog variable

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader