Skip to content

Lazy Conditional

Evaluates up to 10 boolean conditions in order and returns the first corresponding value whose condition is true; otherwise returns the provided else value. Uses lazy evaluation so only the inputs needed for the selected branch are requested and computed.
Preview

Usage

Use this node to build multi-branch logic without computing all branches. Provide condition1 with its value1, then optionally add more condition/value pairs (up to 10), and an else value for the fallback. The node short-circuits at the first true condition, requesting only the inputs it needs.

Inputs

FieldRequiredTypeDescriptionExample
condition1FalseBOOLEANFirst condition to test. If true, value1 will be returned.True
value1FalseWILDCARDValue to return if condition1 is true.Result A
condition2FalseBOOLEANSecond condition, evaluated only if condition1 is false.False
value2FalseWILDCARDValue to return if condition2 is true.Result B
condition3FalseBOOLEANThird condition, evaluated only if prior conditions are false.False
value3FalseWILDCARDValue to return if condition3 is true.Result C
condition4FalseBOOLEANFourth condition.False
value4FalseWILDCARDValue to return if condition4 is true.Result D
condition5FalseBOOLEANFifth condition.False
value5FalseWILDCARDValue to return if condition5 is true.Result E
condition6FalseBOOLEANSixth condition.False
value6FalseWILDCARDValue to return if condition6 is true.Result F
condition7FalseBOOLEANSeventh condition.False
value7FalseWILDCARDValue to return if condition7 is true.Result G
condition8FalseBOOLEANEighth condition.False
value8FalseWILDCARDValue to return if condition8 is true.Result H
condition9FalseBOOLEANNinth condition.False
value9FalseWILDCARDValue to return if condition9 is true.Result I
condition10FalseBOOLEANTenth condition.False
value10FalseWILDCARDValue to return if condition10 is true.Result J
elseFalseWILDCARDFallback value if none of the conditions are true.Default Result

Outputs

FieldTypeDescriptionExample
valueWILDCARDThe selected value based on the first true condition, or the else value if none are true.Result B

Important Notes

  • Order matters: conditions are evaluated from 1 to 10 and the first true one wins.
  • Lazy evaluation: only the inputs necessary for the selected branch are requested and computed.
  • Provide pairs: for any conditionX that can be true, ensure valueX is also provided; otherwise the node will request it.
  • Fallback recommended: provide an else value to avoid a None output when no conditions are true.
  • Type flexibility: value inputs are WILDCARD; ensure downstream nodes can handle the type that may be output.
  • Maximum branches: supports up to 10 condition/value branches.

Troubleshooting

  • Node keeps asking for inputs: Ensure each conditionX that might be true has a corresponding valueX, and provide an else value.
  • Unexpected None output: Add or connect an else value, or verify that at least one true condition has its value connected.
  • Downstream type errors: Standardize the types of valueX and else so the selected output matches what downstream nodes expect.
  • Multiple true conditions choose the wrong branch: Remember only the first true condition in order 1..10 is used. Reorder conditions accordingly.
  • No output changes when toggling conditions: Verify that the condition you toggle precedes any other true condition; otherwise a prior true condition will short-circuit.