There are several types of variables in UiPath Studio that are used to store various kinds of data like generic value, text, number, data table, time, and date. Variables are mainly used to control the repetition of the loop.
The variables are also used to represent the unknown fields like files, folders, alphabets, and numbers. The variables in UiPath are similar to other programming languages. So, that the user can also create, remove, and manage the variables in UiPath Studio, like others.
Variable Panel in UiPath Studio
We can create the variables in UiPath Studio that allows us to make the changes with the help of the Variable Panel. There are four fields that exist in this Panel are given below:
The name field is mandatory for every type of variable. Suppose the user has not given any name to the variable. Then, the name of the variable is generated automatically by the UiPath Studio.
The variable type is also an essential and mandatory field for each variable. The user can select various options from the properties panel itself, such as Boolean, Int32, String, Object, and Generic value.
The Scope field is used to show the area of the variable in which the variable is present. By default, the scope field is available everywhere in the project. Every element can access the global variable, but if any user-specifies the scope of the variable to a particular flow chart then, the flowchart can access and modify that variable.
The default field is the optional field that shows the default value of the variable. For example, the default value of the type Int32 is 0. When the default field is vacant then, any variable is initialized by the default value of its category.
How can the user create a variable?
There are two methods to create the variable in the UiPath Studio after selecting any activity in the design Panel. Following are those two methods:
1. Select the option from the Context menu or select the activity and press the button of Ctrl+K by the keyboard.
2. Using Variable Panel in the UiPath Studio.
There are several types of variables in UiPath Studio used within the variable Panel that variable type is given below:
- Text type Variables
The text variable can store only String type data. That’s why it is also known as the String Variable. If the user wants to store the info like name, last name, and User name, he will select this option.
- Boolean type Variables
The Boolean variables are also known as true or false variables because this variable has two possible values: True or False. These types of variables enable the user to make decisions and have improved control over the flow.
- Integer type Variables
The integer variable stores only the integer or Int32 values as integer info. This type of variable is also known as the number variable. The number variable is used to perform the equation and comparisons.
- Array type Variables
Array variables are used to store several values of a similar type. We can create multiple arrays, Strings, and Boolean standards in UiPath Studio.
- Date and Time type Variables
This type of variable enables the user to store information about a particular date and time. These variables are found in the Browse and select a .Net type window, under the system namespace.
- Data Table type Variables
The Data Table type variable can store a big piece of information. These variables act as the database or spreadsheet with the rows and columns.
For example: if any user wants to extract the data or information from any website and store it in the spreadsheet, then the user needs to choose this type of variable.
How to delete any variable in UiPath?
We can delete the variable in UiPath with the help of two methods that are given below:
1. Open the variable Panel and right-click on that variable, which we want to delete and then click on the delete option for deleting the variable.
2. The second method is the one in which the user can choose the variable and then press the delete button from the keyboard to delete the variable.
Manage the variable in UiPath
The UiPath tool has two methods or Parameters to manage the Variables. These parameters are given below:
- Declare the scope of the variable.
- Discuss the Default value (the user does not have the default value of every variable, so mention that values which the user has) of the variable.
Sequence in UiPath
The sequence option comes in the Activities Panel under the favorite menu. If the user is not able to found the Sequence option, then he can search the sequence in the search bar.
The user can also drag this sequence option directly. Otherwise, the user can create the new sequence after the click on the new option in the design panel. The sequence is the step by step execution or activity of the automation workflow.
For example: Suppose you have an automated flow of any business then, you need to write that flow one after another in steps, and the entire process can be done inside a sequence.
The user can drag the activity inside the sequence in UiPath Studio. If the user wants to add any other event like a log message after the first activity, then he needs to drag and drop that activity.
So, all activities come under a sequence such as the first activity, log message activity, and many other activities below the first activity. The name of the sequence can be changed according to the user by using the display name field.
UiPath Data Types
Data types define the type of value of any variable. In UiPath Studio, the value could be either an integer, String, Boolean, Generic, or an array.
To select the data type of any variable, the user needs to go in the variable Panel and then select the variable type.by