Get all related columns from another table without having to use a lookup (or query)

Is there a way to get all related columns from another table without having to use a lookup (or query)? I have a “Roles” table with specific permissions for users, but to use those permissions I’m forced to set a relation (that part is fine) but then I have to create a lookup for every single column in the Roles table where all the permissions are set, and those are dozens. Whenever I have to make changes on Roles table I have to edit or add the corresponding lookup column on the users table. It’s very time consuming, there must be a better way to do this. Maybe I’m forgetting something… Any suggestions.

I want to set permission using a separate Roles table, so it can be also editable and my users can create new Roles in the future. I don’t want them to set permission at the user level.

Thank you for your suggestions or points of view.

Can you show us how you’re setting up your Roles and your relations? I do feel like there might be an easier way to do this, but gotta see the data structure first, specifically about these parts.

1 Like

Thank you.

I came up with a solution… it involves JSON object column then converting the whole json into a list using the name:value and separated by comma using javascript code. So I end up with a list that I can use is in the app’s navigation filter using something something like this “Show tab when Permission includes RolePermission:true”.

Now I can pull all the permissions for that user and just ask if the user can access or perform an operation if the permission IS included in the list.

Screenshots later.