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

Chapter 4. Calculation Fields > Formatting Labels or Envelopes

Formatting Labels or Envelopes

Calculation fields can be combined with other fields to build more complex formulas. For example, once you have a Full Name calculation field, you can combine it with the address data to create a Label field. This field can become a building block for every layout that requires these fields to be used together. Not only will it make a label easy to position for printing, but the same field works nicely as a letter header or “sold to” field in an invoice as well. Just adjust the field fonts and sizes on each layout.

To create a label field:

1.
Choose File > Define Fields (Ctrl+Shift+D/Command-Shift-D).

2.
When the Define Fields dialog box appears, type the name you'll use for your label field in the Field Name text box, select the Calculation radio button, then click Create. We use Label as the field name in this example.

3.
When the Specify Calculation box appears, double-click on the name of the full name calculation field you created in “To merge fields” on page 52—in our case, Full Name. From the operators keypad, click the ampersand button.

4.
From the operators keypad, click the quotes button and then the paragraph () button (Figure 4.16).

Figure 4.16. To put the first field on a line of its own, put a paragraph symbol between quotes.


5.
Click to the right of the quotes, then click the ampersand button and press Return (Mac) or Enter (Windows) (Figure 4.17).

Figure 4.17. Just like in a word processing program, typing a return breaks the formula line.


6.
From the function list on the right, double-click Trim.

7.
With the text parameter highlighted in the formula box, double-click the next field to be used in the calculation.

This example uses the Address field.

8.
Click to the right of the parentheses (Figure 4.18).

Figure 4.18. Use the Trim function to delete extra spaces around the address line.


9.
Next you want to put the Address field on its own line in the label. Click to the right of the quotes, then click the ampersand button and press Return (Mac) or Enter (Windows).

10.
From the function list, double-click Trim. Replace the text parameter by double-clicking City in the field list.

11.
Click the quotes button and type a comma and a space inside the quotes. Click to the right of the quotes and click the ampersand button (Figure 4.19).

Figure 4.19. To insert a comma between two fields, use the quotes button and type a comma and a space inside the quotes.


12.
From the function list, double-click Trim. Replace the text parameter by double-clicking State in the field list. Click to the right of the quotes, and from the operators keypad click the ampersand button.

13.
Click the quotes button and type a space inside the quotes. Click to the right of the quotes and click the ampersand button to add a space before the next field.

14.
From the function list, double-click Trim. Replace the text parameter by double-clicking Zip in the field list (Figure 4.20).

Figure 4.20. To string City, State and Zip together on one line, use ampersands (&) between functions and don't insert the paragraph symbol.


15.
Set the Calculation result to Text and Click OK. When you're finished, click Done.

Now you have a completed formula in a field. When you place this field on a layout, it will display three lines of text: the full name and two address lines.

Tip

  • If your addresses will sometimes include a country but not always, use the If function combined with IsEmpty to add the Country field as the last line of the formula. For information on how to do this, see Steps 7 through 11 in “To merge fields” on page 52 (Figure 4.21).

    Figure 4.21. To add a Country line to a label, select the If function, and use IsEmpty to test the results. If the field contains data, the calculation will add a paragraph marker and the field contents. If it is empty, no extra line is inserted.


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