# Repeating group referancing another instance of the same data

**URL:** <https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177>\
**Category:** Questions\
**Created:** [March 13, 2024, 1:03pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177 "2024-03-13T13:03:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebentr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ebentr/32/208493_2.png) [@ebentr](https://forum.bubble.io/u/ebentr)\
**Post date:** [March 13, 2024, 1:03pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177/1 "2024-03-13T13:03:58Z")

</div>

Good day.

I’ve spent some time trying to find a solution on this issue.  
I am new to bubble so please excuse if it’s a silly question.

I have 2x repeating groups on on page which are displaying different “views” of the same data type. (Lessons)  
The first group is a list of names of available Lessons in my Lessons data type.  
The second actually displays the full lesson including it’s video and “questions” list.

I have currently set a custom state on the 1st group so when clicking the cell it sets the state = “Current Cell’s Lesson”  
The 2nd Repeating group then pulls it’s Data Source from the state of Repeating Group #1’s state (By searching for Lessons \> Lesson Unique ID = Group 1’s State Unique ID)

Upon completing the Questions of each lesson I’d like to show a pop up congratulating the user, then automatically move on to the next Lesson, which is item #2 in the 1st Repeating group’s list.

I know there is an Workflow option “Show next” under Repeating Group.

The problem is that I can not add into the Workflow to set the Custom State of Repeating Group 1 to “Show next” in the Repeating group as this is relying on the user actually selecting that cell…

And since my Repeating Group 2 pulls it’s Content from the State of Group 1, I am stuck…

Is there a solution to this or a way to rethink my structure completely?

---

<div class="post-metadata">

**Author:** ![hergin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hergin/32/199185_2.png) [@hergin](https://forum.bubble.io/u/hergin)\
**Post date:** [March 13, 2024, 1:33pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177/2 "2024-03-13T13:33:24Z")

</div>

Your custom state in the first repeating group will not be a `Lesson` but the index (starting from 1). Then the second repeating group will just show the videos etc of the `lesson #custom state`. Finally, your next button will just increase the first repeating group’s custom state by 1. You can check to make sure it doesn’t exceed the length etc. You can change the custom state by either a next button or clicking on cells of the first repeating group.

---

<div class="post-metadata">

**Author:** ![ebentr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ebentr/32/208493_2.png) [@ebentr](https://forum.bubble.io/u/ebentr)\
**Post date:** [March 13, 2024, 1:52pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177/3 "2024-03-13T13:52:59Z")

</div>

THanks for the fast reply.

I amvery new to bubble. When setting up my Custom State on the group 1, I can only select from my Data Types, and “BASIC TYPES” … None of which has “Index” as an option… 👀

---

<div class="post-metadata">

**Author:** ![hergin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hergin/32/199185_2.png) [@hergin](https://forum.bubble.io/u/hergin)\
**Post date:** [March 13, 2024, 1:57pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177/4 "2024-03-13T13:57:00Z")

</div>

It will just be a number. You can either set it 1 at the beginning, then increase it later on with a button or set it to the Current Cell’s index when a cell is clicked.

---

<div class="post-metadata">

**Author:** ![ebentr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ebentr/32/208493_2.png) [@ebentr](https://forum.bubble.io/u/ebentr)\
**Post date:** [March 13, 2024, 2:11pm UTC](https://forum.bubble.io/t/repeating-group-referancing-another-instance-of-the-same-data/312177/5 "2024-03-13T14:11:16Z")

</div>

Oh wow. Thank you so much! I had no idea what the “Index” function did. But now I get it.

Thank you so much this has solved my problem 100%!
