Switch on a String in UiPath Example

String, Switch, Case & UiPath

By default, the UiPath Switch defaults to an int32 variable. But if you want to use a String in UiPath Switch activities, all you have to do is head over to the properties tab and change the TypeArgument to String.

Boolean, Int32, Object and String UiPath Switch Expressions

By the way, you’re not limited to an int32 or String in UiPath Switch activities. There’s a ‘browse for types’ option that allows you to add any reference types, so the possibilities are endless. But it’s always a good idea to keep things simple.

If your conditional logic requires something more complex than a UiPath if activity, try the switch. It just might solve your issues.

1 Like