How to find if a Data table is having a required value with out using for each row

Hi, I am having a data table with records of 2000 and above
I need to find out if the data table is having a specific value in it’s any of the column
If able to find the column , i need the column name and row number
Is this possible to achieve with out using for each row
Because using for each row with 2000 records , the process is too slow

@AiTeam_Digital_workf,

Welcome to UiPath Community!.

You can check for that value in a particular column and get the row index using this linq query,

New System.Data.DataView(dt).ToTable(False, {"yourColumn"}).AsEnumerable().[Select](Function(row) row.Field(Of String)("yourColumn")).ToList().FindIndex(Function(col) col = "valueToCheck")

@AiTeam_Digital_workf

Welcome to our uipath community.

Use Lookup DataTable activity to do this.

https://docs.uipath.com/activities/docs/lookup-data-table

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.