How to get any particular values from extracted data table

I am extracting data table from website and it has multiple lines approximate 10 rows and 10 columns. How Can I get the row number of the value I am searching ? Value is coming from SQL DB and stored in Variable.

EX : Value Is ORder number from DB + 123
Extract DB has 10 order numbers . How Can I find 123 is in which Row number ?
I want to click on that row and process further.

@Pal_Patel

You can use lookup datatable

Cheers

1 Like

Thank for the respond. Can you explain more in detail How To use that ? And How Can I get that row to click on it ?

Another way is to use Linq Query:

Replace the dt_Table with your table, ColumnName with the Column you are looking into and value to find with the Value you are looking for.

dt_Table.AsEnumerable().ToList().FindIndex(Function(row) row.Field(Of String)(“ColumnName”) = valueToFind)

Remember It will return -1 if no rows are found

1 Like

I am getting error while use this formula. Can you help me to find the solution . I am using in assign .

What is the error?
Can you share error Snippet?

@Pal_Patel

May I know where you want to click?

You are saying datatable and database …and then click

Check the lookup datatable activity…you just need to pass a value to lookup and it gives the row number as response

Cheers

Hi @Pal_Patel
Welcome to the community!

Use Lookup data table activity to find your row index.

  1. Provide the Column name in which you want to search your value.
  2. use the Extracted data table variable in Data Table field.
  3. provide the value in the Lookup value field you want to search in the given column.
  4. Create a rowIndex Variable(Int32) in the properties which will give you the index value of the row where the search value will be found. In case the value is not present in the column it will return -1.

Thanks
Biswajeet

1 Like