Switch for an argument

Hello @panpan1020!
There is some discussion on this throughout the forums you can check out, like here:

There are a few approaches. Also, you can simply select to use a Decision rather than a Switch, but I like the idea of using a Switch in this case.

Essentially, you need the Expression for the Switch to return the email domain. So, you can either A) use Regex or Split to extract the domain, or B) use an If expression to set the string to your choosing.

First you would set something up like this for the Switch with TypeArgument = String:

image

image

Second expression to extract the domain using Regex may be more user friendly since you don’t need to adjust the conditions each time you add another domain.

I hope this helps you out.

Regards.

1 Like