I am struggling in MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 03:33 AM
I have a requirement where I have to check for date/time of fields on MRVS from the form in catalog.
I have in total four date fields, 2 date fields in form level, and two date fields on MRVS, now my requirement is to validate the date fields in MRVS is in between the dates entered on form.
I am struggling to access the MRVS values on FORM level
- Labels:
-
Data Foundations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 06:47 AM
In a client script that applies to the Catalog Item, not the MRVS, you can access the entire MRVS value using
g_form.getValue('mrvs_internal_name');
This will give you a JSON formatted string containing each variable name and value for each row. You can loop through these values like this:
var mrvs = g_form.getValue('mrvs_internal_name');
var obj = JSON.parse(mrvs);
for (var i = 0; i < obj.length; i++) {
if (obj[i].v_date1 != g_form.getValue('v_date2')) {
....
}
Replacing your MRVS internal name, the name of the MRVS variable (v_date1 in this example) and the name of the Catalog Item variable (v_date2 in this example).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 06:47 AM
Hi @Taaha M ,
Have you tried this : https://www.servicenow.com/community/service-management-forum/how-to-access-multi-row-variable-set-i...
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025