Add Condition If Action

Please consider adding a Condition If action similar to Condition action without the Else section.

Often I have a condition when failed returns a Response action thus no need to specify the Else section.

condition

For readability, this will reduce 2 steps (else, Steps) and possibly a third one (then) in the tree structure view.

Well the else steps are not required - so just leave them empty when you don’t need them

Actually not a bad idea to make the else an action that is added on demand instead of by default.

I am assuming that at some point you will be adding else if and switch so this behavior could be added when you do a pass to SC condition steps.

2 Likes

I see - that is a good idea - to add parts on demand. I was thinking how to solve the “switch case” alike option - and that might be also a solution for it - to keep on adding “cases” as needed.

3 Likes

Yes. Good idea.

For a Switch statement a case and a default should be added by default which is the minimum so it makes sense and equivalent to an if-else. The rest of cases on demand.

For the if, else-if and else only the if should be added by default as it’s the bare minimum so it makes sense.

Then you have of course the subtle differences between both approaches if/else and switch/case.

You could follow the approach that programming languages do regarding what values can be evaluated(integers, strings, logical, etc) or abstract all that and make Wappler’s version.

This probably is a tough design choice.

PS: This feature request could be merged with the else-if and switch one that is already open.
All in all I believe the conditional flows(SC and AC flows) deserve a pass as a whole.

3 Likes