cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Titatovenaar
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'.

 

 

Titatovenaar_0-1617390310287.png

 

Any suggestion is greatly appreciated!

 

1 REPLY 1
alrez
Community Support
Community Support

Hi,

 

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.

 

Regards,

 

Alex

 

-------

 

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

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,329)