How to change label value into catalog

Deepa12
Tera Expert

Hi,

 

When the response is Yes, the catalog item variable label should be change.

 

i have written catalog client script (onchange) to change label value 

g_form.setLabelOf('fieldname', 'newname');

 

But it didnt works, pls assist me to change label name dynamically.

 

 

6 REPLIES 6

Not applicable

Hi @Deepa12 ,

Can you drop the complete script ?

 

Not applicable

@Deepa12 

 

Plz Share the Script which you wrote

PavanK960672992
Mega Patron

Hi @Deepa12 ,

If  simple setLabelOf won't work the try below.

Try code on below URL.

https://servicenowguru.com/system-ui/ui-scripts-system-ui/modifying-label-form-fields-client-scripts...

Still if you have issue please share variable type for which you are trying.

 

Harish KM
Kilo Patron

Hello you may refer the below article. setLabelOf will not work for variable labels

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0758098