The Mobilengine form language allows helper variable declaration inside the markup. In the
declarations
trait, you can declare one or more let elements to
essentially give a name to a specific data-binding query expression.
There is no restriction on the data type of the value that you store in a variable.
You can reuse the value of the named query expression anywhere in the form that you declare
the let
in, without having to enter the query
again.
If the named query expression is a reference table query, storing its return value in a variable contributes to performance optimization, because the return value of the server query will be cached in the variable.
Storing a reference table query in a let
can serve as a workaround to
combine a server-side and a browser-side query and overcome the data-binding execution context
limitation that the server can only access scalar-value browser-side query results.