Filter datatable on multiple critera


I’m trying to filter on emty columns in a datatable:

.Select("[statut] = ‘’ AND [Date du tracking] = ‘’ AND [Type de pièce] = ‘’ AND [Motif de traitement] = ‘’ AND [Motif de rejet] = ‘’ ")

but it seems that it is no working


What is the error message you are receiving

the datatable has no row

Do you have any row in your data table where all the 4 columns are null,

If possible provide the excel sheet, and where you are using [statut]=’’ use [statut] is Null and give a try

no it does not work: NDDCurrent_Day_DT.Select("[statut] is Null AND [Date du tracking] is Null AND [Type de pièce] is Null AND [Motif de traitement] is Null AND [Motif de rejet] is Null ")

Can you provide excel sheet


Use the below workflow for filtering the datatable based on empty columns.

Sequence (3).xaml (6.7 KB)

If any one of the columns have a value and you want a complete row then use the below select statement
dt.Select("[statut]<>’’ or Convert([Date du tracking],‘System.String’)<>’’ or [Type de pièce]<>’’ or [Motif de rejet]<>’’ or [Motif de traitement]<>’’").CopyToDataTable

If you need to select from the datatable where all the columns contains value then use the below select statement
dt.Select("[statut]<>’’ and Convert([Date du tracking],‘System.String’)<>’’ and [Type de pièce]<>’’ and [Motif de rejet]<>’’ and [Motif de traitement]<>’’").CopyToDataTable