Database Reference
In-Depth Information
▪ A field in the Expenses table to type in the Invoice ID. Because this field doesn't hold in-
formation about any particular entity in your database, it's a perfect candidate for global
storage. Global fields, as you remember from Global Storage , have the same value across
every record of their table.
▪ A relationship between the Expenses table and the Invoices table, using Ex-
penses::Global Invoice ID and Invoices::Invoice ID as the key fields.
▪ A new layout similar to the original Expenses layout, but with the context of your new
table occurrence group and a portal showing Invoice Line Items.
To get these elements to work together, you first have to revisit your Relationships graph and
decide which table occurrences to use in the new group. Read on.
NOTE
You can download a finished copy of the database (called Invoices FINISHED.fmp12 ) from this
topic's Missing CD page at www.missingmanuals.com/cds/fmp13mm . Use the file to see how the
completed process works, and as a reference as you go through the exercises that create your new
layout.
Understanding Table Occurrence Groups
If you tried to add your new TOs to the existing group of table occurrences, you could easily
get tangled in a mess. As you add more features that require more TOs, pretty soon you'll
need a map, a GPS system, and a six-pack of aspirin to untangle all the table occurrences.
See Figure 14-11 for an example of a graph gone wild.
The simplest way to keep things straight is to create an entirely new group of occurrences,
called a table occurrence group , somewhere else in the graph. You can assemble and wire
these TOGs together in any way that makes sense for your new display, without complicating
or otherwise changing the existing group.
NOTE
You can create as many TOGs as you like without making your database any larger. Still, perform-
ance may start to suffer if you create more than about 25 occurrences of tables that contain tens of
thousands of records.
To figure out which table occurrence you need to use to make the new layout, think about
what you need it to do. You start by finding an expenses record on the Expenses layout and
then you need to get to the new Assign Expenses layout—via a button, perhaps. Once you're
Search WWH ::




Custom Search