Any thoughts on how to do the following setup? The...
# questions
m
Any thoughts on how to do the following setup? There are separate tables like "Sales/Marketing.." User has a field "Department".. User can be in multiple departments. Depending on the values of this field, they should have access to these tables. As I understand, I can't use Roles as a user can only have one role. Other than combining all data into one table and filtering it out based on the value of Department, I'm not sure how this can be handled. Would love to hear any alternate methods.
r
You could make department a table, and then have all the records in the "Sales/Marketing" table linked to the "Sales/Marketing" department and then use permissions to hide the values
That won't hide it from the UI, but you can use conditional visibility to do that, which can deal with multiple values in that user's Departments field
not a pretty solution though, I'm afraid!
We have had a long term plan to do multiple roles per user, but it's never made it to the top of our backlog
m
Honestly I like one role per user. But this requirement was given to me after everything was built so now trying to figure out how to fix it without changing the whole structure. I think your suggestion might work coz then department is a linked field that can be used in permissions. Thanks, will try and report!
c
@millions-army-64326 a thought ~ use a custom page and use conditional logic to show/hide the elements that people should have access to.
✅ 1
m
@chilly-midnight-76694 so conditional logic on a custom page doesn't work unless you use User Role. My problem was I have just one user role
@rough-orange-4490 I ended up with something similar to what you suggested but with a junction table, coz I needed Department & Company ownership both. Thanks for the suggestion!
🙌 1