> For the complete documentation index, see [llms.txt](https://docs.incari.com/incari-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.incari.com/incari-studio/master/toolbox/flow-control/switch.md).

# Switch

## Overview

![](/files/-MIxaVVbcK2dd-KQp3VK)

**Switch** compares whether or not the **Value** of a single **Data Input** is equal to any of multiple pre-defined **Values**, also known as **Cases**. Whichever **Case** is evaulated to be equal to the **Input**, will trigger the corresponding **Output Pulse**. If there are no matches found, the `Default` **Pulse** will be executed.

While you should never have **Cases** of the same **Value**, be aware that equality is checked from top-to-bottom; meaning that if a match has been found, subsequent **Cases** won't be evaluated.

### Attributes

*The **Switch Node** has no **Attributes***.

### Inputs

| Attribute   | Type          | Description                                                        |
| ----------- | ------------- | ------------------------------------------------------------------ |
| `Data Type` | **Drop-down** | The type of data that will be plugged into the `Input` **Socket**. |

### Outputs

| Attribute | Type     | Description                                        |
| --------- | -------- | -------------------------------------------------- |
| `Cases`   | **List** | The pre-defined **Cases** to compare with `Input`. |

## Inputs

| Input             | Type                                          | Description                                                           |
| ----------------- | --------------------------------------------- | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**                                     | A standard **Input Pulse**, to trigger the execution of the **Node**. |
| `Input`           | *Defined in the* `Data Type` ***Attribute**.* | The **Value** to be compared with the list of pre-defined **Cases**.  |

## Outputs

| Output      | Type      | Description                                                                                                                                           |
| ----------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Case: [n]` | **Pulse** | An **Output Pulse** for each pre-defined **Case**, whose execution is triggered if the corresponding **Case** is evaluated as being equal to `Input`. |

## External Links

[*Switch statement*](https://en.wikipedia.org/wiki/Switch_statement) on Wikipedia.
