Lookup Latest Row (idea for lookups with Multiple Relations)

Currently lookups don’t work well (or at all) with Multiple Relations. I have a use case where it would be helpful to pull the last row from a Multiple Relation.

I currently use a query to create a new sheet that filters the latest entries, but doing this through a Multiple Relation lookup would be cleaner… I think.

1 Like

Would an inline list > show only x component > sort descending by sheet order work?

Potentially…

Are you looking for the last row of your sheets?
According to my knowledge last roll don’t increase with multiple relations?
You can use rollup column to count or sum any value in sheets. https://docs.glideapps.com/all/reference/data-editor/computed-columns/rollup

Feel free to let me know I be any mean of help.

This is multiple steps, but you can do a rollup on your relation to get a max date for example, build a template with the rollup date and whatever you used for your previous relation in the sheet containing the relation and The sheet you are relating to. Then create a new single relation using the template to get only the last record. It’s a lot of Glide columns, but it’s better than a completely separate sheet and duplicated data.

4 Likes

@Jeff suggested this to me several months back and I’ve used this logic a few times now…it works!

1 Like

This is brilliant! Been wondering how to do nested relation/lookups for a while and completely gave up on it :sweat_smile:
This is so amazing, thanks @Jeff_Hager

1 Like

You can also do a single value > last > whole row

3 Likes

I can’t seem to get this to work. Is the method still functional, and/or have there come any new solutions to the problem?

What is your actual goal?

Thanks for the quick reply @Darren_Murphy :pray:t3:

I have a details screen of a car, where I’m showing a map of where it’s parked. I have an “Add new parking” button, which takes users to a form screen, where they can add a new parking. When they submit this form, a new row is created in a “Parking” table (the car obviously sits in a “Car” table).

Now, on the details screen of the car, I’d like the map to show the latest parking submitted, so users always know where their cars are parked.

Hope that’s context enough :slightly_smiling_face:

Okay.

So I assume that you have a multiple relation column in your Cars table that links to the Parking table?
Assuming that’s the case, you should be able to use the method that @Robert_Petitto mentioned:

The Single Value → Last → Whole Row would be via your multiple relation.

2 Likes

Correct. It’s a multiple relation.

@Robert_Petitto’s method worked. I had overlooked the “Whole row” option. Now I’m running look ups on the single column whole row, which updates to the latest row automatically.

Thank you very much for the assistance @Darren_Murphy :+1:t3:

2 Likes