Skip to content

Compare

The Compare operation evaluates two inputs against a selected comparison operator — Less, Greater, Equal, Less Equal, Greater Equal, or Not Equal. It attempts type conversion when sensible (e.g. string to number, binary to string) and outputs a boolean result.

Compare operation

Inputs

PortTypeRequiredDescription
> (Gate)AnyNoWhen connected, a false or Nil value stops the path. See Gate Inputs.
Data1AnyYesFirst value to compare.
Data2AnyYesSecond value to compare.

Outputs

PortTypeDefaultDescription
OutBoolean(unset until first valid run)Comparison result. Unchanged when the gate blocks execution or inputs are incomparable.

Properties

NameTypeDefaultDescription
Operation TypeComboLessComparison: Less, Greater, Equal, Less Equal, Greater Equal, Not Equal.
String Case SensitiveBooleantrueWhen false, strings are lowered before comparison.
On ErrorComboStop this branchPer-op On Error verb (Stop this branch / Continue with the last value / Continue with the fallback). See the Error Handling guide.

State on Reload

Output is preserved across restarts within the configured time window.

To render the Boolean result as a labelled String ("YES" / "NO", etc.) or an Integer (1 / 0), chain a Convert node after the Out port.


SituationBehaviour
Both numeric (int, float, double)Converted to double for comparison
One string, one numberString is parsed as a number; if parsing fails, inputs are incomparable
Binary containing valid UTF-8Converted to string
Array or MapAlways incomparable

  1. Gate check — If a Gate input is connected, evaluate it. A false or Nil value stops the execution path; the output keeps its previous value.

  2. Type alignment — Inputs are coerced to a common comparable type using the rules above. If coercion fails (incomparable types, non-UTF-8 Binary, unparsable number-string) or an Input is unconnected, the On Error verb is applied.

  3. Compare — The selected comparison is applied.

  4. Emit — The Boolean result is written to Out.


Operation Type: Equal   String Case Sensitive: false

InputValue
Data1"Hello"
Data2"hello"

Output: true

Both strings are lowered to "hello" before comparison.


  • Threshold checks on sensor readings
  • String matching for status codes or identifiers
  • Conditional branching based on numeric or string values

Compare can hit these errors: an unconnected Mandatory Data input, incomparable types (Array, Map), non-UTF-8 Binary, a String that doesn’t parse as a number against a numeric operand.

Any of these triggers the On Error verb you picked. See the Error Handling guide for the common On Error model; Compare’s options are:

VerbWhat it does
Stop this branch (default)This Node and its dependents stop; Out keeps its value and reads as a failed update.
Continue with the last valueDependents run on the value Out already holds, not stamped as new; it reads as a failed update.
Continue with the fallbackDependents run on Out’s per-output Fallback, stamped as this run’s value; it reads as a failed update. The Editor refuses a Task where the Fallback is unset.

Out carries the per-output Fallback you set in Settings under the Out port, like any other Output — Nil until you set one, and a Boolean false is the usual choice for a comparison.

Gate closure is not an error — a closed Gate stops the Path and consults no verb.


  • Array and Map types are always incomparable.
  • Complex cross-type conversions (e.g. number to string for lexicographic comparison) are not performed.