Dynamic expression not added at the cursor position in server connect

Wappler Version : 4.2.0
Operating System : Windows 10
Server Model: PHP
Database Type: MySQL
Hosting Type: Custom

Expected behavior

When adding dynamic data to an existing expression, the selected data binding should remain at the original/cursor posiion

Actual behavior

The data is added to the end of the expression

How to reproduce

In this case, I’m creating a table row in a repeat, to insert into an email. Wappler makes it very easy to create such an expression, mixing dynamic and static data, and dealing with quoting and concatenation etc. - unless you want to edit an existing expression. Eg I want to add some dynamic data here:

image
If I select what I want from the bindings panel, the selected binding is inserted at the end of the expression, not at the cursor position. There is no easy way to edit this, either in code view:

image
… because most of the text is invisible and the area can’t be resized (scrolling up and down is the only option)…

or in this editor, which is even less usable, as only one line is displayed:

Solution: copy the expression into a text editor.

I think this is a bug, rather than a feature request.

Obviously, the editing facilities and lack of space are a problem, but that’s another issue - but improvement in this would obviate the need to use a text editor. I expect the available space could be better used, on most monitors/screen resolution - certainly in my case:

image

Can confirm. This is a bug.

Just to confirm the issue here - you click in the value field and add a dynamic value, but it gets added at the end of the whole value and not at the cursor position? Is that correct?

Yes

1 Like

The new resizable dialogs make editing expressions in Wappler a great deal easier. However, the bug reported here is still an issue. At least it’s easier to edit the code now, but it would often save any need to edit the code at all if it were not for this bug.

It’s not just an issue if you need to edit an existing expression and want to insert variables (as in the example above). Eg if it were not for this problem, replacing the values in a string like the one below for dynamic values would be really easy using the Server Data Bindings panel. As it is, it’s not possible at all - you may as well use a text editor. The problem is the same in App Connect. The UI almost works really well, but as it, in cases like this, it doesn’t work well at all.

https://www.site.com/file.php?param1=value1&param2=value2&param3=value3&param4=value4&param5=value5

It would be great if this could be fixed.

This has been fixed in Wappler 4.6

This topic was automatically closed after 47 hours. New replies are no longer allowed.