When retrieving objects, add a Range Last - Mendix Forum

When retrieving objects, add a Range Last


In many use cases, I find the latest added item to be more relevant to retrieve than the first one. Even though it’s not impossible to manipulate the sort order to get the latest item, it is not as straightforward as an option next to “First”.

1 answers

Not too sure what the use case is but for a sorted list:


- select range: first

- sort: by an attribute

- sort attribute by: ascending or descending depending if you want the first or last in the sorted list


You could then apply this by adding the createdDate field to your entity then (range first, sort by createdDate descending) will get the most recent