# How do you build a quiz in Adalo?

Model questions and choices, record the selected answer, show progress, and calculate a result without tangling the screen flow.

- Canonical URL: https://adalocado.com/answers/build-a-quiz
- Verification: Verified from current public evidence
- Topic: Database and Relationships
- Skill level: Intermediate
- Last reviewed: 2026-08-13
- Index status: index-now

## Short answer

Model Questions separately from Answers, relate each answer to its question, and store the user’s selected answer in a response or session record. Use a question detail screen or list state to move through the quiz.

A durable quiz needs four responsibilities: questions hold prompts, choices belong to questions, sessions represent attempts, and responses record selections. That model makes progress, retakes, scoring, and duplicate protection explainable. The expanded answer defines the record-level invariant that prevents double scoring, preserves past attempts instead of overwriting them, and supplies a small known-data fixture for checking results. Current public documentation and a forum scoring example support the building blocks, while the full workflow remains explicitly untested end to end.

## Intended outcome

A repeatable quiz flow with separate question data, answer choices, user responses, and an explainable score.

## Requirements

- Questions collection
- Answer Choices collection related to Questions
- Quiz Sessions or Responses collection
- Sample questions and choices

## Step by step

1. **Separate the records**

   Create Questions and Answer Choices. Relate many choices to one question; mark the correct choice with a true/false property when appropriate.

2. **Create a session**

   Create one Quiz Session when the user begins so responses and the final score belong to a single attempt.

3. **Display one question**

   Show the current question and a filtered list of choices whose Question relationship matches it.

4. **Save the selection**

   On tap, create or update a Response related to the session, question, selected choice, and logged-in user.

5. **Advance predictably**

   Use an explicit question order or next-question relationship rather than relying on an unstable implicit record order.

6. **Calculate the result**

   Count correct responses or update the session score as answers are submitted; prevent repeat taps from inflating it.

## Why it works

- Questions describe prompts; choices describe selectable options; responses describe what one user selected.
- A session groups responses from one attempt and makes history, retakes, and progress possible.
- Explicit order values make next/previous behavior deterministic.

## Data model

| Collection | Properties | Relationships |
| --- | --- | --- |
| Questions | Prompt, Order | Has many choices and responses |
| Choices | Label, Correct | Belongs to one question |
| Quiz Sessions | Started, Completed, Score | Belongs to one user; has many responses |
| Responses | Submitted Date | Belongs to session, question, and selected choice |

## Common failures

### Choices from other questions appear

Filter Answer Choices where Question equals Current Question.

### A double tap adds score twice

Create one response per question/session or condition the scoring action on there being no existing response.

### The next question order changes

Add a numeric Order property and sort consistently, or relate each question to its next question.

## Testing checklist

- [ ] Known sample answers produce the expected score for a complete session.
- [ ] A rapid double tap cannot create two responses for one question and session.
- [ ] Leaving and returning preserves the current attempt and saved responses.
- [ ] Each choice belongs to one question
- [ ] Every attempt creates a session
- [ ] Only one response is saved per question
- [ ] Progress survives navigation
- [ ] The score matches known test data

## Limitations

- Public evidence supports the underlying relationships and update action, but the complete quiz has not been reproduced end to end.

## Community evidence

### [Update scores in a database](https://forum.adalo.com/t/update-scores-in-a-database/31685)

The answer describes updating a score property with Magic Text and a formula after the correct-answer interaction. Boundary: This older thread supports the scoring primitive only; it does not verify the complete session-and-response architecture proposed here.

## Sources

- [Adalo relationships](https://help.adalo.com/database/relationships)
- [Adalo update action](https://help.adalo.com/action-basics/creating-an-action-that-triggers-data-edit)
- [Adalo forum: update scores](https://forum.adalo.com/t/update-scores-in-a-database/31685)

Markdown version: https://adalocado.com/answers/build-a-quiz.md
