Hi all,
I'm pretty new to Powerapps and was hoping someone can help me. I've got a connection to 2 SQL tables - one full of questions and the other ready for answers.
My app collects the data from the question table and then loops through them, asking a multi choice question for each, dynamically building the Q&A's based on the data.
As the user answers a question I'm Collecting the data on push of the submit...some of the data is coming from the existing questionnbank collection and some from the text or radio button...currentRow is my loop control.
Collect(myResults,{child_org_id:12345,category_id:Last(FirstN(questionbank,currentRow)).category_id,question_id:Last(FirstN(questionbank,currentRow)).question_id,index_ref:Last(FirstN(questionbank,currentRow)).indexIndicator,question_type:Last(FirstN(questionbank,currentRow)).question_type,maximum_score:Last(FirstN(questionbank,currentRow)).maximum_score,numeric_answer:Radio1.Selected.myValue,verbatim_answer:TextInput1.Text,uid:Text(usersap),completion_ref:completionRef,createddatetime:Now(),rebased:0});
Which works fine.
Now, when I reach the last question I want to patch this data to the t_results datasource - I've tried patch('DS',Default('DS)',myResults) but to no avail...
I know I could patch each record in turn, but I need the user to complete all questions, so a final submission is preferrable.
I've read some posts on batch patching, but I'm a bit lost...Can anybody suggest a solution?
Thanks

Report
All responses (
Answers (