cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmbreb
New Member

How do I update and replace the score when users change their answer?

How do I replace a previously selected variable when the user goes back and changes their answer?

 

This app is like a quiz where the user goes through several questions, with each question featuring different options of different score values (e.g. if they select option A, it adds 0 to the score, option B will add 3 to the score, etc):

 

If(Radio1.SelectedText.OptionText = LookUp(Options,OptionId="1.1",OptionText), Set(Score,LookUp(Options,OptionId="1.1",OptionScore)));

If(Radio1.SelectedText.OptionText = LookUp(Options,OptionId="1.2",OptionText), Set(Score,LookUp(Options,OptionId="1.2",OptionScore)));

 

At the end, it calculates the final score to be out of 5: Round(((Score/110)*5),1)

 

The issue is, if the user goes back to a previous question and changes the selected option, the final score seems to add this on top rather than replace the previous answer, so the user ends up getting a final score like 6/5, 7/5.

 

How do I update and replace the score when users change their answer for some questions?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
lcimon
Resolver I
Resolver I

Hello @rmbreb,

 

To have this behavior, you need to save the score for each question separatly (in a collection or multiple variables) and calculate the final score at the end.

View solution in original post

1 REPLY 1
lcimon
Resolver I
Resolver I

Hello @rmbreb,

 

To have this behavior, you need to save the score for each question separatly (in a collection or multiple variables) and calculate the final score at the end.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,065)