Bubble to slow for event in Javascript loop (Toolbox plugin). Ideas?

Hi Bubblers,

I am stuck and it would be awesome if you could help me!

I built a little JavaScript that takes a list of ExerciseGroups and creates a list of User’s Exercises for each ExerciseGroup:
The Javascript part loops over each ExerciseGroup:
42

…and when the Event of bubble_fn_exerciseGroup() is triggered, a new User’s Exercise is created in Bubble and attached to the User’s Exercises list of the Current User:

As long as the debugger was on, this worked just fine and produced a beautiful list of different User’s Exercises in my DB :slight_smile::

The moment I turned the debugger off, everything went too fast it seems and instead of 11 different User’s Exercises I get 11 identical ones :frowning::

This happens despite the fact that the JavaScript seems to loop over the correct ExerciseGroups:

59

So I assume Bubble is not fast enough to get the new value from my JavascripttoBubble element.

Any ideas how to fix this?

Thanks so much for the help!
Nicola

I should have said:
I built a little JavaScript that takes a list of ExerciseGroups and creates a User’s Exercise for each ExerciseGroup. It’s a 1:1 relationship. Sorry, somehow I cannot change the text.

Hi @nicola.kegel,

I’m not really familiar with the toolbox list functionality, but I did notice that the Create User’s Exercise workflow does assign “first item” to “Exercise”.

@nicola.kegel

You may wanna check the list processor out to do this without writing any Javascript:

3 Likes

Thank you so much Gaurav for building the Bdk Utilities plugin. It’s a game changer for my app! Why didn’t I find this in December? You would have saved me weeks! :stuck_out_tongue_winking_eye:

Also thanks for the very structured and easy to understand documentation.

1 Like

Haha thanks @nicola.kegel!
Its true I don’t end up marketing any of this stuff. But awesome bubblers like you who are active on the forum have been very kind in spreading awareness! :smiley: