swipe
swipe2w ago

Loop: Is there an "continue" node?

It would seem that the "Output" node exits the loop entirely. I'm looking for a way to "continue" to the next item in the array. This seems to be a pretty fundamental loop feature. Maybe I'm missing something?
3 Replies
AI Support
AI Support2w ago
AI Support Bot Information
<@405465071448227840> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support2w ago
AI Response
It seems like you're trying to implement a loop that processes each item in an array, and you want to continue to the next item in the array without exiting the loop using the "Output" node in BuildShip. In BuildShip, when you want to process items in a loop and move to the next item without exiting the loop, you should avoid placing an "Output" node directly inside the loop because it typically signals the end of a workflow execution, thus stopping the iteration. Instead, you can follow these steps to achieve the desired behavior: 1. Use a Loop Node: You can use nodes designed to handle iterations over arrays, such as the "Repeat" or "For Each" node, which is specifically for iterating over items in an array. 2. Conditional Logic: Within these loop nodes, use conditional logic (such as the "Branch" node) to decide whether to process the current item or "continue" to the next one. You can implement the condition that skips the rest of the logic for the current iteration if needed. 3. Return to Loop Start: By not placing an "Output" node within the conditional logic, the loop will continue naturally to the next item in the array without needing explicit "continue" functionality. 4. Logging or Temporary Storage: If you need to log or save intermediate results, consider using logging nodes or save intermediate results in temporary workflow variables instead of using the "Output" node. For any additional details or specific implementation help, you might want to refer to the detailed documentation for loop nodes and branching in BuildShip. If this does not address your concern completely, feel free to provide more specific details about your workflow design.
BuildShip AI Support
Gaurav Chadha
Gaurav Chadha14h ago
Hi @swipe also sharing this here for community - currently break and continue is not supported directly in loop, we'll be adding this in near future, for now you may try to add a branch inside the loop, and place the nodes you wanna skip inside one of the paths. If the condition is true, those nodes will run, if it's false, the empty path is taken and they're skipped.

Did you find this page helpful?