cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PRAVEENZNMD
Helper III
Helper III

Dataverse Primary Key Column allowing duplicate values

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
dpoggemann
Super User
Super User

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-cle...) but this can be overridden and the record can be added anyway.  

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

AhmedSalih
Super User
Super User

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.

 

 

 

View solution in original post

2 REPLIES 2
dpoggemann
Super User
Super User

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-cle...) but this can be overridden and the record can be added anyway.  

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
AhmedSalih
Super User
Super User

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.

 

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,341)