Quiz - Choice vs Answer not working

Help,

I’ve been at this for a day and a half. The app is a quiz with 5 questions. Each question has 4 possible answers. When the user click on an answer, “Correct” or “Wrong” will appear. The user will then click Button 1 to go to the next question. The Ask Question block works fine. It goes out to Airtable and gets the right question. The Button 2,3,4,5 blocks aren’t working. It’s not getting the right choice and answer and therefore is not displaying “Correct” or “Wrong” appropriately. I would also like to keep track of how many correct answers the user gets, but I’m waiting on that til I figure this out.
Would you please look at my blocks. I need a break.
Thanks Thunkable community.
Jeem



image
image

Hi,

You use a too complicated algorithm - many requests to AirTable, a lot of duplicate code. Try to simplify everything:

  1. Get all the data from AirTable and add them to the list. After that, you no longer need to access AirTable, because you will have all the data in the list.
  2. If needed add this list to the Local Storage. This will allow working with the list on any screen.
  3. Set the question index = 1 and fill all the widgets with the data from the first question.
  4. After the answer to the question, check it, show in another variable whether the question was true or not, then increase the question index to 2 and fill the widgets with the data of the second question, etc.

You store the data in the AirTable, which requires access to the Internet. And if there is no internet? I would store the data locally. I copied them from Excel into a text block and made a list of them.

Alex