I’m seeking some assistance with setting up two Repeating Groups in my Bubble application. My goal is to display even numbers in the first Repeating Group and odd numbers in the second, using the current cell’s index.
Currently, I’ve used the <-modulo-> function to filter even and odd numbers, but I’m encountering an issue: some numbers are repeating, and I’m not sure how to address it.
I was doing the math in my head, but i cant quite figure out what you’re looking to do. Could you do a mock up (handwriting is fine!) of what number you’re wanting to see over each cell, and how/why it should differ from the Index itself?
I believe the problem you’re seeing is because some of these numvers are displaying their index +1…so then the very next index calculation has a matching number, because it’s just the index, no +1. It would be helpful to understand your use case and what you’re trying to accomplish.
Hi msgiblin, I am trying to recreate what shows the red numbers, I know it can be obtained using a single repeating group, but when I do this I have another problem which is with flexbox, so I resorted to 2 repeating group which solves the flexbox problem but does not allow me to show the corresponding numbers (numbers in the red circle).
I’ll say without knowing the context of why, (Id recommend not going that route, and instead really learnkng the responsive design tools to get the rows to act like you need with 2 columns), if you had to do it with 2 separate groups you could approach it like this:
2 repeating groups, set identical data source somewhere on the page (so the lists are always identical). Have a group in each RG cell, with Collapse when Not Visible Selected. This is the group the content will be built in.
Set a condition on this group, the left column (odds): ‘When This Index ← Modulo → 2 is 0’ and set visible to ‘This Group is Not Visible’
On the right column (evens),‘When This Index ← Modulo → 2 is 1’ ‘this group is not visible’
Then just have that element dosplay the index as normal, and only odds will show on the left, and evens on the right.
In the repeating group of odd numbers, you have to add the number of the cell itself and subtract 1.
In the repeating group of even numbers, you just have to add the number of the cell itself. And set a condition that if the number of the cell is equal to ‘1’, the text has a value of ‘2’.