Skip to main content

If

Runs on: Shared. Runs on the Community backend or inside a chatbox overlay.

The most flexible comparison check. Its operations adapt to the type of A: strings get equality, inequality, contains, starts-with and ends-with; numbers get equality and relational operators; booleans get equality and inequality. When A is an object, pick a field to compare instead of the whole thing.

B can be wired to an input or entered inline on the node. When the comparison is true the original A goes down Pass, otherwise down Fail.

Inputs​

NameTypeDescription
aanyThe value to compare. Passed through on whichever output fires.
banyThe value to compare against. When not connected, enter it inline on the node.

Outputs​

NameTypeDescription
passpass-throughThe original A, when the comparison is true.
failpass-throughThe original A, when it's false.

Configuration​

  • Operation: Depends on the type of A: =, ≠, contains, starts, ends for strings; =, ≠, >, <, ≥, ≤ for numbers; =, ≠ for booleans.
  • Inline B value: The comparison value, used when B isn't connected.
  • Field path (objects only): Which field of A to compare.
  • Case sensitive (strings only): Makes string comparisons case-sensitive.

Example​

After a Channel Cheer trigger, connect the bits amount to A, set the inline B value to 1000 and the operator to ≥. Cheers of 1000 bits or more take Pass to a VIP alert and thank-you TTS. Smaller cheers take Fail to a standard acknowledgment.