How to save user responses?

Hey! Hoping for some help as I don’t really understand how to structure user responses this in the database. Here’s the context. I am creating a question bank, which at its core is just a list of exam style practice questions.

There is a data type ‘question’. This contain’s the question’s content, answer, difficulty level etc. I display a question in a repeating group.

The user is able to click on one of three buttons to say whether they got the question right or wrong:

CleanShot 2022-07-08 at 20.38.07@2x

How can I store this user’s response so that I can keep track of their statistics e.g total questions answered, questions answered per day.

Do I need to create a data type ‘response’ and link these with ‘Question’ and ‘User’, is that the right path to take?

Yes, exactly… you’ll need a datatype that links a User to a Question and their Response…

So create a datatype and call it something like User_Response with the following fields:

User (of type User - although you might just use the built in Created By for this)
Question (of type question)
Response (of the type that equates to the response)

1 Like