- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 08:45 AM
Hi,
I am using the MRVS and need to sum the value of the hard drive's size as shown in the pic.
I would appreciate if anyone can give me a clue.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 09:06 AM
Hi there,
You would have to place a "Total size" variable outside the MRVS for this. Unfortunately though, you would want to calculate that field on the moment you are adding a row. Though, from within the MRVS, you can't influence variables outside the MRVS.
You could think of a workaround. For example, on submission of the Catalog Item, the Total Size will be calculated and the Variable filled. If help needed on this, I can have a look. We have a similar workaround in place.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
09-13-2019 10:21 AM
Yes indeed. You can't add a seperate floating variable just for the sum on the MRVS. So a workaround would be to have a Total variable outside your MRVS.
After submitting your Catalog Item, it would show something like:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
11-17-2023 01:53 AM
HI @Mark Roethof,
Can you please help me i have also same requirement it's working as you suggested
But here as this is a business rule but i want this same for on change client script because the total cost needs to be compared with other variable
can you please help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 10:25 AM
Hi Mark,
What should replace with the long sys ID?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 10:27 AM
If you are using only 1 MRVS for this, the sys_id of your Size GB variable which is in your MRVS. Something like:
grMRVSAnswer.addEncodedQuery('parent_id=' + current.getUniqueValue() + '^item_option_new=b9901a2edb68f304ceed9ce8db961934');
Just replace the sys_id.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
09-13-2019 10:27 AM
The field that I am going to sum name: "size" and the result name: "total_disk_size"