if

This block is part of the number group and was last modified in core v10.4.28.

if v10.4.28

In pins 3
  • true required
    number
  • false required
    number
  • boolean required
    condition
Out pins 1
  • number
    number

Outputs the then pin when the condition pin evaluated true, otherwise the else pin; which input is read is pre-selected by the engine before this block runs. The chosen value passes through unchanged (no coercion), and no selection means nil. Example: condition=true then=5 else=9 -> 5.

A typical wiring for if: number feeds the then pin; >= AND <= feeds the condition pin; the number out pin feeds search.

Studio canvas example for the if block: typical wiring for if.

Commonly used with

In production blueprints, this block is most often wired together with:

  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
  • if: wired in both directions with this block.
  • create: feeds into this block. Creates a new function that can be executed using the given name.
  • set fields: this block feeds into it. Generates an array of mutations based on the given filled fields.
  • get fields: feeds into this block. Gets the selected fields from the given object.
  • >= AND <=: feeds into this block. returns true if the numbers is between the two numbers.

Version history

Introduced in v10.4.28.


Back to number Return to the main group to view all sub-groups Back to number: conditions Return to the group to view all blocks within this group