> ## Documentation Index
> Fetch the complete documentation index at: https://reportana.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set

The `set` property is used to assign a value to a variable. It allows you to create variables and assign values to them for later use within the same context.

For *example*, creating a variable and setting it to generate a protocol number:

```twig theme={null}
{# Returns the protocol: YearMonthDayHourMinuteSecond #}
{% set protocol = NOW|date('YmdHis') %}

{# Displays the result #}
Protocol Number: {{ protocol }}
```

In this example, we are using the `set` property to create a variable named `protocol` and assign its value. The assigned value is generated by the `NOW|date` function according to the provided pattern: "YearMonthDayHourMinuteSecond". Therefore, the `protocol` variable will return the protocol number composed of the year, month, day, hour, minute, and second values.

**Example output of the code:**

<img src="https://mintcdn.com/reportana/rrUbVfAgCraOJwnY/set-en.png?fit=max&auto=format&n=rrUbVfAgCraOJwnY&q=85&s=5bf1239b43ca386a9d799ec78c4e56fe" alt="Example `set`" width="327" height="61" data-path="set-en.png" />
