Anything similar to "CASE" as SQL instead of a lot of IFS
Options
![JJ](https://us.v-cdn.net/6037124/user_avatars/1335010.jpg)
JJ
Member ✭
Hi,
I am using in a POST request a lot of "IF" conditions to cover 5 scenarios.
Is there a better approach than using 5 scenarios, using some sort of CASE as we have in SQL?
My examples of conditions are:
IF GENDER = M AND COUNTRY = B THEN
ELSE
IF GENDER = M AND COUNTRY = A THEN
ELSE
IF GENDER = F AND COUNTRY = B THEN
ELSE
IF GENDER = F AND COUNTRY = A THEN
...
ELSE XYZ
Thank you very much.
I am using in a POST request a lot of "IF" conditions to cover 5 scenarios.
Is there a better approach than using 5 scenarios, using some sort of CASE as we have in SQL?
My examples of conditions are:
IF GENDER = M AND COUNTRY = B THEN
ELSE
IF GENDER = M AND COUNTRY = A THEN
ELSE
IF GENDER = F AND COUNTRY = B THEN
ELSE
IF GENDER = F AND COUNTRY = A THEN
...
ELSE XYZ
Thank you very much.
Comments
-
Hey - there isn't currently a support for CASE although it would definitely be something nice to add. So currently the multiple conditional set up is a good path forward
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback