- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2019 01:40 PM
Hi Community!
I have a form in our Service Portal that has a Multi-Row Variable set. This particular set is a list of users that gets pre-populated and then users can be added or removed.
We've just hit an issue where the "Add" button gets disabled and when we try and submit the form it gets this error:
{"error":{"detail":"","message":"The maximum rows specified in the multi-row variable set users attribute exceeds the system limit."},"status":"failure"}
There are about 50 users listed. I specifically was using multi-row variable sets to avoid the low limitations of the other list types in forms. I know I could switch the variable type to a Macro and build my own widget. Does anyone know how I can get around this limit without replacing the multi-row variable set?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2019 06:29 AM
I find the question interesting and so I tried to analyse the problem. Setting of max_rows attribute (described in the documentation see here and here), suggested by audrey.deruere, is a good idea, but it not worked. By trying to set max_row to any value to 50 and higher one gets error message. Event if one uses Export/Import to XML to force setting the value to a higher value one still get the same error message "The maximum rows specified in the multi-row variable set {0} attribute exceeds the system limit".
The reason on the message in the code of REST API used by "Add to Card" and "Order Now". The server side code is not readable directly, but with some tricks one can find it. It contains the following code fragment:
var mrvsErrorMessages = catUtil.validateMaxRowCountMultiRowVS('sc_cat_item', itemId, itemId, request_body.variables);
if (mrvsErrorMessages && mrvsErrorMessages.length > 0) {
var errors = mrvsErrorMessages.join();
throw new sn_ws_err.BadRequestError(errors);
}
where catUtil variable is
var catUtil = new RestCatalogUtil();
The code of RestCatalogUtil can be read, but can't be modified. The code of validateMaxRowCountMultiRowVS method calls GlobalServiceCatalogUtil.getMaxRowCountMultiRowVS to get the limit of the rows of
var globalCatalogUtil = new global.GlobalServiceCatalogUtil();
var varKeys = Object.keys(variablesData);
for (var i = 0; i< varKeys.length; i++) {
var varName = varKeys[i];
var varValue = variablesData[varName];
if (mrVarSetIdtoNameMap[varName] && varValue != '') {
var rowArray = JSON.parse(varValue);
var rowCount = rowArray.length;
var rowLimit = globalCatalogUtil.getMaxRowCountMultiRowVS(mrVarSetIdtoNameMap[varName],srcTable, srcId);
if (rowCount > rowLimit) {
valMessages.push('The maximum rows specified in the multi-row variable set ' + varName +' attribute exceeds the system limit.');
}
}
}
(By the way, the code is dirty at least because the message will be not localized).
Finally, the code of getMaxRowCountMultiRowVS method of GlobalServiceCatalogUtil is read-only too and it forwards the call to getMaxRowCountMultiRowVS method of undocumented GlideappScriptHelper.
getMaxRowCountMultiRowVS: function(variableSetId, srcTable, srcId) {
return GlideappScriptHelper.getMaxRowCountMultiRowVS(variableSetId, srcTable, srcId);
}
In other words, I don't find a way to fix the problem using Multi-Row Variable set.
As the workaround I can suggest you to use variable of the List Collector type with sys_user as the List table. It has no such limit. I personally find the User Interface of the List Collector even more comfortable, because it not displays previously added users and the User list will be displayed in more compact way:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2020 04:48 PM
You can expand 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2023 06:05 AM
Hi @ryanlitwiller !
I know this is an old comment. But I already create the sys property with a value of 100, when I try to change the attribute of the MRVS, to max_rows =100, it keeps showing the error..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 08:56 AM
Has anyone found more variable set attributes for Multi-row variable sets? I am trying to hide the action buttons (Add, Remove All, Edit, Delete) but can't see to find a good way to do that...thanks in advance if anyone has any ideas!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 03:22 AM
Earlier the solution was not available however you can do it easily now by adding a new system property & variable set attribute -
1. Make sure property is added in system property before doing below step otherwise it will return error :
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0818277
2. Add "Variable Set Attribute" to max_rows=100 on the variable set. Keep in mind, you need to bring this field on the form or edit via list.
If it helps, please mark the answer as helpful or mark as solution provided.