I am trying to filter the data table and since there are no rows with that filter condition it’s throwing an exception saying “The source contains no DataRows”
How to proceed further?
What should happen: If there are no rows then I need to get the count as “zero” and write some logic towards that.
CopyToDataTable methods throws exception if instance has no rows.
To avoid this, first, set result rows of Select method into datarow array (arrDr). Then check if arrDr has any items using Any method in condition of IF activity.
If arrDr has one or more rows, convert it to DataTable using CopyToDataTable method.
If arrDr has no row, set empty datatable from filterDt using Clone method.