Result of either of two steps. Possible?

Hey Bubblers,

I have a workflow that has 2 steps both with conditional rules. Both steps create the same type of item. I want to create a 3rd step to tie that new thing to its parent thing, do I have to create 2 new steps to follow both of the first two steps with the same conditions? Does anyone know of a way to do ‘result of step 1’ if its rule is met and if not, ‘result of step 2?’

That is kinda confusing, I hope it makes enough sense. Let me know. It would be great.

All the best,
Benjamin

Bdk utilities plug-in has if then functionality otherwise not really.

1 Like

No matter what it’ll require two separate conditional tasks. This is a limitation of the AST-builder Bubble employs, far as I can tell. So the simplest is to, yes, recreate the same rules or leverage “and result of step 1 is not empty” trailing conditionals. You can try to add fancier actions, such as creating DB-stored tokens that is written different between step 1 and step 2, then referenced in steps 3 and 4. But no matter what, they’ll be a step 3 and 4.

This would be solved if Bubble allowed dynamic injection into the boolean :formatted as text action. Then one could do Step 3’s write action = result of step 1 is empty: formatted as text (rule for yes = result of step 2, rule for no = result of step 1).

Thank you, I kinda figured. Open to suggestions anyway ahaha.

All the best,
Benjamin

Actually, I stand corrected. You can now reference dynamic data within :formatted as text actions. I have no idea when this functionality was added. Could’ve swore it wasn’t there 6 months ago ha. Anyway, that makes it possible within a single action.

In step 3, target value = result of step 1 is empty: formatted as text =>

value for yes = result of step 2
Value for no = result of step 1

Hacking the :formatted as text operator is incredibly useful, especially when building out checkbox forms or search filters.

3 Likes

not working now… when using :formatted as text, system will try to convert the “yes” and “no” values to text, which makes a type mismatch in the expression.

Roy, know that you cannot use :format as text in any place Bubble is actually expecting a boolean value. Such as in Do When conditionals, constraints against boolean (yes/no) data types in searches, etc. It can only be used for comparisons to text-type data attributes. So in the above example

In step 3, target value = result of step 1 is empty: formatted as text =>

value for yes = result of step 2
Value for no = result of step 1

Step 3’s target value CANNOT be a boolean data type. If it is, the logic needs to be enhanced further (and made uglier) via adding “IS {some text}” operators to force the resultant conditionals back down to booleans.