Hi All,
In my app, I have a questionnaire built in a gallery.
My goal is upon successfully answering all the required questions, patching those questions that have been answered.
As I have a few different types of questions in my gallery, such as date or text, I am saving the answers in a hidden Answers_lbl of each gallery Item, then for all the gallery items where Answers_lbl is not Blank, I am creating a collection. In a next screen the user needs to confirm their answers and I want to patch the items of the collection. I am using a dataverse as my data source to save all of my answers.
My current formula for Patching the collection items is the following:
ForAll(
ColAnsweredQuestions,
Patch(
'Questionnaire answers',
Defaults('Questionnaire answers'),
{
Answer: CAnswer
}
)
);
I get an error that my ForAll and Patch functions have some invalid arguments. Any ideas on where am I making a mistake?
Solved! Go to Solution.
What is CAnswer? If it is a field in the ColAnsweredQuestions collection, you'll need to modify your code to this:
ForAll(
ColAnsweredQuestions As aQuestion,
Patch(
'Questionnaire answers',
Defaults('Questionnaire answers'),
{
Answer: aQuestion.CAnswer
}
)
);
Hope that helps,
Bryan
What is CAnswer? If it is a field in the ColAnsweredQuestions collection, you'll need to modify your code to this:
ForAll(
ColAnsweredQuestions As aQuestion,
Patch(
'Questionnaire answers',
Defaults('Questionnaire answers'),
{
Answer: aQuestion.CAnswer
}
)
);
Hope that helps,
Bryan
Hi @newb Please can try below formula
ForAll( ColAnsweredQuestions,
Patch('Questionnaire answers',
{
Answer: CAnswer
}))
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
181 | |
47 | |
46 | |
34 | |
33 |
User | Count |
---|---|
260 | |
87 | |
79 | |
68 | |
67 |