- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 02:39 PM
I would like to use a multi row variable set to collect direct deposit information, allowing employees to split their deposit into multiple accounts. However, we would like to limit the number of accounts they can use. Is there a way to set a maximum number of rows/entries?
Solved! Go to Solution.
- Labels:
-
HR Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 09:04 AM
Hi there,
You can set a limit to the number of rows that you can add to a multi-row variable set by using the max_rows attribute in the Variable Set attributes field.
Would that help? Don't see a reason for scripting this like others suggested.
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
05-11-2020 02:43 PM
You can control the OOTB 50 row limit with the following sys_properties:
glide.sc.multirow_set.rows.size
Set this property to whatever new limit you want.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:48 AM
Thanks Sachin. Unfortunately, I am not finding that property.
Also, if I set the max rows in the property, I assume it would apply to all uses of multirow variable sets? Can i set this at the individual use (in a particular record producer)?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 08:41 AM
IF this property is not present on your instance, then you need to create this system property and give limit as per your requirement.
But, this will be applicable for all multi row variable sets.
IF you want to limit number of rows only for particular catalog item, then you need to write onsubmit client script to count number of rows with validation.
Beliw example is a list of serial numbers multi row variable set, where serial_number is the internal name of the MRVS
var snlist = g_form.getValue('serial_number');
var obj = JSON.parse(snlist);
var length = obj.length;
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 08:47 AM
Hi,
please avoid that system property as it would apply globally.
you can use onSubmit client script to get the value and alert user about the max rows
function onSubmit(){
var value = g_form.getValue('variableName');
var parser = JSON.parse(value);
if(parser.length > 50){
alert('Please ensure less than 50 rows');
return false;
}
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader