Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Save data from multiple screens to submit

How can I save data from fields across multiple screens to submit as one entry? For example, I can use an Edit Screen to submit a form with 5 fields. I'd rather have a flow with detailed explanations so each field (or two) is on separate screens. I can create a button to the next screen, but how do I save the data from each field/screen and submit all fields at once? Or (and on a related note), if I have to submit each field at at time, how do I append the data to the same record?

Community Champion
Community Champion

How many  input fields do you have? For three input fields the expression is still very compact:

Patch(MyDataSource, Defaults(MyDataSource), {MyTextColumn: TextInput1.Text, MyNumberColumn: Value(TextInput2.Text), MyOtherColumn: TextInput2.Text})

There is no limit that I have yet met for characters in a PowerApps expression, my longest one to date is probably a about a thousand characters.


Can't comment on the roadmap as I am a simple user...

Thanks.  Well the form I'm currently considering has at least 20 fields.  I've decided to use Forms, with the Updates syntax of Patch.  My data source are SharePoint Online lists.  There is a main "parent" list and several "child" lists.  It took me a while, but I firgured out a way to use the Patch function to import a default value of a "key" field in the parent form into its counterpart in a child form.  So solutions involving Patch (rather than SubmitForm, EditForm, etc.) are of particular interest to me in developing apps of this type.

Colinl, can you please share your Patch code. I am still having problems wit my Sharepoint list.

Thanks in advance.



Sure.  Not sure if the below will make complete sense to you (I've tried to be generic), but it assumes a "Creator Form" to initialize a new parent form record; the "Parent Form" itself for data entry; the "Child Form Screen" that has a "Child Form" to add rows to a "Child Gallery List" on the same screen; and a "Browse Gallery List" for the created parent records.  Sorry for any typos.  Still a work in progress ...


OnSelect code for Button to Open Parent Form Screen
; ResetForm(<ParentFormName>)
; Patch(<SPParentList>, Defaults(<SPParentList>), <CreatorForm>.Updates)
; Navigate(<ParentFormScreenName>, Fade)
; NewForm(<CreatorForm>)


OnSelect code for Button to Open Child Form Screen
; Navigate(<ChildFormsScreenName>, Fade)


OnSelect code for Button to "Save and/or Submit" Parent Form
If(<CreatorForm>.Mode = New
, Patch(<SPParentList>
, First(Filter(<SPParentList>, ID = Value(<ParentKeyDataCardValueNumber>.Text)))
, <ParentFormName>.Updates
; Navigate(<AfterSubmitScreenName>, Fade)
, Patch(<SPParentList>
, <BrowseListGalleryName>.Selected
, <ParentFormName>.Updates
; Navigate(<BrowseListScreenName>, Fade)


OnSelect code for Button to Save new line to Child Gallery
Patch(<SPChildList>, Defaults(<SPChildList>), <ChildFormName>.Updates)
; Refresh(<SPChildList>)


OnSelect code for Button to Return to Parent Form Screen
Navigate(<ParentFormScreenName>, Fade)

OnSlect code for button to "Cancel" the newly created parent record
If(<CreatorForm>.Mode = New,
RemoveIf(<SPParentList>, <ParentKeyDataCardValueNumber>.Text = ID)
; RemoveIf(<SPParentList>, <ChildKeyDataCardValueNumber>.Text = <SPChildListKeyField>)
; Navigate(<AfterCancelScreenName>, Fade)

, Navigate(<BrowseListScreenName>, Fade)


Great!! This definitely makes sense.



Continued Contributor
Continued Contributor

@murali  -- Hoping to revisit this solution.  I have a similar need, submit data from multiple screens on a New form.  I implemented the solution from this post, (shown below), and wanted to check if this is a reasonable solution.  This is working for me with a new entry -- where in the original message, you discussed using the Updates for an item being edited. 


My questions then is -- is this a viable solution for submitting a new form collected from multiple screens?  Or should I use Patch?

frmAddNew.Updates,frmAddNew_2.Updates, frmAddNew_3.Updates, frmAddNew_4.Updates, frmAddNew_5.Updates)

Frequent Visitor


I have a similar setup - but I am approaching it slightly differently.  I have a table with about 50 fields that, depending on specific fields, are then split into screens for form entry.  Can you share how you would do the Patch function for 20+ fields in one table (for a new entry)?  So far I have 

Patch( MyTable, Defaults( MyTable), ...)

How would I implement an Update in the Patch function for the different screens that contain fields in the table?

Hey realik,


So I don't exactly understand your question but I think I can help. The way I see it you have a table with 50 columns. You desire to create a new entry for 20 or more of these columns (fields) at a time right? I think you have a few options. 


You could just use a collect function. It won't update already created rows, but it doesn't sound like you need that. I am writing this assuming that your users are using things like text input boxes and drop down menus to enter their information. I think it would look like

Collect(MyTable,{TextInput1: TxtInpt1.text, DropDown1: DrpDwn1.Selected.Value, TextInput2: TxtInpt2.Text, .... })

Where TxtInpt1 is the name of the text input box that the user would enter the information you desire in the TextInput1 column. Collect can collect information across screens.


Your second option is very similar, just use the patch function. I believe you have it written correctly already, just need to fill in the column links.


The last option I can think of involves edit forms. One thing I have done is set up a screen, S1, and on S1 there are just text input boxes and drop down menus. Then I set up a asecond screen, S2, which contains and Edit Form. I put every single column into this Edit Form, so essentially it is a really long edit form with every field in it. Then I change the update field of each data card to the name of the corresponding text box from S1.


It would go like this. You have the text box TxtInpt1 on S1. You have the TextInput1 data card on S2. Set the TextInput1 data card's update value to TxtInpt1.text. Now when you SubmitForm(EditForm1) you will find the information from TxtInpt1 in the TextInput1 column in your database.


You could have one screen for each column (field) if you wanted to, it doesn't matter as long as you set all of the data card's update fields correctly.


I have used each of these methods succesfully in my own apps, so I believe they could work for you as well. I hope this helped.

Thank you for the response! 


I have created the command for submitting 3 forms for a new entry intio a single sharepoint record (multiple fields on each form) as follows:


OnSelect = SubmitForm([@NewForm1]);Patch(TracsBatchJobs,NewForm1.LastSubmit,NewForm2.Updates,NewForm3.Updates);SubmitForm([@NewForm3]);Navigate(BrowseScreen1, Fade)


It was almost working - but seems to have broken when I copied the submit...I say almost because it would submit but it would submit 2 for form 1 & 2 and then one for form 3 (so I would have 2 entries...



Hey realik,


I've been experimenting with submitting two seperate forms as one sharepoint list entry and I have not had much success using actual forms. The method using Collect(), Patch(), and regular text boxes I described earlier worked fine. 


From first glance I can tell that your equation contains two different SubmitForm() statements, so essentially you are submitting two different records. I believe this is why two records would be created. Remove that second SubmitForm() and see what happens.


I hope this helps.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (36,585)