How to auto populate value in multi row variable set row by row.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 01:54 AM
Hi,
For Example: In attached screenshot.There is a field "PUT Name" It have value Test, Test1, Test2. (It is a variable in catalog not MRVS).
There is another field name is "Task input" It is multi row variable set.
I want if I am adding a row in MRVS ,the value of put name should be auto populate in MRVS first variable which name is "security zone name" Row by row means in first row test. In second row test1 and in third row test2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 05:43 AM
I wrote this code on load but it is adding a blank row however, rest result are fine.
function onLoad() {
var obj = g_form.getValue('task_input').length !== 0 ? JSON.parse(g_form.getValue('task_input')) : [];
var vofvalue = g_form.getValue('put_name');
var arry = vofvalue.split(',');
for (var i = 0; i < arry.length; i++) {
obj.push({
security_zone_name: arry[i]
});
}
g_form.setValue('task_input', JSON.stringify(obj));
}