Find empty values in a datatable

Hi Robosapiens,

Wanted urgent help on a scenario.
The scenario is like say , Their is a datatable with 5 columns and total of 2000 rows .
What i want is i want to check in the columns and the rows which field are empty,
for example,
if a datatble has 5 columns and 3 rows i want to check that for all the three rows their is data . If some data is missing for any row i have to pull the row out and print separately . Can anyone help

Thanks !!

@Shikhar_Tandon

first idea as a quick shot, use it within an assign, returning a list

(From d In dtData.AsEnumerable
Where d.ItemArray.Any(Function (x) If(isNothing(x), True, String.IsNullOrWhiteSpace(x.toString.trim)))
Select d).toList

with the check on returned list count with YourDataRowListVar.Count within an if activity
it can be reacted on result or no returned rows case.

Find Demo Xaml here:
GetRowsWithBlanksInAnyCol.xaml (7.7 KB)

Edited:
Statement saved up against Null Exceptions
Added Demo XAML

4 Likes

Thanks a lot @ppr for your effort really appreciate.!!
If Suppose there are 10 columns in a datatable with 2000 rows but i want to only check for 5 columns that is their any blank value in the rows of that 5 columns only as they are only mandatory not all the 10 . What can be done in that case.

Waiting for a reply. Let me know in case of any doubts. Once again Thanks !!!

@Shikhar_Tandon
sorry for delay, was very occupied by my regular job.

Configure the ColNames or ColIndex on the Collist Variable

These Cols were picked up for the Empty Check.

Find demoo Xaml here:
GetRowsWithBlanksByColList.xaml (8.7 KB)

1 Like

Thanks a lot @ppr for this… Will try this on code and let you know if there’s a problem.

Thanks !!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.