Hi @Nancy_Star
So basically to get the count and avoid that error
Better check the count in if condition and then assign it to a variable
Example
In if condition
Expression : DT.rows.count>0
Then. Use your variable and assign the value accordingly
Else datatable is empty,send out notification
Also please intialize your datatable