Multi-Companies and users within them

Hi, All:

I’m very new to Adalo and hoping this is the platform for what I need.

Here’s what is needed, note that Ive tried to figure it out on my own :slight_smile:

  • Multiple companies need to be able to log into the app and only see their companies information.
  • There are three roles for each company: Admin, Provider, and Client. Each will have a different dashboard and info they can see. (I think I have this one figured out by just adding a check box of “is X role” and adjusting the views based on that.
  • Provider roles need to be linked to an company as well as a Client
  • Client roles need to be linked to Provider roles as well as Client
  • Providers need to be able to assign a task to a Client and mark it complete when it’s finished (Clients should not be able to mark them complete)
  • Clients should be able to see the tasks assigned to them, and create a progress report that will be linked to that task
  • A task should be able to have multiple progress reports associated with it.
  • Each task should be unique in that another Client role cannot see or interact with it.

I’m sure there is more, but that is the bones of what I am looking to do and ANY help would be greatly appreciated!

Also, I’m sure you can tell this can build up a database pretty quickly, is there a limit to the Adalo database?

EDIT: I watched THIS video and it seemed like a good way to handle the companies because you could create an account for them, then when they enter their company code it would stamp what company they are registered to. However, its not working for me they way the video says. The button doesn’t redirect or write the company name to the user.

1 Like

This is how I assign users to companies:
a. Database has companies and users
b. Create relationship between company and user (many users to one company)

Then you need to have two paths for user signup - one for admin/company creator, one for general users

  1. Create sign up form. This is an admin user.
  2. Admin user creates company. Upon creation, update admin user with company.
  3. Admin user then has to create additional users (with just name and email). Every time a user is created by that admin, the new user is updated with the logged in user’s company. The process then generates a random number password and emails (via SendGrid) the password to the new user. When user opens app, they click on user login and enter their random password and update password. Then link to screen to update all that user’s info, which updates user record for logged in user.

Every time you want to make an update to the company or show company info, you use logged in user - company.

I don’t know how you could automatically assign company to new users without another user creating them first (which assigns them to the company). Maybe a company code which is used during sign up would work too, but need to make sure company codes can’t be guessed?

Hope that helps.

1 Like

Thank you!

When you say you have a table with company and user info, are they on the same table or separate tables?

I was thinking if the method you suggested, but I didn’t know that if an admin created a user that it would automatically link them to the same company, good to know!

I really appreciate the info!

Now just need to figure out the rest of the app, if you or anyone else has any info it again, would be greatly appreciated!

Separate company and user collections.

You need to assign the company to a user every time you create a user. You do it in the actions. When creating new users from the admin user, you update the field by setting user-company relationship to “logged in user-> company”.

You would create relationship between company and provider the same way. Although if the relationship is many to many, I’m not sure if you can do it via an update collection, you’ll have to see.

Here’s another video showing the same thing, maybe in a bit more detail - Adalo Referral Code Tutorial - YouTube

In short, the referral code button needs to be a list set to the equal the input. Then, when they have a correct input, a button will appear (because the filter matches) and that button is specifically tied to the business, so an action can add that current business to the user’s account.

Yeah, I think I got this, i’ll have to play around with it more.

Thank you!

Any clue on the other pieces? I still need to make a way to assign tasks to a user and a user to be able to submit a report based on that task.


Thank you! I think @paulh method will work too, but good to see that there are multiple ways to do this.

Any clue on the other pieces? I still need to make a way to assign tasks to a user and a user to be able to submit a report based on that task.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.