set variable name in variable set based on catalog item

Shruti Chennuri
Tera Contributor

I have a variable set having one of the variables as 'Phone number'. This variable set is used in many catalog items. I have created a new catalog item where this variable set is used but for this particular variable i need to have a different name (for eg. Internal Phone Number). 

So I do not want to create a new variable but instead want to use same variable but with different name and annotation. 

Please help me out to find a suitable solution for this requirement. This is an urgent requirement.

Thanks 

4 REPLIES 4

Aman Kumar S
Kilo Patron

Hi @Shruti Chennuri ,

I don't believe that would be possible, you will need to create a new variable. or you can create a copy of the variable set and in the newly copied update the phone number field.

Best Regards
Aman Kumar

UjwalaBedarkar
Tera Expert

Hi @Shruti Chennuri ,

You can use OnLoad client script 

 

g_form.setLabelOf('your variable',"the label you want to set") ;

 

Feel free to mark correct, If I answered your query.

 

Hi Ujwala,

 

Thanks for quick reply. The above line of code is working. I want to change the help text also along with Label. Could you please suggest a way for the same.

 

Thank you

Ankur Bawiskar
Tera Patron
Tera Patron

@Shruti Chennuri 

you can change the label & use script shared by Ujwala

But you cannot set help text dynamically using script

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