Using Calculated Field Labels
When you design a layout, you usually include all fields that might be needed, even if some arent always used. Major changes are best handled by creating another layout, but there can be times when you only need to include (or exclude) a specific field. For instance, you might have designed an invoice layout that includes a discount field. You would only want that field and its label to appear if there is a discount. (Otherwise the customer will want to know why they didnt get one.) By creating a calculated field that contains both the value and the label, you can customize the layout to automatically display or hide the field.
To create a calculated field label
1 .Choose File > Define > Database (Control+Shift+D/Command+Shift+D).2 .When the Define Database dialog box appears, click the Fields tab.3 .Type a name into the Field Name text box. Choose Calculation as the Type, and click Create (Figure 3.54).
Figure 3.54. You create a calculation field by giving the field a descriptive name, selecting the Calculation from the Type drop-down list, and clicking Create.
[View full size image]
Figure 3.55. To place a function in the formula box, double-click it in the functions scrolling list. Functions are followed by parameters in parentheses that you can specify.
[View full size image]
Figure 3.56. To specify what field to use in a calculation, double-click it in the field list on the left.
[View full size image]
Figure 3.57. The most frequently used operators are available via a keypad.

Figure 3.58. So far, this calculation says that if there is no discount, the field is empty, but if there is a discount, the word Discount should appear.

Figure 3.59. Click OK to save the finished calculation.
