• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Calculation Fields > Formatting Form-Letter Modules

Formatting Form-Letter Modules

If you've created form-letter layouts before, you know that it's 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 concept—a 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 you're 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. You'd 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 addressee's 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, they're 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 field—in 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.


6.
In the Operators keypad, click the quotes button. Between the quotes type Dear and a space. Click to the right of the quotes. In the Operators keypad, click the ampersand button (Figure 4.28).

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


7.
In the field list, double-click your courtesy title field. This example uses MrMS.

8.
In the Operators keypad, click the ampersand button, then the quotes button. Type a space inside the quotes.

9.
Click to the right of the quotes and click the ampersand button again (Figure 4.29).

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


10.
In the function list, double-click Trim. With “text” highlighted in the formula box, double-click the Last Name field in the field list.

11.
Click to the right of the parentheses. In the Operators keypad, click the ampersand button, then the quotes. Type a colon inside the quotes.

12.
Be sure to select Text from the “Calculation result is” pull-down menu, then click OK twice to finish.

You now have a standard letter heading and greeting in one field.

✓ Tip

  • Once you get the hang of the concept, you can start combining modules of calculation fields to help you streamline your layout creation. For example, many invoices have two address sections: the ship-to address and the bill-to address. Sometimes these addresses are the same, but occasionally they're not. If you created one calculation field for the shipping address (usually the same as the label field), you can create another for a billing address. If the billing address exists, it will be inserted in the layout. If the billing calculation field is empty, the shipping address will be inserted instead.


To create a customizable 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 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 field—in 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 you'd 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.


6.
Click the quotes button. Type Dear and a space between the quotes. Click to the right of the quotes. In the Operators keypad, click the ampersand button (Figure 4.31).

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


7.
Double-click If to choose it from the function list. In the formula box, double-click the “test” parameter in the If statement to select it. In the function list, double-click IsEmpty (Figure 4.32).

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


The IsEmpty function looks at a field to see if it contains any data.

8.
With the “field” parameter highlighted in the formula box, double-click Greeting Name in the field list (Figure 4.33).

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


9.
In the formula box, double-click “resultOne” to highlight it.

10.
Double-click the MrMS field in the field list.

11.
In the Operators keypad, click the ampersand button, then the quotes button. Type a space inside the quotes.

12.
Click to the right of the quotes and click the ampersand button.

13.
Double-click Trim in the function list, which appears in the formula box with “text” highlighted, then double-click the Last Name field in the field list (Figure 4.34).

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.


14.
In the formula box, highlight “resultTwo” and double-click the Trim function. With “text” highlighted in the formula box, double-click Greeting Name in thefield list (Figure 4.35). Click to the end of the line.

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.


15.
In the Operators keypad, click the ampersand button, then click the quotes button and type a colon between the quotes.

16.
Make sure your calculation is set to Text, then click OK twice to finish.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint