Flow Designer & List Collector "For Each": A low-code solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 05:58 AM - edited 03-11-2024 08:56 AM
Purpose: To develop a Catalog Item where end-users can select multiple Records/Options via a List Collector, and Flow Designer is able to differentiate and provide the desired action(s).
Background: For our purposes, we wanted to provide a List Collector Variable (referencing our Business Applications Table) where our end-users could select multiple Applications and, based on the selection, certain actions would take place or tasks would generate.
NOTE: As of writing this, we are on Vancouver Patch 4.
We had gone through several iterations of development trials/errors in Flow Designer to have our 'If' Statement recognize the differences between CI Records, through creating Flow Actions and MLVS on the Catalog Item, but none would work. The solution will keep you in a Flow (without creating any Actions) and utilizes the newer Function (fx) capability.
Some of the notes below are the 'typical' for Catalog Item Flows are created, but I wanted to provide all of the details from the top for full clarity:
Step 1: Trigger = Service Catalog
- This is the initial point to trigger the Flow where, when the Catalog Item is submitted, then follow these Steps.
Step 2: Get catalog Variables from...
- Here is where you'll associate the List Collector Variable to your Flow and ensure you can reference it in later Flow Steps.
Step 3: Look up the List Collector Records.
- The key points here are using the 'Look Up Records' to ensure you'll have the data from each/every record selected in the List Collector Variable.
- On the 'Look Up Records' step, you'll match up the Conditions where the Record SysID IS ONE OF dot walk from the List Collector Variable Records to the SysID.
Step 4: The 'For Each' Step
- This will run through each and every Record selected on the List Collector Variable.
- On the For Each, you'll select the Records that were looked up in Step 3.
- Here is where you'll add the Function onto the captured List Collector Records. To do this:
- After completing the Records selection, you'll see the Pill View.
- On here, hover toward the right-end of the Pill and you'll see an icon for +fx.
- Once you've clicked on the +fx, you'll be presented with multiple Function options. Search for Split.
- The use of the Split Function will auto-return an Array.String and this is where you can include a Separator. For us, we used a Comma and a space (, ). Add this into the Separator line followed by clicking Apply.
Step 5: The setting of If Statements, Approvals and Tasks
- Now you'll be able to add the 'If' Statements where/as necessary. While we didn't go through every type of option to see if any other Fields work for this, we confirmed its functionality by Dot-Walking on the 'For Each' Step over to the SysID and a couple of other options on our Business Application CI Record. For the purpose of this example, I'm showing the condition for If the SysID of the selected Record from the List Collector IS the SysID for a Specific CI.
From here, you should be able to perform the remainder of your Flow, Tasks and Approvals as on any other Flow.
I hope this is helpful to those working in Flow Designer and using List Collectors!
Thank you,
Josh Pirozzi
- 8,191 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 08:40 AM
Hey Josh,
That is an interesting solution, but I am unsure, why you have to use the +fx function. During the look up I just use the condition "is one of". This will return the list of all selected records, because the condition "is one of" can work with the comma separated values within the list collector.
Afterwards the flow logic "for each" gives me access to all fields of every record. Could you maybe shortly check, if that would work for you to?
Because I would assume, it makes your flow a bit easier to use.
Kind regards
Sebastian
PS: Here a screenshot of a list collector for an user group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 09:00 AM
Hey @SebastianKunzke,
My mistake & good catch! I meant for the Look Up Records to be 'Is One of' and not the single 'Is'.
We had initially tried the more streamlined 'is one of' approach for our use case (List Collector Referencing our Business App Table) without the Function Split, and either the SysID's weren't recognized and each of the If Statements in our Flow to trigger each downstream action/subflow didn't work as expected.
In our research through the Community, my team discovered that there was a recommendation to create an Action that parses the records input on the List Collector into an Array.Object, but that also didn't work as expected in our current version (the article was from a year or two ago).
Thanks!!
- Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 09:25 AM - edited 03-21-2024 09:26 AM
Hi Josh,
I like the solution but I can't get it to work for me, no records are found in the Lookup Records step. Would you please provide the name of the variable and the full name of the variable you used to compare the sysid? I can't tell from your screenshot how you got this to work. and it doesn't work for me.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 09:33 AM
Never mind. It helps if you save the flow after changing it and testing. Oops. 😀