Autopopulating Multi-Row Variable Set Field Based on Single Row Variable Set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 06:29 AM
There is a field called 'entity' in a single row variable set on the record producer form that pulls the 'code' from the company table. There is also a 'company_system' field in a multi-row variable set on the same form. I want to automatically populate the 'company_system' field with the 'system' value from the company table based on the selected 'entity'. I can retrieve the correct value in 'answer', but I need help figuring out how to set that value in the 'company_system' field. Can anyone provide guidance on this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 06:44 AM
You can use the below code:
var mrvsData = g_form.getValue("mrvs_internal_name"); // Replace mrvs_internal_name with actual internal name or MRVS
var mrvsDatastr = JSON.parse(mrvsData);
for (var i = 0; i < mrvsDatastr.length; i++) {
mrvsDatastr[i].company_system = answer; //company_system is the variable name inside MRVS. Update it if not correct
}
g_form.setValue("mrvs_internal_name",JSON.stringify(mrvsDatastr)); // Replace mrvs_internal_name with actual internal name or MRVS
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 07:20 AM
Thank you for your response. However, it seems it's not working- the value is not getting auto-populated in the field.