Advice on database structure with users and non-users

Hi,

I’m new to bubble and not sure if this topic has already been discussed in another thread but I would really appreciate some input on a database design / choice regarding users and “non-users”.

The app is in it’s essence similar to an internal project management app where there would be users; people that have an account and actively work with the system and non-users; people in the organisation that will be referenced in the app (their names used in tags etc) but the majority will never have the need to log-in.

Both users and non-users are part the the same organisation and I would like to be able to use them in very similar ways e.g. assigning task to them, filtering etc (can’t figure out how to merge lists since they are two different data types.) Additionally I would like to provide the Admin of the app with an easy way to “convert” a non-user to a user when it’s applicable.

Now to my question:

  • Should I have two data types? Users and non-users and how should I set-up my workflows to merge these lists? Or should I just keep everything in the user datatype?
  • Maybe there is a smarter way of solving this type of problems that I’m not aware of?

Thanks!

Yes, I would… have a datatype of (for example) ‘Employee’ (or whatever makes sense in your case).

I wouldn’t worry about merging lists - just use that datatype for every thing you need - keep the User datatype only for actual Users (i.e. people signed up with accounts) of your app.

Thanks for your advice @adamhholmes appreciate it.

I will go that route, and keep the types separately in the database.

Any input on the linking data part? Meaning it would be nice if when an employee becomes a member all the tasks assigned to the employee could be transferred to the user.

Br

Just have an Employee field on the User datatype, and when a new User signs up, check to see if they are also an Employee (compare email address, or some other unique identifier), and if so set the Employee on the Employee field of the User.

Then you can just use current user’s employee to access the data.

1 Like