---
title: "elseif · RUAL Documentation"
description: "Conditional branching for arrays (if.. then.. else if.. then.. else if.. default..)."
canonical: https://docs.rual.nl/block-types/array/array_elseif
language: en
---

# elseif

This block is part of the [`array`](https://docs.rual.nl/block-types/array) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

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

- 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.

- 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](https://docs.rual.nl/block-types/array/array_elseif): the `array` out pin feeds [length](https://docs.rual.nl/block-types/array/array_length).

![Studio canvas example for the elseif block: typical wiring for elseif.](https://docs.rual.nl/canvas-examples/array_elseif.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
