Referencing a repeating group's index number from a nested repeating group

Hello! We have a repeating group (A) with another repeating group (B) living inside it. Each cell in Repeating Group B needs to be able to reference the index number of it’s “master parent cell” (i.e., the cell number its parent group is living in.

So for example, it would look something like:
Repeating Group A, Cell 1:

  • Repeating Group B, Cell 1
  • Repeating Group B, Cell 2
  • Repeating Group B, Cell 3

Repeating Group A, Cell 2:

  • Repeating Group B, Cell 1
    - Repeating Group B, Cell 2. [i.e., <<— This one needs to know which cell it lives in within Parent Group A]
  • Repeating Group B, Cell 3

and so on.

In the example above, repeating Group B, Cell 2 (for example) would need to know that it lived in Repeating Group A, Cell 2.

While you can reference “parent cell’s index” it doesn’t look like there’s a way to reference “this entire repeating group’s parent cell’s index”

Questions

  1. Am I correct in thinking that we can’t set states for groups nested inside of the repeating group unless a button is clicked in the repeating group?
  2. Am I correct in thinking that when you nest repeating groups, there’s no way for the cell of the child grop to know which cell it lives in within the parent group?

Thanks!
Mary

2 Likes

You can’t do this with standard Bubble features, but check out the Orchestra plugin - you should be able to do exactly what you’re trying to do with this plugin, by setting a custom state on your Repeating Group B that refers to the cell it’s inside in Repeating Group A.

You can then refer to that custom state value from within a cell in RG B.

2 Likes

Great. Checking this out now!

Hey Mary,

Did you figure this out?

Another way you can accomplish this is by creating a small group in one corner of the repeating group A cell 1 (like a group of size 20px by 20px and assign it data source: current cell index) and this group would automatically reflect in all the other cells in repeating group A. Now it can be easy for you to reference that small group’s index number inside the nested repeating group B cell.

15 Likes

Was just having the exact same problem. Nice little work around. Thanks

Great solution.

clever