
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
12-06-2022 09:13 AM - edited 12-06-2022 09:33 AM
The ServiceNow Service Catalog Multirow Variable Set (MRVS) is a handy way to enter multiple rows as part of a Service Catalog request. In this example a professor at a college wishes to make a request to change the grades of several students in a class and can enter the header information and then enter a row for each student with different values.
Like this!
Reading the Rows from Flow Designer
Once you've created your catalog item and attached a new flow with a Catalog Item trigger you need to process each of those rows. You do that with the Flow Designer action called "Get Catalog Variables". This action allows you choose the main catalog item and select the variables which you wish to use in your flow.
As you can see the standard non-MRVS variable sets have their values surfaced directly (in this case "campus", "instructor" and "course") but the MRVS variable set called Grade Change Student Info is returned as a JSON array.
Steps to complete
1. Add the "Get Catalog Request Variables" step and choose Trigger > Requested Item for the Submitted Request and your main Catalog Item for the template. (See above).
2. Select all variables and move them to the right hand "Selected" panel.
3. Add a "Flow Logic > For Each" step to loop the variable set array and select the variable "Grade Change Student Info" from the previous step like this:
4. You may now use the outputs from the for each to perform an action on each, and combine the values with the header values. You even have access to the variable values with the pill picker. For demonstration purposes I am logging the values like this:
That's it. Good luck!
- 18,916 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great !! Thanks for sharing 🙂
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful!
Since the "Get Catalog Variables" action is limited to Catalog items, is there a comparable method for accessing MRVS data for Record Producers?
EDIT: Even though the action does not explicitly call out Record Producers, it does still work with Record Producers, and they come up in the reference within the action. I have used this action for HR Cases and custom record types successfully. 🙂
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for sharing.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Prinssi - I am using the For Each action with a record producer with no issues.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
I have mapped the MRVS variable to Description field. Once ticket is created, it is showing only sys id instead of username in the desc field. Please help me to rectify it.
Thanks,
Nandhini Muthu
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
It works great with string or reference variables in MRVS. But What about scenario if I have variable type "choice" in MRVs and need to get DisplayValue, instead of Value?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for sharing.
I tried this and found an problem.
When i input 1 row in MRVS, and get the value from flow designer, I got 2 rows data...
And the unexpected row is what I input last time I request the catalog item...
I'm in Washington version.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
For reference filed it's giving SYS_ID but I need name of the record Name(like username not user record SYS_ID)
Is it possible ? if any one knows, could pls help me on this
Advance thanks
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
And same values I need to push to sub flow
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Venky Kshatriy2 - a reference field always returns a SYD_ID as the value. You would have to likely use a look up record for the table that field references and use the SYS_ID as a parameter to get that record and its relevant data, or see if that data is available in the step it is from where you can dot-walk via the daa available in flow designer. Hope this helps!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey, I have tried but i am not able to add into Ask for Approval.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What could be the reason on not being able to see the MLV variable set but can see the individual ones when trying to add them in the list under the get catalog variables?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@reza1921 The MRVS is an object with any number of rows that each contain their own variables (i.e. an object containing objects). To access the variable(s) contained in each row, you need to iterate through the rows.
In the example above, variables like "student" and "old grade" are not available in the Get Catalog Variables action, which is why the For Each action was used to iterate through the rows in the MRVS.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Jon G Lind How can we do it for choice variable?