How to loop through a list of items using Bubble
Sooner or later, you will want to take the same action on a list of items. Here is how I set this up with Bubble
If you come from a programming background, you’ll be familiar with loops. It is a core piece of functionality from many programming languages, and you often have several types of loops you can process a list with, such as ‘For’, ‘ While’, ‘Do-While’ etc
If you aren’t from a programming background, you’ll soon come across the need to perform some kind of action on a list of items, and you wonder if Bubble can actually do this, as there isn’t some magic ‘loop’ action in the Bubble editor.
Bubble can indeed do this, and I’ll explain how below..
My Use Case
My App at RosterBuddy.app allocates chores to team members, and does so in a way that balances the workload across the team. Each week the Admin clicks the Create Roster button, and this triggers a workflow which gets the full list of chores from the database, and then will process the list one by one, and allocate the chore to the person who currently has the least ‘work’ allocated to them…, then the next chore is processed until the end…