- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2019 09:01 AM
I have a service catalog item and it contains some variables and variable sets .
All variables and single row variable sets are showing up on the service catalog item .
But Mutli row variable set is not showing up , I dont know what I am doing wrong .
Need you support ...
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2019 11:49 AM
Hi there,
If you disable all Container variables within that Multi-Row Variable Set, is the Multi-Row Variable Set shown then? We had some similar issues too due to incorrect usage of containers with Multi-Row Variable Sets.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
‎11-14-2019 10:54 AM
Not using any UI policy or Client catalog script .
The form contains 40 + variables including container variables .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2019 11:49 AM
Hi there,
If you disable all Container variables within that Multi-Row Variable Set, is the Multi-Row Variable Set shown then? We had some similar issues too due to incorrect usage of containers with Multi-Row Variable Sets.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
‎11-14-2019 11:29 AM
ragz,
Do a query on the [io_set_item] table to find your catalog Item(s) with the particular variable set (in your case a MR var set) and put the display value of that sys_id into a variable:
**current record originates from the [sysapproval_approver] table**
//Depending on where you're running this script, you may have to replace 'current'
var targetRec = current.sysapproval;
var set = [];
var getSets = new GlideRecord("io_set_item");
getSets.addEncodedQuery(
"variable_set.type=one_to_many^sc_cat_item=" + targetRec.cat_item.toString()
);
getSets.setLimit(1); //you only need one record to return with the MRVS value
getSets.query();
if (getSets.next()) {
set.push(getSets.variable_set.internal_name.toString());
}
//now 'set' holds the internal name of your MRVS
var intName = set[0];
//with the internal name, you can use the variables object to get mrvs values
var mrvsString = targetRec.variables[intName];
the last line from the script above will return a JSON object, something like this:
Yeah, the names of the variables are nonsense but this is how the object is constructed.
Get each value with this syntax: gs.info(mrvsString[0]['SAR_first_name']);
To make this object a String value use : var something = JSON.parse(mrvsString);
Hope this helped!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2019 11:39 AM
Hi ragz,
Try this code in background script and check to see if there is any data in your multi row variable set or not.
var mrvs;
var itemID = '70506da8db002300e69dfbef2996194a'; //replace with your RITM sys_id
var ritmGR = new GlideRecord('sc_req_item');
if (ritmGR.get(itemID)) {
mrvs = ritmGR.variables.your_multi_var_set;
}
gs.print(mrvs);
Mark the item as a correct answer and helpful if it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2019 11:49 AM
Hi there,
If you disable all Container variables within that Multi-Row Variable Set, is the Multi-Row Variable Set shown then? We had some similar issues too due to incorrect usage of containers with Multi-Row Variable Sets.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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