Hello,
I have a project that would require pagination, in which Screen 1 is the first page of the form, then Screen 2 is the next page of the form, and then collect all of that data and add them into one collection (SPSubmit)
Based on my exploration, I would like to achieve the following:
Screen 1 - Fill out all fields, patch data to Page1 (collection)
Screen 2 - Fill out all fields, patch data to Page2 (collection), Patch all data (Page1, Page2) to SPSubmit (collection), Patch SPSubmit data to SPO List (SharePoint list), navigate to success screen
Screen 1
- Declare Page1 as a Collect option
- Patch all fields to Page1
- Navigate to Screen 2
Screen 2
- Declare Page2 as a Collect option
- Patch all fields to Page2
- Patch Page 1 and Page 2 to SPSubmit
- Patch SPSubmit to SPO List
- Navigate to Success Screen
My issue here is I am encountering an error on SPSubmit, see below:
In OnStart, I have the following code:
ClearCollect(SPSubmit,{Title: "",MIN: "",BusinessName: "",AuthorizedRep: "" ,BusinessAddress: "",Attendee: "",Position: "",Merch: "",FBUserName: "",DateAttended: "",TopicsTrained: ""});ClearCollect(Page1,{Title: "",MIN: "",BusinessName: "",AuthorizedRep: "" ,BusinessAddress: ""});ClearCollect(Page2,{Attendee: "",Position: "",Merch: "",FBUserName: "",DateAttended: "",TopicsTrained: ""})
For Page1 collection, I have the following code (for Patch only - the .text, etc. codes are found in my app as the fields):
Patch(Page1,Defaults(Page1),{Title:CardNo.Text, MIN:MIN.Text,BusinessName: BizName.Text ,AuthorizedRep: CO.Text,BusinessAddress: BizAdd.Text})For Page2 collection, same format with Page1:
Patch(Page2,Defaults(Page2),{Attendee: DataCardValue1.Text, Position: DataCardValue8.Text ,Merch: DataCardValue10.Selected.Value ,FBUserName: DataCardValue5.Text ,DateAttended: DataCardValue2.SelectedDate ,TopicsTrained: Text(DataCardValue3.Selected.Value)});In SPSubmit, here is the code:
Patch(SPSubmit,Defaults(SPSubmit),{Title:Page1.Title,MIN: Page1.MIN ,BusinessName:Page1.BusinessName,AuthorizedRep:Page1.AuthorizedRep,BusinessAddress:Page1.BusinessAddress,Position:Page2.Position,Merch:Page2.Merch,FBUserName:Page2.FBUserName,DateAttended:Page2.DateAttended,TopicsTrained:Page2.TopicsTrained})This is the error:
Please take note that my Page1 fields are custom, while the Page2 fields are from a SharePoint form.
Thanks,
David