Hi,
I am building out a tracker application, when app goes live it will a large dataset (held in SharePoint lists).
The plan is that I create a collection that filters on the users email address, there is a variable varUser that is set on app load, the email address is also stored in a column on the SharePoint list. The command below will return all items that match the filter but when that hits 500 the app will stop functioning correctly. The next part, which I am stuck on, would be to limit the number of items that are placed in the collection, ideally I only need the very most recent item. I have been playing around with SORT but I couldn't work out a way of doing a FILTER and SORT in the same collection command.

Any help on how I can achieve this would be gratefully received.
Thanks
Rob