Skip to content

Filter Array in Power Automate(MS Flow)

Introduction

This blog explains how to use the Filter Array action to filter the array in Power Automate (MS Flow)

Use Case: In my example, I am retrieving opportunities than filtering based on won and lost opportunities.

Steps to be followed:

  1. Add “+New step”
  1. Search for filter array action and select that.
  1. In Filter array action, pass your array in “From”
  • Add column by which you want to filter.

In my case, I am filtering based on status of the opportunity that’s why I selected status column.

  • Add a condition to filter based on won opportunity.
  • NOTE: won opportunity has a status value equal to 1.
  1. Repeat step number 3 to add filter for lost opportunities.
  • NOTE: lost opportunity has a status value equal to 2.
  1. You can use the “Create HTML table” action to format the result of the filter action.
  • Select Create HTML table action
  • Enter the Body of the Filter array (won opportunities) from Dynamic content.
  • Add columns in the table.
  • For Value enter as per below.
item()?['name']

Similarly create table for lost opportunities.

Final Flow:

Result:

3.6 7 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments