Tutorial

Table Of Contents
Simplifying data entry 39
See how calculations speed data entry
Members of the Corporate Travelers Club pay an annual fee. New
members pay a fee of $200, while continuing members pay $100.
The following steps show the calculation you are going to build. The
calculation returns a membership renewal fee based on membership
type.
1. Choose Window menu > Sample07.
2. Choose Data Entry from the Layout pop-up menu if it is not already
selected.
3. Create a new record by choosing Records menu > New Record.
Notice there’s no data in the Renewal Fee field.
4. In the Membership Type field, click New. The Renewal Fee field
indicates 200.
The Renewal Fee field is a calculation field.
5. In the Membership Type field, click Continuing. The value in
Renewal Fee changes to 100.
6. Delete this record by choosing Records menu > Delete Record.
Deleting this record is necessary to set up a later part of this lesson.
7. Click Delete in the confirmation dialog box.
Create a calculation field
There are several different ways of formulating a calculation, each of
which can yield the correct result. The following method uses an If
statement
to compare the data entered in the Membership Type field
with one of the membership types. The calculation returns one of two
results.
1. Choose MyFile07.fp7 from the Window menu.
2. Choose File menu > Define > Database.
3. In the Define Database dialog box, click the Fields tab if it is not
already selected.
4. For Field Name, type Renewal Fee.
5. For Type, select Calculation to make this a calculation field.
6. Click Create.
The Specify Calculation dialog box appears.
7. Scroll through the list of formulas in the upper-right corner of the
Specify Calculation dialog box until you locate
If (test ; resultOne ; resultTwo). Double-click this formula so that it
appears in this dialog box.
This formula has three parts: a test, a result if the test evaluates as
true (result one), and a result if the test evaluates as false (result two).
You will replace the placeholders
test, resultOne, and resultTwo with
the actual components of the calculation.
Select Calculation