UiPath RPA Variables

Much like other programming languages, UiPath comprises of variables, operators, variable types, and scope.

Variables

Variable stores data or information inside the form described by the user. Information present inside variables can be manipulated to perform numerous actions to push a desirable outcome.

Variables can be declared using the Ctrl + k shortcut.

This brings up a “Set Var:" option that allows us to name a variable as per requirement. Strings are defined with the help of double inverted commas "". Anything enclosed within double inverted commas is considered as a string variable.

All declared variables in a workflow can be accessed from the variable panel located on the bottom of UiPath studio. In this example, we have declared a variable Phone which stores a string variable. Right-clicking on a variable provides the option to delete it.

The variable type can be easily changed by clicking on the variable type box and selecting the desired type.

The scope option in the variable panel allows selecting the availability of a variable in the entire workflow. This allows a variable to be restricted within a particular sequence or used globally.

Restricting variables within a particular workflow allows us to use the variables with the same name multiple times much like traditional programming languages. The name of the scope can also be edited under the properties panel by editing the Display Name property.