# User form best practices when you have separate entities

**URL:** <https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313>\
**Category:** Tips and Hacks\
**Created:** [August 19, 2024, 12:58am UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313 "2024-08-19T00:58:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 19, 2024, 12:58am UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/1 "2024-08-19T00:58:20Z")

</div>

Using Xano

Imagine you have multiple companies, within those companies multiple users of my app (sometimes 1 or 2, other times up to 1000 users)  
Also, there are none company related users who will also have access to a different section of the app.  
Company users and none company users have slightly different tables so, right now, the parts not used are left blank.

Should I create

1, One table for all companies and 1 for all non company related users?  
2, Shove them all in 1 table?  
3, Doesn’t matter, stop wasting our time with silly questions 😂 😢

If I have a company admin section that allows these companies to add their own users, will they need their own DB table too?

Thank you

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 19, 2024, 1:49am UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/2 "2024-08-19T01:49:16Z")

</div>

Oh, so i guess I cant have multiple login tables. Hmmm

Should I create a different workspace for the company and non company side or I guess continue keeping it all in 1 xano table and separate them by role?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 19, 2024, 7:50am UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/3 "2024-08-19T07:50:40Z")

</div>

The proper DB structure should be one table for many tenants, which keeps the relationships. Something along these lines.

 ![Screenshot 2024-08-19 at 09.49.52](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/95d709dc646452586a945b725e7e9d33db0a0bd6.jpeg)

As for the forms, you can even have two separate, it doesn’t really matter front-end wise, but more like UX and DB wise.

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 19, 2024, 3:15pm UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/4 "2024-08-19T15:15:33Z")

</div>

Oh, I did not set mine up like this but this makes sense.  
I think I have to go back and set this up again.  
I have company and non company users in 1 table, its a big table.

Thank you

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 20, 2024, 3:44pm UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/5 "2024-08-20T15:44:32Z")

</div>

If I have everyone in one form, how do I get the different roles to get sent to a different pages?  
I have 3 roles and I want each role to go to a different dashboard when they login.  
since I have everyone in one table I might aswell use the same login form, but then I have the issue of them all navigating to the same dashboard.  
This is how it should be

 ![login layout](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e70f2907b2a8f4f270305d0ca041cfca1104c1d6.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 20, 2024, 3:53pm UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/6 "2024-08-20T15:53:11Z")

</div>

You could use a Multi option split to check that in the Workflow

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 20, 2024, 3:59pm UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/7 "2024-08-20T15:59:31Z")

</div>

I thought that but for some reason I dont see the role as an option after login.  
its weird  
I have access to only last name, id, email and profile pic.  
no first name, no role, etc

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [August 20, 2024, 5:03pm UTC](https://community.weweb.io/t/user-form-best-practices-when-you-have-separate-entities/10313/8 "2024-08-20T17:03:42Z")

</div>

I was being an idiot and forgot what I learned yesterday. I now have access to the role.  
Did I set this up wrong?  
Its not working.  
I also tried adding a “fetch collection” to be sure the user data was there. that also didnt work

 ![multi-option](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0ca1ac0e8599d1df00721106685283ab676948f6.png)

also tried this

 ![multi-option2](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7049b6b70c0ae386d56eb61b6ba7b76e99f93cb7.png)

i gave up and just used 2 consecutive true/false splits. it worked and was easier to work out
