Auto-Enter Field Options

Regardless of their type, most fields are empty when you create a new record. Often, but not always, that's what you want—a completely blank slate into which you can type all the information pertinent to a record. But auto-enter options also put data into fields for you, saving time and reducing human error. Auto-enter options can also create things like serial numbers for a primary key (Keys) or store data about your records (Figure 6-2).

Note

If you don't see any options in the Fields tab of your Manage Database window, click the Options/Comments column heading. That toggles it between showing comments and showing options.

On the Options for Field dialog box's Auto-Enter tab, the first two auto-enter options (creation values and modification values) let you create and maintain metadata. Many developers find these fields so useful for peeking behind the scenes that they create primary key fields and the four metadata fields shown in Figure 6-2 in each table before they create any other fields.

Tip

Information about records, as opposed to information about the entities you base your tables on (Modeling Your Database) is called metadata. Metadata helps you do basic forensics on your database. For example, if there's a question about an Invoice, you can see at a glance who created it, and then ask the person to solve the mystery. Plus, when data entry folks know you're tracking this kind of metadata, they may start being more careful, since they know you can track their mistakes back to them.

Top: This layout shows four auto-enter fields that store information about who creates and/or modifies each record and when they do so.Bottom: The Manage Database window's field list shows auto-enter options in the Options/Comments column. The highlighted "modStamp" field tracks the date and time that any field on any record gets changed. In conjunction with the "modifier" field, you can figure out who's entered stuff into this record and when. The names of metadata fields in this table follow a naming convention of starting with a lower case letter, and then using an upper case letters instead of a space to indicate the start of a new word. Developers often name metadata fields that way to tell them apart from fields that store user-entered data. If you're not working with FileMaker Pro Advanced, you won't have the Copy and Paste buttons shown here. See page 512 to learn about FileMaker Pro Advanced's ability to copy and paste fields from one table to another.

Figure 6-2. Top: This layout shows four auto-enter fields that store information about who creates and/or modifies each record and when they do so. Bottom: The Manage Database window's field...