# Sorting Table Data by most recent Time Stamp

**URL:** <https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [November 6, 2025, 4:32pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006 "2025-11-06T16:32:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar.enriquez](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@omar.enriquez](https://forum.inductiveautomation.com/u/omar.enriquez)\
**Post date:** [November 6, 2025, 4:32pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006/1 "2025-11-06T16:32:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 6, 2025, 4:35pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006/2 "2025-11-06T16:35:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 13, 2025, 4:28pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006/3 "2025-11-13T16:28:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![omar.enriquez](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@omar.enriquez](https://forum.inductiveautomation.com/u/omar.enriquez)\
**Post date:** [December 11, 2025, 1:52pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006/4 "2025-12-11T13:52:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [December 11, 2025, 2:11pm UTC](https://forum.inductiveautomation.com/t/sorting-table-data-by-most-recent-time-stamp/112006/5 "2025-12-11T14:11:49Z")

</div>

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