> 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/data-read-local.md).

# Data Read Local

Read a value stored in the scenario's local data storage and output it for other blocks to use. Useful when you need to share values inside the same scenario (for example inside loops or between different branches) without relying on direct connections.

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

This block does not have any inputs.

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

`Generic` This socket outputs the value retrieved from local storage for the given key. If the key is not found a default value is produced and a warning is shown.

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

`Data Key` Enter the text key used to look up the value in the local storage. The field provides autocomplete suggestions for existing local keys to help avoid typing mistakes.

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

* When the scenario runs, the block uses the text from the `Data Key` control to look up a value in the scenario's local storage.
* If a matching entry exists, that value is sent through the `Generic` output socket.
* If there is no matching entry, the block produces a safe default and shows a warning so you know the key could not be found.

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

* Local storage read access for sharing data across the scenario without direct connections.
* Autocomplete for the `Data Key` control to reduce typos and speed up setup.
* Safe default behavior and a visible warning when a key is missing.

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

1. Type the name of the value you want to read into the `Data Key` control (use autocomplete to pick existing keys).
2. Run the scenario. The block will output the stored value to the `Generic` socket when available.
3. Use downstream blocks to process, display or export the value.

Examples of common uses:

* Read counters, flags or intermediate results that were stored earlier in the scenario.
* Pull configuration values placed in local storage by a setup step.

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

* To save a value that this block can read, pair it with the `Data Write Local` block. Write once, read wherever needed in the same scenario.
* If you need data to persist across runs or be available globally, use `Data Write Global` and `Data Read Global` instead.
* Use `Is None` or `Replace None` after this block to provide fallback values and avoid downstream errors when a key is missing.
* Combine with `Debug Input` to quickly inspect the retrieved value in the log while building the scenario.
* For logging or exporting read values, connect the output to `CSV Export` or other export blocks.
* When building subsystems or loops, `Data Read Local` together with `Subsystem` or `Data Memory` can help coordinate state without extra wiring.

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

* No value appears: check the exact spelling of the `Data Key`. Use the control's autocomplete list to confirm existing keys.
* Warning about missing key: this indicates the key was not found in local storage. Consider creating the key earlier in the scenario with `Data Write Local` or handle the missing value using `Replace None`.
* Unexpected value type: remember that the block outputs whatever was stored. Use type-checking or conversion blocks downstream if you need a specific type.
