Tutorial

Table Of Contents
Simplifying data entry 39
The calculation formula uses values from the current record or
related records. The formula can use values from all field types. You
can use calculations to return text values (for example, combining
the contents of first name and last name fields into a full name field),
dates, times, timestamps, and the contents of container fields.
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.
Select Calculation