Write specific column of a table in the page to a list. which has a keyword in another column

Have a scenario of a web page table output with a keyword in a column (column 5). Need to read the specific column (column 2) of row which has that keyword and write it to a list.

@srinivas.abburi,

Welcome to the UiPath Community :tada:

Here is possible approach on the basis what I understood.

  1. Your Extracted DataTable . here I have build for demo purpose.

  2. Select only useful column in another DT.

  3. Keep only rows which have the desired value. Here for demo I assumed “val” is the desired value.

  4. Convert DataTable Column to List

Full Solution:

Output:
image

Sample Code:
Workflow2.xaml (13.5 KB)

Thanks,
Ashok :slight_smile:

Hi Ashok,

Thanks for response. The input here is the web page output (HTML), not excel data (or) a Data Table.

@srinivas.abburi,

You can still use Table extraction to get data from web page into Datatable and append the logic I specified.

Thanks,
Ashok :slight_smile:

@srinivas.abburi

Welcome to the community

Two ways

  1. Use extract datatable and get the table into datatable and then use filter datatable with column as 4 (as column index starts from 0) and then from filtered table filtereddt.Rows(0)(1).ToString gives the value in column 2 of required filtered value in column 5
  2. Use extract datatabe and then use assign with requiredvalue = dt.AsEnumerable.Where(function(x) x(4).ToString.Equals("requiredvaluetofilter"))(1).ToString

Cheers

Thanks guys for prompt responses.