User manual

Table Of Contents
Working with related files
8-3
For example, a travel agency might store trip information in a Trip
file, then use it with client information that’s in a Client file and with
billing information that’s in an Invoice file.
You create a relational database by first defining a relationship in the
master file. Then you add the fields to display the data from the
related file on a layout of the master file. You can then work with the
data in the related fields in all modes when you work with records in
the master file.
When you enter a value in the match field of a record in the master file,
FileMaker Pro uses the relationship to access all the records in the
related file whose match field contains a value that satisfies the
requirements of the relationship. Then it displays data from the fields
of the related file in the current record of the master file.
When the related field is in a portal on the layout, values from all
related records are displayed.
When the related field is placed directly on the layout, the value from
the first (or only) related record is displayed in the field. (The first
related record that’s accessed depends on whether the related records
are sorted. See “Defining relationships for relational
databases and lookups” on page 8-10.)
Invoice file
A-200-61
Invoice No
6-Oct-2001
Date
C100
Client ID
Trip
ID Trip Name
T10
Cost $
NY-Roma 550.00
T20 Roma-Istan 700.00
Williams
Name
1,250.00Total
Client file
C100
Client ID
Williams
Client Name
408-555-3456
Phone
Trip ID
Trip Name
T10
NY-Roma
T20
Roma-Istan
Trip file
T10Trip ID
NY-RomaTrip Name
Route
ID Origin
R200
Destination
NY Paris
R42 Paris Roma
Master file
C200
Client ID
Smith
Client Name
408-555-1234
Phone
Route
ID
Origin
R20
Destination
NY Paris
R42 Paris Roma
T10
Trip ID
T10Trip ID
R20Route ID
BostonOrigin
LondonDestination
T10Trip ID
R42Route ID
ParisOrigin
RomaDestination
Related file
All records in
the related file
are displayed
in a portal
Relationship
M
aster
fil
e
C200Client ID
SmithClient Name
408-555-1234Phone
Route
ID Origin
R42
Destination
Paris Roma
T10Trip ID
T10Trip ID
R20Route ID
BostonOrigin
LondonDestination
T10Trip ID
R42Route ID
ParisOrigin
RomaDestination
Related file
Related fields not
in a portal–only
the first record in
the related file is
displayed
Relationship