Showing results for 
Search instead for 
Did you mean: 
New Member

Only apply condition to every record of a filtered list

Hi guys,


I want to make sure my flow does not send the same e-mails twice.

In table 'List rows present in a table 2' the history of mails send is being updated. (MailSendID is the unique record here)

In table 'List rows present in a table' all unique mails are listed out that are ready to be send. (ID is the unique record here that potentially matches with MailSendID from the previous table).


I want to use the 'Filter Array' action to filter only rows from 'List rows present in a table' where MailSendID contains ID.

After the 'Filter Array', via add a condition I want to check how many rows were returned. If it's 0 = there wasn't any row where the MailSendID contains ID, meaning that the array is empty and an email can be send. If it's more than 0 then there's at least one row where column MailSendID contains ID. So I know I do not have to send the same mail again.


Maybe the problem is that the 'Filter Array' is within an 'Apply to each' action, but unfortunately it is impossible to do it without.

As soon as I use a Filter Array and compare 2 fields from different tables, it immediately places it within an 'Apply to each'.





Any suggestion is greatly appreciated!


Community Support
Community Support



Instead of doing the "send an email action" within the "apply to each" create a variable at the beginning  of the flow, then set the variable to either Yes or No within the "apply to each", then after the "apply to each" add a condition to check whether that variable is yes or no and send an email depending on whether its set to yes or no.








Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (3,045)