> For the complete documentation index, see [llms.txt](https://docs.helmut.de/helmut4-releases/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.helmut.de/helmut4-releases/v4.9.1/helmut4-components/streamdesigner/nodes/actions/misc/stream-set-temporary-variable-action.md).

# Stream Set Temporary Variable Action

With the help of the Stream Set Temporary Variable Action it is possible to set a variable within a running stream and to query it at any point within this stream by using the wildcard [{stream.variable.?}](/helmut4-releases/v4.9.1/helmut4-components/streamdesigner/wildcards/variable-related-wildcards-3/stream-variable.md).

<figure><img src="/files/vnktK00EeubLyVLgvKMN" alt="" width="345"><figcaption><p>Stream Set Temporary Variable Action</p></figcaption></figure>

#### Example

A path that occurs repeatedly within a stream.

To prevent static copy and paste actions, the stream variable can be used to define it in the first place, and make all other references dynamically based on the first definition.&#x20;

#### Lifetime of a stream variable

By default a stream variable is no longer available after the stream has ended.

As temporary variables can only be created and used in a stream it is possible to inherit them to another stream/job by using [Stream Execute Generic Stream Action](/helmut4-releases/v4.9.1/helmut4-components/streamdesigner/nodes/actions/misc/stream-execute-generic-stream-action.md), [Job Create Job Action](/helmut4-releases/v4.9.1/helmut4-components/streamdesigner/nodes/actions/job-action/job-create-job-action.md) or [Job as Json](/helmut4-releases/v4.9.1/helmut4-components/streamdesigner/nodes/actions/job-action/job-as-json-action.md).

The sub stream can retrieve and update the temporary variable and pass this on to the next one.

{% hint style="info" %}
Keep in mind, that the changed value won't be returned to the previous stream
{% endhint %}

#### Stream variable exception

An exception to this are [Pre-Streams](/helmut4-releases/v4.9.1/helmut4-components/helmutio/streams/io-event-triggers/prestream.md). If a temporary variable has been defined in a pre-stream, this one will be passed on to the main stream defined in the profile.
