How to get the current value of a parent repeating group (in loop)?

Hi all,

I’ve created a Repeating Group to create 3 columns.
In this RG is a nested RG to show user infos.
And in this RG is also a nested RG that shows user items.

1:
userName1:
item1
item2
2:
userName2:
item1
3:

How to get the current loop-variable from the 1st RG to use this variable in the data source from the 3rd RG to do a do a search for ?

example:
the 1st RG repeats 3 times and I want to do a db search in the 3rd RG data source element an there I want to user the current loop value (1,2 or 3).

I already found this plugin: Orchestra (repeating group addon) Plugin | Bubble
Seems that this could handle that maybe, but I don’t know how to do it :-/

I hope I explained it well, … my english … :slight_smile:

Thank
jupxi

1 Like

I think you don’t need multiple Repeating Groups
Can you send a copy of your app so I can try to do this?
I’m willing to help you, but recreating everything from scratch isn’t possible.

I’m sorry I can’t share my app because it’s so huge with many other projects included and I’m not allowed to share it :frowning:

Could you may explain me about your solution? What would you use instead of a RG to show “subitems” ?

Thanks so much in advance,
jupxi

To achieve the desired behavior, you can use what I call a “ghost input”. In each ID, you will add an input and use this element as a reference to get the current_index of the parent ID.

I created this image here to show the example I created more clearly. I separated each ID by color to make it easier to understand.

Here I show the result I had in Bubble by placing the 3 repeater groups

Here is the element tree

The rectangle marked with dotted lines marks the RG nesting that I set up in Bubble for this example. I used the arrows to show the value of each of the inputs based on colors.

Let me know if I was able to explain your question with this example. If not, feel free to ask and I can help you.

2 Likes

Hello I’m back,
Okay, I understand that you can’t keep opening the app, but I was curious how the solution to this problem would be and I decided to help you.

Maybe the other guy’s answer is also correct and his is more correct, but it doesn’t seem to follow his example and is more complex

I did what I believed to be your problem with what I understood in your example
“1:
user_name1:
item1
item2
2:
user_name2:
item1
3:
…”
If you just copy and paste it won’t work
You have to change the privacy rules, be careful with this part and seek help if you don’t know what you are doing

please tell me if it was good

here it is

and Yes, I needed multiple repeating groups
but there were only 2 and not 3 :slightly_smiling_face:

1 Like

Can you leave this app public here for us?

1 Like

One thing I would add to this example you made would be to add an ‘items’ column to receive a list of ‘items’ in the user table. By doing this you avoid the need to use a ‘Do a Search for’ on each element of the RG. This will save WU.

1 Like

Sure, I’ll add this exemple here

I tried to do this, but I’m still a beginner at bubble, I tried and it ended up not working, I just did another simulation to learn how to use it and I think I can do it now, later I’ll try to change
thak you :slightly_smiling_face:

You sent the app’s page, try to send the editor’s page (like I did), and put it on view only, so that no one can change the app’s settings and break it

1 Like

When is done it will be here =) (I can release it later today)

2 Likes