Question on repeating group with external button

Hello I have a repeating group that lets say have a field for a person names.

Now I have the group repeating 10 times each with various names that are all a record in a db. In the same repeating group I have a check box.

Now I have a button NOT in the repeating group.
And a field NOT in the repeating group lets call it last name field and I type in “josh”

When I click the button I want it to itteate through the repeating group and if the repeating group section has the tick box ticked then I want it to add the last name “josh” to the db for each of the record.


Note the tick box is not stored (not auto binding)

example is just to get my thinking going on my use case.

Thank you!

I think first you should know that there is no direct iteration in Bubble (actually there is, but not clean). Cleaner and proper way: you have to learn how to work with lists.

See the example below:

Simply, the idea is to create a custom state in the repeating group called selected people and whenever a checkbox is checked, add that cell’s Person to the selected people custom state. And doing the opposite when it is unchecked (i.e., removing that cell’s Person from the selected people custom state)

Here is the setup, a repeating group that displays the list of people in the system with first and last names and a checkbox (which is not binded to anything):

Whenever, the checkbox is checked, you update the custom state Selected People of the repeating group:

And you do the opposite when unchecked:

Finally, when the apply button is pressed, all you need to do is make changes to a list of things which the things are the selected people custom state of the repeating group:

Here is the full example if you want to check the details yourself:

Worked a charm and I have looked into using more states - thank you