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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,642)