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 / Dataverse Primary Key ...
Power Apps
Unanswered

Dataverse Primary Key Column allowing duplicate values

(0) ShareShare
ReportReport
Posted on by 96

Hello Team,

 

While creating a dataverse table, there is a default  primary key column. However it seems like I can enter duplicate values in that primary column. Is this by design? 

 

Also how can I restrict duplicate entries in table. 

 

Thanks,

Praveen

I have the same question (0)
  • Verified answer
    Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @PRAVEENZNMD ,

     

    The primary key is actually the GUID of the records in the table, this is unique.  The Primary Name field is not unique and really can not be enforced to be unique out of the box.  You can setup duplicate detection rules so when someone enters a new record it will provide a warning (https://docs.microsoft.com/en-us/power-platform/admin/set-up-duplicate-detection-rules-keep-data-clean) but this can be overridden and the record can be added anyway.  

  • Verified answer
    AhmedSalih Profile Picture
    6,678 Moderator on at

    Hello @PRAVEENZNMD , I had to do something similar like you use case before and I just made sure that the data in my Primary Name Column initially has no duplicates (if you have data already), and then create an Alternate Key for the table and select the Primary Name Column. This will make it a primary key and won't allow duplicates. 

    AhmedSalih_0-1658322552996.png

    AhmedSalih_1-1658322643656.png

     

    NOTE: Employee Identification is my Primary Name Column for this table.

     

     

    Regards,
    Ahmed
    If my reply helped you, please give a 👍. And if it has solved your issue, please consider a a 👍 & Accepting it as the Solution to help other members of the community find it more.

     

     

     

  • SZ-23070748-0 Profile Picture
    23 on at

    Hello @dpoggemann, I've been wondering how my user can correctly assing a primary key in lookup column if the latter has duplicate values? Consider the following scenario: I want to add lookup column "Project Owner" and lookup "Users" table. In case I have multiple people with the same Full Name (Primary Column of table of "User" name) how can my user know who is a correct "Project Owner"? 

    What I would like is to have a possibility to concatenate "Full Name" with some other column, let's say Domain Name, which I know is unique. Is something similar possible in Dataverse? What would be your suggestion on how to handle it? 

    Thank you!

    P. S. obviously I don't want to change anything in the system table, I used it just as an example 🙂

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Sergii24 ,

    When you setup a lookup and choose the record to populate the lookup, it is not connecting behind the scenes with the Primary Name column but with the GUID of the record so it doesn't really matter to the relationship specifically if it is a duplicate name value.  It is of course harder when you are selecting the one to populate the lookup because you would see two with the same name 😉


    Note, as mentioned by @AhmedSalih you can set the alternate key on that table to the Primary Name field and force uniqueness.  

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