
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 06:03 AM
Hi everyone.
So I have a catalog item. In that, I'm using some multi row variable sets. That all works just fine.
However, in my flow I would like to be able to get a list of what people actually ordered. Those things are in that multi row variable set.
What I want to do is get the elements in the mrvs, so I can write out the variable choice names in an email, and then send that.
Can any of you help me figure out how to do that? I'm pretty proficient in Flow Designer, just not code 😉
Solved! Go to Solution.
- Labels:
-
flow designer
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 08:09 AM
Hi Jacob,
Flow Designer supports mrvs. To get each row, use "For Each Item in"
Example:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 06:29 AM
Hi,
In Flow Designer, you'd use the same concept of retrieving those catalog variables as normal.
Then, for the MVRS, you'll see that it's an ArrayObject. From there, within the flow, you'd add a For Each Item step to walk through that ArrayObject, you could assign this to flow variables if needed.
Or, if you're sending a notification from the flow, you should be able to use the ArrayObject and write a script yourself to iterate through it, here's an example of a script action you could also use:
var sysID = fd_data.trigger.request_item.sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(sysID);
var arr = [];
var mrvsVar = rec.variables.name_of_mvrs_variable;
var parser = JSON.parse(mrvsVar);
for(var i=0;i<parser.length;i++){
arr.push(parser[i].variable_name_within_mvrs.toString());
}
So a few different options here. I'd recommend trying a bit and then let us know if you get stuck and if so, where at, so we can help further.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 05:56 AM
Hi,
I'm glad your question was answered.
I believe I covered all of that above and gave additional information as well, but perhaps you enjoyed the screenshots.
Thanks and take care! 🙂
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 12:11 AM
Hi Allen.
And I appreciate your answer. However, the answer most useful to me (at least initially) is the one that primarily keeps me in Flow Designer with as little scripting as possible.
I usually go for more FD, less scripting, in my solutions 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 08:09 AM