> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/data-logic/referencing/tag-to.md).

# Tag To

This function block forwards a named value from elsewhere in the same scenario. Use it together with the matching `Tag From` block to retrieve variables across the workspace without direct wiring.

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

This function block has no inputs.

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

`Generic` Provides the value obtained from the matching `Tag From` block.

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

`Tag` Enter the tag name that identifies which value to fetch.

* The field accepts free text and suggests existing tag names to help avoid typos.
* The entered tag must exactly match the tag used in the corresponding `Tag From` block.

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

* Lightweight cross-block data access within the same scenario.
* Autocomplete helps find existing tags.
* Validation warns if no matching `Tag From` block is found.
* Returns the same data type provided by the matching source block (`Generic`).

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

When this function block runs it searches the scenario for a `Tag From` block that uses the same `Tag` text. If a match is found, the value provided by that `Tag From` is returned on the `Generic` output. If no matching source exists, the block reports an error and marks itself invalid so you can spot and fix the missing tag.

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

1. Place a `Tag From` block where a value is produced and set its tag text.
2. Add this `Tag To` block where you need to consume that value and enter the identical tag in the `Tag` field.
3. Use the `Generic` output to feed downstream blocks or processing.
4. If you rename a tag, update both the source and this block to keep the connection.

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

* Use `Tag From` together with this block to pass results from a processing branch into another part of the scenario without adding wires.
* Combine with `Data Write Local` and `Data Read Local` when you need persistent or loop-friendly storage of values.
* Use `Data Write Global` and `Data Read Global` if you need values shared across multiple scenarios.
* Add `Debug Input` near the producer or consumer to log tag contents while developing.
* To export logged data downstream, pair the output with `Data to JSON` or `CSV Export`.
* If a value might be missing, guard the consumer with `Is None` or `Replace None` to provide sensible defaults.

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

* If you see an error about a missing tag, check for typos and ensure a `Tag From` block exists with matching text.
* If the output is an unexpected type, verify what the corresponding `Tag From` block is producing and adapt downstream blocks or use `Data Type Converter`.
* When tags are renamed, update both source and consumer blocks; autocomplete can help find all existing tags.
