Some data, like phone numbers or Social Security numbers, must always contain a fixed number of characters. But when users make simple errorslike adding hyphens in a phone numberthey often dont know that theyve done anything wrong. In the previous section, "Creating Field Masks," we showed you how to create a field mask to format a phone-number field. In order for the mask to work properly, the user must not enter more than 10 digits. This technique prevents such simple errors from taking place.
1 .Open a file with a phone-number field whose length you want to limit.
Well use the same file we worked with in "Creating Field Masks" (Figure 3.74).
2 .Choose File > Define > Database (Control+Shift+D/Command+Shift+D).
3 .When the Define Database dialog box appears, click the Field tab, then double-click the Phone field.
4 .When the Options dialog box appears, click the Validation tab.
5 .Check the "Maximum number of characters" check box and enter 10 in the box to the right (Figure 3.75).
6 .Uncheck the "Allow user to override during data entry" check box (Figure 3.76).
7 .If you want FileMaker to display a custom message when the user enters more than 10 characters, click the "Display custom message if validation fails" check box and type the message in the box below (Figure 3.77).
8 .Click OK twice to exit.
If the user enters more than 10 characters in the Phone field, FileMaker will display the alert message you entered in step 7 (Figure 3.78).
If youve created a very clever FileMaker database, you may want to reuse it for other projects. If you choose File > Save a Copy As and choose Clone > No Data, youll have a fresh copy of your database that you can rename. If you copy that clone to the FileMaker templates Folder (in the same folder as the FileMaker application), it will show up in the templates list when you choose File > New Database.
Many commands in FileMaker can be carried out without using a mouse. Here are some of the most useful.
Control/Command+B
Browse mode
Control/Command+L
Layout mode
Control/Command+F
Find mode
Control/Command+U
Preview mode
Shift+Control/Command+D
Define Database
Shift+Control/Command+F
Find & Replace
BROWSE MODE:
Control/Command+S
Sort
Control/Command+-
Insert current date
Control/Command+;
Insert current time
Control/Command+T
Omit record
Shift+Control/Command+T
Omit multiple records
LAYOUT MODE:
Control/Command+R
Group selected objects
Shift+Control/Command+R
Ungroup selected objects
Control+Alt?+/Command+Option+L
Lock selected objects
Shift+Alt?+Control/Command+Option+L
Unlock selected objects
Shift Control/Command+K
Set Alignment (dialog box)
Control/Command+K
Align selected objects