If Else Condition Documentation
Version: 1.0.0
Retrieved: 2025-10-09 15:15:57
If Else Condition
The module allows you to add if/else conditions to split/route messages to different outputs.
Settings
The module allows you to add a list of conditions to match against the messages arriving at the module. The group of conditions can be matched in two ways: All conditions have to match (And), or one of the conditions have to match (Or).
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Logic Operation | And, Or | And requires all conditions to be true, Or at least one | And |
| Conditions | See table below | A list of conditions to evaluate | [] |
Conditions
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Source Property | Length: 1-64 | Property in message to use for evaluation | |
| Condition | Greater Than, Equal To etc | Comparison operator to use | Greater Than |
| Value | Value to compare Condition with |
Input
The input message will be evaluated against the specified conditions.
Output
The incomming message will always be sent as output from the module. If the conditions evaluates to true the if output will be used, and if false the else output will be used. If the specified Source Property is not found on the incomming message that condition will evaluate to false.
Examples
Example 1 And operator with two conditions
# Settings:
Logic Operation = And
Conditions = [
{
Source Property = tag1,
Condition = Greater Than,
Value = 23
},
{
Source Property = tag1,
Condition = Greater Than,
Value = 28
}
]
# Incoming message 1:
{
"tag1": 25
}
# Output message 1:
# The incomming message is sent on the `else` output from the module as only the first condition is true
# Incoming message 2:
{
"tag1": 29
}
# Output message 2:
# The incomming message is sent on the `if` output from the module as both the conditions are true
Example 2 Or operator with two conditions
# Settings:
Logic Operation = And
Conditions = [
{
Source Property = name,
Condition = Contains,
Value = a
},
{
Source Property = name,
Condition = Equal To,
Value = My Name
}
]
# Incoming message 1:
{
"name": "Some other name"
}
# Output message 1:
# The incomming message is sent on the `if` output from the module as the first condition is true
# Incoming message 2:
{
"name": "e"
}
# Output message 2:
# The incomming message is sent on the `else` output from the module as none of the conditions are true
Search Documentation
Conditions & Filtering