IF Condition for comparing four variables

Hi Folks,

I have four variables(contains the value of get transaction item each).

I have to write a condition like if any one of variable has empty value, my bot should not proceed and move to next transaction

image

Please help me to write a IF condition

Regards,
Sharu

@Anil_G and @fernando_zuluaga Please help me

Hi @sharu_priya,

If i undestand right, you need something like:
IF → in_AccNumber Is Nothing or in_LegalTool Is Nothing or in_Reason Is Nothing or in_Comments Is Nothing → then “next” → else “run the next activity”

Let me know if this statement is ok or needs further help.

Thanks,
Nikos

1 Like

Thank you…

I tried the below but need to check

String.IsNullOrEmpty(in_AccNumber) OR String.IsNullOrEmpty(in_LegalTool) OR String.IsNullOrEmpty(in_Reason) OR String.IsNullOrEmpty(in_Comments)

I have used throw in THEN, will it go and pick the transaction?

yes check it…

If you use this if in for each do not need the throw.

@sharu_priya

You can write a if condition in your process xaml as you written above…and on then side if you throw error it will write exception if you leave like that it goes to sucess…both works…as you need

On the els esid eyou can have whole of your process

Cheers

{Var1,…,Var4}.Any(Function(a) a.Trim=“”)

Ir you are using reframework, just below the get transaction item, in the same if that you assign the item to the transaction item, add those validations in that if, so if any of your variables is empty then don’t assign any transaction item and move to the next transaction, if it has value then just assign it and continue the transaction

Regards