Switch option!


#1

In switch activity, We get to check an Expression followed by Default, true and False! If I have a case wherein, I need to check condition in reach row and depending upon the result, proceed further, how can I do that?

Example - Assuming I have a datasheet - with a state such as “LL”, "FM and “MG”. Depending upon the state, I would like to invoke different workflows for each state. How can I do this?

The number of states would be more than 20.


#2

Hi @MGDEL,

If you want that behavior inside a Sequence you should use Switch

If you want that behavior inside a Flowchart you should use Flow Switch


#3

HI @acaciomelo! Thanks for the suggestion on Switch (sequence). What I want to do in switch is, have an expression for each case and if found True, then follow a certain sequence.

Similarly at next level, check for expression if found true, do next sequence. Hopefully, I am making some sense?


#4

It seems that UiPath doesn’t check more than one validation inside each case. In this case, I believe that you could use nested switches like one switch inside another or If activity inside each switch case.


#5

Thanks! I will check that.


#6

Can I use string varibale in Switch Case insted of constatnt string?


#7

Yes you can! What’s the problem you are facing?


#8

I have used varibale but it is considering as string.


#9

My bad! seems like it is only considering string.


#10

Hi @acaciomelo just now I have created below topic

Please see if you can suggest a solution.

Regards
Hitesh


#11

You could use State machine
This will let you have different conditions for every branch.