- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2015 05:44 AM
I want to change the label of the variable based on some conditions. The type of the Variable is :Label
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2015 11:32 AM
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 = '4183304f4f9b0200fbb73fb28110c75a';
gel('label_IO:' + variableSysID).childNodes[0].childNodes[1].innerHTML = 'My new Label Text Here';
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2015 10:15 AM
Have you considered creating a second label, then making the first label visible false and the new label visible true with a catalog ui policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2015 10:55 AM
Yes I thought of the same approach.
But I am looking for a solution which I can update the existing label instead of creating a new variable because I have so many conditions and for each condition the label should be different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2015 10:57 AM
Did you try setLabelOf(fieldname, label) else change it using DOM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2020 08:31 AM
This is best practice