đź“Ł Welcome to Day 2 of the UiPath Studio Web Workshop, we will delve into advanced techniques for array analysis and data categorization using UiPath Studio Web. Join us as we explore how to streamline your automation processes, enabling you to efficiently organize and categorize data. In this session, we will also elevate your data handling skills with UiPath Studio Web. Learn to generate data tables from text files and perform advanced string operations such as concatenation of first, middle, and last names. from text files and performing advanced string operations. Join us as we delve into practical exercises to enhance your proficiency in data.
👉 Topics covered:
đź“Ś Task 1: Array Extremes
Find Max and Min Values from List of Array of Numbers
đź“Ś Task 2: Data Segregation by Switch activity
Utilize "Switch" Activity for Data Categorization
Organize Data into Distinct Excel Sheets by Departments
đź“ŚTask 3: Generating Data Tables
Overview of Generating Data Tables from Text Files
Practical Exercise: Generate Data Table from a Sample Text File
đź“Ś Task 4: Concatenating Names in Excel
Extracting First Name, Middle Name, and Last Name from Excel
Concatenating Names and Writing Results into Full Name Column
Speakers:
Vajrang Billlakurthi, Digital Transformation Leader, Vajrang IT Services Pvt Ltd. and UiPath MVP
Swathi Nelakurthi, Associate Automation Developer, Vajrang IT Services Pvt Ltd
Rahul Goyal, SR. Director, ERP Systems, Ellucian and UiPath MVP
3. 3
• Overview:
- This UiPath project focuses on finding the minimum and maximum values from a list of integer
values stored in an array.
• Requirements:
- Obtain multiple integer values.
- Determine the minimum and maximum values from the list.
- Display the minimum and maximum values.
• Variable Creation:
- Name: InputValues
- Data Type: Integer[]
- Values: {10, 30, 6, 2, 50, 100, 4, 80}
1. Array Extremes: Finding Min and Max Values
4. 4
• Set Variable Value:
- Utilize Set Variable Value activity to store integer values in the InputValues array.
• Log Message Activity:
- Use Log Message activity to display the minimum and maximum array values.
• Display Minimum Array Value:
- Message: "Minimum Value: " + InputValues.Min().ToString()
• Display Maximum Array Value:
- Message: "Maximum Value: " + InputValues.Max().ToString().
• Prompt to use in Autopilot to Generate the Automation
- Assign multiple values of type array of integers and log minimum and maximum values.
Workflow Overview
5. 5
• Overview:
- This UiPath project automates arithmetic operations between two numbers based on an operator
retrieved from an Orchestrator Asset.
- The Switch activity is utilized to execute different operations based on the operator value
• Requirements:
- Obtain two numbers to perform calculation.
- Store these numbers in two variables.
- Create an Orchestrator Asset
- Retrieve the operator from an Orchestrator Asset.
- Perform arithmetic operations (addition, subtraction, multiplication, division) based on the
operator.
- Display the results of each operation.
- Handle invalid operators.
2. Interactive Calculator Using Switch
6. 6
• Overview on Asset and Switch
• Asset:
- An Orchestrator Asset is a secure storage facility within UiPath Orchestrator where sensitive data like credentials or
connection strings can be stored and accessed by robots during automation execution.
- In UiPath Orchestrator, assets can typically be stored in four main types: Text, Bool (Boolean), Integer, and Credential.
• Text: Stores textual information such as URL’s or configuration values.
• Bool: Stores Boolean values (true or false) for configuration or decision-making purposes.
• Integer: Stores integer values for numeric configurations or counting purposes.
• Credential: Securely stores sensitive information like usernames and passwords for authentication purposes.
• Switch:
- The Switch activity in UiPath allows automation workflows to execute different child activities based on the value of a
specified expression. Each child represents a possible outcome or condition defined by the expression.
7. 7
• Obtaining Numbers:
- Two numbers are required for calculation.
• Storing Values:
- Store the two numbers in separate variables.
• Getting Operator from Asset:
- Retrieve the operator from an Orchestrator Asset and store it in a variable named operator.
- Orchestrator Assets can store various types of data such as Text, Bool, Integer, or Credential.
• Switch Activity:
- Use the Switch activity to execute different operations based on the operator.
- Switch Expression: Operator
Workflow Overview
8. 8
• Switch Implementation and Execution
- Child Activities:
• a. Child (+):
- Perform the sum of the two numbers and store in a variable.
- Log the sum.
• b. Child (-):
- Perform the difference of the two numbers and store in a variable.
- Log the difference.
• c. Child (*):
- Perform the product of the two numbers and store in a variable.
- Log the product.
• d. Child (/):
- Perform the division of the two numbers and store in a variable.
- Log the division.
• Default:
- If an invalid operator is provided, log an "Invalid Operator" message.
9. 9
• Overview:
- This UiPath automation project demonstrates the process of converting data from a text file to a
DataTable, then writing the DataTable to a spreadsheet stored in Google Drive.
• Requirements:
- Upload a text file to the Orchestrator Storage Bucket.
- Read the text file from the Storage Bucket using Read Storage Text activity.
- Convert the text data to a DataTable using Generate Data Table activity.
- Write the DataTable to a spreadsheet in Google Drive.
• Variables:
- Result: Auto-generated variable to hold text data from the Read Storage Text activity.
- DataTable: Auto-generated variable to hold the converted DataTable result from the Generate
Data Table activity.
- Save Spreadsheet For Later: Auto-generated variable that holds information about the newly
created spreadsheet in Google Drive.
3. Generate Data Table from a Text File
10. 10
• Upload Text File:
- Upload the text file containing data to the Orchestrator Storage Bucket.
• Read Storage Text:
- Use Read Storage Text activity to read the text file from the Storage Bucket.
- A default variable named Result is created to hold the text data.
• Generate Data Table:
- Use Generate Data Table activity to convert the text data to a DataTable.
• Input: Result variable holding the storage text data.
• Parsing Method: Choose Custom to set the column separator based on the input text file.
• Column Separator: Use ";" followed by space ” “ (";“” “).
• Toggle on Use First Row as Column Headers to utilize the first row as column headers.
• A DataTable variable is automatically created to hold the converted DataTable result.
• Create Spreadsheet in Google Drive:
- Use Create Spreadsheet activity to create a spreadsheet in Google Drive.
- Connect to Google Drive.
- Save Spreadsheet For Later is automatically created to hold the newly created spreadsheet information.
• Write Range to Spreadsheet:
- Take Write Range activity to write the DataTable data into the created spreadsheet.
- Connect to Google Sheets.
Workflow Overview
11. 11
• Overview:
- This UiPath automation project focuses on concatenating first name, middle name, and last name
from each row of a spreadsheet and adding the full name to another column in the same
spreadsheet.
• Requirements:
- Iterate through each row of the spreadsheet.
- Concatenate first name, middle name, and last name to form the full name.
- Write the full name to a specific column in the spreadsheet.
• Variables:
- CurrentRow: Auto-generated variable by the For Each Row in Spreadsheet activity to hold data of
the current row.
- CurrentRowIndex: Auto-generated variable by the For Each Row in Spreadsheet activity to hold
the index of the current row. Note: Index starts with zero.
- ConcatenatedFullName: Variable containing Full Name information (concatenation of First Name,
Middle name, and Last name).
4. Concatenating Names in Spreadsheet
12. 12
• For Each Row in Spreadsheet:
- Use For Each Row in Spreadsheet activity to iterate through each row of the spreadsheet.
• Set Variable Value:
- Inside the For Each Row activity,
• Use Set Variable Value activity to concatenate first name, middle name, and last name to form the full name.
- Variable:ConcatenatedFullName
- Value: CurrentRow("First Name").ToString + " " + CurrentRow("Middle Name").ToString + " " +
CurrentRow("Last Name").ToString
• Ensure correct column names are provided as they are case-sensitive.
Workflow Overview
13. 13
• Write Cell:
- Use Write Cell activity to write the full name into the Full Name column of the spreadsheet.
- Determine the cell to write based on the Column, Current Row Index and the desired position.
• Cell: Provide "D"+(CurrentRowIndex+2).ToString
• What to write: Provide ConcatenatedFullName Variable
• Clarification on Position:
- In the Write Cell activity, the "Position" parameter determines where the concatenated full name will be written
within the spreadsheet. This position should be chosen based on the layout of your spreadsheet and the specific
column where you want the full names to be written.
- For example, if the "Full Name" column is in column D and you want to start writing the full names from row 2
onwards, you would set the "Position" to 2. This means that the full name will be written in column D, starting
from row 2, and progressing downwards for each row processed.
• Column: D
• CurrentRowIndex (Starts with 0 and auto increments for each row)
• Position: 2 ( Choose the value based on your requirement )
• CurrentRowIndex + Position: (0+2)
• Column + (CurrentRowIndex + Position): D+(2)