Set multiple custom states in repeating group?

Hi !

I have a repeating group in which each element has a custom state (a boolean that is either yes or no), to make it open or close.

Let’s say it looks something like this :point_down:

Now, I would like to have a button that allows to ‘open all’ or ‘close all’ the elements of my repeating group.

I can’t seem to find a way to do that… Any idea ? :pray:

hi @tart2000design,

how about you add a custom state to the repeating group itself and add toggle each row’s custom state based on clicking the arrow or the close/open all buttons.

it will look like this:
BubbleForums22222

1 Like

Hi @Anana1,
This looks exactly like what I’m trying to achieve, but can you be a bit more specific in how to achieve that ? How do you ‘add toggle each row’s custom state’ ? I can’t seem to find it in the workflows :disappointed_relieved:
What does your workflow look like when you click the ‘open all’ button for example ?
Thanks you

@tart2000design I could explain in detail but it’s easier for you to see for yourself and play around with it, here’s a public version of the one I showed you. free for all to edit:

you basically make expanding/collapsing based on two conditions, current row and the whole RG custom states.

Wow, thanks @hanan1
I finally got it to work by fiddling with your demo. Is there a reason why the custom state on the RG needs to be a text field and not a boolean (it doesn’t work when it’s a boolean) ?
Thank you very much :pray:

Also, there is this weird (if expected) behavior :
When I open #1, click ‘open all’ and then close #2, they will all close, but #1.
The logical thing to happen would be for #2 to close and all the others to remain open…
I understand that it’s what is ‘supposed’ to happen with the way it is built, but it makes for a really less than intuitive experience for the user :confused:
So in the end, I’m not even sure I’ll keep this feature…
It would be sooo much easier to be able to set states within a RG.

@tart2000design Ah I’m sorry, missed a condition because I did it fast. The text state is there because we need an intermediate state when the RG is not all open or all closed; either of which changes all at once.
I’ll fix it and explain when I have more time later today. no worries.

Hey, I just made a much better, much easier solution for this issue. You can find it here:

And here is the explanation:

4 Likes

Wow @hanan1 this is such a smart and elegant way to do it!
Well done :+1:
I’ve been struggling with that thing for weeks, I’ll implement it straight away!

1 Like

thanks! I hate when I get stuck with something so I know how you feel :confused: hope it works for you!

1 Like

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