How to create Users (Admin) and User (Customers) in the same databse

Hi, I’m stuck creating my database.

In my application, there will be Users (“Admin”) who can create their roadmap, and other users (“Customers”, the admin’s customers) can login and participate to the roadmap.

In my dashboard, I would like to display a “community” tab and in this tab display only the Customers who are linked to the User (Admin).

How can I differentiate between these two types of users? Especially when the list of Customers appears in the User Admin, because at the moment I can only display all Customers but not ONLY those who are linked to the User( Admin).

App Link : https://bubble.io/page?type=page&name=index&id=mappyapp&tab=tabs-1

Thanks for your help

Admin - Yes/No

Use that as a filter.

1 Like

Where is the customer/admin link recorded? It should probably be in the User table (assuming each user can only have one admin, but even if not: it can be done there). You can create a field “Admin” there that records a user’s admin.

Let me know if you need more help.

Yes but after i can’t display Customer’s Admin …

I tried to create a table customer and link to my user tab but when i want to log the customer i can’t… I only can log the USER on …

Hi Thomas,

So the login flow for customer and admin is and should be the same (username & email).

Once logged in, the status (admin or customer) should be recognised from the database side and then accordingly, different elements will be displayed. Correct?

If so, then you can have for example conditionals on different groups that check the status of the user and then display/don’t display certain information.

Let me know if you need more help with this.

Yes everything works when i used Admin = Yes/No but i have a group where i want to display the customers (Admin = No) for the login user (Admin = Yes), and i can’t link a list of customers (Admin = No)…

It’s going to display ALL customers (Admin = Yes) and not only the customers of login User

I can give you access to my app ?

Ok sure let me have a go, should be easy to set up I think :slight_smile:

Thank you @fab118