# Assign / Set Variable Value

> `System.Activities.Statements.Assign`

`System.Activities.Statements.Assign`

Allocates any value to a variable or argument. It can be used to increment the value of a variable in a loop (see the example in the [The Do While Activity chapter](https://docs.uipath.com/studio/standalone/2023.4/user-guide/control-flow-activities#the-do-while-activity)), sum up the value of two or more variables and assign the result to a different variable (see the example in [the Generic Value Variables chapter](https://docs.uipath.com/studio/standalone/2023.4/user-guide/uipath-proprietary-variables)), assign values to an array (see [the Array Variables chapter](https://docs.uipath.com/studio/standalone/2023.4/user-guide/types-of-variables#array-variables)) and so on. By default, this activity is also included in the **Favorites** group.

In the Studio profile, this activity is named **Assign**, while in the StudioX profile, this activity is named **Set Variable Value**.

## Project compatibility

**Windows** | **Windows - Legacy** | **Cross-Platform**

## Configuration

* **Save to** - The variable to which you want to assign the value to.
* **Value to save** - The value to be assigned to the variable.

## Advanced Options

#### **Options**

* **DisplayName** - The display name of the activity.
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.
* **Set value** - The value to be assigned to the variable.
* **To variable** - The variable to which you want to assign the value to.
