cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Filtering duplicate records in a list

Hi,

 

I'm looking to create a mail activity for a set of contact records.

I start my flow from record 'a' trough a manual trigger after which I list records related to record A.

These records on their turn hold the necessary contact records I want to send a mail to.

 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @M-DH 

 

Here you go. It's quite simple. You'll do it in no time 🙂

small-Screenshot_2019-12-13_at_10_09_20.jpgsmall-Screenshot_2019-12-13_at_10_09_20.jpg

 

Is this what you need?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

8 REPLIES 8
Super User II
Super User II

Hi @M-DH 

 

Just for me to understand what you need, the duplicate values come from a List, and you want that list to have unique values correct? 

 

By list, you mean a SharePoint list or somewhere else?

 

The solution to de-dupe the list could be for you to do the following:

  1. Define an array variable
  2. Make a Loop on the duplicate list
  3. Check if the item already exists in the array variable
  4. If not, add it otherwise continue.

 

Then you would use the array variable with your unique values.

 

Makes sense?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hi @manuelstgomes ,

 

In this case the list is a list from Dynamics which contains a multitude of contact records which we fetch from a list of 'projects'.

The issue here is that a contact can be related to multiple projects at once, but we only want to send out one general mail to all our project contacts without one of those contacts receiving the same mail 2 - 6 times.

 

So I'm looking for a way to filter out the duplicate contact records in the last collection in order to get the desired result, I'm sure there is a way but my current level of knowledge doesn't allow me to.

 

 

Hey @M-DH 

 

I think the solution I provided you should work.

 

Do a "Get items" from dynamics to fetch the information that you want and then, for each, add them to the variable array if they don't exist there. Then you'll get the unique values to send the general email.

 

Makes sense? If not please let me know and I'll try to do a mockup for you.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hi @manuelstgomes,

 

I would love a mockup, I'm having some troubles creating the solution myself.

Thanks!

 

 

Hi @M-DH ,

 

Your needs are similar to grouping records by on one or two fields, you can refer to this article below and see if it helps:

http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

 

Best Regards,

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

Hi @M-DH 

 

Here you go. It's quite simple. You'll do it in no time 🙂

small-Screenshot_2019-12-13_at_10_09_20.jpgsmall-Screenshot_2019-12-13_at_10_09_20.jpg

 

Is this what you need?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

Hi @manuelstgomes ,

 

This worked out perfectly, thanks a million!

 

Hi @M-DH 

 

AWESOME!!!! Happy that it worked for you.

 

Anything else please let me know

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (3,823)