How to write "condition" in the "IF" section?

PLEASE HELP




I have a project, UiPath flow like this.

I have two data from Excel, this data is used on the web with two conditions, if SKU is “Yes” then the robot will choose SKU and if SERVICE is “Yes” then the robot will choose SERVICE after running SKU.

I created a variable “listGroupby” with data type “List of String” then I used “append of list” to store the data.

after that I used “For each” to run several activities on the website in the yellow circle.

now, I want the robot to run if you choose “SKU” then go to the “SKU” flow or if you choose “SERVICE” then go to the “SERVICE” flow because this section has a different flow

how to write “condition” in the “IF” section?

@Kia1

Before click filter first use a get text activity to get the text and then validate the text with sku and service

Cheers

maybe using a switch Activity is more appropriate

@Kia1,

If you are sure you are going to get two options only then use If condition this way:

If there could be more than two you can use Else If this way [You can add multiple Else If as per requirement]:

You can use Switch also in second case:

Remember Case should be string without “”

Thanks,
Ashok :slight_smile:

take variable and assign it SKU or SERVICE check that variable in switch and according to that it will take case for eg
variable = SKU

switch(variable)
case1: SKU
case2: SERVICE

then it will execute SKU