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
Highlighted
Super User
Super User

Re: Filtering duplicate records in a list

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
Highlighted
Super User
Super User

Re: Filtering duplicate records in a list

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

Highlighted
Frequent Visitor

Re: Filtering duplicate records in a list

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.

 

 

Highlighted
Super User
Super User

Re: Filtering duplicate records in a list

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

Highlighted
Frequent Visitor

Re: Filtering duplicate records in a list

Hi @manuelstgomes,

 

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

Thanks!

 

Highlighted
Community Support
Community Support

Re: Filtering duplicate records in a list

 

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.
Highlighted
Super User
Super User

Re: Filtering duplicate records in a list

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

Highlighted
Frequent Visitor

Re: Filtering duplicate records in a list

Hi @manuelstgomes ,

 

This worked out perfectly, thanks a million!

 

Highlighted
Super User
Super User

Re: Filtering duplicate records in a list

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
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (10,873)