Selecting a record in one table and displaying the associated records from another

New to Glide but I was doing quite well, until…

I have two tables in Airtable, Table A and Table B.

Table A links to several records in Table B.

I’d like one or both of these options:

First a page that has a list of Table A records. When you click on one of the records a new page appears with a list of the associated Table B records.

In the second example there is only one page, at the top is a Choice which selects from Table A and when a choice is made, the associated items from Table B appear below.

I went around in circles trying to see what filter I used and how I chose the field to filter on from a different table from the one I was filtering…

Thanks for any help!

Hi @kcrane,

Welcome to the community :partying_face:

Check this out! : Table A and B.mp4 - Google Drive

Thank you

1 Like

@dilon_perera

Thank you for that, I understood some but not all of the steps. Did you need to create ‘dummy’ columns converting AT linked records to text?

Maybe I should have read/watched more intros before jumping in.
The Glide Uni videos on relationships answers my questions.

I find the screen/page concept a bit confusing as, if I have it right, creating a page actually creates the top level of what can become a series of sub-pages unless you specifically navigate to another page. Eg click on an item in a list, a new page appears, yet that page isn’t in the page list. But that newly created page can access info from the top level page, which is what I wanted :grinning:

If I understand you right, what you need for your first option to work is just to navigate to details screen of table A records, then display a collection citing the relation from table A to table B records.

For this, it would write a table A’s rowID to a user-specific column. You would then create a relation from that value to the corresponding column in table B, and display that in a collection.

2 Likes

Thank you, yes that’s right @thinhdinh. I hadn’t realised that screens are actually a stack of screens and that the detail screen is built-in. The shorthand of calling it a details screen made me miss that it is actually ‘the screen that is displayed when you click on an item in a collection’.

I also hadn’t realised that screen ’stacks’ aren’t independent of each other, so that if I start on one screen and I am clicking on an item in a collection showing Table A it shows the detail screen for Table A. If start in a separate screen, and show a collection of Table A, then the same details screen appears. In other words detail screens are attached to collections as you said, It would aid my understating Glide better if detail screens could be selected directly in the editor, for example being included in the properties of the collection on the right hand side, along with sort and group etc.

I’m now working out how I get two details screens for one collection. Sometimes whenI click on an item I do need to edit the items in my table and other times I want to see a list of related records in another table.

For this use case you can use the “Show New Screen → This Item” action.

2 Likes

Ooh, thanks @darren_murphy

That’s something I could assign to a button or used advanced actions and change the click on an item action?

Yes, certainly.

Sorry for the late reply! Here’s a detailed video : Table A and B detailed.mp4 - Google Drive

1 Like

Thank you very much for that detailed explanation, much appreciated :+1::sunglasses:

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