Hide uncheck checkboxes inside a multi row variable set
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello ,
I have a multi row variable set that has check boxes that represent canada provinces, but when only once province is selected the unselected ones show as false. Is there a script to use to hide the false values in the portal and in the back end as well?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Hi,
Multi row variable set is accessible as JSON string. You can create onchange catalog client script and update the field. Refer the sample code
var mrvs = JSON.parse(g_form.getValue('mrvs_variable_set'));
// Replace mrvs_variable_set with actual variable set name
for (var i = 0; i < mrvs.length; i++) {
mrvs[i].hide=false; // replace hide with actual variable
}
g_form.getValue('mrvs_variable_set',mrvs);
// Replace mrvs_variable_set with actual variable set name
Even in backend you multi row variable set is store as JSON. You can follow similar script to update the mrvs_variable_set
Thank you,
Palani
Palani
