Data table and extract data


from this list of table, i want to click on the “View Result” if the parameter set is “AsOf_1MthAgo”. How do i do it? There might be 4 or lesser/more rows…


You can use anchor base for this purpose , you can use “JOB ID” as find element and then click on “Veiw result”


Hello @Joanna2

  • Data Scraping (if needed) to extract table data into a DataTable variable (e.g., dataTable).

  • For Each Row in dataTable:

    • If (row(“Parameter Set”).ToString = “AsOf_1MthAgo”):
      • Click on “View Result” link (you may need to use a dynamic selector to identify the correct link in the current row).

Thanks & Cheers!!!

You can scrape the data as table then
you can use for each and loop through the table
then use if activity
inside it
write the condition
and then use click activity

Hope it helps

Hi @Joanna2

=> Use the Extract Datatable activity to extract the table as datatable and store in a datatable variable. Let’s call the variable name as dt_Extract.
=> Use for each row in datatable activity to iterate the dt_Extract to iterate the each row in datatable.
=> Inside for each insert an If condition to check the condition

- Condition -> Currentrow("PARAMETER SET").equals("AsOf_1MthAgo")

=> Take an assign activity and create a variable to store the row in int variable. Let’s call the variable name as RowNumber.

- Assign -> RowNumber = (CurrentIndex+1).toString

=>Inside If condition take a click activity and indicate the view results, when indicating check the strict selectors and uncheck the fuzzy and image.
=> Open the Ui Explorer of click activity, Select the attribute which contains the row number.
=> Pass the RowNumber Variable in that Attribute.

Hope it helps!!

Hi, Able to show how to do for the following? Thank you!

=> Open the Ui Explorer of click activity, Select the attribute which contains the row number.
=> Pass the RowNumber Variable in that Attribute.

Hi @Joanna2

To click on the “View Result” link in a table row when the parameter set is “AsOf_1MthAgo” using UiPath, you can use a combination of activities like the “Data Scraping” wizard, “For Each Row” activity, and conditional statements. Here’s a step-by-step guide:

  1. Use Data Scraping:

    • Use the “Data Scraping” wizard to extract the table data from the web page. This will create a DataTable variable containing the table data.
  2. For Each Row:

    • Drag and drop a “For Each Row” activity to loop through each row in the DataTable.
  3. Add an If Condition:

    • Inside the “For Each Row” loop, add an “If” activity.
    • In the condition, check if the value in the “Parameter Set” column of the current row is equal to “AsOf_1MthAgo”.
  4. Click on “View Result” Link:

    • If the condition is true, use a “Click” activity to click on the “View Result” link in the same row.
    • You may need to indicate the element using the “Indicate on Screen” feature or by using selectors, depending on the web page structure.
  5. End If:

    • After clicking or if the condition is false, continue with the next row in the DataTable.
  6. Complete the Loop:

    • The “For Each Row” activity will automatically iterate through all rows in the DataTable, checking each row’s “Parameter Set” value and clicking the link when it matches “AsOf_1MthAgo.”
  7. Handle Errors and Exceptions:

    • Consider adding error handling mechanisms in case the “View Result” link is not found or if there are any issues during the process.
  8. Test and Debug:

    • Test your automation process with different scenarios to ensure it correctly clicks the “View Result” link for rows with the specified parameter set.

By following these steps, you can automate the process of clicking the “View Result” link for rows with the “AsOf_1MthAgo” parameter set in your table, even if there are varying numbers of rows in the table.


Okay @Joanna2

When you are indicating the element in the website by click activity, check the strict selectors and uncheck the fuzzy and image.
Open the Properties of that Click activity, and click on the Strict selectors option, a small window opens → click on the Ui Explorer → There you can see the attributes and all → Check the attribute which has the row number → select the number and right click → click on choose variable → select the RowNumber Variable → Do validate.

Hope you understand!!

Hi, i tried but still fail. can please help me?

The 4 (4-job-*) after the job will change, it might not be row 4 always.


Your selector would be something like this…where by incrementing the idx value can loop through each…

<wectrl tag='TABLE' />
<webctrl tag='td' tablecol ='1' innertext='AsOf_1MthAgo' idx='{{indexvar}} />
<nav up='1' />
<webctrl tag='td' tablecol ='6' />
<webctrl tag='A' innertext='View Results />

This can be used as selector…note this is illustration exact one will be similar to this…use ui explorer to find

Idx can be passed as variable starting from 1 and inside loop can use check app state and if found click else end the loop as no more items are there

Second way is to use for eqch ui element activity…and indicate the complete row and have the innertext with * to have only the value ypu need…then inside the loop use get children with filter on A tag and then use that output to click on view results

Both would work

Hope this helps