Passa al contenuto principale

Logic and comparisons

Compare values, combine conditions and pick a value depending on a condition.

Equals​

Checks whether two values are equal.

Inputs

NameTypeRequiredDetails
ATextYesFirst value.
BTextYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a equals b.

Equals (number)​

Checks whether two numbers are equal (numeric comparison, unlike Equals which compares text).

Inputs

NameTypeRequiredDetails
ADecimal numberYesFirst number.
BDecimal numberYesSecond number.

Outputs

NameTypeDetails
ResultYes/NoTrue if a equals b numerically.

Not equals​

Checks whether two values differ.

Inputs

NameTypeRequiredDetails
ATextYesFirst value.
BTextYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a does not equal b.

Greater than​

Checks whether a is greater than b.

Inputs

NameTypeRequiredDetails
ADecimal numberYesFirst value.
BDecimal numberYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a > b.

Less than​

Checks whether a is less than b.

Inputs

NameTypeRequiredDetails
ADecimal numberYesFirst value.
BDecimal numberYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a < b.

Greater or equal​

Checks whether a is greater than or equal to b.

Inputs

NameTypeRequiredDetails
ADecimal numberYesFirst value.
BDecimal numberYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a >= b.

Less or equal​

Checks whether a is less than or equal to b.

Inputs

NameTypeRequiredDetails
ADecimal numberYesFirst value.
BDecimal numberYesSecond value.

Outputs

NameTypeDetails
ResultYes/NoTrue if a <= b.

Logical AND​

Returns true only if every value is true.

Inputs

NameTypeRequiredDetails
ValuesList of Yes/NoYesYes/No values to combine.

Outputs

NameTypeDetails
ResultYes/NoTrue if all values are true.

Logical OR​

Returns true if at least one value is true.

Inputs

NameTypeRequiredDetails
ValuesList of Yes/NoYesYes/No values to combine.

Outputs

NameTypeDetails
ResultYes/NoTrue if any value is true.

Logical NOT​

Inverts a yes/no value.

Inputs

NameTypeRequiredDetails
ValueYes/NoYesYes/No value to invert.

Outputs

NameTypeDetails
ResultYes/NoThe inverted yes/no value.

If/else value​

Returns one of two values depending on a condition (ternary).

Inputs

NameTypeRequiredDetails
ConditionYes/NoYesYes/No condition to evaluate.
Value typeKind of valueNoOptional data type for the two values and the result (defaults to text when left empty).
Value if trueMatching valueYesReturned when the condition is true.
Value if falseMatching valueYesReturned when the condition is false.

Outputs

NameTypeDetails
ResultMatching valueEither value-if-true or value-if-false.

Match value​

Looks a value up in a list of cases and returns the result that case stands for, or the fallback when nothing matches. Use this instead of a long chain of if/else values or a switch whose branches only set one value.

Inputs

NameTypeRequiredDetails
Value to matchAnyYesThe value to look up. Numbers and yes/no values are matched by their text form; a user, role or channel is matched by its id.
Value typeKind of valueNoOptional data type of the returned value (defaults to text when left empty).
CasesLookup table of Text to AnyYesThe lookup table: each entry's key is a value to match, each entry's value is what to return for it.
FallbackMatching valueNoReturned when no case matches. Left empty this returns nothing.

Outputs

NameTypeDetails
ResultMatching valueThe matching case's value, or the fallback. May be empty.
MatchedYes/NoTrue when a case matched, false when the fallback was used.

Is empty​

Checks whether a value is empty.

Inputs

NameTypeRequiredDetails
ValueAnyYesValue to check.

Outputs

NameTypeDetails
Is emptyYes/NoTrue when the value is empty.

Use a fallback when empty​

Passes the value on, or the fallback when the value is empty (an empty text or list still counts as set). The result is never empty, so steps after it get no "may be empty" warning.

Inputs

NameTypeRequiredDetails
ValueAnyYesThe value to use when it is set.
FallbackAnyYesUsed instead when the value is empty (an empty text or list still counts as set). Must be the same kind of value.

Outputs

NameTypeDetails
ResultAnyThe value, or the fallback when the value was empty.

Turn text into a choice​

Finds the value of a choice list that a text names, for example a typed answer or a command option. An exact match wins, then one that ignores spaces around the text and upper or lower case. Special letters such as ß and the dotted İ are matched exactly, so Straße does not match STRASSE. When nothing matches you get the fallback, or no value.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to look up in the choice list.
Choice listChoice listYesThe choice list whose values the text is matched against.
FallbackChoiceNoThe choice to use when the text matches no value. Leave it empty to get no value instead.

Outputs

NameTypeDetails
ChoiceChoiceThe matching value of the choice list, or the fallback. Empty when nothing matches and there is no fallback. May be empty.
MatchedYes/NoYes when the text matched a value of the choice list.

Has a value​

Checks whether a value is present. Returns true when the value resolves to something other than nothing or an empty text or list. The friendly inverse of "Is empty".

Inputs

NameTypeRequiredDetails
ValueAnyYesValue to check.

Outputs

NameTypeDetails
Has a valueYes/NoTrue when the value is neither missing nor an empty text or list.

Is one of​

Checks whether a value is one of the values you list out. This is how you test a fixed choice such as a channel's type, which a plain "Equals" cannot compare at all. Matching is exact and server objects match by id, so 5 and "5" are not the same value. An empty value never matches, and an empty list matches nothing.

Inputs

NameTypeRequiredDetails
ValueItemYesThe value to test. Connect something here first: the list below then offers exactly the values its type allows.
One ofList of AnyYesThe values that count as a match. An empty list matches nothing.

Outputs

NameTypeDetails
ResultYes/NoTrue when the value is one of the listed values.

Text to yes/no​

Reads a yes/no value from text. Returns an empty value if not recognized.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to read (e.g. true/false, yes/no).

Outputs

NameTypeDetails
ResultYes/NoThe yes/no value, or empty. May be empty.
Need more help?
Can't find what you're looking for? Our team is happy to help.