Multiple User Types with Different Relation Fields

Hi,

I want to create an app for multiple business activities with multiple user types. Say I have users that do production, other users that do deliveries, vendors that open the app and see their purchase orders / submit invoice.

Can I only use the “Users” table with different role “production”, “courier”, “vendors”? Each with their own related fields connecting “Production/Production ID”, “Courier/Delivery ID”, “Vendor/PO ID” / “Vendor/Invoice ID”. Subsequently, there would be irrelevant columns for roles other than that user role?

Or can I make a different table to maintain that relevant relationships? But how do I make sure that table can be used to maintain user-relevant functions in Glide?

Thanks

Yes, you can.

I don’t really see that as a problem. You should keep the users in one place.

However, I’m not entirely sure about your ID columns. What do they represent?

Noted on keeping them in one place. Thank you so much for your response.

Say, for example, I want to keep track of deliveries made by a particular courier or to look up how many invoices are past due that are related to one particular vendor. I’m planning to relate them back to the users table from deliveries or invoices, respectively. So the “deliveries ID” relation columns in users table would have blanks for “vendors” and vice versa for “courier” would have no invoices.

No issues there, just thought it can be neater if I have “couriers” table and “vendors” table is all.

Actually, I came across another problem regarding security.

I need row owners to make sure personal details are protected. But I need to look up a list of users for assigning tasks. If they’re all in the same table, how do I display the list of “users”?

Say on the dispatch page, I want to look up my users that are “couriers” and list them in a choice component. I can only see the user who currently logged in the choice. I can’t look up the list of users unless I remove row owners.

What would be the workaround for this case?

1 Like

Thank you Darren

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