The resulting datatable is empty which I can only assume is because those columns are being recognised as a string rather than a number, so the greater than check doesn’t work.
@daryldawes Are you sure you have the names of Columns properly, I guesss the Column Names starts from “Column0” When you don’t add headers. Can you Check that and confirm if you are using the right Column
Yes. The 2 records that I posted in my original post have 6 & 11 in Column5 and 888.93 in Column7 which would meet the “keep” conditions provided to the filter datatable activity.
@daryldawes Can you try this Query :
DT.AsEnumerable().Where(Function(row) (if(String.IsNullOrEmpty(row(“Column7”).ToString.Trim) Or String.IsNullOrWhiteSpace(row(“Column7”).ToString.Trim),False,Convert.ToDouble(row(“Column7”).ToString.Trim) >= 200)) and (if(String.IsNullOrEmpty(row(“Column7”).ToString.Trim) Or String.IsNullOrWhiteSpace(row(“Column5”).ToString.Trim),False,Convert.ToDouble(row(“Column5”).ToString.Trim) >1))).CopyToDataTable
Assign it to the Same Datatable that you are using
Only if the Filter Datatable is not working properly
@daryldawes is it solved ?
If not please keep variable type from value column to string as it it comparing string to int. which will alwayd fail.
Compare in this way: Column name >= Convert.Tostring(200)
@daryldawes You Have to handle Exception for that Statement , If there are no rows available after Filtering, The Datatable will be Empty, Hence it will throw an error.