Table sort - toggle sort arrow icons?

Hi folks, it’s been a while…
For the life of me I can’t marry up the sort function with the arrow orientation…
I have 3 icons (sortable, ascending, descending), so can’t just sort the table by ‘selected’.

Currently I’m trying to sort the table by visibility of the icon. I.e.
WHEN up arrow is visible
THEN table is sorted ascending order

BUT when I click between different columns, the toggle isn’t always sorting the data in the right way…

Any advice would be much appreciated!
SortableTable-Help.rp (81.8 KB)

Hi @daijo

After taking a look at your file, I think they do not match because the sorting action is set as “Toggle” (therefore it alternates between two states) but in each column there are actually three “states” or groups: Sort Up group, Sort Down group and Sortable group. So, when you click on a different column to sort the table and then go back to the previous column, the visibility of the icons does not match anymore the type of sorting (ascending or descending).

One way to get what you want would be removing the Add Sort action form the OnClik event of the column header, and adding it under the OnShow event of each arrow group, something like

Name sort up (Group)
Add Sort Student_name as Text asc to (Repeater)

Name sort down (Group)
Add Sort Student_name as Text desc to (Repeater)

Hope it helps

Thanks @lastmonkey, I really appreciate you taking the time to look.
I’ll give that a bash.