IsNothing(datatable) not working

datatable

#1

Hi, correct me if I am wrong
IsNothing(serverDt.Select(“Date like ‘Daily’”)) = false means when the value is initialised.
I have to check in the input’s excel if there is a column called date with a string called daily inside. If it’s inside continue…
But apparently, all my inputs are going either the right side of if statement or the left side of if statement


#2

Hi @sangasangasanga, if you are just looking to check whether there is any record, you would want to use serverDt.Select().length > 0.


#3

@quihan hi im checking if there is a particular line. Some of my inputs have but some of inputs don’t have


#4

Ya, you are just finding whether there is a record in your data table that matches your query. Is that right?


#5

@quihan yes

but isn’t the above line too general


#6

Hi @sangasangasanga, replace the select() with your query inside. serverDT.Select(“Date like ‘Daily’”).Length > 0