User manual

Table Of Contents
Chapter 4 | Working with related tables and files 106
Multi-criteria relationships
In a multi-criteria relationship, you increase the number of match fields, which increases the
criteria that FileMaker
Pro evaluates before successfully joining related records. In a multi-criteria
relationship, FileMaker
Pro compares the values from each match field on each side of the
relationship in the order in which the fields appear. This is called an AND comparison; to match
successfully, every match field must find a corresponding value in the other table.
In this relationship, both TextFieldA and NumberFieldA are match fields to TableB. A record in
TableA with a TextFieldA value of Blue and a NumberFieldA value of 123 will only match those
records in TableB where both TextFieldB and NumberFieldB have values of Blue and 123,
respectively. If TextFieldA and TextFieldB have matching values, but NumberFieldA and
NumberFieldB do not, no related records are returned by the relationship.
Use a multi-criteria relationship when you want to relate two tables based on more than one
common value, such as a customer ID and a date.
For example, a catering equipment rental database has three tables: Equipment, a static table that
stores equipment rental inventory; Customers, which stores customer names and addresses; and
Catering Line Items, which stores a record of each equipment rental, including the equipment ID,
the customer ID, and the event date. The purpose of this database is to track equipment rentals
and display all rentals by a selected customer on a selected date.
In this relationship, both Customer ID and Event Date are match fields to the Catering Line Items
table. A record in the Customers table with a Customer ID value of 1000 and a Event Date value
of 10/10/2014 will only match those records in the Catering Line Items table where both fields
Customer ID and Event Date have values of 1000 and 10/10/2014, respectively. If Customer ID
fields in both tables have matching values, but Event Date fields in both tables do not, no related
records are returned by the relationship.
Although the database uses three tables, the multi-criteria relationship is between the Customers
and Catering Line Items tables. These tables have the following fields:
Table Field name Comment
Customers Customer ID Number field, auto-enter serial number; one of the match fields to the
Catering Line Items table
Event Date Date field; the other match field to the Catering Line Items table
Match field Match field
Match fields
Match fields