Get the condition while is True


What I have :

  • Checking if all the value exist with IF condition :
    String.IsNullOrEmpty(var_a) OR String.IsNullOrEmpty(var_b) Or String.IsNullOrEmpty(var_c) Or String.IsNullOrEmpty(var_d)

What I want :

  • IF one of a condition is true, display the var_x
    Example : var_b is true and all other is false, display the var_b in message box

Advance thanks,

you can rewrite to:
{var_a,var_b,var_c,var_d}.Where(Function (x) String.IsNullOrEmpty(x)).Count = 1

What if both var_b och var_c are true? Do you want to display them both or not displaying anything at all?

What do you mean with var_b is true? Is it if String.IsNullOrEmpty(var_b) is true? If yes, then you will just displaying either null or an empty string.

another option could be to work with dictionaries and taking the key as a descriptor

@MasterSinge Since you have multiple conditions to check its better to go for switch activity which acts like a if. Please find attached workflow (2.5 KB)


1 Like

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