- 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:42 AM
onchange is on 'landscape' variable not on mvrs I want to populate 'nickname'(nickame is in mvrs) on 'jenkins_access_group_name'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:41 AM
so you want to access MRVS variables when you write onChange catalog client script on outside variable?
if yes then this syntax should work for you
var mrvsData = g_form.getValue('application_namespace_configuration');
Please share complete client script and what's your business requirement
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:44 AM
Hi Ankur this syntax is not working