How to check if a set of columns contains value

Hello everyone, I have to validate if a set of columns (index 10 to 20) contain value in their respective cells (any value that is not null or empty), it would be very useful if it could be solved in a single line of code where I return a boolean, if any of the columns is empty return False

I can identify the row to evaluate with
dtDriveResponses.AsEnumerable().Where(function(x) x(“Full Name”).toString.Trim.Equals( strName) or x(“Email”).toString.Trim.Equals (strMail))
But I don’t know how to condition that the columns where the previous values are found contain data

Hi @Juan_Esteban_Valencia ,
The below expression returns boolean value. So we can set it to boolean variable using Assign activity as the following or set it to condition property of If activity directly.

booleanValue = dt.AsEnumerable.All(Function(r) r(“target”) is Nothing OrElse String.IsNullOrEmpty(r(“target”).ToString))

Thanks & Regards,
Shubham Dutta

When in all rows is to Check, in a Col within the Col index Ränge 10 to 20 blanks are occuring WE can do

Assign Activity
Mycheck =
(From d in yourDtvar.AsEnumerable
Let ras = d.itemarray.skip(10).Take(10).toArray
Let chk = ras.Any(function (x) isNothing(x) orElse String.isnullorempty(x.tostring.trim))
Select b = chk).Any(function (x) x )



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