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 - Building Power Apps
Answered

Update or add new record in SQL Server via Power Apps

(0) ShareShare
ReportReport
Posted on by 105
Hi team, 
 
I need to create a page that allows user to key in product target yield using Power Apps.
We stored all database required for this use case in SQL Server. I already have premium license and environment to connect Power Apps to SQL Server. 
 
This is what the database looks like:
Columns Data type Example / Remarks
productfamily string
SAMSUNG APPLE, Lenovo, etc...
-> existing/data already exist in table as extracted from Excel file
partno string
123456789
-> existing/data already exist in table as extracted from Excel file
description string
product description
-> existing/data already exist in table as extracted from Excel file
targetyield (%) integer/decimal number (yet to be decided) 99.65 -> manually key in by users on Power Apps
year date 2025 -> manually key in by users on Power Apps
 
My question:
1. Is it possible for Power Apps to pass targetyield and year user input/data into SQL Server? Or do I need to create a flow from here? 
 
Thank you so much, I really appreciate all the guidance and information received.
 
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    152,141 Most Valuable Professional on at
    Update or add new record in SQL Server via Power Apps
    Based on the limited information, it would seem to be a simple Patch - example from inside a Form or Gallery
    Patch(
       YourTable,
       ThisItem,
       {
          targetyield: Value(YourTextControl.Value) // Modern control example
          year: YourDataPicker.SelectedDate
       }
    )
    If outside, ThisItem would need to use a LookUp instead based on the unique identifer in your Table.
    Lookup(
       YourTable,
       YourIdentifier = GalleryName.Selected.Identifier
    )
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • AR-03030545-0 Profile Picture
    105 on at
    Update or add new record in SQL Server via Power Apps
     
    Thank you or your response. May I know what detailed information that you need, or I need to provide for better understanding?
     
  • WarrenBelz Profile Picture
    152,141 Most Valuable Professional on at
    Update or add new record in SQL Server via Power Apps
    I really need to understand your process - I took a guess with my response, so is that in the correct direction ?
  • AR-03030545-0 Profile Picture
    105 on at
    Update or add new record in SQL Server via Power Apps
     
    Yes, you are right. Basically, I want to know if I can directly use the Patch function to pass these user input from Power Apps interface to my database or table in SQL Server. 
    I want to confirm and play around with this first before I dive into it. 

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 755 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 350 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 248 Super User 2025 Season 2

Last 30 days Overall leaderboard