Widgets/Condition
Conditional Widget
Conditional Widget
A "Condition" type widget. Conditional Widget evaluates incoming data against a configured value using a specified comparison operator, and routes the data to one of two output ports based on whether the condition is met.
This widget allows you to create branching logic in your workflows, sending data down different paths depending on specific conditions.
Inputs
When used in Basic Mode:
- in (DataTypes: Number, String, Boolean) The incoming value that will be evaluated against the configured condition.
When used in Advanced Mode with Data Port enabled:
-
evaluation (DataTypes: Number, String, Boolean) The value that will be compared against the configured value.
-
data (DataType: Anything) The data to be passed through to either the "then" or "else" output based on the evaluation result.
Outputs
-
then (DataType: Same as input) Transmits the incoming data when the condition is met
-
else (DataType: Same as input) Transmits the incoming data when the condition is not met
Custom Settings
- Comparison Value Set the value that incoming data will be compared against.

-
Condition Type Choose from one of the following comparison operators:
-
Equal: Routes to "then" when the incoming value equals the configured value
-
Not Equal: Routes to "then" when the incoming value does not equal the configured value
-
Greater: Routes to "then" when the incoming numeric value is greater than the configured value
-
Less: Routes to "then" when the incoming numeric value is less than the configured value
-
Starts With: Routes to "then" when the incoming string value starts with the configured string
-
Ends With: Routes to "then" when the incoming string value ends with the configured string
-
Includes: Routes to "then" when the incoming string value contains the configured string
-
Matches: Routes to "then" when the incoming string value matches the configured regular expression
-

- Advanced Mode (Data Port) When enabled, the widget accepts two inputs: one for the evaluation value and one for the data to be routed.

📌 Important Notes
- Type coercion is performed when comparing values. For example, the string "10" is considered equal to the number 10
- Boolean values need to be compared against string representations ("true" or "false") when using the Equal condition
- String comparisons (Starts With, Ends With, Includes, Matches) are case-sensitive
- The Matches condition uses JavaScript regular expression syntax for pattern matching
Examples
Basic Numeric Comparison
This example routes numbers greater than 10 to a "High" display and all others to a "Low" display:
Drag the example onto the workspace to explore and experiment!
In this example
- The Slider widget outputs numbers from 0 to 20 as you move it
- The Conditional widget checks if the number is greater than 10
- If true, the number goes to the first (High) Display widget (connected to the "then" output)
- If false, the number goes to the second (Low) Display widget (connected to the "else" output)
Result: Numbers above 10 appear in the first box; numbers 10 or below appear in the second box
String Processing
This example checks if a string contains a specific keyword and routes matching data to different processing paths:
Drag the example onto the workspace to explore and experiment!
In this example
- The Button widget triggers the Text widget with the message "Hello World!"
- The Text widget sends its content to the Conditional widget
- The Conditional widget checks if the text includes "Hello" (case-sensitive)
- If true, the message goes to the first Text widget
- If false, the message goes to the second Text widget
Result: Only messages containing "Hello" appear in the first box; all others appear in the second box
Advanced Mode with Separate Data
This example shows how to use the Conditional Widget in advanced mode, where one input is used for evaluation and another carries the data to be routed:
Drag the example onto the workspace to explore and experiment!
In this example
- The Button widget starts the process
- The Value widget provides the number 18
- The Sequence widget takes the number 18 and:
- Sends it to the Conditional widget's evaluation port (this port is used to check if the number meets the condition)
- Triggers the Text widget with the message "Access granted - adult confirmed", which is sent to the Conditional widget's data port
- The Conditional widget checks if the evaluation value (18) is greater than 17
- If true, "Access granted - adult confirmed" appears in the first Text widget
- If false, "Too young - try again later!" appears in the second Text widget
Result: If the number is above 17, access is granted; otherwise, the user is told to try again later
Glossary
-
Case-Sensitive
A property of text comparison where uppercase and lowercase letters are treated as different characters. For example, "Hello" and "hello" are considered different in case-sensitive comparisons.
-
JavaScript Regular Expression
A pattern matching syntax used in JavaScript that allows you to search and manipulate text using special characters. For example,
\d+matches one or more digits,.*matches any characters, and[a-z]matches any lowercase letter. Used by the Matches condition to perform advanced string matching. -
Regular Expression
A sequence of characters that defines a search pattern. Used in the Matches condition to perform advanced string matching.
-
Type Coercion
The automatic conversion of values from one data type to another, such as converting the string "10" to the number 10 for comparison.