Re: Save data from multiple screens to submit

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.

Re: Save data from multiple screens to submit

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 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)

Re: Save data from multiple screens to submit

@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?

Re: Save data from multiple screens to submit

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?

Re: Save data from multiple screens to submit

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

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.

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 records...one for form 1 & 2 and then one for form 3 (so I would have 2 entries...

Re: Save data from multiple screens to submit

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.