cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sar1
Helper I
Helper I

Remove duplicates based on certain creteria

Hi Everybody!

 

I wondered if in Power automate it's possible to remove duplicate values based on certain criteria. My data would look like this:

 

Screenshot 2021-09-21 at 6.47.22 PM.png

 

and I want these yellow(highlighted) columns in the share list. In other words, I don't want duplicate values based on the Items column. The share list updates daily but I only need the latest row of each(Pencil, Eraser, Pen)

 Is it possible to achieve this?

 

Any small help would be appreciated.

 

Thanks in advance.

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @sar1,

 

Out of interest, would you be open for an alternative approach?

 

Why not prevent inputting duplicate entries instead? You can configure your item column to enforce unique values.

 

Below is an example of that approach.

 

1. Change the setting in the column.

 

enforceuniquevalues_itemcolumn.png

 

2. When you try and add a item it will validate it and you will get an error saying that the value already exists in the list.

 

enforceuniquevalues_itemcolumn01.png

sar1
Helper I
Helper I

Thanks, @Expiscornovus for the reply. In my list, I have 4 multiple columns and I need a Unique combination for them. If I added a new item it updates the previous combination. 

Like If one entry consists of John and pen and other Tenna and pencil. and if I added another with John and pen it removes the previous.

I created flow and it working but I want a loop to compare it with every item already present in the list.

How can I achieve that? 

sar1_0-1632903659561.png

sar1_3-1632903805436.png

 

sar1_1-1632903702351.png

 

sar1_2-1632903759759.png

The following are the synatax used in the flow. 

length(body('Get_items')?['value'])
int('1')
body('Get_items')?['value'][0]['ID']

Any recommendation will be highly appreciated. Thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

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.

Users online (1,263)