Is it no longer possible to use else if in IF?

UiPath Studio Version : 2023.10.4
UiPath UIAutomation.Activies Version : 24.10.12
UiPath System.Activities Version : 24.10.7

When using the IF statement,
can only use Then and Else, which are provided by default.

I need to add multiple conditions,
Do I need to upgrade the Studio Version to solve this?

Thank you.

*add question
Is there a way to view it horizontally like the previous version of the IF statement?

Hi @qfactor2013

最新のStudioバージョンでは、IFアクティビティは「Then」と「Else」のブランチのみをサポートするモダンなデザインが採用されています。複数の条件を追加するには、ネストされたIF、Switchアクティビティ、またはFlowchart内のFlow Decisionを使用してください。

もし、以前のバージョンのような横向きのレイアウトを希望する場合は、Classicアクティビティに切り替えるか、Flowchartレイアウトを使用して視覚的にわかりやすくすることを検討してください。Studioのアップグレードではこの動作は変更されません。これはモダンデザインフレームワークの一部です。

1 Like

Hey @qfactor2013 in my opinion if you are dealing with more condition try to use Switch Activity.or if you only want to deal with IF activity you can use more IF activity like 1-IF check is condition is true or not if it is not true then in the Else you can put one more IF activity. but the best is to go with switch activity.

cheers

1 Like

I FOUNT IT!!!

I see that it was created as a completely new activity.
However, most of the activities were named in English,

but I wonder why it is displayed in the installed language.
I wish it was possible to search for the original name of the activity when searching

(UiPath.Core.Activities.IfElseIfV2)

It’s easier to view it horizontally, but I guess there’s nothing I can do about it. Thank you for your answer.

Yes, I forgot about Switch for a moment.
When developing a flow, I can’t help but think of IF first :slight_smile:
Thank you for your answer.

@qfactor2013 yes you can use Else IF activity as well but i recommend you to go with Switch activity. because it better deal with when you have multiple condition..

cheers

1 Like

Chiming in here.
If/Else chains and Switch serve different purposes, and are not interchangeable.
You can only switch on specific variable by its value, while if’s can be any conditions.
Sure, “streamlining” the value can be beneficial (f.e. pass it through a classification and switch on the category), but is not always practical.

For example, you can’t do something like this in a switch without making the switch redundant.

1 Like

yeap i know
if and switch each have their own pros and cons.
Thank you for your answer. :slight_smile:

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