cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Submit Form to SPList and patch on Postgres

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Submit Form to SPList and patch on Postgres

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Submit Form to SPList and patch on Postgres

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,301)