I am not sure that I have understood the case.
You can create BL API service for each loop then call it async. If you need results at the end use Promise.all() like described in the following article How to wait for all Promises to resolve in JavaScript
I see what are you talking about, but unfortunately, this is not possible with Codeless at this moment. I’m going to create a ticket to add a new codeless block for running inner blocks asynchronously, something like that:
I’m having an issue with accessing a variable in a custom code block
i have 2 custom code blocks. Both in “On page enter” event
the first custom code block do initialization of the counter value to store it.
the second custom code is inside the RT message listener block.
i need to access the value from the first custom code block to get the value of the counter
i can access it from the console if i type the variable name. but if i try to do so from the second custom code block i got error that the variable is not defined
Actually, we can
Since it is a browser environment there is a window namespace that you can use to define your global variables, see the following example:
We’ve just updated cloud servers to solve the issue you described above. We have added the new block which runs code asynchronously. The block can be found on the Advanced tab (System section). Could you please let us know if it does what you were looking for?