Skip to content

If Statement

The If Statement node evaluates user-defined conditions and returns True if the conditions are satisfied, or False otherwise.


Dependencies

No external service or node dependencies are required for this node.


Operations

OperationDescription
ANDRequires all conditions to be met.
ORRequires one condition to be met.

Input Fields

LabelInput TypeDescriptionRequiredVisible WhenDefaultExample
OperationpicklistOperator used when multiple conditions present❌ NoAlwaysANDOR
DataTypepicklistThe data type for comparison.❌ NoAlwaysstringnumber
InputJSON ArrayThe left-hand value to compare.❌ NoAlwaysnullvar1
OperatorpicklistThe operator to use for comparison.❌ NoAlwaysEqualsContains
ComparetextThe right-hand value to compare against.❌ NoAlwaysnullabc
Add ConditionbuttonAdds an additional comparison❌ NoAlwaysnullN/A

Operators

Data Types

String
DataTypeDescription
EqualsChecks if the input value equals the value in the compare field
Not EqualsChecks if the input value does not equal the value in the compare field
ContainsChecks if the input value contains the value in the compare field
Starts WithChecks if the input value starts with the value in the compare field
Ends WithChecks if the input value ends with the value in the compare field
Is Null or EmptyChecks if the input value is null or empty
Number
OperatorDescription
EqualsChecks if the input value equals the value in the compare field
Not EqualsChecks if the input value does not equal the value in the compare field
Greater ThanChecks if the input value is greater than the value in the compare field
Less ThanChecks if the input value is less than the value in the compare field
≥ (Greater or Equal)Checks if the input value is greater than or equal to the value in the compare field
≤ (Less or Equal)Checks if the input value is less than or equal to the value in the compare field
DateTime
DataTypeDescription
BeforeChecks if the input date value is before the date value in the compare field
AfterChecks if the input date value is after the date value in the compare field
EqualsChecks if the input date value is equal to the date value in the compare field
Not EqualsChecks if the input date value is not equal to the date value in the compare field
Is Null or EmptyChecks if the input date value is null or empty
Boolean
DataTypeDescription
EqualsChecks if the input value is equal to the value in the compare field
Not EqualsChecks if the input value is not equal to the value in the compare field
Object
DataTypeDescription
Deep EqualsChecks if the input value is structurally and exactly equal to the value in the compare field.
Not EqualsChecks if the input value is structurally not equal to the value in the compare field.
Is Null or EmptyChecks if the input value is null or empty

Output

The If Statement node does not return data; instead, it controls workflow execution by directing the flow through either the True or False path based on the evaluation of conditions.


Examples

AND – Check conditions with AND operation

Check if {{SetVariable2.var1}} is equal to abc AND {{SetVariable3.var2}} is equal to cba.

FieldValue
OperationAND
DataTypeString
Input{{SetVariable2.var1}}
OperatorEquals
Compareabc
Input{{SetVariable3.var2}}
OperatorEquals
Comparecba
OR – Check conditions with OR operation

Check if {{SetVariable2.var1}} is equal to abc OR {{SetVariable3.var2}} is equal to cba

FieldValue
OperationOR
DataTypeString
Input{{SetVariable2.var1}}
OperatorEquals
Compareabc
Input{{SetVariable3.var2}}
OperatorEquals
Comparecba

Potential Errors

Error ConditionDescription
TBD

Developer Notes

  • TBD

Tentech 2024