# How to use sortOrder for perspective table?

**URL:** <https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188>\
**Category:** Ignition\
**Created:** [February 9, 2021, 4:44pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188 "2021-02-09T16:44:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 9, 2021, 4:44pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188/1 "2021-02-09T16:44:16Z")

</div>

I have a perspective table. I would like to order my rows by date, with the most recent at top, and then sorted by a second boolean column.

I don’t understand how to use it however and cannot find documentation or a simple example.

Here is what I have that is not working. How can I make this work?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c041643a750d3512c231b285cd416f4c22d0353a.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 9, 2021, 5:20pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188/2 "2021-02-09T17:20:04Z")

</div>

It appears (based mostly on the tooltip on the property and the behavior I just observed) that the `sortOrder` only comes into effect if you _don’t_ have a binding on the table data…  
That appears to be ‘working as intended’, but is certainly not very user friendly. I’ll check in on the expected behavior and see if there’s anything more we can do.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 9, 2021, 5:22pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188/3 "2021-02-09T17:22:08Z")

</div>

Oh ok so because I use a named query it won’t work? Understood, so really I need to use an `ORDER BY` clause.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 9, 2021, 5:37pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188/4 "2021-02-09T17:37:11Z")

</div>

I think ordering at the source is definitely best, if you’re able to, but I did confirm that it’s _not_ working as intended, so expect a future update to resolve things.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 9, 2021, 5:48pm UTC](https://forum.inductiveautomation.com/t/how-to-use-sortorder-for-perspective-table/43188/5 "2021-02-09T17:48:17Z")

</div>

Actually, testing on 8.1.3 it’s now working as I would expect. Do you have column definitions set up with a sort property set to ascending/descending?
