More Clarity in Layout of The Data Formats Expression Editor for Creating Complex Expressions

I’ve been using Wappler for 5 months, and I have never been able to relate to how the menus are used to create a complex expression… which has lead me to edit expressions in code more often than I would like!

Here is a simple example I have struggled with:

(var1.value==0) && (var2.value==1)

After seeking help on how to create this, the format in the Data Format window is this:

ex1

The nesting in this layout and the series of clicks needed to create it just doesn’t make sense to me. Why do I go back and click on var1 in order to create an expression only involving var2?

This implies to me that the bracketing is:

(var1.value== 0)  (var1.value && (var2.value==1))

Which doesn’t really mean anything.

I think the issue is that this window does not show a root position which the user can come back to in order to create the second expression. If the window was laid out like this to create my example:

Expression:
   var1.value
      -> ==
        -> 0
&&
   var2.value
      -> ==
        -> 1

Then the layout and the series of clicks required would exactly match the structure of the desired result:

(var1.value==0) && (var2.value==1)

I think this is a similar issue to the one that came up with the layout of the Server Action window, where you added the “Server Actions” root location and then everything made sense.

It would be even more amazing if the construction of an expression happened horizontally rather than vertically, since most of us are used to programming of expressions being shown that way.

So the display would look like this when you add an operator

Expression:
   var1.value [OPERATOR] [VALUE]

Then you click on [OPERATOR] AND [VALUE] (Which would be icons of course) to set the operation and value and the display then looks like this:

Expression:
   var1.value ==  1

(Even if you left the construction of the expression to be vertical, it would be great if this is what the display would look like if you collapsed the whole var1.value expression.)

I hope this is helpful feedback… I know you want to move people away from editing the code and creating mistakes, so I feel it is important for you to know what has really held me back from using the menu system.

I’d love to hear your feedback @George, @Teodor, and @patrick!

Best wishes,
Antony.

Community Page
Last updated: