Use List collector variables in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 06:41 PM
Hello,
I have a flow where I need to build condition based on the values selected in the list collector variable. For eg I have four options available A,B,C,D in list collector, if A,B are part of the selection then a task should be assigned to certain group else to another group.
I have tried getting the catalog variable and then using the list collector variable to check if it contains these 2 values however it is still not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2023 05:41 PM
Hi,
Can you share how you've built the if logic to check if variable list collector contains a value? Have you done two contains checks with one value in each and connect them with AND and not OR?
So:
list collector contains 'x'
AND
list collector contains 'y'?
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
03-11-2023 09:50 PM
To build a condition based on the values selected in a list collector variable in ServiceNow, you can use the "contains" operator in a "Condition" block in the flow designer.
Here's an example of how you can set up the condition:
Drag and drop a "Condition" block onto your flow.
Click on the "Add Condition" button to add a new condition.
In the "Condition Type" drop-down menu, select "Variable".
In the "Variable" drop-down menu, select your list collector variable.
In the "Operator" drop-down menu, select "contains".
In the "Value" field, enter the first value you want to check for (e.g. A).
Click on the "Add Or" button to add another condition.
In the "Variable" drop-down menu, select your list collector variable again.
In the "Operator" drop-down menu, select "contains".
In the "Value" field, enter the second value you want to check for (e.g. B).
Click on the "Save" button to save your condition.
On the "Then" branch of the condition, add the task that should be assigned to the certain group.
On the "Else" branch of the condition, add the task that should be assigned to the other group.
This should allow you to assign tasks based on the values selected in your list collector variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 12:40 AM
I think you should use the reference qualifier in the field itself to filter whatever you wish before calling the values in Flow designer.