Formatting Form-Letter Modules
If youve created form-letter layouts before, you know that its relatively easy to use merge fields to personalize a standard letter. However, if you depend heavily on form letters, you still end up repeating the same tasks over and over when you use this tactic. Form letters usually follow the same basic concepta salutation (Dear), a courtesy title (Mr., Ms., General, or Exalted Leader), and a last name. Then comes the body of the text, followed by a closing (Sincerely) and a signature name. Replace many of these form-letter elements with calculation fields and you can minimize duplications.If youre clever about creating options with the all-purpose If function, you can trim the number of different layouts and letters you need to create as well.For example, if you have a Greeting Name field, you can set your salutation to automatically create either a formal or informal heading. Youd still use If and IsEmpty functions to check for text in a field (like the MI field), but substitute the Greeting Name field instead. If there is no text in the Greeting Name field, the salutation would default to the standard formal format (Dear Mrs. Jones). If it is supplied, the less formal greeting name (a first name or a nickname) would be used (Dear Karen).One of the most useful next steps in putting the Label calculation field to work is using it in a letter layout. Most well-composed letters include the addressees name and address as a block of text (just like the label). Following that block of text is a date or a greeting line. Since the elements and their positions are standard, theyre a prime target for another modular calculation field.You can adapt the techniques below to create layouts such as business forms, statements, invoices, and other printouts that combine global container fields with standard fields.
To create a standard letter heading
1 .Follow the steps in "To create a label field" on page 64.2 .Choose File > Define > Database (Control+Shift+D/Command+Shift+D).3 .Click the Fields tab. Type the name of your heading field in the Field Name text box, select Calculation in the Type drop-down list, then click Create. We use Letter Heading as the field name in this example.4 .When the Specify Calculation box appears, double-click the name of your label calculation fieldin our example, Label. In the Operators keypad, click the ampersand button.5 .In the Operators keypad, click the quotes button and then the paragraph button two or three times to create enough space between the heading address and the salutation. Click to the right of the quotes and click the ampersand button in the Operators keypad (Figure 4.27).
Figure 4.27. To create a letter heading, use the existing Label field, then add paragraph markers to separate the addressee information from the rest of the letter.

Figure 4.28. Put different portions of the heading calculation on different lines so you can read them easily later.

Figure 4.29. Always remember to add a space within quotes whenever you merge several text fields on one printed line.

To create a customizable letter heading
1 .Follow the steps in "64.2 .Choose File > Define > Database (Control+Shift+D/Command+Shift+D).3 .Click the Fields tab. Type the name of your heading field in the Field Name text box, select Calculation from the Type drop-down list, then click Create. We use Letter Header as the field name in this example.4 .When the Specify Calculation box appears, double-click the name of your label calculation fieldin our example, Label. In the Operators keypad, click the ampersand button.5 .In the Operators keypad, click the quotes button and then the paragraph button two or three times to create the visual space youd like between the heading address and the letter salutation. Click to the right of the quotes again and click the ampersand button in the Operators keypad (Figure 4.30).
Figure 4.30. Multiple paragraph symbols can be placed between quotes to add extra space.

Figure 4.31. The Dear greeting plus a space will precede the Greeting Name.

Figure 4.32. To create a formula that chooses between two options depending on whether theres data in a field, select the If function, then select IsEmpty as its test parameter.

Figure 4.33. To use a Greeting Name if one exists, select it as the test parameter for IsEmpty.

Figure 4.34. If the Greeting Name field is empty, the calculation will use the standard formal greeting of "Mr." or "Ms." plus a space and the last name.

Figure 4.35. Choosing Greeting Name as the field for "resultTwo" inserts it instead of the formal greeting whenever you want to use an informal name for the addressee.
