SlideShare a Scribd company logo
1 of 15
Variables,
Arguments &
Imports
What you'll learn in this
session
At the end of this session you will be able to:
• Explainwhatvariablesareandwhattheyareusedfor.
• Createandconfigurevariablesinanautomationproject.
• Explainwhatargumentsareandwhattheyareusedfor.
• Differentiatebetweenvariablesandarguments.
• UsetheInvokeWorkflowFileactivitytochainworkflowexecutionandpassdatathrougharguments.
• Bestpracticeswhileusingvariablesandargumentsandnamingconventions
3
What are variables?
Variables are containers that can hold multiple data entries (values) of the same
data type. For example, EmailAddress can be a variable that holds the value
"rpadeveloper@uipath.com".
The value of a variable can change through:
• External input
• Data Manipulation
• Passing from one activity to other
Why are they important?
Variables help us pass data from one activity to another. Advancing with any
automation process would be hardly possible without using variables
Variables
4
There are three main ways to create variables in UiPath:
1. From the Variables panel
Navigate to the Variables panel, select the ‘Create Variable’ line and type in the name.
Whenever needed, provide its name in the Designer panel or in the desired Properties
field.
2. From Expressions
Variables can be created from expressions directly in an activity input field or the
Expression Editor. Select a part of the expression and press Ctrl+K. The Set Var field is
displayed. Fill in the name and press Enter. Check its type and scope in the Variables
panel.
3. From the Properties panel
In the Properties panel of any activity, select a field that can be edited press Ctrl+K. The
Set Var field is displayed. Fill in the name and press Enter. Check its type and scope in
the Variables panel.
Creating Variables
5
Variables are configured through their properties. You can set them in the
Variables panel. The main properties in UiPath are:
1. Name
Navigate to the Variables panel, select the ‘Create Variable’ line and type in the name.
Whenever needed, provide its name in the Designer panel or in the desired Properties
field.
2. Type
It defines what kind of data can be stored in the variable. In UiPath, the type is declared
when the variable is created, however there are some types that can accommodate
different types of data.
3. Default Value
In general, variables have initial values that change throughout the process. For most
variables, if no initial value is assigned when the variable is declared, there is a default
rule that assigns a value.
Configuring Variables
6
4. Scope
The part of the workflow in which the variable can be used. Some variables can be global
(used throughout the workflow), others local (used inside an activity).
In real automation scenarios, there are many variables in use. Making all of them
unnecessarily global can cause efficiency issues as well as create the conditions for
confusion.
In UiPath, the scope of a variable cannot exceed the workflow in which it was defined.
Since business automation projects rarely consist of single workflows, we need a
different kind of vehicle to pass data between workflows, and this is called an argument.
You will learn more about arguments shortly in the session.
7
What are arguments?
Arguments are very similar to variables:
•They store data dynamically
•They have the same data types
•They support the same methods and properties
The difference is that they pass data between workflows, and they have an additional property for
this – the direction. Arguments have specific directions: In, Out, and In/Out. These tell the Robot
where the information stored in them is supposed to go.
Why are they important?
Arguments are a key component when it comes to building more complex automations, where you
need to store and use data between multiple workflows.
Arguments
8
There are three main ways to create variables in UiPath:
1. From expressions
Directly in an activity input field or the Expression Editor. Select a part of the expression
and press Ctrl+M (for In arguments) or Ctrl+Shift+M (for Out arguments). The Set Arg
field is displayed. Fill in the name and press Enter. The argument is created. Check its
direction and type in the Arguments panel. Arguments created in these ways
automatically receive the type according to the activity.
2. From the Properties panel
In the Properties panel of any activity, right-click a field that can be edited, and select
Create In Argument or Create Out Argument from the context menu. Alternatively, press
Ctrl+M (In) or Ctrl+Shift+M (Out). The Set Arg field is displayed.
Fill in the name and press Enter. The argument is created and visible in the field. Check
its direction and type in the Arguments panel. The argument type is automatically
generated depending on the selected property.
Creating Arguments
9
3. From the Arguments Panel
Navigate to the Arguments panel. Select the Create Argument line, and fill in the name,
direction and type. A new argument is created.
10
What is a workflow?
A workflow represents a small piece of automation that you can take and re-use in your
projects. It is basically your canvas, the place where you design and work with all the
UiPath Studio activities and it defines the flow of your automation. Hence the name,
workflow.
Moving data around within these workflows is carried out through a collaboration
between variables and arguments. As discussed, data present in variables of a particular
scope, when needs to be transferred to another workflow, has to be shifted on to an
argument which in turn carries it to the other workflow, and vice-versa. This procedure of
transferring the data from one workflow to another is called Importing.
When we use “Invoke Workflow” activity in UiPath Studio, it provides a panel where we
can map all our input and output arguments to their relevant variable counterparts in the
current workflow. Make sure to keep the direction of the arguments accurate and as per
need for proper flow of data within these workflows.
Importing Data From One Workflow to
Other
11
In UiPath Studio, namespaces represent containers that store different types of data.
They enable you to easily define the scope of your expressions, variables and
arguments.
For example, if you have the System.Data namespace imported, you can further
use DataTable, DataView, DataColumn, DataRow and other classes that are available in it,
without having to always type System.Data.DataTable and so on.
You can view and manage namespaces from the Data Manager or from
the Imports panel. Note that some namespaces are automatically imported when you
browse for a .Net type variable or argument.
About Imported Namespaces
12
Meaningful names should be assigned to workflow files, activities, arguments, and
variables in order to accurately describe their usage throughout the project.
To improve readability, variable and argument names should also align to a naming
convention:
•Snake case: First1_Name2, first_name2,
•Upper or lower Camel case: FirstName, lastName,
•Pascal case: First1Name2, First1Name,
•Kebab case: First-Name, First-Name1
Argument names should have a prefix stating the argument type, such as:
in_DefaultTimeout, in_FileName, out_TextResult, io_RetryNumber
Naming Conventions
13
Quiz Time!
menti.com Code : 3155 1460
14
QnA
THANK YOU!

More Related Content

Similar to Variables, Arguments & Imports.pptx

UiPath Development Best Practices.pptx
UiPath Development Best Practices.pptxUiPath Development Best Practices.pptx
UiPath Development Best Practices.pptxApurbaSamanta9
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3Vijay Perepa
 
Salesforce integration questions
Salesforce integration questionsSalesforce integration questions
Salesforce integration questionsDebabrat Rout
 
Qtp Training
Qtp TrainingQtp Training
Qtp Trainingmehramit
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes arvind pandey
 
AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1guest38bf
 
Qtp Presentation
Qtp PresentationQtp Presentation
Qtp Presentationtechgajanan
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A ReviewFernando Torres
 
Obiee interview questions and answers faq
Obiee interview questions and answers faqObiee interview questions and answers faq
Obiee interview questions and answers faqmaheshboggula
 
Issues in Query Processing and Optimization
Issues in Query Processing and OptimizationIssues in Query Processing and Optimization
Issues in Query Processing and OptimizationEditor IJMTER
 
Informatica cloud Powercenter designer
Informatica cloud Powercenter designerInformatica cloud Powercenter designer
Informatica cloud Powercenter designerRameswara Reddy
 
UNIT_5_Data Wrangling.pptx
UNIT_5_Data Wrangling.pptxUNIT_5_Data Wrangling.pptx
UNIT_5_Data Wrangling.pptxBhagyasriPatel2
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow TransformationsPramod Singla
 
UNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningUNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningNandakumar P
 
ISC APPS FORMS BY SWAROOP
ISC APPS FORMS BY SWAROOP ISC APPS FORMS BY SWAROOP
ISC APPS FORMS BY SWAROOP Anil Kumar
 
Baltimore MuleSoft Meetup #8
Baltimore MuleSoft Meetup #8Baltimore MuleSoft Meetup #8
Baltimore MuleSoft Meetup #8ManjuKumara GH
 

Similar to Variables, Arguments & Imports.pptx (20)

UiPath Development Best Practices.pptx
UiPath Development Best Practices.pptxUiPath Development Best Practices.pptx
UiPath Development Best Practices.pptx
 
Introduction to Visual Basic
Introduction to Visual Basic Introduction to Visual Basic
Introduction to Visual Basic
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3
 
Salesforce integration questions
Salesforce integration questionsSalesforce integration questions
Salesforce integration questions
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
Alteryx Presentation
Alteryx PresentationAlteryx Presentation
Alteryx Presentation
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
 
AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1
 
Qtp Presentation
Qtp PresentationQtp Presentation
Qtp Presentation
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A Review
 
Obiee interview questions and answers faq
Obiee interview questions and answers faqObiee interview questions and answers faq
Obiee interview questions and answers faq
 
Issues in Query Processing and Optimization
Issues in Query Processing and OptimizationIssues in Query Processing and Optimization
Issues in Query Processing and Optimization
 
Informatica cloud Powercenter designer
Informatica cloud Powercenter designerInformatica cloud Powercenter designer
Informatica cloud Powercenter designer
 
UNIT_5_Data Wrangling.pptx
UNIT_5_Data Wrangling.pptxUNIT_5_Data Wrangling.pptx
UNIT_5_Data Wrangling.pptx
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
 
UNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningUNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data Mining
 
Technical Interview
Technical InterviewTechnical Interview
Technical Interview
 
ISC APPS FORMS BY SWAROOP
ISC APPS FORMS BY SWAROOP ISC APPS FORMS BY SWAROOP
ISC APPS FORMS BY SWAROOP
 
Baltimore MuleSoft Meetup #8
Baltimore MuleSoft Meetup #8Baltimore MuleSoft Meetup #8
Baltimore MuleSoft Meetup #8
 
Intro to tsql
Intro to tsqlIntro to tsql
Intro to tsql
 

More from ApurbaSamanta9

Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptxApurbaSamanta9
 
Debugging in UiPath.pptx
Debugging in UiPath.pptxDebugging in UiPath.pptx
Debugging in UiPath.pptxApurbaSamanta9
 
UI Automation with UiPath.pptx
UI Automation with UiPath.pptxUI Automation with UiPath.pptx
UI Automation with UiPath.pptxApurbaSamanta9
 
Introducing Excel Automation.pptx
Introducing Excel Automation.pptxIntroducing Excel Automation.pptx
Introducing Excel Automation.pptxApurbaSamanta9
 
Types of Workflow.pptx
Types of Workflow.pptxTypes of Workflow.pptx
Types of Workflow.pptxApurbaSamanta9
 
Familiarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxFamiliarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxApurbaSamanta9
 
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxAutomation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxApurbaSamanta9
 

More from ApurbaSamanta9 (9)

Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptx
 
Debugging in UiPath.pptx
Debugging in UiPath.pptxDebugging in UiPath.pptx
Debugging in UiPath.pptx
 
UiPath Logs.pptx
UiPath Logs.pptxUiPath Logs.pptx
UiPath Logs.pptx
 
UI Automation with UiPath.pptx
UI Automation with UiPath.pptxUI Automation with UiPath.pptx
UI Automation with UiPath.pptx
 
Email Automation.pptx
Email Automation.pptxEmail Automation.pptx
Email Automation.pptx
 
Introducing Excel Automation.pptx
Introducing Excel Automation.pptxIntroducing Excel Automation.pptx
Introducing Excel Automation.pptx
 
Types of Workflow.pptx
Types of Workflow.pptxTypes of Workflow.pptx
Types of Workflow.pptx
 
Familiarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxFamiliarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptx
 
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxAutomation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

Variables, Arguments & Imports.pptx

  • 2. What you'll learn in this session At the end of this session you will be able to: • Explainwhatvariablesareandwhattheyareusedfor. • Createandconfigurevariablesinanautomationproject. • Explainwhatargumentsareandwhattheyareusedfor. • Differentiatebetweenvariablesandarguments. • UsetheInvokeWorkflowFileactivitytochainworkflowexecutionandpassdatathrougharguments. • Bestpracticeswhileusingvariablesandargumentsandnamingconventions
  • 3. 3 What are variables? Variables are containers that can hold multiple data entries (values) of the same data type. For example, EmailAddress can be a variable that holds the value "rpadeveloper@uipath.com". The value of a variable can change through: • External input • Data Manipulation • Passing from one activity to other Why are they important? Variables help us pass data from one activity to another. Advancing with any automation process would be hardly possible without using variables Variables
  • 4. 4 There are three main ways to create variables in UiPath: 1. From the Variables panel Navigate to the Variables panel, select the ‘Create Variable’ line and type in the name. Whenever needed, provide its name in the Designer panel or in the desired Properties field. 2. From Expressions Variables can be created from expressions directly in an activity input field or the Expression Editor. Select a part of the expression and press Ctrl+K. The Set Var field is displayed. Fill in the name and press Enter. Check its type and scope in the Variables panel. 3. From the Properties panel In the Properties panel of any activity, select a field that can be edited press Ctrl+K. The Set Var field is displayed. Fill in the name and press Enter. Check its type and scope in the Variables panel. Creating Variables
  • 5. 5 Variables are configured through their properties. You can set them in the Variables panel. The main properties in UiPath are: 1. Name Navigate to the Variables panel, select the ‘Create Variable’ line and type in the name. Whenever needed, provide its name in the Designer panel or in the desired Properties field. 2. Type It defines what kind of data can be stored in the variable. In UiPath, the type is declared when the variable is created, however there are some types that can accommodate different types of data. 3. Default Value In general, variables have initial values that change throughout the process. For most variables, if no initial value is assigned when the variable is declared, there is a default rule that assigns a value. Configuring Variables
  • 6. 6 4. Scope The part of the workflow in which the variable can be used. Some variables can be global (used throughout the workflow), others local (used inside an activity). In real automation scenarios, there are many variables in use. Making all of them unnecessarily global can cause efficiency issues as well as create the conditions for confusion. In UiPath, the scope of a variable cannot exceed the workflow in which it was defined. Since business automation projects rarely consist of single workflows, we need a different kind of vehicle to pass data between workflows, and this is called an argument. You will learn more about arguments shortly in the session.
  • 7. 7 What are arguments? Arguments are very similar to variables: •They store data dynamically •They have the same data types •They support the same methods and properties The difference is that they pass data between workflows, and they have an additional property for this – the direction. Arguments have specific directions: In, Out, and In/Out. These tell the Robot where the information stored in them is supposed to go. Why are they important? Arguments are a key component when it comes to building more complex automations, where you need to store and use data between multiple workflows. Arguments
  • 8. 8 There are three main ways to create variables in UiPath: 1. From expressions Directly in an activity input field or the Expression Editor. Select a part of the expression and press Ctrl+M (for In arguments) or Ctrl+Shift+M (for Out arguments). The Set Arg field is displayed. Fill in the name and press Enter. The argument is created. Check its direction and type in the Arguments panel. Arguments created in these ways automatically receive the type according to the activity. 2. From the Properties panel In the Properties panel of any activity, right-click a field that can be edited, and select Create In Argument or Create Out Argument from the context menu. Alternatively, press Ctrl+M (In) or Ctrl+Shift+M (Out). The Set Arg field is displayed. Fill in the name and press Enter. The argument is created and visible in the field. Check its direction and type in the Arguments panel. The argument type is automatically generated depending on the selected property. Creating Arguments
  • 9. 9 3. From the Arguments Panel Navigate to the Arguments panel. Select the Create Argument line, and fill in the name, direction and type. A new argument is created.
  • 10. 10 What is a workflow? A workflow represents a small piece of automation that you can take and re-use in your projects. It is basically your canvas, the place where you design and work with all the UiPath Studio activities and it defines the flow of your automation. Hence the name, workflow. Moving data around within these workflows is carried out through a collaboration between variables and arguments. As discussed, data present in variables of a particular scope, when needs to be transferred to another workflow, has to be shifted on to an argument which in turn carries it to the other workflow, and vice-versa. This procedure of transferring the data from one workflow to another is called Importing. When we use “Invoke Workflow” activity in UiPath Studio, it provides a panel where we can map all our input and output arguments to their relevant variable counterparts in the current workflow. Make sure to keep the direction of the arguments accurate and as per need for proper flow of data within these workflows. Importing Data From One Workflow to Other
  • 11. 11 In UiPath Studio, namespaces represent containers that store different types of data. They enable you to easily define the scope of your expressions, variables and arguments. For example, if you have the System.Data namespace imported, you can further use DataTable, DataView, DataColumn, DataRow and other classes that are available in it, without having to always type System.Data.DataTable and so on. You can view and manage namespaces from the Data Manager or from the Imports panel. Note that some namespaces are automatically imported when you browse for a .Net type variable or argument. About Imported Namespaces
  • 12. 12 Meaningful names should be assigned to workflow files, activities, arguments, and variables in order to accurately describe their usage throughout the project. To improve readability, variable and argument names should also align to a naming convention: •Snake case: First1_Name2, first_name2, •Upper or lower Camel case: FirstName, lastName, •Pascal case: First1Name2, First1Name, •Kebab case: First-Name, First-Name1 Argument names should have a prefix stating the argument type, such as: in_DefaultTimeout, in_FileName, out_TextResult, io_RetryNumber Naming Conventions