I have a repeating group with checkboxes. Each time I check an item it gets added to a custom state list. Then there is button to process all selected records that are in the custom state.
Use case: I have a repeating group with orders and I want to push the selected orders to an external system using a POST API.
How should I iterate or loop through the items in the custom state list
While the forEach method will work in some contexts, note that if you’re doing something like firing a workflow only when the previous iteration’s workflow is truly complete, you can use List Shifter’s iterate function.
(The issue being that the “delay” parameter will never be right for all devices in all situations. It will be too short for some devices and longer-than-need-be for others.)
This being said, Bubble in-page workflows themselves are either poorly coded, bugged, or intentionally slowed (which wouldn’t make sense, but is a possibility — is it because of logging? Why do we even need logging for workflows that don’t touch the database?) and even a trivial (or even EMPTY) Bubble workflow takes a measurable time to complete (“why?” we wonder - I guess it’s because logging? ).
As a result, iterating over workflows takes longer than it “should”.
If what you want to do is purely computational and in the page, you can use List Shifter’s PROCESS List action which operates at essentially native JavaScript speeds.
At least there are iteration options available. When I started with Bubble there were none/zero/zip.
(Though it’s literally, actually inexplicable that a native/vanilla solution doesn’t exist. It would be excusable if Bubble were truly an array-oriented environment, but it’s not as it’s missing some basic features there.)
I have an event starting the ForEach. I have a second event executing this ForEach.
But after the Start ForEach it never goes inside the executing event. I just don’t get why.
Any hints?
The ForEach is just a custom state list. The start is triggerend when pressing a button. The executing event is just hiding a panel (to simplify the test).