[Wish]_Alternative Switch widget

[Wish]_Alternative Switch widget

The current Switch widget evaluates its connected action paths and only one of those paths is executed. This allows nested if-statements to be replaced by one switch widget.

May I suggest an alternative to the Switch widget, one that executes ALL connected action paths before continuing with the remainder of the action. (For those who are familiar with C#, just remove the “break;” command in each switch-case clause). An example where such a widget would be useful is a web-form with lots fields that require some custom validation. Instead of a number of consecutive if-statements to set validity parameters, one widget with a number of action paths would suffice.

Disclaimer: I’ve only just finished the on-line Associate Developer training so if I missed such a feature please let me know.
Just a note, It is a bit stupid but C# does not allow fall-through, break is always requiring.

This is only possible in C.
Thx, I stand corrected. Now I remember having the same issues with C#, although an empty case clause will allow fall through. (It's been quite a while, so I was mixing things up.)

Still, in many situations a fall through alternative to the Switch widget could reduce the number of necessary control flow elements in an action flow. However, I'm guessing OutSystems will follow the C# paradigm, so chances for such an alternative are probably slim...
Hi Ramon,

First of all welcome to the agile network.

Following your example I'd just like to add that you may use only one assign widget to perform all the custom validations, perhaps combining it with some user functions to assign the correct value to the Valid attribute of the corresponding widgets.
Even though this approach saves on the node number count it's inexpressive and it doesn't help code reading.

Also, keep in mind that the agile platform already performs some validations (type and mandatory fields) and that you can combine server-side and client-side validation. It is also possible to have custom client side validations.