Is it possible to copy multi-row variable data to another MVRS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:22 PM - edited 06-06-2023 11:22 PM
Hi All,
I have build a catalog item which has a MVRS and on submit of this it creates a RITM. Now, there is one more catalog where they select the closed RITM's and it has to copy the closed RITM MVRS values to form level MVRS.
I have some code that will copy the variables from the Requested Item to the form level, but I just noticed that it is not copying over the multi-row variable set information. Multi Row Question Answer table [sc_multi_row_question_answer] has the values in it but I'm unable to copy them.
Has anyone come across this before? Is there an easy way to copy this data?
Thank you in Advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 12:08 AM
Hi,
Can you please elaborate more?
Where exactly MRVS values are stored and where you want to set?
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 12:43 AM
Hi @Anil Lande ,
I want to copy the MVRS Variable set values from a closed RITM to the form level. I'm able to copy the variables from the closed RITM to the form level but I'm unable to copy the MVRS values.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 01:25 AM
Can you please share what you have tried, it would be helpful to suggest changes to your code.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 01:45 AM
To set MRVS Values you need to query the RITM table and pass the JSON from closed RITM to form using Glide Ajax.
You can get variables and pass JSON
In server side script use:
in client script you can use this returned Array of JSON to set MRVS like below:
g_form.setVlaue('mrvs_name', 'returned JSON');
A hardcoded example would be:
function onSubmit() {
var additional_users = [ {
"user_nm" : "dcdcscs"
}, {
"user_nm" : "dvdsc"
} ];
g_form.setValue('additional_users',JSON.stringify(additional_users));
}
Thanks
Anil Lande