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 / ID as Primary Key in D...
Power Apps
Unanswered

ID as Primary Key in Dataverse Table

(1) ShareShare
ReportReport
Posted on by 98
Is it possible to create a unique primary key field "ID" with autoincrement that acts like other relational databases?  It seems to work sometimes, but I don't understand completely but if I add to a form I want it to populate and increment automatically and I want to be able to reference in other tables, as a many to many relationship, like one field having values from the IDs of my table "1,2,5,7".
I have the same question (1)
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Could be done but why would you want to?
    Dataverse table already include a unique key value even if you don't use it. You can create your own primary key which you can use in relationships and it does not have to be an autoincrement number.
     
    You can set up a many to many relationship as described below
     
  • JK-25091409-0 Profile Picture
    98 on at
     
    I tried many to many relationships but I didn't like it because there was no way to see the relationship data in the tables.   So I started putting comma separated multiple "ID"s in a column (1,2,5,7, etc).
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    You can try to add one , Data type= # Autonumber, and define it as Business required, you can define Prefix if you'd like.
    then you can refer it as you own id.
     
     
  • Verified answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    If you need to understand the relationships from the joining table creating a more informative unique primary key in the two tables would probably be more descriptive than using integers.
    Something like this which you can create and manage.
    Each row still has a unique key (GUID) provided by Dataverse and the primary key that you use can be anything you want and does not have to be a sequential integer so you would not have the concern of two users getting the same number for a record because Dataverse does not provide the facility to assign keys in this manner.
     
     
     
     
     
    If this answered your question please mark it as such
     
    If this answered your question please mark it as such

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard