cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StephCORKING
Helper III
Helper III

remove duplicates from list if match is found

Hi 

I'm completely stuck with a flow and I need some help

 

I have a sharepoint list with imported data from excel.  I need to check 2 column values to determine if a match is found and only keep the first item.

Here is an extract from my list

Screen Shot 2021-06-17 at 09.24.19.png

 

The last row is a duplicate of the previous one and I want to remove it from the list but I don't know how to get it to work.  Can anyone help?

Steph

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @StephCORKING :

vbofengmsft_0-1623914325008.png

Do you want to delete duplicate records based on these two fields?

If so,I've made a test for you reference:

vbofengmsft_1-1623914519868.png

vbofengmsft_2-1623914540075.png

The Result:

vbofengmsft_3-1623914570672.png

vbofengmsft_4-1623914602271.png

Best Regards,

Bof

 

 

View solution in original post

7 REPLIES 7
v-bofeng-msft
Community Support
Community Support

Hi @StephCORKING :

vbofengmsft_0-1623914325008.png

Do you want to delete duplicate records based on these two fields?

If so,I've made a test for you reference:

vbofengmsft_1-1623914519868.png

vbofengmsft_2-1623914540075.png

The Result:

vbofengmsft_3-1623914570672.png

vbofengmsft_4-1623914602271.png

Best Regards,

Bof

 

 

View solution in original post

Hi @v-bofeng-msft 

Thanks a lot.  I'm having a problem with the JSON formula in the Append to Array variable.  Can you see what I'm doing wrong?

Screen Shot 2021-06-17 at 10.57.59.png

 

 

When I run it, the flow is failing (on the second Apply to each)

Screen Shot 2021-06-17 at 11.22.58.png

 

This is my flow:

Screen Shot 2021-06-17 at 11.21.48.png

Screen Shot 2021-06-17 at 11.22.06.png

Screen Shot 2021-06-17 at 11.22.16.png

 

On the Apply_to_each_2, I entered: 

items('Apply_to_each_2')['DelRoadMapItemName']
and
items('Apply_to_each_2')['SubCatName']
 
Not sure what I'm doing wrong 😟
v-bofeng-msft
Community Support
Community Support

Hi @StephCORKING :

You lost a "," here:

vbofengmsft_0-1623919508017.png

Best Regards,

Bof

 

Hi @v-bofeng-msft 

 

Thanks.  My flow seems to be stuck in an infinite loop.  There are 112 items in the list and process is not stopping (i cancelled it after 7 minutes on the Apply to each step.  Also, there are failing items in the list too but i can't see what they are.

 

This is the correct order for the flow?

Screen Shot 2021-06-17 at 11.50.19.png

Hi @StephCORKING :

If you have a large number of items, then this flow will take more time to run (because of the nested two loops)

Best Regards,

Bof

Thanks @v-bofeng-msft 

 

It does work but it is taking too long and the SP list will only get longer.  I need to find another solution.

 

Steph 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (1,981)