Tadabase has functionality that allows you to build multi-tenant apps (one app serves multiple, separate clients) but seems to me to be missing a piece of this process.
I can create a “Company” or “Client” table and reference this in all other tables.
I can filter on this when displaying or editing records – to only show the records that belong to that tenant.
The issue is when creating new records. Unless I’m doing something wrong, any form I build to create a new record that includes other related table options must include a “Company/Client” select input in order to filter those associations to the correct tenant. I can make this “Company/Client” select option only show the Users Company, but it must be present in the form, and it must be selected by the User - every time.
In other words, for a multi-tenant app, most forms must include a “Please select your Company” field.
This extra step may seem small but is very disruptive to the User experience. “Why do I have to select my Company every time I add a calendar item / add a task / complete a form?”
Is there a way to make this process seamless, so that Users aren’t forced to complete this step?
Can the Company be pre-populated / pre-associated, so the User doesn’t need to see this option?
I find it frustrating that multi-tenant functionality has been intentionally built-in to Tadabase (and works well), but this part lets it down.
Crossed-posted from “How Do I?”
@safetyinmind, you are right about this. We have this filter option when working within the data source where you can show only records that belong to this specific company but not yet in fields.
Inside the fields, we’ve also added on some of our servers the ability to do multi-dependent dropdowns which might help in your case. This is not published but will be done soon. To understand a bit more about this feature, suppose you have a form where you can choose a Dad and another field you can choose a Mom. Now imagine, you only want to show Children that belong to the Mom and Dad, not either, that’s where this new feature comes in.
This isn’t exactly what you’re asking for, but when working with multi-tenant apps, this can be super beneficial as well.
To answer your suggestion. This is something we will certainly eventually do. I will investigate a bit more as to how quickly we can do it, but I can assure you it will be done in the near future. Can’t give a timeline yet, but will try and come back here in a few days with a more accurate timeline.
We have many exciting new things in the pipeline and working on pushing those into production first.
Thanks @moe. I appreciate the (for you) late-night response.
I understand everyone expects different things from Tadabase and I know it must be a juggle for you to try and please everyone. Multi-tenancy is paramount for our app. Our business will be supplying the same service to multiple clients. I just can’t stomach the idea of launching an app with the constant need for our users to have to select their company over and over again in almost every form submission.
I am planning towards a finished product by the end of next month (June). Do you think this is in line with your plans?
The multi-dependant filter looks good – not sure yet where I’ll use it and, as you say, it doesn’t get around having to include the “Select your company” in this case, but I can see it being useful.
My please Neil!
@Chem, do we have any JS to automate this and hide the field?
I really don’t have an estimate as to when we can launch this, but I will do my best to come back to this thread asap and give you an answer.
Forgive me if ive misunderstood the problem/solution link here but couple of thoughts i’d like to share with you. If you add a seperate table, like you said, to hold Company/Client then add connection to Users table that sorts out the user/company relationship. From this point onwards all transactions on all tables should contain Logged In User AND Company Name so that can you filter records. I used record rules to automatcially add ‘Logged in User’ and ‘Company Name’ (OrganisationName) into the target table wherever the add new record is going into. Screenshots are below.
Hi Shumon. Thanks for those tips.
I have a similar set-up and use the connections you described to filter those associations.
The problem for me is that when I have a form that creates a new record and there are other connected table fields in the form – those connections can only be filtered to the targeted Company by also including a “Select your Company” drop-down in the form.
Say, for example, I have a form to create a new department for my company. It might look like this:
Department Name: __________
Employees (to include in this department): __________<multi-select from “Employees” table>
In the above form, the “Employees” selection will show all Employees across all companies/tenants in my app, unless I include a “Select Company” dropdown in the form. Only then can I filter the Employees table to only show those Employees that belong to the targeted Company.
I am able to filter the “Select Company” dropdown so that Users only see their own company, but this field still has to be included in the form and the user still has to click and make this selection before the other form connections work. This also applies for editing existing records – although the Company field is already populated, and I can make it “display only”.
I haven’t yet found a way to create a form without having to include the “Select your Company” dropdown – which will become a frustrating and (in their minds) unnecessary step for my users.
Maybe I’ve missed a trick somewhere? Can you show me how you handle “Add New” forms that have connected, user-selected options from another table?
Create employees table first with company_ID as connection to company. Then create department table with one-to-many connection to employee table. You have to define which company the employees work for at some stage in the configuration phase.
I may not be explaining myself very well.
Even with all the table connections (just as you describe) already in place, for a user to create a new record that includes the selection of a record in another connected table, requires the form to have a “Company” field so that Tadabase knows to only show those records that belong to the Users Company.
With a Company field:
Without a Company field:
The issue is I do not want a “Select Company” field in every form. If you’ve solved this - I’d love to see how you have constructed your forms - are you able to share?
Moe is aware of the issue, so I’m hoping he can offer a solution soon.
I just figured out where the multi-dependant dropdowns you described will be invaluable. Most records in my app have a limited lifetime (employees resign, worksites change, assets are bought and sold). I can use the second field to ensure “flagged as current” items only are shown in select fields.
I have a feeling you were way ahead of me on this.
However, this will also required an on-form field for “current only”. Similar to “Company”, I wouldn’t want this to appear for users.
I see what you mean. Unless the company is selected, the contractor names (Users) are not filtered so you end up with names of all users for all companies.
Very important issue you’ve highlighted. Im surprised nobody else has picked up on this much earlier.
Hi @moe. Did you manage to scope this for an approximate ETA?
I found a way to do this. Its a long explanation to describe clearly in one msg but I’l try. The ‘User’ table must contain the ‘Department’ connection to the ‘Department’ table. The department table is connected to the ‘Company’ table.
Each time the logged user adds/edits any records you must use record rules ( logged users field - company) to auto add ‘company’ into the target table.
If this is what you were looking to do then I am happy to arrange a Zoom session with you to explain it to you. Let me know.
Hi @Shumon ,
Thanks for the time you’ve taken to think this through for me - I appreciate it.
Your suggestion works for automatically adding the Company connection to a record when it is saved, however it doesn’t filter select options on an input form. Just as you have in your example, the Company Select field (“Organisation”) must be present so that the Departments field options are filtered for this specific Company.
From a User experience, selecting your own Company over and over again, in almost every single form, will become tedious. I’d like to find a way to avoid having this Company field present on the form.
The Organisation (Company) field is locked and is pre-filled when the form loads. The department list is fitered to show departments only for the company of the logged in user.
You can login and try it: https://jinnsystems.tadabase.io/ts/login
The list of users are shown below:
Thanks for the zoom session yesterday, im not ready to give up on this challenge so I revisited the core issue you rightfully identified and would like to share a revised solution.
If you dont have time to go through the screenshots attached then the key point you need to know is this: use ‘Display Rule’ to hide ‘Company’ everythingelse in the screenshots contain detail you already know about. Btw your tip on page redirect to edit form after submitting ‘add new’ is appreciated and works well.
I love your persistence!
Everything you’ve shown works for:
(Hiding the Company Select when editing an existing record is a great idea, by the way – this works well, and I will implement)
However, when creating a new record, if you want all other select options on the form filtered to this Company, then the Company select field must be on the form (and the Company manually selected by the User). I’ve tested this - hiding it does the same as removing it – the form doesn’t know how to filter the other select options.
You may have tested this on “Edit”, not “Add New”?
If you can get an “Add New” form to filter its select fields without the “Company select" field present, I will name my app after you.