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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fastest way create/upd...
Power Apps
Suggested Answer

Fastest way create/update SQL records

(1) ShareShare
ReportReport
Posted on by 145
Hello,
 
I use Azure SQL database like a source for all my apps.
 
For create/update bulk records I use Patch(source,collection).
 
Exist faster way? 
 
BR
jakub
Categories:
I have the same question (0)
  • Suggested answer
    SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at
    Hello,

    In one of my projects, I implemented a solution to patch a collection of 50 records.
    I achieved this by creating a JSON of the collection and sending it to Power Automate.
    Within Power Automate, I iterated through the JSON list and added each record to my SQL database.
     
    I hope this information is helpful.
  • Suggested answer
    cha_cha Profile Picture
    4,932 Moderator on at
    Hello Jakub,
     
    Functions like UpdateIf(source,condition) and RemoveIf(source,condition) are a quick go-to for this however they maybe subject to delegation issue.
     
    As far as I know, not yet tested, it is now possible to run SQL Query using the connection.
     
    • Option 1 (not sure): Run SQL Query from Power Apps directly.
    • Option 2 (a bit sure): Run Stored Procedures from Power Apps directly.
    • Option 3 (definitely): Create a flow to execute SQL queries. Then add this flow to Power Apps.
    Regards,
     
    Charven
     
     
     
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at
    pls try the following:
     
    ForAll(
        YourCollection,
        Patch(AzureSQLSource, Defaults(AzureSQLSource), {
            Column1: ThisRecord.Column1,
            Column2: ThisRecord.Column2
        })
    )
     
    For bulk insert or update operations, Power Automate (Flow) is more efficient as it can handle data operations in larger batches.
    • Create a Flow with an HTTP Request Trigger or use Power Apps trigger.
    • Pass the collection data from Power Apps to the Flow.
    • Use SQL Server actions in the Flow to insert/update records in bulk.
     
  • Suggested answer
    ShaileshP Profile Picture
    31 on at
    The best way to do is, use Power Automate Flow to push the records from PowerApps to Azure SQL Server..
    --Pass the variable information to Power Automate..
    -- Write a Simple Stored Procedure in SQL..
    -- Add that Stored procedure in PowerAutomate Flow to take the input variables.
    -- You can also add a response back to PowerApp, This way if there is any error, that would be handled as well. In short, better error handling.
     
    This will be helpful in future if you are updating multiple tables as all the control of the DML(Insert/update) can be done in stored procedure.. This way it will be efficiently handled.
     
    Let me know if you would require detailed step and I can assist you on 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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard