Default sort on a repeater


#1

How do you set a default sort order on a repeater?


#2

Click on the repeater and add a ‘Loaded’ interaction (rather than ‘Item Loaded’, which runs every time a row in the repeater is loaded). Then add an ‘Add Sort’ action.

You could also add a default sort at the page level, when the page is loaded (click anywhere on the canvas, then add a Page Loaded interaction).


#3

Thanks. No sure why that wasn’t working for me before.

Can you do secondary sorts?


#4

Yes, but you can’t target the same repeater with a sort or filter in the same action. If you want to add multiple sorts (say, sorting by sale type and then numerically within sale type) then you’d need to add two separate ‘Add Sort’ actions, each independently targeting the same repeater. Occasionally, this won’t work quite right, because the second sort fires before the first sort completes (especially on longer tables), so I usually add a 100-500ms wait in between the sort actions.


closed #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.