Filter an array or collection in Flow

A while back wrote a post about arrays in Flow. One of the things that I didn’t look at was filtering arrays. Filtering arrays is actually really simple.

Create an array

I started by creating an array.

Filter Array

Now I only want to select the items that have IsOk set to Yes. This can be done with the Filter array action

The filter array’s condition can be set in the advanced mode to

@equals(item()?[‘IsOk’], ‘Yes’)

or you could set the left hand side of the condition to item()?[‘IsOk’] using the expression editor and then set the right hand side to Yes.

 

 

 

Advertisements

5 thoughts on “Filter an array or collection in Flow

  1. I’m trying to pull multiple lines of data from an excel spreadsheet into a word template using MS Flow. Would an array work to pull the information.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.