web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Suggested Answer

Create a standard Primary Key Integer.

(0) ShareShare
ReportReport
Posted on by 72
I see power apps defaults to non-standard primary keys.  Using text.  I would like to use the standard primary key ID as a integer.   I see many people default to text, but that breaks the system.   The primary key is for internal use as a integer.  Code depends on these being standard.
 
What is the default way to create a standard primary key ?
 
again, please do not suggest text or other data types for a primary key.  I need it to be a standard, internal, unique long integer.   This is required in order for the database to run properly.
 
Suggestions ?
 
thanks
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    280 Super User 2025 Season 2 on at
    Create a standard Primary Key Integer.
    Good Afternoon, 
     
    After reading this I have a few quick suggestions but, may change them based on your follow up.
     
    I read the line you put about "database to run properly" are you using a external database like MSSQL or MySQL etc.
     
    Database
    If you are then changing the field in your data base for the item creation: Define an INT column as IDENTITY primary key in the schema. Then if you are using virtual tables in Dataverse with a Power Automate frontend to add items you can add items a either set the IDENTITY column as a read-only or Visible=False this will generate a UID without any issues of duplicates if it's on read only they could also copy it for tracking.
     
    Dataverse
    If it's a Dataverse it's really recommended that you accept the GUID system as a PK an extra integer column is going to cause issues or require a lot of overhead to keep unique values.
     
    I don't believe its SharePoint but, if it is again us the ID column.
     
     
    SharePoint
    If you need the user to be able to delete it the only option is to use logic like you would for a registration system for a website.
     
    Allow the user to fill the column have a conditional on the submit button for a lookup if the value they wrote exists in the current items in the table it won't allow them to submit project a message to them that value is taken or already exists. This will require a lookup request every time a user types or changes the value and creates a lot of overhead.
     
     
    Hopefully these answer your question if they do please select this as the solution if not please feel free to follow up with more information this seems like an interesting problem set, I would love to help out.
     
    Have a wonderful day!
  • RG-27121653-0 Profile Picture
    72 on at
    Create a standard Primary Key Integer.
    I see dataverse does not work as a standard database engine.   Makes it super hard to move a functional database to the dataverse.   We are looking at alternative solutions.   Unfortunately, these requirements have moved us away from power platform, graph, dataverse, and sharepoint.   These systems are simply not capibile of doing standard database activities.
     
    Its just way easier to do this in house with functional systems, rather than fighting with these disfunctional systems on O365.
     
    Thanks anyway.
     
    Cheers!

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

Coming soon: forum hierarchy changes

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard