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?

1 Like

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)


Perfect, that works, thanks!

1 Like