Filter DataTable by LINQ function with variable parameters (In/Out)

input Arguments:

in_dtData
in_arrFilterSet
in_intColIndex

output Arguments:
out_dtResult

Code:

out_dtResult =

(From d in in_dtData.AsEnumerable()
Let val =  d(in_intColIndex).toString.Trim
Let chk = in_arrFilterSet.Any(Function (x) val.StartsWith(x))
Where chk
Select r = d).CopyToDataTable

Handling empty filter results
:ambulance: :sos: [FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum

We would also recommend to safe it more on possible null values and its handling / feedback returns e.g. by Datavalidations before filtering