---
title: "set document expiry · RUAL Documentation"
description: "Updates the expiry of the given document from the given storage."
canonical: https://docs.rual.nl/block-types/storage/function_update_document_expiry
language: en
---

# set document expiry

This block is part of the [`storage`](https://docs.rual.nl/block-types/storage) group and was last modified in core [`v13.0.6`](https://docs.rual.nl/core-versions/130006).

### Storage Selection Required

This block relies on a storage to perform its storage releated actions. You must manually select the storage you want to use in your flow using the storage selector modal. To access the modal, click the white button on the block.

Updates the expiry of the given document from the given storage.

- flow `flow`

- guid required `value` The documents GUID (unique ID) to update.

- expiry required `date` The document will be unrecoverably deleted on the given date

- update priority `v13.0.6` `number` A document update can be important for search relevance or not, by poviding the system a priority you can help it understand what updates are high priority (1) and what updates can be delayed without huge impact for search relevance (3). 1 is highest priority, 2 is medium priority, 3 is low priority and 0 is wait-for-insert.

Default `1`

- storage `storage` The storage this document should be updated in.

- flow `flow`

- success `condition` Returns `true` in case the update succeeded

- error `value`

A typical wiring for [set document expiry](https://docs.rual.nl/block-types/storage/function_update_document_expiry): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `guid` pin; [date now](https://docs.rual.nl/block-types/date/date_currentdate) feeds the `expiry` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the set document expiry block: typical wiring for set document expiry.](https://docs.rual.nl/canvas-examples/function_update_document_expiry.png)

### Version history

Introduced in [`v11.0.0`](https://docs.rual.nl/core-versions/110000).

Last modified in [`v13.0.6`](https://docs.rual.nl/core-versions/130006).
