Filter datatable without header

hello I am trying to filter datatable with filter datatable activity .
I use index to find the column like this but the filtering return empty datatable
image
image

anyone can help ?

Thanks

Hi there @pavlou_antwnis,
Unfortunately, I am not very familiar with the Filter DataTable Activity, but you can achieve the above through the following expression:
Assign - commfinal2 = commfinal.AsEnumerable().Where(Function (drRow) drRow.Item(1).ToString = “3710”).CopyToDataTable

Prior to this, however, you would want to check whether the DataTable contains any values matching the above criteria, otherwise you will receive an exception.

You can achieve this through a similar expression, found below:
If - commfinal.AsEnumerable().Any(Function (drRow) drRow.Item(1).ToString = “3710”) Then

  • Perform the filter

Else

  • No results match

End If

Thanks in advance,
Josh

1 Like

Thanks for your answer but i found the problem is on the filtering .
if i try this
image
I got a result .
You know how convert the datacolumn to string ?

Hello JDavey,

Regarding your below reply. Found it helpful.

"Hi there @pavlou_antwnis,
Unfortunately, I am not very familiar with the Filter DataTable Activity, but you can achieve the above through the following expression:
Assign - commfinal2 = commfinal.AsEnumerable().Where(Function (drRow) drRow.Item(1).ToString = “3710”).CopyToDataTable

"

Can help me with as enumerable function to filter data rows based on blanks in selected column.