mvrs : Need to count number of rows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2020 06:08 AM
I have a catalog item with a multiple row variable set.
I would like to display (in another field of the form), information related to mvrs data
For example, number of rows.
I tried with onSubmit catalog script on mvrs but found that this kind of script can't access variables outside mvrs.
Do you have any idea ?
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2020 09:46 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 02:08 PM
//get the MRVS
var multiRowVariableSet = JSON.parse(g_form.getValue('variable_set_1'));
var numberOfRows = multiRowVariableSet.length;
Please also see the article I wrote explaining MRVS: