Hi,
I have a situation where I have to check multiple values whether they are empty or not. I’m using if condition for each value and working out accordingly.
Is there any way to verify all the values at once.
Any help is appreciated
Thank you
Hi,
I have a situation where I have to check multiple values whether they are empty or not. I’m using if condition for each value and working out accordingly.
Is there any way to verify all the values at once.
Any help is appreciated
Thank you
Yes you can do it.
Do one thing create a Array of string datatype variable and store those multiple values in a Array. Let’s call the variable name as Arr_Values.
Then in the If activity give the below condition,
Arr_Values.Contains(Input.toString)
If the input value is contains in the array then it will go to then block.
If this is not your case, then do elaborate more with some images for our better understanding.
Hope it helps!!
Hi ,
->Store all the values you want to check in an array or a list.
->Use the “Assign” activity to assign a boolean variable the result of the check.
values.All(Function(x) String.IsNullOrEmpty(x))
checks if all values in the list are empty using LINQ’s All method along with a lambda expression. It will assign True
to the variable if all values are empty; otherwise, it will assign False
.
{Var1,Var2…}.All(Function (x) String.IsNullOrEmpty(x))
E.g. checking a few String Vars if all are empty or not
Thank you for all your responses.
Here my source of input is a data row. How to assign each column value to an array