Hi Bubblers,
I need help implementing a working loop for processing a list of items on the Bubble Free Plan (which doesn’t support backend workflows). Here’s what I’m trying to do:
Use Case:
I’m building a simple POS system for hardware stores. After a user adds items to a cart and hits “Process Transaction,” I want to:
- Loop through each item in the cart.
- Reduce the stock quantity for the selected variant of each cart item.
- Record the sale.
Database structure
- Cart Item→ has a field
variant
(linked to Variant), and aquantity
-Variant→ has astock quantity
field - Sale → will store the details after stock is reduced
The Problem:
Since I’m on the Free Plan, I can’t use backend workflows. So I tried using a custom workflow to loop through the list, but:
-
Bubble throws this error:
“Circular custom workflow – custom workflows cannot call themselves (either directly or indirectly)”
-
Even though I created a separate “loop” event and a “process single item” event, Bubble still complains because one ends up calling the other.
What I’ve Tried:
- Creating a
LoopIndex
state and a list state on the page. - Using
Trigger custom event
inside a loop. - Keeping the loop logic on the page level (frontend).
- Splitting into two workflows (e.g., one for looping, one for processing) — still doesn’t work because of the circular workflow rule.
What I Need:
I just want a working loop structure on the frontend (Bubble Free Plan) that can:
- Go through each Cart Item in a list
- Deduct the quantity from the associated Variant
- Do this reliably without hitting the circular workflow issue
Help?
Can anyone share:
- A working example (even in a test Bubble app)
- A trick/workaround to loop through lists using only frontend logic (no backend workflows, no plugins)
- Any help to break this blocker — it’s the last step in my workflow
Thanks in advance for the help.
—
I’m working on this to support small businesses here locally, so any guidance is really appreciated.