4D Write Pro: User-friendly Display of Formulas

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.

A new way to display formulas

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!

blank

 

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.

Example:

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.

blank

blank

 

 

 

 

 

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.

blank

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.

blank

New user interface

blank

Simple programming

$o:=New object
$o[wk visible references]:= True
$o[wk display formula as symbol]:=True
WP SET VIEW PROPERTIES(WParea; $o)

Conclusion

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.

 

Roland Lannuzel
• Product Owner & 4D Expert •After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.