How to dynamically change the label of the catalog variable in Newyork version

Sam154
Giga Contributor

In Catalog Item , I have a Label type variable  "For Details , Contact XYZ" , This label should get changed dynamically based on the selection of entitlement reveiwer field.

I have tried using the below :

1.setLabelOf ('Variable,value)

2. gel('label_IO:' + variableSysID).childNodes[0].childNodes[1].innerHTML = 'My new Label Text Here" 

But nothing is working, Please provide solution to achieve this.

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hi, try using something like the following code in a catalog client script. Please note that you will need to add in there the sysid of you variable.

variableSysID = 'variable sys_Id';

gel('label_IO:' + variableSysID).childNodes[0].childNodes[1].innerHTML = 'My new Label Text Here';

Note : Make sure you Unchecked ISOLATED SCRIPT Checkbox. If its not available on the form then add it to form and do it or you can uncheck it from list view as well.

find_real_file.png

 For more details on it :Isolate Script in London

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

 

Thank you,
Abhishek Gardade

View solution in original post

2 REPLIES 2

AbhishekGardade
Giga Sage

Hi, try using something like the following code in a catalog client script. Please note that you will need to add in there the sysid of you variable.

variableSysID = 'variable sys_Id';

gel('label_IO:' + variableSysID).childNodes[0].childNodes[1].innerHTML = 'My new Label Text Here';

Note : Make sure you Unchecked ISOLATED SCRIPT Checkbox. If its not available on the form then add it to form and do it or you can uncheck it from list view as well.

find_real_file.png

 For more details on it :Isolate Script in London

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

 

Thank you,
Abhishek Gardade

Any updates on this? Can you mark as correct answer and close this thread?

Thanks!
Abhishek Gardade
Hexaware Technologies

 

Thank you,
Abhishek Gardade