Catalog Item - MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Team,
We have three variables in MRVS, lets say MVar1 , MVar2, MVar3.
And one reference variables outside MRVS, lets say Var4.
Based on the value in reference field Var4, we have to populate value in MVar2 and MVar3.
What I did is, I have created oncHange client script for Var4 which will be setting value MVar2 and MVar3.
g_form.setValue(MVar2,value1) ;
g_form.setValue(MVar3,value2).
But this is not working. Please guide, how can I achieve this .
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
so you want to grab outside variable in MRVS Client Script
you can access the value like this
var outsideValue = g_service_catalog.parent.getValue("Var4"); // give outside variable name here
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
This is for getValue but how can we setValue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I believe I answered your original question about how to get the value
now to your next question, did you try this and see if that works?
g_service_catalog.parent.setValue("Var4", "sysId");
OR check below links
Populate field outside MRVS with a total sum of fields inside MRVS
MRVS detect when a row is removed or deleted
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader