Quiz style answers not feeding to the database

Hi,

I have been going in circles a bit. I am creating a quiz-style app with 30 questions but split into 7 categories but as one singular quiz (e.g. biodiversity, energy, pollution, etc). I first built the questions as Create “Answers” at the start of the quiz then Update “Answers” with each question. I gave each category it’s own column in the database with the intention that the points for each question is added to the correct category to get to a total.

But then once I switched Category, the updates never reflected so for example the 15 for this Energy question is not reflected in the database. You can see besides Biodiversity, the row turns out empty.

I tried to work around it by creating a new Answer for every Category, which basically populated one number per row. But now when I try to sum the total it only recognises the Biodiversity Answer row.

What have I done wrong? Is there a way to sum all Current Answers and for it tp recognise all Current Answers?

Thank you!

I have also now tried creating Total in the database and Update it on every question based on the value of the question + the current value of the entry and it worked up to question 4 then stopped working (which coincides with the change in category, but Total is not linked to the change in category question).

Can you make another Property within you Collection …. call it Scores. Then, populate the same number in that Property no matter the Category…..You would have to total it as you go, then pull the total sum from that Property. Then you would have a way to total each Category individually, plus have a column for the total score.

Is the score just a view of the total across all Questions and Categories that is displayed on the screen?

Hi @endangeredwildlife,

Let me try to understand and please correct me if I’m wrong in somewhere!

So you have 30 questions, 7 categories and each question belongs to an one category? Do you also has something like a quizzes collection where a category can have multiple quizzes and also a quiz can have multiple questions? So the app would show the categories > click on a category > click on a quiz available in that category > go to the quiz screen where the questions of that quiz gets displayed > creates an attempt which would hold the total score, correct answers count, wrong answers count, taken quiz, taken category, taken user > show the score at the end of the questions > once user gets back into the quizzes screen, it shows the all attempts with scores > once user gets back into the categories screen, it shows the best score, average score and lowest score from the user’s attempts?

Let me know!

Thank you and have a great day!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.