User manual

Table Of Contents
Chapter 4 | Working with related tables and files 121
3. In the Specify Calculation dialog box, define a calculation that determines which portal records
will be displayed.
For example, if you are working in an Invoices layout, in a portal that shows product records
from a LineItems table, and want to display just the products with quantities greater than 1, use
the formula If(LineItems::Quantity
< 1; 0; 1).
4. Click OK.
Important The results of summary fields, calculations, and find requests are based on the full set
of related records, not just the records in a portal that are filtered. For example, if a portal is
displaying a filtered subset of records, and a Total of summary field outside the portal summarizes
these records, the summary field will total all related records, not just the displayed records.
For more information about filtering records in portals, see Help.
About lookups
A lookup copies data from another table into a field in the current table. After data is copied, it
becomes part of the current table (and remains in the table from which it was copied). Data copied
to the current table does not change automatically when the data in the other table changes,
unless the data in the match field of the current table changes.
To establish a connection between tables for a lookup, you create a relationship. Then you define
a lookup to copy data from a field in the related table into a field in the current table.
When you type a value in the match field of the current table, FileMaker Pro uses the relationship to
access the first record in the related table whose match field contains a matching value. Next, it
copies the value from the lookup source field into the lookup target field, where the value is stored.
After a value is copied into the lookup target field, you can edit, replace, or delete it like any other
value (because the lookup value belongs to the current table). You can also update data in the
current table to match data that changes in the related table.
Creating lookups
To create a lookup:
1. Create a relationship for the lookup between the match field of the current table and the match
field of the related table. See
“Creating relationships” on page 118.
2. With the database open, choose File menu > Manage > Database.
3. In the Manage Database dialog box, click the Fields tab.
C235
Name
42.83.91.04Phone
ParisCity
C100
Name
555-3849Phone
VancouverCity
Current table
C200Customer ID
SmithName
Records in related table
Relationship
Lookup target field Lookup source field
C200Customer ID
SmithName
555-1234Phone
New YorkCity
Customer ID
Customer ID