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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Dual Super User

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

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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