Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Write Local

This function block saves incoming data into a local scenario storage so other blocks can read it later. Use it when you need to persist a value (image, number, text, list, etc.) across different parts of your scenario or to create simple feedback loops. Note: this block enables loops but does not guarantee data flow ordering or integrity — use with care.

📥 Inputs

Generic This socket accepts any data type to be stored.

📤 Outputs

This function block does not produce outputs.

🕹️ Controls

Data Key Enter a string key to identify the value you store. Use clear, unique names so other blocks can read the right data.

  • Autocomplete helps pick existing local keys when available.

  • Keys are plain text labels; matching must be exact when reading.

⚙️ How it works

  • When the block runs, any value present on the Generic input is saved under the chosen Data Key in the local scenario storage.

  • If no data is provided, nothing is written.

  • The saved value stays available to other blocks that read the same key until it is overwritten or the scenario ends.

🎯 Features

  • Store any data type (images, numbers, lists, text).

  • Simple persistent storage inside the running scenario.

  • Autocomplete for existing local keys to reduce typos.

  • Designed for quick sharing of intermediate results and enabling local loops.

📝 Usage

  1. Type a descriptive name into Data Key (for example "last_detection" or "calibration_matrix").

  2. Connect a producing block to the Generic input so a value is provided at runtime.

  3. Use a corresponding read block (for example Data Read Local) elsewhere in the scenario to retrieve the value by the same key.

💡 Tips and Tricks

  • Use clear key names (for example include the type or source: "camera1_frame", "threshold_value") to avoid accidental overwrites.

  • To read back the stored value inside the same scenario use Data Read Local. To share data across scenarios use Data Write Global and Data Read Global.

  • Combine with Data Memory when you want a value to remain unchanged until explicitly updated.

  • If you want to export stored structured data later, write it into a friendly format using Data to JSON and then save with CSV Export or other export blocks.

  • Use Debug Input to quickly inspect what is being written under a given key while building your flow.

  • Use Replace None before writing if you want to ensure a fallback value is stored when the input is empty.

✅ Best practices

  • Avoid reusing the same key for unrelated data types (e.g., image vs. number) — prefer distinct keys.

  • Keep keys human-readable to make debugging and maintenance easier.

  • When building feedback loops, be explicit about which blocks read and write the same key to reduce ambiguity.

🛠️ Troubleshooting

  • No value found when reading: confirm the exact spelling of the Data Key in both write and read blocks.

  • Unexpected value type: check which block last wrote to the same key and ensure consistent data types.

  • Difficulties tracing data: add Debug Input or a temporary Data Read Local connected to a visible output to inspect stored values.

  • Race conditions / ordering issues: remember this local store does not guarantee execution order — design flow accordingly or restructure using clearer control/flow blocks.

Last updated