Only show data from related table?

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

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.

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.

1 Like

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

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!

1 Like

I would recommend you go to Glide 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.

3 Likes

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