UiPath RPA Academy 学习笔记 Lesson 3

Lesson 3 - Data Manipulation

  • A Type into activity has properties of different types
    • ContinueOnError - Boolean value
    • Delays - Integers
    • Text - String
  • Scalar variables
    • Characters, Booleans, Numbers, Date Time
  • Collections
    • Arrays, List and Queues
    • Strings
    • Dictionaries : used to pull data from Orchestrator queues
  • Tables
  • Generic value
    • Pros
      • Flexible use of variables
      • Without types considerations
    • Cons
      • Lack of specific handling methods
      • Imprecise expression evaluations
  • Collections
    • Array
      • Fixed size
      • Handy in most places
      • Ex: Name: anArray / Variable type: String/ Default: [“value”,”value2”]
    • List
      • Flexible size
      • Advanced use cases
      • Ex:Name: aList/ Variable type: List/ Default: new Listof String from [“value1”, “value2]
  • Dictionary
    • Data from orchestrator queues
    • Passing multiple data as a single argument
  • Text
    • String
      • Input: Email, files, screen scraping
      • Internal: Selectors, names, file paths
      • Output: Applications, email, files, logs
    • Ex: message.Contains(“success”)
    • Ex: part=status.Split(“ “c); - split the sentence word by word. part(4): the 5th element (start from 0)
    • Ex: status.Split({“Record”, “has”}, StringSplitOptions.None); - “Record” and “has ” are ignored
  • Handling Text
    • Extracting data
      • String Split method
    • Assembling
      • String concatenation
        • use + sign
          • Eg: “Hello”+ world+ Name.ToString #to see more, visit MSDN site
      • String.Format method ( for large text)
        • Eg: String.Format(“Hello(0)(1), world, Now)

  • Microsoft Visual Basic pages for String class
    UiPath RPA Academy 学习笔记 Lesson 3
  • Data Tables
    • From Excel, CSV files
    • Web data scraping
    • Ex:
      • ReadCSV activity loads the data from file into a DataTable variable
      • To iterate through the DataTable: use ForEachRow activity
      • To print the names of people in the table: use WriteLine activity to get cell value from each row (pull from the row by the column name)
      • To see the value on the name column for a fixed row index: sampleData.Row(0)(“Name”).ToString
    • Select
      • Go through the whole DataTable looking for the rows that follows a certain rule and returns an array with the matches
      • Eg:
        • Assign activity to specify the table: sampleData.Select(“Age<40 and income > 40k”) : be careful with the data type
        • Use for each activity

本人编程小白,在自学uipath,记录学习笔记方便复习。
本笔记为UiPath RPA Academy视频摘要, 转发请给credit
By: Lauren Ye