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 / A record with matching...
Power Apps
Suggested Answer

A record with matching key values already exists

(1) ShareShare
ReportReport
Posted on by 15
Hello,
I build a user dataverse table using as primary name as the full name of the user.  Since we have some homonym, the primary name is not unique.  I created an alternate key being the unique identifier of the user which is effectively unique.  I am using a dataflow to fill in the dataverse table from a SharePoint list.  An upsert using the alternate key was chosen to refresh periodically the user list.  The dataflow ran successfully in development for the unmanaged solution.  The solution was imported in acceptance as a managed solution and the dataflow executed successfully.
The solution was then imported in production again as a managed solution.  But, the dataflow ran in error with the following error for the homonym records ""message":"A record with matching key values already exists.","cdsErrorCode":"0x80040237","InnerErrorMessage":"Cannot insert duplicate key."".
Trying to enter the homonym record directly in the dataverse table, I am getting the following error when entering the full name in the primary column "There was an error in saving this record.  A record with matching key values already exists".
I do not understand these errors in production since there is no error in acceptance  And, as far as I correctly understood, a primary column do not have to be unique.  And, the alternate key used by the dataflow contains unique data.
What is wrong?
Thanks.
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    I believe that primary name column in Dataverse is expected to be unique.
     
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    To make clear The primary field does not go away because you say you have a secondary key,.'
     
    I would need to see your expression for doing, what you believe is an upsert, as it sounds like it is in fact just doing creates, not upserts.

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard