DocsNodesFlowIf

If

Checks a condition and sends the run down true or false. Join several checks with and or or.

Kindcontrol:logic
GroupFlow
Credits0.1 credits
Ports out2

How it looks

Settings

SettingRequiredWhat it does
Continue down "true" whenconditionYesBuild it from values in the run, like trigger.payload.celsius is greater than 30, or write it as an expression. It must come out as true or false.

Ports

PortThe run leaves by it when
trueThe condition held.
falseIt didn't.

Example

Only at night

  1. Condition: trigger.payload.lux is less than 10.
  2. Connect true to Send to client lights.on, and leave false empty to end there.
Types are strictA number is never equal to the same digits as text, so 21.5 and "21.5" differ. Send numbers from the board as numbers.

Problems you might see

CodeMeans
LOGIC_CONDITION_NOT_BOOLThe condition came out as something other than true or false, like a number or text.
EXPRESSION_EVALUATION_ERRORA value it reads couldn't be worked out.

Problems found when you publish stop the publish and point at the node. Problems while a run is going fail the node, and its On failure setting decides what happens next. See the error codes for the API's own.