> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/dynamic-variables/flow-variables/adding-and-managing-flow-variables.md).

# Adding & managing flow variables

## Introduction

Flow variables are added and managed for any process flow via [process flow settings](/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/process-flow-settings.md). Once variables are defined, they can be referenced throughout the system - for example, in [scripts](/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/dynamic-variables/flow-variables/referencing-flow-variables-in-custom-scripts.md), or as [variable values](/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/dynamic-variables/flow-variables/referencing-flow-variables-in-a-process-flow.md#introduction).

## Adding flow variables

**Step 1**\
[Access the required process flow](/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/managing-process-flows/accessing-your-process-flows.md).

**Step 2**\
Select the 'settings' icon from the [actions bar](/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/the-process-flow-canvas.md#the-actions-bar):

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Ftu7JBoN9wyi3nU3nRlqw%2Fflow%20variables%201.png?alt=media&amp;token=b4c56ff4-6bdd-4e94-8775-68469569dba7" alt=""><figcaption></figcaption></figure>

**Step 3**\
Scroll down the settings drawer to the **variables** section, then click the **add new flow variable** button:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F1TFApgy75g3KYcfHk3Lm%2Fflow%20variables%202.png?alt=media&amp;token=a977ba31-54f5-4a43-9b84-6673857c9ad0" alt=""><figcaption></figcaption></figure>

**Step 4**\
Enter a name for this variable - the name you enter here should be specified whenever you are referencing this variable:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fyxsxnh5EoshiaWcBOeZE%2Fflow%20variables%204b.png?alt=media&amp;token=21232a87-60be-493d-9cdf-99766a3ca57e" alt=""><figcaption></figcaption></figure>

**Step 5**\
Click the **select a type** field and choose the required type:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FHhAvwgtM5WRTyK8EgzZI%2Fflow%20variables%204.png?alt=media&amp;token=8ca608de-1f7e-46ea-bc82-c4a20884bd7b" alt=""><figcaption></figcaption></figure>

The following options are available:

<table><thead><tr><th width="224">Variable type</th><th>Variable is defined and passed as...</th></tr></thead><tbody><tr><td>String</td><td>A string value.</td></tr><tr><td>Number</td><td>A numeric value.</td></tr><tr><td>Specific date</td><td>A selected date - choose the required date/time from a date picker.</td></tr><tr><td>Dynamic date</td><td>A <code>+</code>/<code>-</code> number of <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>months</code>, <code>years</code> to be matched relative to the current date.</td></tr><tr><td>Boolean</td><td>A true/false value.</td></tr></tbody></table>

**Step 6**\
Enter the required value for this variable and save settings:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FOFsfjRNodMWlprdGFiOW%2Fflow%20variables%205.png?alt=media&amp;token=a91d1aae-7221-4ce4-b158-82ab0ea14e48" alt=""><figcaption></figcaption></figure>

## Updating flow variables

**Step 1**\
Access settings for the required process flow as detailed [above](#adding-flow-variables).

**Step 2**\
Click the 'edit' icon associated with the variable you want to change:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FgxyWDOdTpPzZs3X8eiL7%2Fedit%20flow%20variable%201.png?alt=media&amp;token=47837585-4b38-4eb6-9a65-501156a3aa96" alt=""><figcaption></figcaption></figure>

**Step 3**\
Now you can either update existing settings and click the **update** button, or click the **delete** button to remove this variable:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FRV9p1SG3tuqzJL3Z4iFd%2Fedit%20flow%20variable%202.png?alt=media&amp;token=f1b6d86d-81ac-4e1a-9772-3adf28e36c92" alt=""><figcaption></figcaption></figure>
