Ordering an AirData Table or Container List

Is it possible to order an AirData Table or a Container List by a certain field? I’m trying to organize either my AirData table or my Container list by a field where I capture DateTime. I want the most recent entries to show up at the top of the table or top of the list.

Hi!

It sounds like you’re looking to sort a List of Objects by a particular property, and then give that sorted List as input into a Container List. The most straightforward way to do that is to take that unsorted List of Objects and use a Query Expression to sort them.

So say you have a List of Objects, called list, and it has a DateTime property called datetime, and you want to sort objects in this list so that that later DateTimes are listed first. You could sort that List as follows:

FROM
  item
IN
  list
ORDER BY
  item.datetime
DESCENDING
SELECT
  item

The List of Objects returned by this expression can then be used as input into a Container List, which will display the Objects so that they are sorted by DateTime in the desired order.

Does that account for your use case?

1 Like