If & Else If statements in workflow

I know Bubble is a no-code platform but If & Else If are more logic than coding and if it can be done in the workflow it would save lots of effort for us app builders since the alternative is specifying the condition in an “only when” & adding a bunch of terminate this workflow or worse when you need to do a conditional in the middle of a workflow.


Hi there, @ahmadnaser16an… a thought comes to mind here that I didn’t think it could hurt to share because I find myself forgetting about it quite often. When possible (of course), consider putting Only when conditions on the workflow events themselves as opposed to putting them on multiple steps within a workflow event. That particular “trick” should help when it comes to what you said about adding a bunch of terminate this workflow steps.

Again, just a thought.


1 Like

personally I’ve found the “Only when” sufficient for most workflows. You can combine them with custom states to basically replicate any of the functionalities of if… then statements.

You can replicate a “while” loop with recursive workflows with the “only when” on the recursive workflow call.

A whole series of

else if
else if
… etc

can often just be refactored :slight_smile:


this is such a hack. seems a real shame Bubble doesn’t have a robust solution.