Formulas are an integral part of 4D Write Pro documents. They allow the integration of a lot of information coming from the database. Creating documents and templates that include formulas, combined to physical constraints (number of pages, paper size), can lead to non-wysiwyg designs. A new mode of displaying formulas is now available to facilitate this design.
The new formula display option (on the right) gives a more compact and clear view. And as we can see, the result is much closer to reality in terms of space.
When tables are associated with a datasource as above, you can now see it as a ⓕ (and it’s tip), so you can know without any doubt that its content is dynamic!
Formulas as text
Formulas expressed as such, i.e., not evaluated, can sometimes be long or even “cumbersome” from a layout point of view, even when they are simple.
The formula [String(This.item.salary; “###,###,##0.00”)] takes up more space than its evaluated result [2149.09] and may not seem to fit on a single line in a table cell for example.
FORMULAS AS SYMBOLS
For end-users, the readability of this type of formula is sometimes tricky, misleading, or in some cases, completely useless. That is why it is now possible to display formulas only as a symbol ⓕ, indicating their presence, to make documents clearer and more precise!
And as we can see, the result is much closer to reality in terms of space.
As you can see, formulas are now visible as tips when hovering over the symbol.
Property list, user interface and code
Choosing the way formulas will be displayed can be done at many levels.
New view property in the property list.
New user interface
$o:=New object $o[wk visible references]:= True $o[wk display formula as symbol]:=True WP SET VIEW PROPERTIES(WParea; $o)
This new possibility will offer all users of formulas (who doesn’t use them? ? ) more ease of design and layout of their documents, whether they are final documents or templates.