KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: ST COMPUTE EXPRESSIONS and ST FREEZE EXPRESSIONS
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: January 10, 2019

When using expressions in a 4D Write Pro document, the expressions should be evaluated before outputing the document else where, such as emailing it or printing it. If not the expression will not be displayed or evaluated correctly.

There are two commands to do this that are similar but fit different needs. These commands are ST COMPUTE EXPRESSIONS and ST FREEZE EXPRESSIONS.

With any of the two commands, they should be used on all expressions that need to be evaluated. When a 4D Write Pro document already has evaluated expressions, adding a new expression will require call of the evaluating commands making sure that the range contains the expressions.

ST COMPUTE EXPRESSIONS evaluates and updates the displayed text meaning that the raw stylized text still contains the expression while the plain text displayed in an object contains the value of the expression.
This is useful in cases where a template is used to generate one time dynamic documents, such a greeting letter where the document does not need to be retained while the template does.

ST FREEZE EXPRESSIONS replaces the expression with the evaluated command. If a template is being used, consider storing the frozen document in a temporary storage or in a new location.
This is more useful in cases where a copy of the resulting document needs to be retained such as an invoice where it is benefical to use a template to draft up, but a copy should be maintained for record keeping.

Links:
4D Docs: ST COMPUTE EXPRESSIONS
4D Docs: ST FREEZE EXPRESSIONS