Quite often I’m uncertain, or perhaps just forget, what format is required when filling in fields for constants, variables or expressions in Wappler’s UI. This issue has caused much confusion and given rise to many threads over the last year or two.
Today there was such a case - where an issue was resolved by @patrick providing information about enclosing an expression in curly brackets for it to be evaluated as expected. The thread was fairly long but resolved with a simple answer. Without access to a code manual or built-in debugger, it can be difficult to track down bugs which are caused by issues like these.
Enclosing constants in quotes for example is something which I sometimes get wrong. I would expect to have to use single or double quotes, but sometimes Wappler does it automatically and sometimes it doesn’t (at least I think this the case). I’ve also been caught out by omitting the curly brackets around expressions. I always have code view displayed so keep an eye on what’s going on, but am not always sure what’s required - eg if there are nested quotes (which perhaps shouldn’t be nested).
Information popups like this can be very useful:
I think it would be very useful if these were extended, particularly in cases where you have to think twice, or simply don’t know without resorting to trial and error, what format the value should be in. Eg:
In this case, I might reasonably expect to enclose the global names in quotes. Also, in what circumstances should a value be given to ‘Global name’. The addition of more such info icons and brief descriptions might save a lot of time.
Last updated: