elseif

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

elseif v10.4.28

Conditional branching for arrays (if.. then.. else if.. then.. else if.. default..).

In pins 3
  • default required
    array

    Input pin for the default array.

  • else if required
    condition

    Input pin for the condition that determines which array is used as output.

  • then required
    array

    Input pin for the array to use if the condition is true.

Out pins 1
  • array
    array

    Output pin for the resulting array based on the condition.

Evaluates the condition pins in order and outputs the array wired to the FIRST condition that is strict boolean true; when none are true it outputs the default input. Truthy non-boolean values do NOT count as true. If the selected input is not an array, outputs an empty array.

else
switch

A typical wiring for elseif: the array out pin feeds length.

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

Version history

Introduced in v10.4.28.


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