Sorting Table Data by most recent Time Stamp

Trying to sort a Power Table pulling data from a tag’s Tag History. Data can be sorted by manually pressing the column but I’m looking to sort it to in Descending order when the page is opened.

Have come across the sortDataset function but not sure where to use this syntax or if this is even the correct way.

Move the table's data binding to a custom property. Make the data binding and expression binding that references the custom property and uses sortDataset() to order by t_stamp.

5 Likes

Can you not just sort the table in preview mode, save the page and it keeps the settings?

That doesn’t work, at least in vision. Had to use a script.

Ya, probably because the data is updated by the binding and then the sorting is lost