- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 08:46 PM
how to access MVRS variables outside mvrs for to autopopulate catalog item variables
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:56 AM
Hi @sariksorte Please try this -
//Type appropriate comment here, and begin script below
var obj = JSON.parse(g_form.getValue('application_namespace_configuration'));
alert(obj);
for (var i = 0; i < obj.length; i++) {
g_form.addInfoMessage(obj[i].app_nickname); //user is the variable inside mrvs
obj[i].app_nickname = "HI";
}
g_form.setValue('application_namespace_configuration', JSON.stringify(obj));
For me this script is working and setting the variables values inside the MRVS. Please let me know at which point in the script it is not functioning as expected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:18 AM
This script is not alerting 'obj' or the info message is not coming as expected?
var obj =JSON.parse( g_form.getValue('application_namespace_configuration'));
alert(obj);
for (var i = 0; i < obj.length; i++) {
g_form.addInfoMessage(obj[i].app_nickname); //user is the variable inside mrvs
}
Also, can you share the variables list in catalog item and variable set variables, so that I will try to reproduce it in my pdi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:31 AM
landscape is the variable in catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:56 AM
Hi @sariksorte Please try this -
//Type appropriate comment here, and begin script below
var obj = JSON.parse(g_form.getValue('application_namespace_configuration'));
alert(obj);
for (var i = 0; i < obj.length; i++) {
g_form.addInfoMessage(obj[i].app_nickname); //user is the variable inside mrvs
obj[i].app_nickname = "HI";
}
g_form.setValue('application_namespace_configuration', JSON.stringify(obj));
For me this script is working and setting the variables values inside the MRVS. Please let me know at which point in the script it is not functioning as expected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 01:12 AM
Hi Gopika,
Thank you for your quick response, it helped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:36 AM
Could you please let me know is the onChnage on the mrvs or other variable if it is on other variable what will you want after accessing MRVS?