Aggregating Repating Group User Choices

Hello Forum, since this is my first post let me give you a big thank you for helping me on many occasions in the past. Rly happy to have this community supporting building things with Bubble.

Now to my question: A section of the App I’m building will allow the user to participate in Quizzes. A Quiz will come in the form of n-questions with pre-defined answers to pick from.

Therefore I’m building 2 pages

  1. Quiz Overview → An overview of available quizzes to participate
  2. Quiz Detail → The page that will show the actual quiz to the user

I’ve set up the database the following way:

  1. A “Quiz” thing

  2. A “Quiz Question” thing

A Quiz thing is defined by a name and Instructions and can contain a list of Quiz Questions-things. Each Quiz Question thing contains the actual question and a list of possible answers.

On the Quiz Overview page, I’m showing a repeating group of Quiz-things. If the user clicks a Quiz I will redirect the user the the Quiz Detail page and forward this-Quiz to the page.

On the Quiz Detail Page I’m showing a repeating group for this Quiz by iterating over the attached Questions and showing a list of possible answers. Each cell in the repeating group contains

  1. The question
  2. Radio Buttons for the possible answers (since they are predefined)

The user can now scroll through the list, read the question, and select one of the pre-defined ansers to each question.

Now my question (or problem). When the user is done with the quiz (has selected one answer to
each question) I need to send an aggregate of the question/answer pairs to an external API for evaluation. The format I can send this is rather flexible, ideally a text list. Just as an example:

“quiz name”:“My first quiz”,
“quiz instructions”:“Some instructions for the API to evaluate the quiz”,
“quiz answers”:[{“question1”:“answer1”}, {“question2”:“answer2”}, … ]

Unfortunately, I could not find a way to access each repeating group’s question and user’s answer in the workflow section. I would like to keep all of this dynamic so that I can generate new Quizzes in my backend in the future and the whole workflow works with different Quiz-lengths (between 1 - 10 questions) and different lengths of possible answers (between 1 - 5).

Any help is much appreciated, if you need further details or clarification, please let me know.


This topic was automatically closed after 70 days. New replies are no longer allowed.