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.


The Use of Formulas in Collections & Callback Commands

When you use collections with a member method that needs a callback method, many of you have asked us for a more straightforward way.

You asked; we delivered!

Starting with 4D v19 R6, 4D allows you to use a formula to define a callback in the collection member functions, the EXECUTE METHOD IN SUBFORM, CALL FORM, and CALL WORKER commands. If you can reduce your code to a simple expression, you can pass it directly into the formula without using a method. 


4D Write Pro: Where are my formulas?

When a 4D Write Pro document contains external elements resulting from expressions or formulas, they are visible when the “Display expressions” mode is used. Still, they are blended into the text when the values are displayed. This is what you want for a final document, but it is sometimes useful to easily view these calculated values while writing the document. Well, 4D v19 R3 is giving you new display options for this purpose!


4D View Pro: Use 4D formulas in your spreadsheet

4D v18 R5 introduces a new command that simplifies writing your code: VP SET CUSTOM FUNCTIONS. It creates custom functions in 4D View Pro which execute 4D formulas.

Thanks to this command you can now allow 4D commands, fields, variables, methods, or any arbitrary expression to be used in your cell formulas. For example, there’s no need to create a method to use a simple variable in 4D View Pro, just pass it as a parameter to your Formula.


4D Write Pro – More control when using formulas

As a 4D Write Pro user, you’ve most likely used expressions (or more recently, formulas) to automatically fill in certain parts of your documents. These formulas can return “raw” text or images. In the case of text, they may contain line breaks. The question is how should these line breaks be handled when they are processed inside 4D Write Pro documents? This blog post provides the answers … keep reading!


4D Write Pro and formulas

With 4D v18 R2, 4D Write Pro is able to manage formula objects inside documents. To do so, four new commands have been created: WP Get formulas, WP Insert formula, WP Compute formulas, and WP Freeze formulas. They all can be used with intuitive targets like document, body, headers, etc. And as you may have guessed from the command names, formulas are no longer text expressions but powerful formula objects!


More sophisticated ORDA queries with formulas

In 4D v17 R6, ORDA queries are becoming increasingly more powerful and concise. This blog post is for those of you who need more sophisticated search criteria than just a simple syntax like “name = Smith‘”. With this R-release, you can use any project method or 4D expression in the query() member method by using formulas.

What better way to explain this feature than with an example? Let’s dig into the details.


Formula: More power behind simplicity

The Formula command is available since 4D v17 R3. So far you might have thought of assigning a formula as a method to an object or building smart objects that can calculate values or do anything you need. That’s really great, and there’s more than meets the eye!

I had a great demonstration from Vincent de Lachaux – Developer and expert 4D – on how he uses this command. For this blog post, I compiled different scenarios from that demo to give you insight on a different dimension of this command.


Name your ranges and formulas in 4D View Pro

4D v17 R4 is on the way with a cool new 4D View Pro feature: named ranges and formulas. If you need to use formulas with references to cell(s) or constant(s), this feature can be a great help!

With these new commands, your formulas are more readable and easily accessible with 4D View Pro’s automatic completion.