# Running up a score on a quiz by returning to previous question

**URL:** <https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174>\
**Category:** Teachers' Lounge\
**Created:** [July 8, 2023, 6:09pm UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174 "2023-07-08T18:09:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregsemailhelper209](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gregsemailhelper209](https://community.thunkable.com/u/gregsemailhelper209)\
**Post date:** [July 8, 2023, 6:09pm UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174/1 "2023-07-08T18:09:01Z")

</div>

I need some help with block logic.

I have created a multiple choice quiz with both a Next and Previous button. To avoid the player simply banging on the correct answer multiple times to run up the score, I have disabled the correct answer once the user has selected it.

However, if a user chooses to use the Previous button to return to a question once they have answered it (for review, in the best case), they can hit the correct answer again and run up the score.

Is there a logic sequence that says “If this question has been answered, the correct answer button must be disabled?” Thanks in advance.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 8, 2023, 9:48pm UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174/2 "2023-07-08T21:48:59Z")

</div>

If you have a previous button then you need to store the button “state” for each answer (for each question). You can do that with _stored_ variables or with a local data source. If you have many questions, I’d recommend a data source.

When the user clicks a button, store that button’s state as “clicked” or “false” or some other value that makes sense to you. Then have an If condition when the user clicks it to check if the value of the associated data source cell (or variable) allows the user to click it again.

When the screen opens, you’ll need to loop through all possible button values for that question and set the buttons to enabled or disabled based on the stored values.

---

<div class="post-metadata">

**Author:** ![gregsemailhelper209](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gregsemailhelper209](https://community.thunkable.com/u/gregsemailhelper209)\
**Post date:** [July 9, 2023, 1:51am UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174/3 "2023-07-09T01:51:31Z")

</div>

Thanks for your reply! I have been watching YT about stored variables just today. I am indeed using a local DB so I will review your second and third paragraphs starting now. It is still a bit overwhelming as I’ve only been using the program for a couple of weeks. I will experiment and once I’ve implemented what you say I will declare this question the “solution,” following community rules. Thanks!

---

<div class="post-metadata">

**Author:** ![gregsemailhelper209](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gregsemailhelper209](https://community.thunkable.com/u/gregsemailhelper209)\
**Post date:** [July 11, 2023, 5:58pm UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174/4 "2023-07-11T17:58:46Z")

</div>

I hope your solution provides aid to the next person. In my case, I am going to delete the Previous button. Its value is not worth its cost.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:33pm UTC](https://community.thunkable.com/t/running-up-a-score-on-a-quiz-by-returning-to-previous-question/2499174/5 "2024-11-08T13:33:42Z")

</div>


