Database Reference
In-Depth Information
These problems arise because invoice data is transactional —an invoice represents a single
business transaction at one specific point in time. But your customer record doesn't represent
a single transaction with your customer: It represents an association you have with that cus-
tomer. If the association changes (the customer moves and you need to store a new address),
then your data should change accordingly. However, transactional data should never change
once the transaction is complete, since it has to serve as a record of what happened during
the transaction. Lookup fields solve the problem of saving transactional data.
While related fields automatically show new data, lookups use a semi-automatic approach. If
you change a customer record, it doesn't affect the fields in existing Invoice records at all.
But any new Invoice you create does get the updated data and you can change the data in a
field configured to Auto-Enter Lookup at any time—for a one-time address change, for ex-
ample. This semi-automatic approach to updating data turns out to be just the right thing for
transactional data like address fields on invoices: When you change the transaction record,
its fields update appropriately, but when you change source records (the address fields in
your customer record), FileMaker leaves the transaction alone.
Creating Lookups
To create a lookup, you define a field normally but add an auto-enter option called Looked-
up value . You can also add a lookup to an existing field. Simply click the field in the field list
and then click Options. The following steps explain how to create a new lookup field:
1. Choose File Manage Database and then, if necessary, click the Fields tab. Fin-
ally, from the Table pop-up menu, choose Invoices .
You see the fields in the Invoices table—and you're ready to add a new one. You start
by adding a lookup field for the customer's street address.
2. In the Field Name box, type Street Address , and make sure the Type pop-up
menu is set to Text. Click Create .
FileMaker adds the new field, but it's still just an ordinary field.
3. Click the Options button. In the Field Options dialog box, click the Auto-Enter
tab .
The Options dialog box appears. You'll create the lookup here.
4. Turn on the “Looked-up value” checkbox .
The Lookup dialog box appears ( Figure 5-20 ).
5. Make sure the “Starting with table” pop-up menu is set to Invoices .
Search WWH ::




Custom Search