Audit Log Table default sort

I have a window, with a Table object, to show recent events in the Audit Log, and a Date Range object, to allow selecting the date range to view.

The Data property is bound to Other-> Functions

The Binding Function is Audit Log
Start Date is bound to …Date Range.startDate, End Date is bound to …Date Range.endDate.

It works perfectly, except I would like it to default to sorted by Timestamp Descending. I can click on the column header for Timestamp, that cycles through Ascending/Descending/Nothing as expected, but each time I run the project, I have to click on the header to make is sort the way I want to.
Just a little nuisance, but is there a (simple?) way I can get this table to default sort by Timestamp Descending?

Add a custom property (type: dataset) to the table component, and copy your function binding to it. Then on the actual data property of your table, switch to an expression binding using sortDataset; something like this:
sortDataset({{Root Container.Table.functionDataset}, "name of timestamp column", false)

4 Likes

Perfect, that works, thanks!