Dynamic survey based on users attributes

Hello! New user here :slight_smile:

I want to develop simple survey app but I am struggling a bit.

The idea is to give the app to users and have them answer some questions - the thing is I need to filter the questions based on the user's role.
I have three tables: User + role, roles, questions + role (they are all connected with role)
For example : Peter is data analyst, so I want to display only questions relevant to data analyst position, Anna is UX designer, so I want her to see only questions related to UX designer position.

Anyone can help me with this please? :slight_smile:

Can help out with a database schema like this:
This schema has three tables:

  • Users: This table stores information about the users of your survey app, such as their name, email address, etc..
  • Roles: This table stores information about the different roles that users can have in your survey app.
  • Questions: This table stores information about the questions that are asked in your survey app. Each question is associated with a role, so that only users with that role can see the question.

If you start by building this database, I think the rest could be simple to flow

1 Like