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 Apps / detect duplicates and ...
Power Apps
Unanswered

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,392 Super User 2025 Season 2 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard