How to change the label of variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 11:11 PM
Hi Team,
I have already created one variable set "Information" , now I want to reuse the same variable set on another record producer but the label should be different.
Can anyone help here, how to change the label of variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 11:15 PM
Hi @PRAGHATIESH S,
please check below link:
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 11:22 PM
Hi @PRAGHATIESH S
try this:
(function() {
var variableSysID = '4183304f4f9b0200fbb73fb28110c75a'; // Your variable set sys_id
function changeVariableSetLabel(variableSysID, newLabel) {
var labelElement = gel('label_IO:' + variableSysID);
if (labelElement && labelElement.childNodes[0] && labelElement.childNodes[0].childNodes[1]) {
labelElement.childNodes[0].childNodes[1].innerHTML = newLabel;
}
}
var producerSysId = g_form.getUniqueValue();
if (producerSysId === 'your_record_producer_sys_id') { // Replace with your record producer sys_id
changeVariableSetLabel(variableSysID, 'My new Label Text Here');
}
})();
-----------------------------------------------------------------------------------
Please consider marking my reply as Helpful 👍and/or Accept Solution ✔️, if applicable. Thanks!