When working with automation of complex end to end business processes, it is inevitable that you need to capture values from one part of the process and use it at another place. Which means you need to store value in a variable so that you can use it different other parts of the process. So in this article you will learn How to create variables in UiPath. You would also be introduced to some of the most commonly used variables.
Different types of variables in UiPath
- String – Stores values of type strings in this type of variable ( ex: “sample string”,”username”,”Hello Everyone” )
- int32 – Stores values of type integer in this type of variable ( ex: 1,3,5, etc.. )
- Boolean – Stores values of type boolean in this type of variable ( ex: true / false )
- Object – Stores values of type of object.
- Array[T] , where T is any type of variable
Variable types shown above are not the complete list of variables, you can click on “Browser for Types …” and UiPath studio shows a popup with huge list of variable types that it can support
Steps How to create variables in UiPath studio
- When you are working in an UiPath project.
- Click on variables tab present at the bottom of UiPath studio.
- It will expand the variables tab, this tab contains the list of all variables that are required for this specific project.
- Click any activity available in the “Design Area” and you would see the list of variables in the variables tab as below
- Click on “Create Variable” to create a new variable and enter a name you want to give, say “username”
- By default the Variable type is “String”, you can click on the String and UiPath shows the list of types that you can chose from.
- That’s it you are done with creating a variable in UiPath’s variable tab.
- You can further use this variable name in different activities of the project.
Two other important columns in Variables tab
“Scope” and “Default” columns also play a specific role when working with Variables in UiPath studio.
- Scope: The default scope is “Sequence”, when we work with complex projects, you might be having different sequences, flow chart etc.. in that case you can select the desired scope accordingly.
- Default: In case you want to give a default value for a variable, you can provide the value in this column, that is in case your variable was never assigned or modified in the sequence, it will still hold a default value and it can be used with the default value it self.
Founder of TestingTools.co, constantly shares knowledge on different test automation tools. Has experience in building proof of concepts, solutions, frameworks, platforms & implementation of test automation projects.
In pursuit of building a platform with inbuilt framework and reusable components for Oracle Cloud applications ( Oracle HCM, CX, SCM, Financials clouds, Salesforce and other cloud applications )
Major accomplishments in his career:
Product architect and development manager for test automation platforms
Oracle Flow Builder @ Oracle
CloudTestr @ Suneratech
2 times to oracle open world
More than 20 successful POCs ( Proof of concepts )
Designed pricing models.
Trained more than 50 members.
Built more than 100 re-usable functions.
Worked with tools: