Aren't we having nested if-else in uipath cross platform?

Hi,

I am converting a workflow from Windows to cross-platform.
In Windows, I can use else-if-else but in cross-platform (Linux) I cannot use the same. It is giving me the below error.

Thanks in advance.

Hi @Riya_Bansal

This occurs when there is a compatibility issue or unsupported activity in your workflow. As you mentioned that you are converting a Windows workflow to cross-platform (Linux), it’s possible that some activities or features used in the Windows version may not be supported on Linux.

Please click on the Replace Activity & try to replace it with the equivalent & compatible activity such as If or Else If.

https://docs.uipath.com/activities/other/latest/user-guide/if#windows-and-cross-platform-configuration

Hope this helps,
Best Regards.

1 Like

grafik
taken from: https://docs.uipath.com/activities/other/latest/user-guide/if-else-if

We would recommend to check:

  • the version of UiPath.System.Activities and maybe adapt
  • when it is not resolved, then just remodel it as sometimes upgrades are failing on existing modellings

@ppr
Thanks for responding, I have updated the system. activities and now I am able to see nested if-else but I am not getting the option to add else if, attaching ss for reference, isn’t this same as single else-if


c

are you using Studio Version 2023.4.X ? Also check to expand it by double click

@ppr

I am using studio version 2022.10.7 Enterprise Edition
This is how activiti looks like, how can I add multiple if-else?

It looks like that the announcement and availability of the activity in combination with a Studio Version 22.10.X is divergent.

Often we can rewrite a nested if else if into another representation (e.g. move forward pattern). Can you tell us more about your detail business case?. Nesting too much IF Activities within the else blocks we would not recommend

@ppr

My use case is that I want to click on radio buttons when the user answers 1 ques based on that next question appears and the sequence continues up to 6 to 7 levels.
I have almost 17 cases where I need to perform this activiti.

looks like we can do it with a do while and switch. can you share some screenshots for giving some more details

@ppr

do while and switch cannot be used as I have multiple conditions.
Let me elaborate this with an example:
1.) Do you have a car: yes no
let’s say the user selects yes then another question appears
2.) What is the color of your car: red black green
let’s say the user selects black then another question appears
3.) What is the price of your car: $10000 $90000 $80000
and so on…

for this in my current implementation, I have these values picked from db. so I make some conditional statements like:
if((doYouHaveCar.Equals(“yes”))And(colorOfCar.Equals(“black”)And (priceOfCar.Equals(“80000”)))then do so and so…
else if ((doYouHaveCar.Equals(“yes”))And(colorOfCar.Equals(“green”)And (priceOfCar.Equals(“80000”)))then do so and so…
else if (doYouHaveCar.Equals(“yes”))And(colorOfCar.Equals(“red”)And (priceOfCar.Equals(“80000”)))then do so and so…

and the combination of conditions goes on…

I hope it’s understandable now…

we can build with this a if-else#if, or with the variation of for-each and switch

the main thing is to calculate if it is to break/stop or to continue