# Only show data from related table?

**URL:** https://community.glideapps.com/t/only-show-data-from-related-table/64905
**Category:** Ask for Help
**Created:** [August 10, 2023, 6:18pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905 "2023-08-10T18:18:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mikelovin23](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikelovin23/32/61057_2.png) [@Mikelovin23](https://community.glideapps.com/u/Mikelovin23)
#### Post date: [August 10, 2023, 6:18pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905/1 "2023-08-10T18:18:27Z")

</div>

Hello everyone. I have been learning and experimenting with Glide and really enjoying it. But I am stuck so I need some help.  
I am building a simple Maintenance app. I have a table with all my “Projects” these are the physical locations.  
I have another table for maintenance logs, so here the idea is everytime someone visits a projects, the create a maintenance log. In the entry form, i have kept it simple, you select the project (location), type of job done, date etc.  
Now my issue is that on the start screen i have a list of all the projects. When I click a project, I want to display all the maintenance logs that correspond only to that project, but the issue I have is that its showing ALL the maintenance logs, of all locations.

Any ideas where I could be going wrong? link to any tutorials that could explain this?  
Thanks for reading  
Mike

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [August 10, 2023, 6:27pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905/2 "2023-08-10T18:27:44Z")

</div>

> [@Mikelovin23](#):
>
> everytime someone visits a projects, the create a maintenance log. In the entry form, i have kept it simple, you select the project (location), type of job done, date etc.

If you are already in a project, you should be able to automatically populate the project in the form without making a user agreement one. To do this by adding the appropriate column component that contains the project ID into your form.

> [@Mikelovin23](#):
>
> When I click a project, I want to display all the maintenance logs that correspond only to that project, but the issue I have is that its showing ALL the maintenance logs, of all locations.

Do you have relation linking the project table to the log table? If so, you can use that as the source of the log collection on the project detail screen.

---

<div class="post-metadata">

### Author: ![Mikelovin23](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikelovin23/32/61057_2.png) [@Mikelovin23](https://community.glideapps.com/u/Mikelovin23)
#### Post date: [August 10, 2023, 6:31pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905/3 "2023-08-10T18:31:37Z")

</div>

Thanks Jeff! I will have a go at your suggestions, i think I understood 🙂

Update: Ok I managed to do it…BUT I don’t quite understand _HOW_ I did it LOL. I will keep practicing, but thanks for pointing me in the right direction!

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [August 10, 2023, 7:45pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905/4 "2023-08-10T19:45:24Z")

</div>

I would recommend you go to [Glide Docs](https://www.glideapps.com/docs) and familiarize yourself with a few concepts. All credit to you, also, for having figured it out intuitively.

For your specific use case, displaying things (jobs) that belong to a thing (location), I would recommend you learn about `relations` and `query`.

> **[Relations](https://www.glideapps.com/docs/automation/computed-columns/relations)**
>
> Create relationships and link rows together.

> **[Query Column](https://www.glideapps.com/docs/automation/computed-columns/query-column)**
>
> Create complex relations in your data with conditional filtering, sorting and limits.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [August 17, 2023, 7:46pm UTC](https://community.glideapps.com/t/only-show-data-from-related-table/64905/5 "2023-08-17T19:46:13Z")

</div>

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