Flylib.com

Books Software

 
 
 

set Validation options


set Validation options

The default settings for a new field are to check for errors only during data entry and to allow the user to override (ignore) validation warnings. Such settings are usually appropriate only when no validation criteria have been set for a field.

For every field in the table on page 17 with one or more settings in the Validation column, remove the check mark from "Allow user to override during data entry." Doing so ensures that the validation criteria will be enforced.

For the Account Type and Description fields, click the Always radio buttoncausing these critical fields to constantly be checked for invalid data.

Strict data type, Required, Unique . These and other validation criteria are set in the Require section of the Validation tab.

Because Number fields are often used in formulas, enabling this option ensures that all data will consist only of valid numbers .

Account Type and Description are critical fields. To make them required fields, click the Not empty check box. You set this option for any database field thatif left emptywould render a record useless.

Click the Unique value check box for these fields: Bond_Serial #, CD_Certificate, Description, and Sav_Savings Account. Setting this option prevents duplicates from being allowed.



set Storage options

Indexing is the only Storage option we'll apply to fields. When an index is created for a field, FileMaker continuously tracks the field's contents for all records and maintains a sorted list of those contents. Sorts and Finds performed on indexed fields are substantially faster than on non-indexed fields, especially when a database has many records.

On the Storage tab of the Options dialog box, set Indexing to All for the Description field.

By default, FileMaker automatically creates indexes for fields when they're needed. You'll note that indexing has already been set to Minimal for fields to which you've applied the Unique validation option, for example. To force an index to be maintained for a field, you can click the Minimal or All radio button.

Strictly speaking, since this database is unlikely to contain hundreds or thousands of records, we could safely ignore indexing. It's discussed here mainly so you'll have experience using the feature.



about the default layout

Now that the initial fields have been defined and you've set options for them, click OK to close the Define Database dialog box. FileMaker generates a default layout for the database, placing all defined fields in a single vertical column. The field names are used as labels for the fields. If all you wanted was a quick-and-dirty database, you could start entering data immediately. Or you could clean up the layout slightly by rearranging fields, removing unnecessary ones, and editing labels to make them more descriptive.

Investment Minder, however, will be an attractive, easy to use, highly functional database. Rather than use the default layout, we will create custom layouts that better serve our needs. As explained in Chapter 1, you can make as many layouts as you like, each for a different purpose. We'll create these custom layouts in the chapters that follow.



extra bits

make a new database p. 10

  • When naming and saving a new database, the Windows and Mac file dialog boxes are different. Other dialog boxes may also be slightly different, although they will usually contain the same options.

  • It's only critical to include the .fp7 file extension if you're a Windows user .

  • As you can see, you can use either FileMaker Pro or FileMaker Pro Advanced to create databases.


create Text fields p. 12

  • You'll note that after creating each field, the field type defaults to Text (the last type selected) and the name of the last field created is highlighted. When you start to type a new name, the previous name is replaced . Thus, to quickly create each new Text field, you can just type its name and press / . (The keypress is equivalent to clicking Create, the default button.)

  • Don't worry if you make mistakes while defining fields. To change a field's name or type, select it in the Define Database's field list, make the change, and then click the Change button.

  • If you exit the dialog box before creating all the fields, you can return to the Define Database dialog box by choosing File > Define Database.

  • Because similar information will be gathered for each investment type (such as an account number and amount invested), I created a naming convention to make it easy to tell one investment's fields from the others. Stock fields are preceded by Stk_, for example.


create Number fields p. 13

  • Since data in Number fields can be entered using any combination of digits, a decimal, and a sign (+ or -), you're probably wondering why we didn't set a format for the fields. It's because formatting is specified as part of a layoutnot as part of a field definition. Field formatting is discussed in Chapter 3 and later chapters.


set Validation options p. 19

  • The reason that Stk_Account Number wasn't also set as Unique is because multiple stocks can be held in a single brokerage account.