cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to submit multiple forms at one buttom

Hello,

 

I have 2 forms in my app called EditForm1 & EditForm 2 

 

On form 2 i have 1 button, i would like to save both forms with that single button.

 

 

But how??

18 REPLIES 18
Highlighted
Anonymous
Not applicable

I just did it another way. I removed the second screen and placed them all in one screen. 

Highlighted

I was searching for this solution. Tried your method and it works. Thanks!

Highlighted
Anonymous
Not applicable

Hi Meneghino,

 

your formula was correct. I just made a litte change to the syntax. It works for my project very well.

 

In fact I have two items and one of those items is split into 3 forms:

 

Spoiler
SubmitForm(FinanzJ1);Patch(Finanzdaten,FinanzJ1.LastSubmit,FinanzJ2.Updates,FinanzJ3.Updates);SubmitForm(ItemForm2)

 

The OnSuccess property of all Finanz Forms is set to false.

Highlighted

@Meneghino

 

I think I hear you saying that in some cases it may be better to just use controls that are individually configured to handle CRUD operations on records rather than rely on forms with data cards, etc.

 

I have a similar need where I need to populate one dropdown/lookup with a subset of the lookup choices  but can't get this to work in a datacard with SharePoint integration. The patch operation works fine but then I have to mess around with the remainder of the controls in the form when it comes to a submit/update operation using 'Last()', etc.

 

Your perspective is fresh and unique and frankly I am relieved to think there is a way to provision these controls manually as I am not a big fan of the forms in PowerApps. I'm glad I read your suggestion.

 

I plan to give a go at configuring controls for the view, edit and new states and use patch to update/create records.

 

I would love to hear any additional considerations you may have when using this approach that I may not have thought of and thanks again for helping us to look at this in a different way.

Highlighted

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...)
Highlighted
Community Champion
Community Champion

Hi @PhilD

Thanks for the support.  I have since created this blog post on creating your own forms:

https://baizini-it.com/blog/index.php/2017/09/28/powerapps-101-create-your-own-forms/

Highlighted

Nice!

 

Great example that explains the approach very well, thanks!

Highlighted
New Member

Hi, I might be late to the party by about 2 years but I'm here for future people incase they need help with this problem.

 

I found that doing the following helps submitting multiple forms with one button

 

I use the following code "SubmitForm(MyForm1) && SubmitForm(MyForm2) && SubmitForm(MyForm3) && ...." within the OnSelect Function

 

I've used this to update multiple forms within my Sharepoint List and I hope this helps people in the future

Highlighted

Thank you for your contribution from the future.

 

How would you accomplish this with a model driven app?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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