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
07-26-2020 06:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2020 08:20 AM
Hi,
Thanks for the links.
I don't understand how I could achieve what I want using solution proposed by ryanlitwiller
this.NOW.[myAttributteName] = g_form.getValue("myfield");
then from the MRVS I can call upon the NOW object to get my needed value simply with:
this.NOW.[myAttributteName]
I may 'store' mvrs data in NOW object from a mvrs client script
But I need to copy this value to a parent variable in original form.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2020 06:15 AM
Hi there,
You could do this through a Business Rule, on insert of your sc_req_item record. Server side doing your calculation or whatever you are after, and updating the variable you've set up for this.
Would that help?
If my answer helped you in any way, please then mark it as helpful.
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
07-26-2020 08:45 AM
Saw this old solution from almost a year ago. Sounds similar to what you are after.
Obviously this is to count a certain cell from the rows, though principle is the same. Using a Business Rule to update a variable outside your MRVS with a certain value. In your case, just a row count.
If my answer helped you in any way, please then mark it as helpful.
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