Forum Academy Marketplace Showcase Pricing Features

Recursion with URL parameters

Dear bubble community,

I have a database with entries of IDs from 1 to 75 of every user. Now I want to fill every unfilled entry automatically. For example, a user filled out the following IDs:

In this case, I would manually add 4,5,6 and 10-73 to the database.

My idea:
Building a recursion with the help of an URL parameter step

Step starts with 1.
Then it does the following loop:

  1. Check if there is an entry with the ID = current step
  2. If step <= 74, go to the same page and send URL parameter step = step+1
  3. If step > 74, go to next page

Weirdly enough, it goes from step 1 to step 2 but then doesn’t continue. When I reload the page manually, it goes from 2 to 3 etc. but it does not automatically go through from 1 to 75.

Is it possible to build a recursion with a URL parameter at all in Bubble?

I would use a backend workflow that keeps scheduling itself until the list is complete.


@jaredg couldn’t agree more. Backend workflows are the only way I’ve found to do ad-hoc DB manipulation like this. There are annoyances where backend workflows “die” after some time for unknown reasons but that is another kettle of fish.

1 Like

Info on how to do this: Recursive Scheduled Workflows - Bubble Docs

1 Like

Thanks a lot for your input. I worked out the URL parameter way but will try the backend workflow next time.
For anyone encountering the same issue:

Make sure that you have the steps in the right order. I had one “WHEN” condition in my workflows and then put multiple steps into it, like “if x=1, then recurse again to A” and “if x>1 then go to page B” and as I understood, step 2 will not even be checked if step one is wrong. So instead of having multiple steps within one “WHEN”, I split it into to “WHEN” conditions with one step each and …it works!

Thanks for your help!