Sorting Data in Repeating Group by most recent related record

Data structure is as follows

Address >>> Person>>> Person Update

What i’m trying to do is select the most recent patient update and sort by the urgency of the person

Hey @rcrawford

Welcome to Bubble. I think I may be a little confused by your db structure, but if you’re trying to sort a list of things by a certain field, you can set that up in the constraint section of your search (or by using the :sort method). Let’s say that you have a list of “Patient Updates” and that there is a field inside of the Patient Update type called “urgency” (let’s say “urgency” is a number). You could do something like this:

“Do a search for Patient Updates”
(and in the constraint editor)
Sort by --> Urgency
Descending --> “Yes”

Hope this helps.

Hey Jacob,

But how would i ensure that only the most recent record and not all of them?