> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/store-values/value.md). Agents can also search and read this documentation through its [MCP server](https://docs.buildings.ability.abb/collection/~gitbook/mcp).

# Value

Retain a numeric value and choose when the Trigger input accepts an update.

Use **Value** under **Storing** to retain a numeric value between executions of the same running chain. For example, keep the last measurement accepted by a condition.

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-14b6a2d5a7ae01c7b347b384b5b376164efe6ea8%2Frule-chain-value-store-palette.png?alt=media" alt="Value entry in the Storing palette."><figcaption><p>Value in the palette</p></figcaption></figure>

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-ed45d02ac1bafd297f70eeaac991971632c4f6a0%2Frule-chain-value-store-node.png?alt=media" alt="Configured Value store with a boolean Trigger input, numeric Value input and numeric output."><figcaption><p>Value configured to retain the last accepted measurement</p></figcaption></figure>

## Inputs and outputs

* **Trigger:** A blue boolean input that controls whether an update is accepted.
* **Value:** The red numeric input to retain.
* **Output:** The stored numeric value, shown in red. Before the first accepted update, it contains **Initial value**.

## Configurable settings

Open the node's gear icon to change its settings.

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-0dc9bf45220071c695c1be098db88089c77fdc65%2Frule-chain-store.png?alt=media" alt="Value storage settings with Initial value 0, On rising edge and the note Last accepted value, with callouts A to D."><figcaption><p>Value settings</p></figcaption></figure>

| Reference | Setting       | Purpose                                                              |
| --------- | ------------- | -------------------------------------------------------------------- |
| **\[A]**  | Initial value | Enter the numeric output to use before the first accepted update.    |
| **\[B]**  | Trigger mode  | Choose when a true Trigger input accepts the Value input. See below. |
| **\[C]**  | Note          | Explain the stored value on the node.                                |
| **\[D]**  | Save          | Apply the node settings. Save the chain separately in the editor.    |

### Trigger mode

* **On rising edge:** Accept Value when Trigger changes from `false` to `true`. A continuously true Trigger does not accept further changes. Trigger must be false on an execution before a later true input accepts another value.
* **Always:** Accept Value on every execution with a true Trigger input. Choose this to keep updating the measurement while a condition remains true.

Neither mode accepts an update when Trigger is false. The previous stored value remains available. Trigger mode controls the store during an execution, not when the chain starts. Even with a [Calendar trigger](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/calendar-trigger.md), the store needs a true Trigger input to update.

{% hint style="warning" %}
Stored values are runtime state, not permanent storage. Reinitializing the chain or restarting the rule engine resets the output to Initial value.
{% endhint %}

## Retain the last accepted measurement

Before you begin, [open the rule chain editor](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/open-the-configuration-of-an-existing-rule-chain.md). Configure [Get Data](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/nodes/get-data.md) for a numeric measurement and a [Condition](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/conditions/condition.md) that determines when to accept it. Keep the chain paused while configuring.

1. Drag **Value** from **Storing** onto the workspace.\
   ▷ The settings window opens.
2. Enter `0` in **Initial value** **\[A]**.
3. Select **On rising edge** in **Trigger mode** **\[B]**.
4. Enter `Last accepted value` in **Note** **\[C]**.
5. Click **Save** **\[D]**.
6. Connect the Condition output to **Trigger**.
7. Connect the Get Data output to **Value**.
8. Connect the stored output to the next numeric input.
9. Set the [execution order](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/configure-rule-chain.md#set-order) so Get Data and Condition run before Value and the next block runs after it.
10. Click **Save** in the editor.

The output starts at `0`. A rising Trigger with Value `27` stores `27`. If Trigger stays true while Value changes to `28`, the output remains `27`. Select **Always** instead to accept `28` on that execution.

## Related documentation

* [Boolean](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/store-values/boolean.md) to store a true or false result.
* [Store Values](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/store-values.md) for the shared storage behavior.
* [Trigger mode reference](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/configure-rule-chain.md#trigger-mode).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/store-values/value.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
