Switch on multiple conditions

Hi,

I need to make such switch:
Case 1 : If x = a or b then
Case 2 : if x = c or d then
etc.

I cannot add this “or” into the case. Is it possible?

1 Like

Hello @Marek_Matuszak,

You can use isMatch Activity.

Cheers

Hi,

should I use it inside the Switch activity or before?

1 Like

Before.

like this

System.Text.RegularExpressions.Regex.IsMatch(“Case1Str”,“a”)

1 Like

ok, but how then I add second string to the first case?

1 Like

You can just do this, System.Text.RegularExpressions.Regex.IsMatch(Case1Str,“a|b”)

ok works.

So lets say first in Is Match bool = true.

What should be in Switch as Expression?

1 Like

Hello @Marek_Matuszak,

yes, you can just pass output of IsMatches

image

Cheers
@Marek_Matuszak