Repeating group referancing another instance of the same data

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?

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.

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… :eyes:

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.

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%!

1 Like