I have a scenario in which I have a gallery made up of questions based on the country someone picked ( each country may have a different combination of questions and every time they choose a country or use the onchange property of the country selector dropdown, I collect the questions for that country and their questions data type (Date,text input, choice, yes/no, etc).) into a questions_collection. Now then I use this questions collection as the data source for the project question list for the user to fill out and provide their answers. In the gallery I have one control for each of the data types, one text input control for multi-line answers, one date_input control for date answers, one choice control for choice answers and a radio button control for yes/no answers. Now what I need to do is somehow patch these answers back to a master answer list in Sharepoint and the way I'm thinking is to use a forall(collect function to collect all the answers in the gallery and then patch that collection to the data source? I think thats the way to go about it, but I have run into some obstacles so far and was looking to see if anyone had any suggestions on making this easier? The SharePoint Answers list currently has every column for each of the questions and upon patch even if the question was not in that country set, I'm assuming I would need to give it a blank value? Any advice on how to go about this would be much appreciated
Here is my current code for the collection:
Clear(col_answers);
ForAll('Project Type Questions'.AllItems,Collect(col_answers,{Question:Question_lb.Text},{Dates:Date_Input.Value},{Question_Text: Text_Input.Text},{Yes_No:Radio1.Selected.Value},{Choice:Choice_Input.SelectedItems}))
But I am getting a weird result:

I'm not sure why its skipping so many lines in between one another because the gallery looks like this:
