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

@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 III
Super User III

@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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (43,529)