Elseif usage

There is a “switch case” usage feature request that was previously opened. but I guess it is not important enough. However, while server-side operations in the wappler interface, if conditions can sometimes be complicated. I suggested switch case to remove this complexity in using the interface, but if this is not possible, the use of “elseif” would be appropriate.

Of course, this is a decision you will make, but this is not a new feature but an improvement of an existing feature. Using nested "if condition " with the GUI is not really easy. in some cases it causes confusion. The best solution is to use “switch case” , but if it is not possible to add it, it will be better for us to use “elseif” as desired.

I have been using a nested ternary operator to do this.
"arrTotalQty.items.sum() > 499 ? 30 : arrTotalQty.items.sum() > 299 ? 25 : arrTotalQty.items.sum() > 19 ? 15 : 10"

hi @ben
feature request for server-side usage.

Thanks Serhat.

1 Like