# Mux

This function block collects multiple input values and bundles them into a single list output. Use it when you want to group several signals or images together and pass them downstream as one packaged value.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Input 1` — Generic input socket\
`Input 2` — Generic input socket\
(Additional inputs can be added up to 20 using the control below)

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Generic` — A single output that contains a list with the values from all input sockets (order preserved)

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Input size` — Choose how many input sockets the block provides (2–20). Changing this control will add or remove input sockets so you can match the number of items you want to bundle.

## 🎯 Features <a href="#features" id="features"></a>

* Flexible input count: pick 2 to 20 inputs to suit your workflow.
* Ordered bundling: inputs are collected in left-to-right order into a single list output.
* Generic support: works with images, numbers, text, lists, or any generic data type.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Set the desired number of inputs with the `Input size` control.
2. Connect the values you want to group into each `Input X` socket.
3. The block outputs a single `Generic` list containing all input values in order. Connect that output to downstream blocks that accept lists or generic data.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When the scenario runs, the block reads each connected input socket and produces a single list on its output. Unconnected sockets will contribute whatever default or empty value your system uses for that socket type.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* To split the bundled list back into individual items, pair this block with `Demux` or `Get Element`.
* Use with `Batch Processing` or `Batch Concatenation` when preparing grouped data for batch workflows.
* If you are grouping images, connect the output to `Collage Images`, `Image Concatenate`, or `Multi Image Write` to create combined visuals or save multiple images at once.
* To convert grouped data into log-friendly format, pipe the output into `Data to JSON` or `CSV Export`.
* Filter or sanitize the list before downstream use with `Exclude Nones` or `Replace None` to remove or replace empty entries.
* For quick debugging or preview, send individual list elements to `Show Image` (for images) or to a logging block.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If you accidentally reduce the `Input size` and lose a connection, re-scan or reconnect the source to the new sockets.
* If downstream blocks do not accept the bundled output, check whether they expect a single item per input rather than a list; use `Demux` or `Get Element` to adapt the data shape.
* If some list entries are empty, consider using `Exclude Nones` or `Replace None` to clean the list before further processing.


---

# 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.augelab.com/function-blocks/data-logic/logic/mux.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.
