Hi Community,
I tried and searched for an answer but still couldn't figure it out so hoping someone can help me.
I have a dataverse table with a bunch of questions, it's quite simple, i have Category, QuestionID, Question and Answer where 3 options in a choice column "Yes", "Maybe", "No".
When I created a gallery to display the questions by category, with a dropdown box insert in the gallery for each question, I manage to get the defautselelecteditems to show the patched/existing answer. I used a collection in the Answer's dropdown box OnChange property so that if/when user click to select/change answers from the drop down, the final result will be patch via ForAll of the collection. Since I have to break down the display of questions by category, I use TabList to control which category to switch to showing which batch of questions, the gallery underneath the Tablist will then filter the related category accordingly, now, when user selects answers in the previous gallery, once they click to switch to anther category, meaning the gallery will display, say instead of question 1-6, now it will display 7-13, and if user decides to go back to check what they selected previous in 1-6, all the selections in the dropdown will be gone, meaning the answerdropdown box ddanswer.Selected.Value doesn't hold the value. If there was existing old value, it will show as it was the defaultselecteditem.
How do I keep the selected value of all the answers when user makes changes? I suppose I need to revise the defaulselecteditem part but whatever I tried, it just doesn't work.
My defaultSelectedItems for the answer dropdown box is