web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Check if Records are D...
Power Automate
Answered

Check if Records are Duplicated in existing table / Dataverse and Delete / Duplicate Rows

(0) ShareShare
ReportReport
Posted on by 9

Hello community, 

I want to build a flow that checks if the new item/record added into the dataverse table, its duplicated from an existing item already in the table. If so, then delete one of the records. 

 

This is tricky because, in order to be considered as duplicate, the values of the fields needs to be exactly for some columns. 

 

Example, 

I have columns ID , Article Number, and PO, so if new item added has the same ID, Article number and PO, than an existing record with same ID Article number, and PO ,   then one of these two "lines" needs to be deleted. 

 

 I cannot use the Duplicate Detention Rules in Dynamics because condition must met that ID Article number and PO are the same. Three columns at the same time. 
Detention rules as far as i understood are when one of the condition fields is met. 

 

BcooS_1-1668456301247.png

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @BcooS ,

     

    I made a sample for you.

    Create a table in Dataverse with the following data.

    vxiaochenmsft_0-1668490771005.png

     

     

    Create the following flow, I will explain it step by step.

    vxiaochenmsft_1-1668490771009.png

     

     

    Add a trigger that fires when a new row is added.

    vxiaochenmsft_2-1668490771011.png

     

     

    List rows in the table where the ID, Article Number, and PO are equal to the new row.

    crba2_id eq '@{triggerOutputs()?['body/crba2_id']}' and crba2_articlenumber eq '@{triggerOutputs()?['body/crba2_articlenumber']}' and crba2_po eq '@{triggerOutputs()?['body/crba2_po']}'

    vxiaochenmsft_3-1668490771016.png

     

     

    Set conditions to determine whether the number of filtered rows is greater than or equal to 2.

    length(outputs('List_rows')?['body/value'])

    vxiaochenmsft_4-1668490771018.png

     

     

    If yes, delete new row.

    vxiaochenmsft_5-1668490771021.png

     

    Best Regards,

    Wearsky

     

  • BcooS Profile Picture
    9 on at

    Thank you !!! 
    It really worked !  I appreciate the quick response 🙂 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard