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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/master/toolbox/flow-control/switch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
