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
Suggested answer

Fastest way create/update SQL records

(1) ShareShare
ReportReport
Posted on by 134
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,603 Super User 2025 Season 2 on at
    Fastest way create/update SQL records
    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
    Fastest way create/update SQL records
    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,988 Super User 2025 Season 2 on at
    Fastest way create/update SQL records
    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
    Fastest way create/update SQL records
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

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 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard