Filter datatable based on list of string

Hi everyone,
My requirement is i have list of string eg {“3”,“5”,“20”,“25”}
and i have a datatable with columns and lakh of rows and i have to filter based on a column named “YOS” which has numbers

so i have to filter out the datatable dt1 with values mathching any in the list dtlist
Thanks in advance

Hi @kavya.s16,

Can you share details, especially if you share them as input and output, I’m sure more people will try to support.


arrFilters = {“3”,“5”,“20”,“25”}

Assign Activity | dtFiltered is of DataType: DataTable
dtFiltered =

(From d in YourDataTableVar.AsEnumerable
Where arrFilters.Contains(d("YOS").toString.Trim)
Select r=d).CopyToDatable
1 Like

@ppr thankyou it worked!!

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