From the course: UiPath Studio Essential Training

UiPath variables

- [Instructor] In this video, we will talk about variables in UiPath. If you click here, you will find the Variables tab. So, let's understand first, what are variables. Variables are named containers that store data values. They act as placeholders for information that may change during the execution of our workflow. In UiPath, variables are used to store a wide range of data types, from simple text and numbers to more complex structures, like arrays and data tables. So what are types of variables in UiPath? If you click here, you will find Variable type, and you can find plenty of variable types. So let's start by string. String is used to store sequence of characters, such as words or sentences. Also, we have here integer. Integer type is for storing numbers. If you here browse for types, you will have more and more types, such as double, for example. And double is used for storing numbers, but with fractional parts. So like 2.5, I can't store it in integer, but I will store it in double. Also, we have another type of variables, like boolean. Boolean, it is used for store true or false values. And also, we have data table. Data table store data in rows and columns. So if you are dealing with Excel file or databases, so the variable type will be data table. And also, we have array. So array means that it stores a collection of values of the same data type. So I can have array of integer, array of boolean, array of string, array of data table, and so on. And we will understand more about variables in our course. So how we create variable? Here from the Variables tab, I need to put the name. So let's say I will create a variable called Message. And I will choose a variable type. So it is a message, so the variable type should be string. And how can I use variables inside UiPath? We use it with Assign activity. So I will drag and drop Assign activity here. And Assign ask you the variables and the value that you want to save. So I will say Message. And this message, I will give it value. And as long as you are dealing with a string, so you need double quote. And I will write, "Welcome to UiPath." And now I'm creating a variable called Message, and the value inside the variable is "Welcome to UiPath."

Contents