Forum Academy Marketplace Showcase Pricing Features

Noob question on how to sort in a RepeatingGroup

Friends,

I’m trying to sort in a RepeatingGroup using conditional. The only problem is: I cannot seem to make it permanent.

If I use the condition “when column x is pressed”, it only sorts accordingly for the moment you press the button. Does anyone know how to make this permanent? (i.e. after pressing, I no longer need to hold, it just sorts according to that column, and if I press again it could in opposite order).

Thanks in advance,

Daniel

So create a button that sets the state of your repeating group, with a state type of yes/no.

When the button is pressed and the repeating groups state is no, set it to yes… and vice versa.

Then set the conditional on your repeating group to say "when (state) is set to yes, change the data source to the same data with a different order.

1 Like

to clarify a bit of what csblack is saying…

go to your workflow, create a new workflow and make it for when something is clicked, and select the button you want to control the sorting (you mentioned clicking column x)
then make an action of set state of elements, and choose the repeating group you want to sort, and create a new custom state called “clicked” or something.
now, back in your repeating group in the design tab, make a condition that is (something like) “when this groups state is clicked is yes”, change the data source to what you want. Then when it is no, change it to something else.
you will need multiple set state workflows and multiple conditions on the group if you want to sort the same group in many different ways.

4 Likes

This is great, many thanks Ben & Csblack!! Your solution worked perfectly. Big big thanks for the explanation!!

2 Likes