---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-action-set-stored-value.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-action-set-stored-value.md
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# div-action-set-stored-value
Temporarily saves the variable in storage.

## Parameters
| Parameters | Description |
| --- | --- |
| `lifetime` | <p>**int**</p><p>Required parameter.</p><p>Duration of storage in seconds.</p><p>Available platforms: Android, iOS, web.</p> |
| `name` | <p>**string**</p><p>Required parameter.</p><p>Name of the saved variable.</p><p>Available platforms: Android, iOS, web.</p> |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `set_stored_value`.</p><p>Available platforms: Android, iOS, web.</p> |
| `value` | <p>**object**</p><p>Required parameter.</p><p>Saved value.</p><p>The value has the type `div-typed-value`.</p><p>Available platforms: Android, iOS, web.</p><p>List of possible values:<li>[string_value](string_value.md#string_value)</li><li>[integer_value](integer_value.md#integer_value)</li><li>[number_value](number_value.md#number_value)</li><li>[color_value](color_value.md#color_value)</li><li>[boolean_value](boolean_value.md#boolean_value)</li><li>[url_value](url_value.md#url_value)</li><li>[dict_value](dict_value.md#dict_value)</li><li>[array_value](array_value.md#array_value)</li></p> |
| `scope` | <p>**string**</p><p>Scope of the stored variable:<li>`global` — not bound to a specific card (available for any card);</li><li>`card` — bound to the current card. On Android the card is identified by `DivDataTag`, on iOS by the `cardId` parameter, on Web the scope value is passed to `Store` and the developer integrating DivKit must implement saving variables for that scope.</li>/nDefault value for Android and iOS is `global'. For Web, the implementation depends entirely on the developer.</p><p>Possible values: `global`, `card`.</p><p>Available platforms: Android, iOS, web.</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "set_stored_value",
  lifetime*: "int",
  name*: "string",
  scope: "string",
  value*: div-typed-value
}
```
</details>
