Switch Function not Working


Hi there,

I’m trying to build a more complicated scenario that helps me with pairing up users, but for now, I’m simply stuck at trying to make the switch function work. I asked people how many people they manage, and they can give me a series of options. I would like to use the switch function to translate those options they select in a form to numerical values to help me further down the line. As you can see, the switch function seems to be returning a null value, and I can’t understand why.

Thanks!

Hey Lily,

what is the input like? Why do you need trim() and lower()? Can you try without them and see what the result will be?

In switch condition there are spaces remove space it will work.

I hope this screenshot will help

1 Like

Thank you!! I also used the switch module in the end which was a lot simpler!

2 Likes