Multi Row Variable Set Scoped App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 07:54 AM
Hi,
I'm trying to utilize the multi row variable set in my Scoped Application, but I am running into errors attempting to utilize the documented methods (getRow() and getRowCount())
Evaluator: com.glide.script.fencing.MethodNotAllowedException: Function getRowCount is not allowed in scope x_ahho_movable_med
Here is the link to the documentation that discusses these methods and there is no mention of issues within scoped applications.
https://docs.servicenow.com/bundle/london-application-development/page/script/server-scripting/concept/c_ScriptableServiceCatalogVariables.html#d1035105e133
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 08:51 AM
Hi Adam,
I'm facing the same issue. Did you get a solution to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2019 01:12 PM
Hey Adam-
I ran into this same issue and found a workaround that worked for me. When you access the multi row variable set via script it returns a JSON Array. If you use JSON.parse() it will return a Javascript array which then gives us the ability to use the "length" method instead of the "getRowCount()" method. For example, assume your multi row variable set is named "multi_row_variable_set" and there are 2 variables in the set named "name" and "date_of_birth". Let's also assume you are running this script via a business rule. Your script would then look something like the following:
var mrvs = current.variables.multi_row_variable_set;
var mrvsArray = JSON.parse(mrvs);
var text = '';
for(i = 0; i < mrvsArray.length; i++){
text += mrvsArray[i].name + ' - ' + mrvsArray[i].date_of_birth;
}
gs.info(text);
If the value of the "name" variable is "Matt" and the value of the "date_of_birth" variable is "1980-02-12" then the resulting log statement from the script above would read "Matt - 1980-02-12".
I hope this helps!
-Matt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 02:31 PM
Thanks, Mir. This did the trick.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2019 01:02 PM
Hey Matt--mind taking a look at this one? Seems like you may have done this based on your response.