MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi All,
I have created a variable set inside the catalog item and i want to run a catalog client script on the catalog item when the MRVS value is added by the end user.I have used the onsubmit catalog client script in the variable set but in the g_form.getValue('mrvs_name').I am not getting any value, is there any other way to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
when you grab MRVS variable set value it comes as JSON object
what you want to happen?
💡 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
Hello @kali ,
MRVS values are stored in backend and accessed via scripts as in JSON formats,
so you will need to fetch and parse it..
var mrvsData = g_form.getValue('mrvs_variable');
var parsedData = JSON.parse(mrvsData);
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
36m ago
Hi @yashkamde , @Ankur Bawiskar
When i am using var mrvsData = g_form.getValue('mrvs_variable'); in the catalog client script which is applies to a variable set there is no value coming but if i run the catalog client script running on the applies to catalog item the value is coming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18m ago
you can only grab MRVS value when
1) either you use onSubmit catalog client script
OR
2) either you run onChange of any variable which is outside the MRVS
💡 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