Nested IF Block

Hi Team,

I’m having 1 variable (my_var) and 3 condition values,(Say QA, PROD and STG), I have to check for first condition as my_var = “QA”, then I have trigger one work_flow.xaml file, else I have to check again with condition as my_var = “PROD”, then I have to trigger one diff workflow.xaml file corresponding to PROD, final else part is for work_flow.xaml file for STG environment.

while using if activity, and putting another one if condition within else part of the first IF activity giving an error like,

even if the condition satisfied as QA, QA work_flow also triggered then final else part STG work_flow also getting triggered.

Please help me with this problem and suggest me for Nested IF Activity.

If we do it in invoke code activity, is it possible to trigger workflow within code itself ???

Thanks
Sivakumar Prakash

Instead of IF activity, I recommend you to use Switch Activity.

Each value is one switch case.

3 Likes

Thank u Karthik, by the way one more doubt, how can we introduce NULL in UiPath, I have tried to Assign Null to one variable, but i got error, and tried with System.DBNull also, but again error .

Int_Variable = Nothing

In UiPath you can set to nothing.

So you can use it in any conditional check like below -

If variable is nothing then

Else

End if

1 Like