Greetings!
In my project, I am trying to check only the first row of the following datatable:
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?
lakshman
(Ganta lakshman)
2
@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))
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.