- 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-06-2025 09:51 PM
Hi @sariksorte, In your catalog client script -
var mrvs = JSON.parse(g_form.getValue('mrvs')); //name of your mrvs
var rows = mrvs.length;
if (rows > 0) {
for (var i = 0; i < mrvs.length; i++) {
g_form.addInfoMessage(mrvs[i].user); //user is the variable inside mrvs
g_form.addInfoMessage(mrvs[i].req_for); //req_for is the variable inside mrvs
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:56 PM
This solution is not working in on change client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:04 AM
Hi @sariksorte Are you creating onchange client script for a variable outside the MRVS? Can you please share the script and variables screenshot please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:08 AM