Hello. On one the tabs for one of our item types, we use the tree grid view/query definition pattern to retrieve a list of the items parents. We've added a filter for is_current = 1, so that we only one result, and the most recent results. This works in most cases.
However, when looking at an older version of the item, there may not be an is_current parent. And if we simply remove this filter, we may get multiple parent results.
Ultimately what we want is to get the most recent generation of this items related parents. We actually do this else where in code by sorting descending by generation and setting max records to "1", but I don't think this will work in a query definition.
Is there a way to filter data this way with the TGV/Query? If not, what would be the best pattern to use to get what we need?