How to automatically relate two tables?


I got two tables A and B.
First, I put data into A and create a1.
Then, I goto B and create b1, b2, b3.
I want b1, b2, b3 to automatically link to a1.

Subsequently, if I make a2, and bb1, bb2, bb3, they should be related.

I made row ID in table A and made relations column in table B.

Please see my actual setting below.

Rounding Data Info is table A and Hole Data Info is table B.
I try to match table B from A by “getting the the last row ID from table A”, which does not work.
The last row ID is not fixed but changed to the latest one whenever I add a new row in table A.

The problem is all b1, b2, b3, bb1, bb2, bb3 … have matched with the same last one in table A.

How can I fix this problem?

First you should determine what is the key info that links between two tables? It’s not clear from your description which info this should be.

Last row ID is not the way to go, what’s the info that these tables have in common?

1 Like

May be it can be name or date or anything. What I am curious is how to relate, not what to relate. But I will give it a thought and be more clear on what to relate.

You can’t know HOW to create a relation until you know WHAT you want to relate between the two sheets. To build a relation, you need to have a value in sheet A that exactly matches a value in sheet B. That will be the foundation of your relation.

From the product updates: “Previously the lookup column could only look up columns through a relation. You can now pick any table in your app.”

@ThinhDinh @Jeff_Hager from your insider knowledge, do you know if the new Lookup column functionality will change to fully replace the need for a Relation column? Right now the Lookup column used on its own brings back every cell from the selected source column. There seems to be no way to specify which cell you’re looking for - not very useful in my opinion…

No, you would still need a relation so Glide would know what rows you are looking for. I don’t have an immediate use case for returning the whole column as an array, but people here have done many things with an array as input so I’m sure they can use it for something.

1 Like

As it stands right now, a lookup to an entire table will return the column values from every row. It’s just a quick way to get an array of values without the added step of creating a relation that would link to every row in the related sheet. In most cases, it’s probably a rare uses case, but sometimes it’s nice to have the option if you ever need it.

I wouldn’t say that it would replace a relation column entirely. Relations are useful in their own right for things other that lookups…but I do know that Glide is researching ways to revamp how relations work. Maybe that would include making relations part of other columns, but I’m not sure what their end goal is.


Okay, thanks guys. I thought this feature was going in the direction of replacing the Relation column by merging the functionality with Lookup - that would be useful for me.

As it stands, I see it being useful in the way that @Robert_Petitto is demonstrating.