toffler
toffler

Reputation: 1233

UiPath - how to use variables in switch/case

I'm just curious about switch/case in UiPath. Everywhere else in UiPath, strings must have double quotes or stored in variables, however in switch/case, it seems different.

Every "case" is interpreted as string, regardles of the quotes. How to use variables in there when they're interpreted as string?

Upvotes: 0

Views: 1680

Answers (1)

Ankit Roy
Ankit Roy

Reputation: 44

You cant use variable in switch case in UiPath. However you can use following expression in Expression property helps switch dynamically.

Array.IndexOf({var1,var2,var3},item.ToString)

Something like below screenshot

Variable in Switch Case

Hope this helps

Upvotes: 1

Related Questions