After reviewing all of the previous posts about saving data from multiple edit forms, I'm still not able to solve my problem. Hoping to get specific feedback.
I'm building an app that will allow team members to submit brand new change requests and edit existing change requests. The app will be connected to a SharePoint list. The SP list will contain approximately 30 different columns, varying across text, person, drop-down and date fields.
Because of the number of fields, I don't want them all dumped into one Edit form. I want to split them up across multiple forms on multiple screens to make it easier to complete.
I'm setting up the app to have first provide the user two options: 1) Create a new change request or 2) Edit an existing change request. If they chose #1, they will be taken to the first Edit form, which will be in New Mode. If they choose 2, they will be taken to a Gallery Form where they can search for and select their existing item, click for further details, and then click an edit icon, taking them to the first Edit form, which will be in Edit Mode and pre-populated with the item detail that they selected in the Gallery. On each Edit Form screen, there will be a Continue button to continue to the next Edit Form screen. The final Edit Form screen will have a Save button.
I've read that the Patch function can combine the user input from each form into one record in the SP list. However, I'm having problems getting it to work. Here's what I need:
- Syntax for the OnSelect of the final Save button for saving edits to an existing record in the SP list
- Syntax for the OnSelect of the final Save button for adding a new record to the SP list (I'm hoping to use the same button for both edit and new record creation
- Syntax for each Continue button on each Edit form screen
My database is titled Change Request List
My Edit forms are titled NamingForm, CategoryForm, DescriptionForm, ScoringForm
A few of my field names are Initiative Name (text field), Submitter (Person field), Initiative Category (drop-down field), and Start Date (date field).
I do not think this will be possible to do using forms and multiple screens.
What I would do is for whenever a user wants to submit a new request it is taken to Screen1 where he can enter information into text input or any other control. The Next button would create a Collection and store the user input (or just send the info forward as a context variable). Screen 2 would have more user inputs or controls and clicking Next would add new info into collection (or send everything with additional info as context variables forward). Finally on Screen 3 you would have more user inputs, or display all inputs and Save button which would Patch all info into the SP list.