Hello,
Apologies for a long, long post below
I'm trying to make something work and it works only partially.
I'm trying to create a request form which has 2 screens for input and the final 3rd screen for a Thank You
First 2 screens have different columns in them and here's how I've set it up.
The first screen works just fine. However, I'm facing an issue on the second one related to bulk data in a collection
On the second screen, I have 3 columns and have used a Load and Clear button. The Load button is used to create a collection and store the data of the 3 columns. Clear button is used to clear the collection.
I've then used a Data Table to load the collection data and every time I fill in the 3 columns and hit Load, it loads up the collection data in the table. I've also used a submit button on the 2nd screen to patch the data for both 1st and 2nd screens.
The 1st screen's data is saved in a form and I've used a form on the 2nd screen as well and tried to load the data in a collection within a form itself.
The Issue: Now, collection works fine as far as loading the data on the table goes. However, when I hit Submit on the 2nd screen and patch the data, the item on the list shows up but it only shows the last row of the table that I've used to show the collection data on the second screen. The collection entries before the last row don't show up at all and no new item gets created for them.
What I need to achieve: I need to make it work in a way that the data on the 1st screen's columns remains the same and then it shows the unique entries of the second screen in a new item for each entry.
For eg: This is the collection data I've got in a table
Region | UID | Name |
APAC | 123456 | SunriSe |
EMEA | 989898 | Test |
Now, I want to create a new item for every collection entry so that the 1st screen's data remains the same on both items but it shows the unique data entries of the 2nd screen's items as below:
ScreenOneCol1 | ScreenOneCol2 | ScreenOneCol3 | Region | UID | Name |
Test Data | My Data | Their Data | APAC | 123456 | SunriSe |
Test Data | My Data | Their Data | EMEA | 989898 | Test |
Below is the code I've used on the final submit button:
Patch('My Request Form',Defaults('My Request Form'),Form1.Updates,Form3.Updates);Navigate(ThankYouScreen)
Form1 is the form used on Screen 1 and Form3 is used on Screen 2. Thank You screen is Screen 3
Am I using the incorrect method on the final submit button to achieve my objective.
Is there any other way to patch the 1st screen's data with the collection I've created on 2nd screen and then show the data as in the above table? Is it even possible?