Search
⌃K
Links

Writing dynamic texts

Make texts dynamic via a script
To personalize texts, for example, send a letter that looks basically the same as an invoice to many recipients with the respective other data, this is easier to do with dynamic texts (see birthday greetings).
To make texts dynamic using a script, you have 2 options:
  1. 1.
    Connect simple strings and fields with the plus operator +.
  2. 2.
    Template strings with values inside braces {...}.

Simple strings

Concatenate simple strings with the + operator. Use + to include any data type, e.g., numbers.
At least one of the data types must be a string, so that the output is also a string.

Example

In a table, create a First Name field and paste the following content into a formula field.
"Hello " + 'First Name' + "!"
Result: Hello Sam! (if the First name field contains the value Sam)

Template strings

Template strings are indicated by a 3 minus signs --- at the beginning and end. Everything in between turns into text.
Put braces {...} around scripts, e.g., to write a serial letter that fetches the relevant data, such as first and last name, address, etc., from a table.

Example

Same as above, but with a template string.
---Hello { 'First Name' }!---
Result: Hello Sam! (if the First name field contains the value Sam)