Switch Activity, custom conditions

Hi, I am looking to use Switch activity to specify custom conditions e.g.

From 18 to 35
35 to 60
60-75
75+

How do I do this?

Hi @DEATHFISH

First give the condition in switch expression
Create a strvar as β€œ18 to 35”
Create other variable and pass the string values

Thanks
Ashwin.S

@DEATHFISH,

That was a nice question :slight_smile:

You need to use switch activities within the switch again as we are checking the boolean type here :

If value is between somevalues, in the true condition, do the required or in the else condition, add another condition use another switch as shown in the figure and so on…

image

1 Like

@DEATHFISH Please use below condition in switch.

if((age>=18 and age<35),"One",if((age>=35 and age<60),"Two",if((age>=60 and age<75),"Three",if((age>=75),"Four","Default")))) 

Here One, Two, Three, Four are case names you can change according to your requirement.