cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carterprine
Helper II
Helper II

Compare columns from 2 lists and find differences

Hello,

 

I have two lists (list A and list B) that each have an email address column. List A is the control list (has a directory of all email addresses listed once). List B contains form submissions associated to each email address. Each user may have multiple submissions or none on list B.

 

I would like to create a flow that checks which email addresses in list A have no submissions in list B, and send a single email notification to all of those addresses at one time. 

 

Is this possible?

 

Many thanks!

Carter

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @carterprine 

 

Steps to follow are:

 

1. Declare a variable array called "Emails"

1. Retrieve all List A emails.

2. Iterate each email and retrieve List B filter query by each email of List A

3. Check the count of the record.

4. If not found then append the variable array value using List A email.

5. Finally you have the array of emails.

6. Send email using the array values as single email.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @carterprine 

 

Steps to follow are:

 

1. Declare a variable array called "Emails"

1. Retrieve all List A emails.

2. Iterate each email and retrieve List B filter query by each email of List A

3. Check the count of the record.

4. If not found then append the variable array value using List A email.

5. Finally you have the array of emails.

6. Send email using the array values as single email.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Hello @abm,

Thanks so much for your reply! This sounds like it will work well. I will give it a go and let you know how it works for me.

Cheers,

Carter

Hi @carterprine 

 

Thanks. If you need any further help please let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

This solution worked perfectly, thanks @abm!

 

I used append to array variables to add each list's email addresses to it's own array. Then I used a union expression in a compose, to eliminate any duplicate emails: 

union(variables('ResponseEmails'),variables('ResponseEmails'))

 

Then I initialized a third array variable for the 'missing addresses'. I added an "apply to each" for the outcome of the composed union. Inside of that, I have a condition which checks if the email addresses from List B are found in List A, and if not, emails each person to alert them that they need to provide their daily update. Additionally it adds the missing addresses to the third array, and emails a list of users who didn't provide their daily update to the supervisor.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,289)