I have a workflow where steps 1 and 2 may or not run (depending on conditions) but one of them always runs, e.g.:
1 - If condition A is true run custom workflow A
2 - If condition A is false run custom workflow B
both custom workflows return a success variable (yes/no)
then I want to run step 3 only when step 1 and step 2 completes, therefore I was using this condition:
3 - If step1.success is yes or step2.success is yes run custom workflow C
the problem I am facing is that when the workflows dont run I get a null in the success and the condition 3 is always failing:
(null is yes or yes is yes) => null
You are right @georgecollier and I think the issue is there.
Because you cannot say null is yes when you consider that null is no in boolean (and for Bubble). null is no will return yes. null is yes will return no. The correct formula should be null is empty.
But you cannot set null is no… because if this return no… you will also have null is no.
So I think Bubble need to add a way to say “is empty”. But this will probably be a breaking change because Bubble doesn’t work that way.
So a workaround for @simao.rio1 is maybe to return a text instead of a boolean…
hi @Jici I have already changed the code to workaround this issue, but it wasnt an issue with parentheses. I have checked in the step-by-step debugger and the condition was failing because null or yes => null
@simao.rio1, break it into custom events, it’ll make your app organization and logics work way better.
Let’s say you have the main action that can trigger 2 custom events based on your conditions.
Then you have a 3rd custom event that will be triggered in the end of each of those initial 2.
Doing this way your logic will be protected and the sequence of actions is followed accordingly.
Actually it says custom workflows in the text and in the end we don’t really need to use the custom event return, we can just add the trigger to the final custom event at the end of the previous two how it was done until last week