Forum Documentation Showcase Pricing Learn more

Reorder items in a repeating list

I have a list of items that display in a repeating list. I would like these to be reorderable by the user. Basically, up and down arrows, that when pressed, will move the item up or down the list.

I know I could set up a voting feature, but I only want the item to move up 1 spot or down 1 spot at a time.

Is there a simple way to accomplish this?

I’ve done it but it a bit painful. I used a rank integer to sort the items and a New_Rank integer as temp data for making changes.

When click on UP,
1 - Modify the item above’s New_Rank = Curent’item’ s Rank
to find the item above, use : Repeating group’s items (:filtered all the items above with rank > current’s cell’s rank, sorted by rank) and with “:last item” to select the last one of the list.
2 - Modify the Current item’s rank = Result of step 1’s Rank (ie the item above)
3 - Result of step 1’s Rank k (ie the item above) = Result of step 1’s New_Rank

1 Like

Yes not sure we have a better option there

This was super helpful, thanks!

1 Like