How to display questions one by one with "Previous" and "Next" buttons in Adalo?

Hello everyone,

I’m working on an app in Adalo and need help setting up a screen that displays questions one by one, with buttons to navigate between them.

Here’s my situation:

  1. Database:
  • I have a collection of questions in Adalo, each with a unique ID.
  • The questions are divided into 4 categories (but for now, I just want to display all questions without filtering).
  1. What I want to achieve:
  • Create a screen that displays one question at a time.
  • Add two buttons: “Previous Question” and “Next Question” to navigate between the questions.
  • When the user clicks “Next Question,” the screen should display the next question in the database (based on the ID).
  • When the user clicks “Previous Question,” the screen should display the previous question.
  1. What I’ve done so far:
  • I’ve imported my database into Adalo.
  • I’ve created a screen with a Single Item component to display a question.
  • I’ve added “Previous” and “Next” buttons.
  1. Where I’m stuck:
  • I don’t know how to configure the buttons to navigate between questions based on their ID.
  • I’m not sure how to handle the limits (preventing going beyond the first or last question).

Could someone help me configure these buttons so they work correctly? If possible, could you explain the steps to follow in Adalo (without code, as I can’t use any)?

Thank you in advance for your help! :blush:

using this solution

1 Like

Hello :slight_smile:

Okay, thanks, I’ll try to apply this solution to my project and get back to you to let you know the result.

Best Regards,

Guillaume

The question you’re displaying needs to be a list with a maximum number of visible components = 1. That list is filtered based on “Question ID > Last Question Seen”, where Last Question Seen is a number property you create in the User collection. Every time a user selects next or previous, it updates that number property in the Logged In user.

Hope this is helpful.

2 Likes

Hello,

Thank you for your reply.
Yes it helps, but it’s too technical, or too summarized, and I don’t understand how to implement it in my case :frowning:

  • Create a number property in the Users collection called, for example, “question number I’m seeing”

  • The Questions collection should have a Ranking property (or you can use the ID)

  • When the user opens the questionnaire, update that “question number I’m seeing” property to 0 (or to the number of the first question you want them to see)

  • The question you’re showing on that screen should actually be a list of questions, with maximum number of visible components = 1, and it should be filtered by, for example, Question Ranking > Question Number I’m Seeing. This ensures that the user only sees the first question you want them to see.

  • When the user selects “Next”, you should Update → Logged In User → Question I’m Seeing → [Question I’m Seeing + 1]

Thank you so much,

I’ll try to apply this solution to my project and get back to you to let you know the result.

Best Regards,

Guillaume

1 Like

Hi @Digiminds,

This tutorial might be useful for you to find some ways to solve the problem: https://youtu.be/GR4onw-TCHA.

Best,
Victor.