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 / Submit Form to SPList ...
Power Apps
Answered

Submit Form to SPList and patch on Postgres

(0) ShareShare
ReportReport
Posted on by 116

Hi All,

 

Just quick question, I am plannig to do to Submit Form on SPLIST data and Patch update item on PostgreSQL on one click button, is it possible?

Right now I am only able to get the Gallery from Postgre, but tried to update the list is not working.

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @daroot,

    Could you please share a screenshot about your app's configuration?

    Could you please show more details about the SubmitForm function and Patch function you used within your app?

    Based on the needs that you mentioned, I think it is impossible to be achieved in PowerApps with single one button?

    I assume that you want to submit a new record into your SP list and update an existing record in your Postgre SQL table, I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the "Submit" button to following formula:

    SubmitForm(EditForm1); /* <- Submit Form data into your SP list */
    Patch(
     'YourPostgreSQLTable', /* <- 'YourPostGreSQLTable' represents your Postgre SQL Table */
     LookUp('YourPostgreSQLTable', PrimaryColumn = PostgreBrowserGallery1.Selected.PrimaryColumn), /* <- Find the record you want to update in your PostgreSQL table*/
     {
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    )

    Note: PrimaryColumn represents the Primary column in your PostgreSQL table. PostgreBrowserGallery1 represents the Gallery control which pull data from your PostgreSQL table.

     

    In addition, you could also consider take a try with the following workaround:

    Set the OnSelect property of the "Submit" button to following:

    SubmitForm(EditForm1); /* <- Submit Form data into your SP list */

    Set the OnSuccess property of the EditForm (EditForm1) to following:

    Patch(
     'YourPostgreSQLTable', /* <- 'YourPostGreSQLTable' represents your Postgre SQL Table */
     LookUp('YourPostgreSQLTable', PrimaryColumn = PostgreBrowserGallery1.Selected.PrimaryColumn), /* <- Find the record you want to update in your PostgreSQL table*/
     {
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    )

    More details about the Patch function in PowerApps, please check the following article:

    Patch function

     

    Best regards,

    Kris

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard