cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JS_808
Level: Power Up

submit multiple forms

Hi everyone, 

 

I have a bottom with following code:
" SubmitForm(Form1) And SubmitForm(Form2) And SubmitForm(Form3) And UpdateContext({Popup:true}) "

 

I have three forms on one screen. Backend linked to an excel table stored in one drive. 

 

When clicking the bottom, only the first form gets submitted and the text box in either form2 or form3 always have some issue. 

 

Can anyone provide some insights? 

 

Thanks,

JS

 

 

Capture.JPG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: submit multiple forms

Hi @JS_808,

 

Submit Multiple form is not supported, please check the response from CarlosFigueira in the following thread:

Multiple form submit

Quoted here:

"

Currently this scenario will not work if you have both forms set to the same data source (it should work if you have it set to different data sources, please let me know if this is not the case). When you submit the first form, the data source is refreshed, which causes the item in the second form to be refreshed as well - and the changes that you made are lost.

 

If you have the Item property of both forms set to the same record, then that's expected. If you make changes in one of the forms we do want to update that record everywhere in the app so that it contains the latest changes from the server

 

Even if you have the two forms with different records, it's possible that the change in one of the records will cause a change in the other record (e.g., in a SQL trigger operation), so PowerApps takes the "safe" approach and updates all records bound to that data source in the application, which is why the second form "loses" the changes and therefore there's nothing to be submitted.

"

Regards,

Michael

Community Support Team _ Michael Shao
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

7 REPLIES 7
Super User
Super User

Re: submit multiple forms

Use a semicolon instead of "and".

JS_808
Level: Power Up

Re: submit multiple forms

Hi @Drrickryp,

 

I've tried that too. Same error in these textboxes.

 

I set textbox value to "required". When i set "required" = false, all three forms get submitted successfully. But text value for form2 and form3 became empty.

 

Felt like when form1 get submitted, textbox for form2 and form3 got cleared. But i did set "reset" option to be false.

 

Don't know what's going on.

Thanks,
JS

 

 

 

Community Support Team
Community Support Team

Re: submit multiple forms

Hi @JS_808,

 

Submit Multiple form is not supported, please check the response from CarlosFigueira in the following thread:

Multiple form submit

Quoted here:

"

Currently this scenario will not work if you have both forms set to the same data source (it should work if you have it set to different data sources, please let me know if this is not the case). When you submit the first form, the data source is refreshed, which causes the item in the second form to be refreshed as well - and the changes that you made are lost.

 

If you have the Item property of both forms set to the same record, then that's expected. If you make changes in one of the forms we do want to update that record everywhere in the app so that it contains the latest changes from the server

 

Even if you have the two forms with different records, it's possible that the change in one of the records will cause a change in the other record (e.g., in a SQL trigger operation), so PowerApps takes the "safe" approach and updates all records bound to that data source in the application, which is why the second form "loses" the changes and therefore there's nothing to be submitted.

"

Regards,

Michael

Community Support Team _ Michael Shao
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

JS_808
Level: Power Up

Re: submit multiple forms

Thanks @v-micsh-msft

 

I changed each form to a different source and it worked.

 

Many thanks!

StuartSSTech
Level: Powered On

Re: submit multiple forms

Is this still a known issue that you cannot submit multiple forms without using multiple data sources

pdavis004
Level: Powered On

Re: submit multiple forms

@StuartSSTech 

 

I have an app that submitts multiple forms to SQL, it works. Currently having an issue when its a new record each form is submitted ans a seperate record, but on editing a record it workds seamlessly.

pdavis004
Level: Powered On

Re: submit multiple forms

I found that this answer from @Jcole429 here works: 

 

https://powerusers.microsoft.com/t5/General-Discussion/How-to-submit-multiple-forms-at-one-buttom/m-...

 

Re: How to submit multiple forms at one buttom
 

I have many forms across different screens in my app that I submit to one record in my SQL database. The method I use is. 

Patch('database', Defaults('database'), Form1.Updates, Form2.Updates, Form3.Updates...etc.)

 If there is already a record in the database that I want to modify I search for the ID_Key (Must be a unique key to work) and then patch to that. 

Patch('database',{ID_key:LookUp('database',Name=DataCardValue9.Selected.Value,ID_key)},Form1.Updates, Form2.Updates, Form3.Updates, etc...)

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 95 members 5,118 guests
Please welcome our newest community members: