How do I check if only the first row values in my DataTable contain any empty/null values?

Greetings!

In my project, I am trying to check only the first row of the following datatable:
image

I want to check if any of the first row values are empty or null. My project specifically needs to look for the first row only and ignore the others.

Here is my current effort, but it is not working:
String.IsNullOrEmpty(dt_People.Rows(0).Item(dt_People.Columns.IndexOf(“Name”).ToString))

Any ideas?

@tom_mccaffrey

Try below expression in IF activity.

           String.IsNullOrEmpty(dt_People(0)("Name").ToString.Trim)

If you want to check any values in the first row:

dt_People.Rows(0).ItemArray.Any(Function(x) String.IsNullOrEmpty(x.ToString))

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