# Repeating group states

**URL:** <https://forum.bubble.io/t/repeating-group-states/271104>\
**Category:** Need help\
**Created:** [July 5, 2023, 3:12pm UTC](https://forum.bubble.io/t/repeating-group-states/271104 "2023-07-05T15:12:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martynas](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/martynas/32/175189_2.png) [@martynas](https://forum.bubble.io/u/martynas)\
**Post date:** [July 5, 2023, 3:12pm UTC](https://forum.bubble.io/t/repeating-group-states/271104/1 "2023-07-05T15:12:06Z")

</div>

Hi everyone,

I am doing the following. I have a repeating group displaying an option set of Regions. Group inside repeating group that holds all the information has a state “selected” which is either yes or no based on whether user has clicked on the element or not.

The issue is that I am not able to reset those states from outside of the Repeating group. Hence, after using the popup once, upon opening it a second time the previously selected Regions are highlighted.

I would like to reset them when the popup is no longer visible, because I allow user to update the information and that would be the correct way to do (in my opinion).

 ![hierarchy](https://us1.discourse-cdn.com/bubble/original/3X/a/e/ae47c4f9a3a57f400cedda0c73d853d4d4df7e53.png)  
 ![selected state](https://us1.discourse-cdn.com/bubble/original/3X/7/e/7e6d9cf0eed8dd16680fd113d749f09a2f410ecb.png)  
 ![popup_error](https://us1.discourse-cdn.com/bubble/original/3X/a/3/a3aa3309f8c21b9812595c83e2c1c27a8b9ffbb1.png)  
 ![main_selected](https://us1.discourse-cdn.com/bubble/original/3X/9/4/94b8167c4273c43398fc26fcab585ec4cf475007.png)  
 ![popup](https://us1.discourse-cdn.com/bubble/original/3X/d/5/d59038560500f7fb59f766ccb606e98e0ae62bd2.png)  
 ![MAin](https://us1.discourse-cdn.com/bubble/original/3X/3/8/38d46b0d681e8858ba6184415f86494f3e39c6ce.png)

Thanks for help!

---

<div class="post-metadata">

**Author:** ![gerbertdelangen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gerbertdelangen/32/144602_2.png) [@gerbertdelangen](https://forum.bubble.io/u/gerbertdelangen)\
**Post date:** [July 5, 2023, 6:19pm UTC](https://forum.bubble.io/t/repeating-group-states/271104/3 "2023-07-05T18:19:56Z")

</div>

Hi @martynas,

Yeah, states in repeating groups (actually, on the items in the repeating group) are hard to reach, so there is another solution to make items in a repeating group selectable:

A) Create two states on page level, both of type region and one with \_prev in the name and make sure to mark them as list:

![image](https://us1.discourse-cdn.com/bubble/original/3X/e/8/e84b7182d473f9786ceb9e94ff5c298d55abcd65.png)

B) Adjust the workflow you use now (to set that state selected) to do this:

1. Action 1: Set state regions\_prev to state regions (copy the contents of state regions\_prev to regions).

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/8/a84d6ad2019bf85c3c54bbbb5cb50f3aba3e73ac.png)

1. Action 2: Add the region of the current cell (the one that is clicked) to state regions, but only when state regions\_prev does not already contain this region (see the condition). In other

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/3/3/33a233922d0ed12c64a95aa4067525179aa35e0b.png)

1. Action 3: Remove the region of the current cell from state regions, but only when region\_prev already contains it.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/7/17a338432c5e403b97d4ee2272dede82e86891a6.png)

C) Add a condition so that the user can identify the regions that he or she selected:

![image](https://us1.discourse-cdn.com/bubble/original/3X/3/5/35fdf81e70edfdefb4c4db6f9bca15f17c99a3d3.png)

Now when the popup is closed and/or you have processed the data in the state regions you can set states regions and regions\_prev to empty:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/3/f313a08c086b01e07bab3d1c64f643249b4e4576.png)

\*It is a good habit to keep all of the states in one place, it makes them easier to find afterwards.

In the end it should work like this:

![chrome_0K54PYg8h9](https://us1.discourse-cdn.com/bubble/original/3X/9/3/93d5b10bffd7155bf8e110b05578201c99f457f8.gif)

Hope this helps,

Gerbert  
[MVP Design](https://mvp-design.tech)

---

<div class="post-metadata">

**Author:** ![msgiblin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/msgiblin/32/119904_2.png) [@msgiblin](https://forum.bubble.io/u/msgiblin)\
**Post date:** [July 6, 2023, 3:04am UTC](https://forum.bubble.io/t/repeating-group-states/271104/4 "2023-07-06T03:04:10Z")

</div>

You can also try using the free plugin ‘Orchestra’:

> **[Orchestra (repeating group addon) Plugin for Bubble, by Vinicius Brito](https://bubble.io/plugin/orchestra-repeating-group-addon-1581095540181x938333534159634400)**
>
> Orchestra (repeating group addon) Plugin page on Bubble, by Vinicius Brito. Add Orchestra (repeating group addon) in one click to your app. Bubble lets you build web apps without any code.

This will allow you to create workflows outside of the repeating group that affect individual cells of the repeating group based on conditions or states.

---

<div class="post-metadata">

**Author:** ![martynas](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/martynas/32/175189_2.png) [@martynas](https://forum.bubble.io/u/martynas)\
**Post date:** [July 6, 2023, 7:52am UTC](https://forum.bubble.io/t/repeating-group-states/271104/5 "2023-07-06T07:52:47Z")

</div>

Thank you! Everything works

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [September 13, 2023, 3:12pm UTC](https://forum.bubble.io/t/repeating-group-states/271104/6 "2023-09-13T15:12:47Z")

</div>

Closed on September 13, 2023, 3:12pm UTC

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