Hello Power Users,
I am developing an app similar to a quiz/survey, however, in this instance, a user can record multiple sessions (each session is saved as a record/row with multiple questions/responses - columns). Am running out of ideas on how a user can edit/update previously recorded radio button options. Any suggestions/examples on how a user can pull up a record from a collection to update/edit a given question in a record entry? All records are saved to a collection prior to committing to a SQL database. Thanks
Example
Solved! Go to Solution.
Hi,
For every session while collecting the values into collection add two more columns Session Name (Session1,2,3 etc)- Session Start Time (Date time of session start).
Place a dropdown on top left of the form. Binding the collection and display session Names. e.g. Drop down shows Session1, session2, session3 etc.
Selected session related row should be saved in another collection (which ideally has one active row information)
The active row information should be bound to all radiobuttons.
When user updates session related dropdowns it updates back only to particular row, particular column.
Please feel free to let me know if that answers your questions.
If it answers do mark it as verified.
Regards,
Pavan Kumar Garlapati
Hi,
For every session while collecting the values into collection add two more columns Session Name (Session1,2,3 etc)- Session Start Time (Date time of session start).
Place a dropdown on top left of the form. Binding the collection and display session Names. e.g. Drop down shows Session1, session2, session3 etc.
Selected session related row should be saved in another collection (which ideally has one active row information)
The active row information should be bound to all radiobuttons.
When user updates session related dropdowns it updates back only to particular row, particular column.
Please feel free to let me know if that answers your questions.
If it answers do mark it as verified.
Regards,
Pavan Kumar Garlapati
Hi @mykbitz ,
Could you please share a bit more about the data structure of your SQL Table/Collection?
Do you create a question column in your SQL Table/Collection for each question in your quiz/survey app?
Further, how do you save data into your collection? Using Patch function? Could you please share more details about the formula?
I assume that there is a column (SectionColumn) in your collection, which is used to store the Section value (Part A, Part B, Parat C, ...). I have made a test on my side, please take a try with the following workaround:
Within your previous question screen, set the OnSelect proeprty of the "NEXT" button to following:
If( !IsBlank(LookUp(RecordsCollection, SectionColumn = "Current Section Value")), /* <-- "Current Section Value" -> Part A, Part B, Part C, ...*/ Patch( /* <-- Add new record into your collection */ RecordsCollection, Defaults(RecordsCollection), { QuestionColumn1: AnswerRadio1.Selected.Value, QuestionColumn2: AnswerRadio2.Selected.Value, ... } ), Patch( /* <-- Edit existing record in your Collection */ RecordsCollection, LookUp(RecordsCollection, SectionColumn = "Current Section Value"), { QuestionColumn1: AnswerRadio1.Selected.Value, QuestionColumn2: AnswerRadio2.Selected.Value, ... } ) )
Note: I assume that you save the section record into your collection when you click the "NEXT" button.
More deetails about Patch function, please check the following article:
Best regards,
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 |
---|---|
190 | |
57 | |
43 | |
36 | |
34 |
User | Count |
---|---|
270 | |
78 | |
75 | |
74 | |
67 |