If Statement

Conditionally run code based on a comparison.

Inputs

Value 1

Comparison

Value 2

Outputs

This block does not have any outputs.

\

Comparisons

In examples below, outputs are shown in boolean format (true/false). If a condition evaluates to true, the blocks within it will execute. These same conditions are also available in the Advanced Conditional block, where they have the same behavior.

Equals

Checks to see if 2 values are equal each other.

Equals

Checks to see if 2 values, represented as strings, are the exact same:

You can leave one of the fields blank to (for example) check if a variable has a blank value.

hello there equals hello there → True

Hello there equals hello there → False

12345 equals hello there → False

Equals (case insensitive)

Checks to see if 2 values are the same, while ignoring case:

hello there equals (case insensitive) hello there → True

HELLO THERE equals (case insensitive) hello there → True

Equals (numeric)

Converts the values to integer numbers before making the comparison.

Equals (float)

Converts the values to floating-point numbers before making the comparison.

Does not equal

Unlike the Equals operator, this checks to see if 2 values do not equal each other. Think of it as the opposite of equals.

Mathematical comparisons

Math conditions can be used for comparing numbers. Use the “float” variants to compare numbers with decimals.

Greater than

1 is greater than 0 → true

Greater than or equal to

3 is greater than or equal to -348 → true

Greater than (float)

5.5360000 is greater than 1.353663363 → true

Contains

The contains/does not contain operators check to see if the value in the first field contains or does not contain (case sensitive or insensitive) the string in the second field:

Hello there contains Hello → true

Hello there does not contain world → true

Hi everyone does not contain (case insensitive) Everyone → false

Starts with

The starts with/does not start with operator checks to see if the value in the first field starts with or does not start with the string in the second field.

Hello there starts with Hello → true

Hello there starts with world → false

Hi everyone does not start with everyone → true

Ends with

The ends with with/does not end with operator checks to see if the value in the first field ends with or does not end with the string in the second field.

Hello there ends with there → true

Hello there ends with world → false

Hi everyone does not end with everyone → false