switch

This block is part of the mutations group and was last modified in core v12.0.4.

switch v12.0.4

Returns mutations based on the given expression.

In pins 2
  • expression required
    value

    The expression to evaluate.

  • default
    mutations

    The default statement to be executed.

Out pins 2
  • output
    mutations

    Returns the mutations matching the expression.

  • match
    condition

    Returns true if a match was found.

Outputs the mutations wired to the case matching the value expression, or the default mutations when no case matches. The matched output is true only when a real case matched : falling through to default counts as unmatched. A matched case whose pin is unwired or falsy outputs nil mutations.

A typical wiring for switch: the mutations out pin feeds get at index.

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

Version history

Introduced in v12.0.4.


Back to mutations Return to the main group to view all sub-groups Back to mutations Return to the group to view all blocks within this group