Iterating through each column and reading headers

Let's now iterate through each of the columns in the row. We will associate each column with the corresponding header in Excel. These columns will then be mapped to the input fields on the RPA challenge website. 

We will use the If condition and a series of Else If conditions to map the iteration counter to the headers, for example, Counter#1 to First Name, and Counter#2 to Last Name. Let's follow these steps to do that:

  1. We will start by adding the If action. We will check whether it is the first column that has counterstring as 1. To indicate that, let's set the properties as follows: 
    • Condition: String condition
    • Source valuecounterstring 
    • Operator=
    • Target value: 1

This should look like the following screenshot: 

  1. Next, let's indicate that the first column at position 1 is First Name. To do that, add a String Assign action under the If condition and set CurrentColumnName as First Name:

  1. Now that we have indicated the first column in the row, let's do the same for the other columns. We will use the Else If condition to do that. For the second column, let's add an Else If action and set the properties as follows:
    • Condition: String condition
    • Source valuecounterstring 
    • Operator=
    • Target value: 2
  2. Just below the Else If condition, let's add another String Assign operation and set CurrentColumnName as Last Name:

  1. Do you get the drift? Go ahead and add Else If for the rest of the five columns. Add the String Assign operation for Company Name, Role in Company, Address, Email, and Phone Number, as shown:

We now have the current column name for the iteration stored in the CurrentColumn
Name
 variable. We will use that name of the column to check for the corresponding RPA challenge field to enter the column data. For example, if the current column that is being iterated is Last Name, we will identify the Last Name field on the RPA challenge website.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.4.52