Nabrio Help
Nabrio Help

Getting Started

Nara Overview

Understanding Nara

Using Nara

Components

If-ThenFor LoopWhile LoopPause ForProcedure OrderStopSwitch Case

Miscellaneous

Nomenclature
Troubleshooting
Notice and DisclaimerEULA
NodesOperation

If-Then

Slot Usage: 0

Overview

If-Then evaluates one or more conditions and routes flow to Then, Else, or Skip.

This node supports mixed data-type comparisons, OR grouping within condition sets, optional time-of-day gating, and optional skip behavior when the result has not changed since the previous run.

Input

Conditions

array required

List of condition objects. At least one condition is required.

Each condition includes:

  • Name: optional label for readability.
  • Or group: optional group key for OR logic.
  • Compare Data Type: comparison mode selected from:
    • String (string)
    • Number (number)
    • Boolean (boolean)
    • General Array (array[*])
    • String Array (array[string])
    • Number Array (array[number])
  • First value to compare and Second value to compare: values or references used in comparison.
  • Type-specific compare operator fields.

Condition logic behavior:

  • Conditions in the same Or group are ORed (any true makes group true).
  • Conditions without Or group are treated as separate implicit groups.
  • All groups are ANDed together (all groups must be true).

This gives a flexible pattern: OR within groups, AND across groups.

Compare Data Type

string

Controls which operator set is used:

  • Number (number): numeric comparisons (=, !=, <, <=, >, >=).
  • String (string): text comparisons (equal/not-equal/contains/starts/ends/regex).
  • Boolean (boolean): equal / not equal.
  • General Array (array[*]): size-only comparisons.
  • String Array (array[string]): contains/not-contains/string-array size checks.
  • Number Array (array[number]): contains/not-contains/number-array size checks.

Compare Type Number

string

Available options for Number mode:

  • Equal (EQUAL): true when both values are numerically equal.
  • Not Equal (NOT_EQUAL): true when values differ.
  • Less Than (LESS_THAN): true when first value is smaller.
  • Less Than or Equal (LESS_THAN_OR_EQUAL): true when first value is smaller or equal.
  • Greater Than (GREATER_THAN): true when first value is larger.
  • Greater Than or Equal (GREATER_THAN_OR_EQUAL): true when first value is larger or equal.

Compare Type String

string

Available options for String mode:

  • Equal (EQUAL): exact string match.
  • Not Equal (NOT_EQUAL): exact mismatch.
  • Contains (CONTAINS): first value includes second value as substring.
  • Not Contains (NOT_CONTAINS): first value does not include second value.
  • Starts With (STARTS_WITH): first value begins with second value.
  • Ends With (ENDS_WITH): first value ends with second value.
  • Matches Regex (MATCHES_REGEX): first value matches regex pattern in second value.

Compare Type Boolean

string

Available options for Boolean mode:

  • Equal (EQUAL): both booleans are the same.
  • Not Equal (NOT_EQUAL): booleans differ.

Compare Type Array

string

Array compare options depend on array mode:

  • General Array (array[*]):
    • Size Equals (SIZE_EQUAL)
    • Size Greater Than (SIZE_GREATER_THAN)
    • Size Less Than (SIZE_LESS_THAN)
  • String Array (array[string]):
    • Contains (CONTAINS)
    • Not Contains (NOT_CONTAINS)
    • Size Equals (SIZE_EQUAL)
    • Size Greater Than (SIZE_GREATER_THAN)
    • Size Less Than (SIZE_LESS_THAN)
  • Number Array (array[number]):
    • Contains (CONTAINS)
    • Not Contains (NOT_CONTAINS)
    • Size Equals (SIZE_EQUAL)
    • Size Greater Than (SIZE_GREATER_THAN)
    • Size Less Than (SIZE_LESS_THAN)

Numeric Comparison Inputs

number

For number mode:

  • compareFirstVal
  • compareSecondVal
  • compareTypeNum

Runtime uses small floating-point tolerance for equality checks.

String Comparison Inputs

string

For string mode:

  • compareFirstVal
  • compareSecondVal
  • compareTypeStr

When MATCHES_REGEX is selected, invalid regex patterns produce a warning and evaluate as false.

Boolean Comparison Inputs

boolean

For boolean mode:

  • compareFirstVal
  • compareSecondVal
  • compareTypeBool

General Array Comparison Inputs

For array[*] mode:

  • first value must resolve to an array.
  • second value is numeric target size.
  • operator checks array size relation.

String Array Comparison Inputs

For array[string] mode:

  • first value must be string array.
  • Contains (CONTAINS) / Not Contains (NOT_CONTAINS) expects second value as string.
  • size operators expect second value as number.

Number Array Comparison Inputs

For array[number] mode:

  • first value must be number array.
  • contains checks use numeric tolerance.
  • size operators compare against numeric second value.

Skip until outcome changes

boolean

When enabled, this node routes to Skip if current final result is the same as previous run result.

Behavior notes:

  • First run does not skip.
  • Later runs skip only when outcome unchanged.

Enable time of day ranges

boolean

Enables additional time-window gating.

Final condition result becomes:

  • conditionsMet AND weekTimeRangesMet

Time of Day Ranges

object

Required when time ranges are enabled.

Structure uses day keys (mon..sun) with one or more [start,end] time ranges per day.

Runtime behavior:

  • Supports HH:MM and HH:MM:SS.
  • Overnight ranges are supported (for example 23:00:00 to 02:00:00).
  • 00:00:00 to 00:00:00 is treated as full-day coverage.
  • Missing/invalid day structure restricts evaluation to false for time gate.

Output

Condition Result

boolean

Final combined result after condition evaluation and optional time-range gating.

Or Group Results

array

Per-group result summary, each item containing:

  • orGroup
  • result

Branching

Then

Triggered when final result is true.

Else

Triggered when final result is false.

Skip

Triggered when Skip until outcome changes is enabled and outcome is unchanged from previous run.

White Balance

Previous Page

For Loop

Next Page

On this page

OverviewInputConditionsCompare Data TypeCompare Type NumberCompare Type StringCompare Type BooleanCompare Type ArrayNumeric Comparison InputsString Comparison InputsBoolean Comparison InputsGeneral Array Comparison InputsString Array Comparison InputsNumber Array Comparison InputsSkip until outcome changesEnable time of day rangesTime of Day RangesOutputCondition ResultOr Group ResultsBranchingThenElseSkip