Announcements
I've built several apps connected to SPO data and am now trying to build my first app connected to SQL data. The DB in question supports our ERP. The first table I am trying to connect to and create a record in was created by our ERP system. Within the table, there are three columns that have auto-generated IDs, including the PK. I cannot figure out how to create the record via PowerApps and then allow SQL to generate the appropriate IDs. Any suggestions?
Hi @JamesWo,
You need follow these,
SubmitForm(myForm)
myForm is the name of your added Edit Form
regards.
Sorry, I should have been more clear. I've got the form all completed since that process is identical regardless of the data source. My issue is that there are a few columns that are auto-generated, one of them being the PK field. They are also non-null fields so when I submit a form, the data isn't written to the table.
Hi @JamesWo
The typical way to define auto-incrementing values with SQL Server is to define an int column and to enable the identity option, like I describe in this post.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-is-asking-for-required-column/m-p/1263939
I imagine those missing values are created by your ERP system, rather than by SQL Server. This is because SQL Server will automatically create server generated values without us needing to do anything extra in Power Apps.
That makes sense. Let me dig into that.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 354 Super User 2026 Season 2
M Bilal Khan 330
Mohsin Ali 232