How to calculate formula per day + Incrementing day in the same workflow

Hi everyone,

I hope you can help me with this one.

I want to calculate the number of hours worked in a day , but the hours worked are split up in different interventions (a field called Performance).

I want a workflow which scans through al the in Performances, day by day and run a calculation. I already figured out how to do the calculation.

I’m stuck at the point where I want to increase the day and run the workflow again. It says I created a circular workflow.
In short my Workflow should contain:

  1. run the calculation (On day X)
  2. Increment day X to day X+1
  3. run the workflow again

Thanks for helping me out!

I ran into a similar situation recently trying to count up rental inventory over a range of dates. Honestly, I haven’t come to what I feel is perfect solution yet, but I do think I can help!

Basically, as you know, bubble doesn’t want you to call circular workflows. This is primarily related to the fact that you could theoretically call the workflow into an infinite loop causing the user’s browser to crash. As a general rule, bubble does not allow you to do anything that could ‘break’ stuff for the user.

Side note: You can call an API workflow recursively like you want, however there is a delay of several seconds between each time you call the next workflow (its not great fast for simple calculations like this). Its also very taxing on your performance while its running for multiple minutes if you are doing day-by-day calculations like this. Not recommended.

What database types are you working with? You mentioned something called an ‘invitation’ is this a database type with different fields?
What is your calculation you are doing? Are there multiple date/times ranges that you are subtracting the difference to get durations?
What does ‘day’ + 1mean? is this the number of days out from present date?


I have a field Achievement. This is a field for a certain workaction.
This field has a startdate, enddate, hours worked (end-start) and sort of work.

Formula: Check every day if the hours worked are higher than 8. (It is possible there are more achievements in one day, so the workflow has to group the achievements per day.

Day+1: I mean it is just to increment the date value. For example: start of the workflow is 25 june. then day+1–> 26 june and continue just like this.

Thanks already!

I figured it out myself, but thanks for reaching out! I achieved it by using custom states and the toolbox plugin to work with lists. Thanks anyway!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.