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

Deleting Duplicate Entries based on specific column

Hi all,

 

I am relatively new used to Sharepoint and Power Automate. At the moment I'm trying to create an HTML table or an array (whichever would be easier) and populate it using the data from just one column of a sharepoint list. From there, I'd like to find and delete duplicate entries based on that column, which in my case will be email addresses. From that point I plan to take the final/new list of email addresses and sent out an email to everyone on it. That portion I think I'll be able to figure out once I've done the first part. I have been working at it unsuccessfully for a while, so any help and/or guidance will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User
Super User

@med219 

Hello,

 

Check out my POC i just created for you.

 

Here is my SP list for Fruit and QTYHere is my SP list for Fruit and QTYInitialize empty Array, use the get items SP actionInitialize empty Array, use the get items SP actionAdd a loop to loop through the SP list. Use a compose action to add the column item to a Array. using the append to array variable actionAdd a loop to loop through the SP list. Use a compose action to add the column item to a Array. using the append to array variable actionUse union() to remove all duplicates on an array by selecting the array twice in the parameters.. You can then use split() to split each unique itemUse union() to remove all duplicates on an array by selecting the array twice in the parameters.. You can then use split() to split each unique itempic4.png

Union expression:

union(variables('MyArray'),variables('MyArray'))
 
Split Expression:
split(body('Join'),',')
 
 
 
Hope this helps..
 

 

 

Here is my successful runHere is my successful run

 

 

--Josh

 

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

3 REPLIES 3
Jcook
Super User
Super User

@med219 

Hello,

 

Check out my POC i just created for you.

 

Here is my SP list for Fruit and QTYHere is my SP list for Fruit and QTYInitialize empty Array, use the get items SP actionInitialize empty Array, use the get items SP actionAdd a loop to loop through the SP list. Use a compose action to add the column item to a Array. using the append to array variable actionAdd a loop to loop through the SP list. Use a compose action to add the column item to a Array. using the append to array variable actionUse union() to remove all duplicates on an array by selecting the array twice in the parameters.. You can then use split() to split each unique itemUse union() to remove all duplicates on an array by selecting the array twice in the parameters.. You can then use split() to split each unique itempic4.png

Union expression:

union(variables('MyArray'),variables('MyArray'))
 
Split Expression:
split(body('Join'),',')
 
 
 
Hope this helps..
 

 

 

Here is my successful runHere is my successful run

 

 

--Josh

 

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

med219
Regular Visitor

Thanks so much for the help. What you've provided me works pretty well, I can see that it creates the array without the duplicates so I'm getting somewhere. I run into some issues after that point. The split is not working for me, but the current array is broken down as I'd like so I'm not sure if I need that step to then create an HTML table or put it in some other format that will allow me to email the list. Right now it emails as "xxxxxxxxx@website.com, xxxxxxxxxxx@website.com, ..." which isn't horrible but doesn't look very good/ isn't easy to read through. I believe your answer may be my solution, I just need to work with it a little more.

Hi @med219 ,

 

If your problem has been solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Best regards,

Alice       

 

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 (1,549)