cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danielamgzz
Regular Visitor

It is possible to add an item from Power apps to SQL table?

Im new in Power Apps so i don know if its posible to add an item to a SQL Table from power apps, please help!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Danielamgzz 
To add a little more to @Pstork1 's comments - it looks like you might not have a primary key on your table as all of the fields you have in your form are showing as View only.  This is PowerApps' way of telling you it cannot write to the table...must have a primary key defined for it!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

Yes you can Insert or Update records in a SQL table using Power Apps.  It does require a premium license and there are some prerequisites to the way the table is created that apply.  But it is normally possible.  Here's documentation.

Connect to SQL Server from Power Apps - Power Apps | Microsoft Docs



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 

I already have the connection with SQL, but I do not know how to add the fields of the SQL table to be able to add records

Danielamgzz_0-1637950328201.png

 

Pstork1
Dual Super User III
Dual Super User III

Do you want to add new records of update existing records?

To do that you can submit a Form (New or Edit) or use Patch().

 

Take a look at this walkthrough.  Creating a Basic PowerApp Against a SQL Server Table (pragmaticworks.com)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
RandyHayes
Super User
Super User

@Danielamgzz 
To add a little more to @Pstork1 's comments - it looks like you might not have a primary key on your table as all of the fields you have in your form are showing as View only.  This is PowerApps' way of telling you it cannot write to the table...must have a primary key defined for it!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,426)