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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / detect duplicates and ...
Power Apps
Suggested Answer

detect duplicates and merge them together?

(0) ShareShare
ReportReport
Posted on by

Hi,

I’m facing the following challenge:

I have four custom tables in Dataverse: A, B, C, and D.

  • A, B, and C: These tables contain duplicate records.
  • D: This table contains data rows that are based on (and reference) records from A, B, and C.

The Problem:

If I simply start deleting duplicates from A, B, and C, the related records in D will lose their references, which will result in incomplete or broken data in D.

What I’m Looking For:

I need an automated solution that:

  • Detects and removes duplicates from A, B, and C.
  • Automatically updates the references in D so they correctly point to the remaining (non-deleted) records.

What I’ve Tried:

I’ve used the Deduplicator tool from XRMTools, but it only identifies duplicates and seems to offer no functionality beyond exporting the list.

My Question:

Is there a better process or tool that can handle this automatically, or would I have to resolve this manually?


Thank you in advance!

I have the same question (0)
  • Suggested answer
    BhaskarDhone Profile Picture
    1,394 Super User 2026 Season 1 on at
    This won't be straight forward. Assuming this is one time cleanup. Try below power automate approach.
     
    Step 1: Create Temporary Mapping Tables
    • Create one temp table for each of A, B, and C — call them TempA, TempB, and TempC.
    • These tables will store:
      • A natural key (e.g. Title) Field which is your identifier as duplicate
      • A "Master" GUID (the one you’ll keep)
    These mapping tables act as a controlled lookup reference.

    Step 2: Populate Mapping Tables
    • For each title (or matching logic), identify one master record in A/B/C.
    • Insert into the temp table:
      • Title → Master GUID
    • This gives you a clean list of what GUID should be used going forward.

    Step 3: Update Table D (Reference Table)
    • Run a Power Automate flow that:
      • For each record in D, get the current related GUID (from A, B, or C).
      • Use the corresponding temp mapping table to find the correct master GUID.
      • Update the reference field in D to point to the master GUID.
    Repeat for all three mapping tables (A, B, and C references).

    Step 4: Delete Duplicate Records
    • For each main table (A, B, C):
      • Delete all records that are not listed in the corresponding temp table as “Master” GUIDs.
      • You’re keeping only the master for each duplicate group.

    Step 5: Cleanup
    • Once all relationships in D are correctly updated and duplicates removed:
      • Delete the temp mapping tables (TempA, TempB, TempC) — no longer needed.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard