User manual

Table Of Contents
Chapter 4
|
Working with related tables and files 105
5. Select options for the relationship.
6. Click OK.
For more information about creating and editing relationships, see Help.
Summarizing data in portals
You can summarize data that’s in a related field displayed in a portal. The portal can contain records from a
related table or from the same table (a self-join).
To summarize data in portals:
1. Create a calculation field in the table in which you want the total to be displayed.
2. For the calculation field, define a formula that includes an aggregate function for the type of summary
calculation you want to perform.
For example, if you are in the Invoices table and want to define a calculation to total the related values
in the Price field of the LineItems table, use the formula Sum(Line Items::Price).
3. Place the calculation field on a layout of the table in which it is defined.
See “Placing and removing fields on a layout” on page 81.
Filtering records in portals
By filtering portal records, you can display different sets of records in a portal.
1. Double-click the portal.
2. In the Portal Setup dialog box, select Filter portal records.
To Select
Add a related record (to the related table) whenever
you enter data into a related field in a record of the
current table. (See
Adding and duplicating records”
on page 25.)
Allow creation of related records in this table via this relationship.
When this option is selected, entering data in a related field that has no
corresponding related record creates a related record based on the match
field in the current table.
Delete matching records (in the related table)
whenever you delete a matching record in the current
table. (See
“Deleting records” on page 26.)
Delete related records in this table when a record is deleted in the other
table.
This option deletes related records even when you’re browsing a layout
that doesn’t display the related records.
Sort related records. Sort records. Then, in the left list in the Sort Records dialog box, double-
click the fields to sort. To change the order in which fields are sorted,
drag fields in the right list into the order you want. Select other options,
then click OK.
Selecting this option does not affect the sort order in the related file.