Setting Up Custom States

When the down arrow icon is clicked, then group answer shows. When the up arrow icon is clicked, the group answer collapses.

I’m trying to set a custom state that when the second down arrow icon is clicked while the first arrow icon is still open (group answer is visible), it should automatically collapse the first group answer and open the second group answer. How do i achieve that? Is this possible with the toggle action or I need to use the show/hide action?


workflow

Are you using a repeating group?
You will use custom state and instead of action to collapse/show, you will use conditionnal.
If you are using a RG, the state should be on the RG level and when user click arrow, you will update this state with Current cell (state will be of the type of the data source for RG).
And the group that collapse will have conditionnal to be visible when RG state = Current cell
WF will be on click arrow, set state RG = Current cell

If you don’t use a RG, you can give a different name to each group that collapse and set a different text value for each of them. State will be text and conditionnal will be State = text value you want

Yes, I am using a repeating group. My data source is set to All Options since I’m using option sets. This makes it a bit difficult for me to use the logic especially since I’m using the toggle action instead of the show/hide action.

Would you mind setting up the custom states then I can learn from what you’ve set up and see how it flows, I believe I can have a better understanding that way.

here’s the link to the editor: Mediaplayer404 | Bubble Editor

Page is Accordian Menu

You can have a look
3 thing
A) WF set state
B) State on RG
C) Conditionnal on the Group answer

1 Like

Thank you for this, I totally understand. It looks easier than i had imagined.

Another question, what’s the difference between setting a state on page level vs repeating group, does it affect the speed or something?

I’ve also noticed that you don’t use the toggle action, so how do I make the current group opened to collapse when clicked again?

I only manage to collapse it back up but can’t extend it again unless i click a different cell.

I’ve updated your page
You need two WF
One that check if the state = to current cell. If yes, clear the state
One that will check if state != current cell. If yes, set state = current cell

1 Like

Thank you for this.

This topic was automatically closed after 70 days. New replies are no longer allowed.