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

**URL:** <https://community.glideapps.com/t/get-all-related-columns-from-another-table-without-having-to-use-a-lookup-or-query/66541>\
**Category:** Ask for Help\
**Created:** [September 26, 2023, 5:28pm UTC](https://community.glideapps.com/t/get-all-related-columns-from-another-table-without-having-to-use-a-lookup-or-query/66541 "2023-09-26T17:28:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![globalint](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/globalint/32/67671_2.png) [@globalint](https://community.glideapps.com/u/globalint)\
**Post date:** [September 26, 2023, 5:28pm UTC](https://community.glideapps.com/t/get-all-related-columns-from-another-table-without-having-to-use-a-lookup-or-query/66541/1 "2023-09-26T17:28:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 27, 2023, 1:37am UTC](https://community.glideapps.com/t/get-all-related-columns-from-another-table-without-having-to-use-a-lookup-or-query/66541/2 "2023-09-27T01:37:22Z")

</div>

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.

> [@globalint](#):
>
> I have to create a lookup for every single column in the Roles table where all the permissions are set

> [@globalint](#):
>
> Whenever I have to make changes on Roles table I have to edit or add the corresponding lookup column on the users table.

---

<div class="post-metadata">

**Author:** ![globalint](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/globalint/32/67671_2.png) [@globalint](https://community.glideapps.com/u/globalint)\
**Post date:** [September 28, 2023, 4:24am UTC](https://community.glideapps.com/t/get-all-related-columns-from-another-table-without-having-to-use-a-lookup-or-query/66541/3 "2023-09-28T04:24:46Z")

</div>

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.
