# Tag To

This function block lets you publish a value under a short text tag so other blocks in the same scene can retrieve it. Use it together with the `Tag From` block to pass data around without direct connections.

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

This function block has no input sockets.

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

`Generic` Provides the value published by the matching `Tag From` block.

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

`Tag` Enter a short text label used to identify the value you want to publish. The same text must be used on the matching `Tag From` block to receive this value.

(hint: keep the tag concise and avoid leading/trailing spaces)

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

* Lightweight in-scene referencing for sharing data between distant parts of a design.
* Works without drawing a cable: matching is done based on the `Tag` text.
* Ideal for passing configuration values, flags, or intermediate results when a direct connection is inconvenient.

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

When the scenario runs, this block looks for a `Tag From` block in the same scene whose `Tag` text exactly matches the one entered here. If a match is found, the published value from that block is returned on the `Generic` output. If no match is found the block reports an error and is marked invalid.

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

1. Place a `Tag From` block somewhere in your scene and set its `Tag` to a chosen label.
2. In this block set the same `Tag` label.
3. Connect the output of this block to any consumer that accepts generic data, or use it to bridge distant parts of the flow.

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

* Always pair this block with the `Tag From` block — they form a simple publish/subscribe pair.
* Use short unique tags to avoid accidental collisions. Tags are matched exactly, so watch for extra spaces.
* Combine with `Show Image` or `Image Logger` when you need to forward an image preview or save images originating from a different part of the flow.
* For data that must be shared across scenes or stored for later, consider combining with `Data Write Global` and `Data Read Global` as an alternative approach.
* Use alongside `CSV Export` to send logged values to a file; the `Generic` output can carry structured data prepared elsewhere.

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

* If you see an error about a missing match: check that a `Tag From` block exists in the same scene and that its `Tag` text matches exactly (no extra spaces).
* If the output is empty or unexpected: verify that the publishing `Tag From` block is active and producing a value before this block runs.
* To prevent confusion, keep a short naming convention for tags (for example, use lowercase with underscores).


---

# 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/referencing/tag-to.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.
