
Announcements
Hello!
I have a power app that collects responses to a survey. It has a gallery called ItemsGal. In that ItemsGal I have added Fluent UI controls taken with copy-paste from Microsoft Teams Power App, for each item: text input, combobox, rating, slider and datepicker. They are visible depending on the value of the "QuestionType" column from a sharepoint list. Whenever someone takes the survey, I have a Submit button that patches the responses in another sharepoint list. I also have another gallery, called TabGal that contains 3 buttons, that works as a tabbed gallery to filter the questions, meaning the items in ItemsGal. So whenever I click on a button different items are showed in ItemsGal depending on the value of"QuestionType" column. I also have a "Answer" button to set the controls in the gallery to Edit Mode so people can answer the questions. My problem is that when I try to click on "Answer" button and complete the questions filtered when pressing the first button from TabGal, when I click on the second button and other questions appears, I lose the data that I entered previously in the questions filtered on the first button press. Is there a method to keep the data that I entered without submitting it, since I want to submit all the questions together?
Thank you!
I resolved this by creating a collection on "Answer" button press that stores all the questions of the form, then on the button from the tabbed gallery I create another collection with only the questions that are visible on that tab and updating the first collection using UpdateIf function with the responses stored in the second collection, and also setting the Value property of the Fluent UI controls to the current responses from the first collection. Then on "Submit" button press, I use UpdateIf to update the first collection with the responses from the last tab, then patch those to another sharepoint list that stores all the responses.