Conditional text

Navigation:  Calculations in the text >

Conditional text

Previous pageReturn to chapter overviewNext page

Write also allows you to work with conditions via the function IF. Thus, you can use "conditional text" in your documents, for example.

A typical case: You have an address database with a field called GENDER, which contains a key for the gender of the respective person: "M" for male or "F" for female. You could use the following IF expression to ensure that Write forms a salutation according to gender:

IF (GENDER="M"; "Dear Sir"; "Dear Madam")

If you use this calculation in a mail merge, Write will check each record to see whether the GENDER field contains an "M". If this is the case, the above formula provides the result "Dear Sir", otherwise "Dear Madam" appears.