How to transform durations to starting point and duration

Dear more advance Bubblers,
how to manage this transformation:

  1. I have values of duration in repeatitive list component like:
    |Slot1 | Slot2 | Slot3 | Slot4| and next slots…
    |8 | 10 | 6 | 4|…
  2. I need starting point and duration as the value pairs like:
    |Slot1 | Slot2 | Slot3 | Slot4|…
    |0 8|8 10|18 6|24 4|…
    (starting point | duration)

Additional Starting point value can be stored in the same Slot.
It can be a workflow under the Button click.

Can you please share an idea how to build it at Bubble side?

Each cell will have this to print the starting point of the current slot: Repeating group's Data's items until #(Current Cell's index-1)'s each item's duration:sum. Simply the sum of the all previous items before that cell.

To be able to do Current Cell's index - 1, you should either enable paranthesis option or the new expression editor.

1 Like

Thank you for response.

Sounds very good - I will try it in next hour.
Paranthesis option or the new expression editor - I haven’t tried yet. I’m too new in Bubbles.

Should it be parameter of the new hidden Input field on page or it is some workflow part?

Any additional tips are very welcome.
Once againt thank you.

In the current default expression writing, you cant create the index-1, so you will figure that out yourself anyway while typing the expression I gave you. In this case, just on top right of the propery box, find a small button called new experimental expression editor button and enable it and play with it a little bit to figure out how to write what I gave you.

1 Like

What element should I use to start with expression:

  1. Input at page at repeating group level?
  2. Workflow under button ?

This is one text field in the repeating group cell. No workflow needed.

1 Like

Done as Placeholder and Initial Value at Input field on Repeating group container.
It works well on the screen.
Super. THANK You.

  1. Placeholder does not work as value - cannot store it at DB even auto-binding on.
  2. Initial Value cannot be used together with auto-binding - again cannot update field in DB

How to store counted Starting points to DB?

It seems that it works for point 2. Initial value is also stored to DB even if auto-binding option is turned off (turn on only for a while to set Field to modify)

Once again thank you so much

Dears. It works as initial values. Whan I’m changing duration - starting points are not recalculated. Any tips are welcome

How to store this calculated value into DB thing?

and recalculate live when duration will be changed?

Finally I used Orchestra (repeating group addon) plugin for Bubble.
It work very good,
I bought Vinicius coffee at ko-fi.com Thank you Vinicius.