Field Behavior

The Field/Control Setup dialog box controls how a field looks and works. FileMaker has another dialog box, called the Field Behavior dialog box, that also influences how a field works, but in a different way. This time, you get to decide when (if ever) a person should be allowed to click the field, and how it handles certain special keystrokes. The Format images/U2192.jpg border=0> Field Behavior command shows this dialog box, and so does Figure 6-15.

Figure 6-15. By "behavior," FileMaker means four things: Can you click the field? What happens when you do? How do you type into the field? And what do the special keys (Tab, Return, and Enter) do when in the field?

 

6.3.1. Field Entry

Sometimes you want to show a field value, but you don't want any one changing it. If that's your fancy, select the field in Layout mode and choose Format Field Behavior. Then simply turn off the "In Browse mode checkbox (next to "Allow field to be entered";).

Just because you don't want this field being modified on this layout doesn't mean you don't want to use it in a find request. If you leave "In Find mode" turned on, your users can still type into the field in Find mode. If you don't want that either, turn off "In Find mode." If you want to let people modify a field but not search in it, then turn on "In Browse mode" and turn off "In Find mode." For example, turn off Find if the field isn't indexed (Section 3.3.4.2) and you don't want people stuck with slow finds.

6.3.2. Select Entire Contents of Field on Entry

If a field is formatted as an Edit Box or pop-up list, folks can click it to type a value. Normally, when they first click the field, a flashing insertion point marks the spot they clicked. If you prefer, you can instead have the field start out with all its content selected. For example, if the First Name field contains "Stacey," a single click on the "c" selects the entire name. To get this behavior, turn on "Select entire contents of field on entry."

6.3.3. Input Method

Unless you work for the UN, you probably never use the "Set input method" setting, but for the sake of completeness here's what it does:

In some languages, entering text isn't as simple as in English. For example, Japanese has many more characters than fit comfortably on a keyboard. To get the job done, a Japanese typist must use an input methodthe set of rules and software interfaces used to get text into the computer. Unfortunately there isn't just one method, and FileMaker lets you pick which one you want. Normally, the "Synchronize with field's font" option is selected. This option just means FileMaker automatically picks the input method based on the font you've selected. If you want to override this behavior and specify a hard-coded input method, turn on this checkbox and, from the pop-up menu, choose the input method.

UP TO SPEED
Borders Between Repeating Values

While you've got repeating fields on the brain, there's one more formatting choice worth talking about. You can put a border Section 4.4.8.1 around a repeating field just like any other field. But this border goes around the entire set of fields, not each individual repetition. You wind up with what looks like one big field, and it can be a surprise when you click it and discover those repetitions. Wouldn't it be nicer if you could format those repeating fields to look like a nice clear table, as shown here?

Nicer, yes. And possible too. Just select the repeating field in Layout mode and visit the Format Field Borders window. If you look at this dialog box with a repeating field selected, you have one additional option: "Between repeating values." When this checkbox is turned on, you get your borderline different color, pattern, and thickness to these lines if you want. For example, you can put a dark black border around the whole thing, and a paler gray line between each repetition if that suits you.

 

6.3.4. Go To Next Field Using

Way back in Chapter 1 you learned to use the Tab key to move from field to field (Section 1.5.3). It turns out you can actually change this behavior too: You can designate the Tab key, Return key, or Enter key to jump to the next field. You can select any combination of these three keys, including none of them.


Note: When one of these keys isn't assigned to go to the next field, its more normal behavior takes over: the Tab key inserts a tab into the field; the Return key inserts a new line into the field; and the Enter key exits the record.


You might want to change these settings for two reasons. First, if you have a field that often needs tabs typed into it (like a field that holds an ingredient listquantity [Tab] unit [Tab] ingredient [Return]…), it can be annoying to have to press Ctrl+Tab (Option-Tab) all the time. You can turn off "Tab key" in the Field Behavior dialog box and make typing tabs easier. Since field behaviors are set for each field, you can give the Ingredients field this behavior, and keep the normal tabbing behavior for all the other fields on the layout.

The second reason comes down to the fact that humans are funny creatures. People are smart enough to put a man on the moon, but for some reason they hate to learn new ways to work. If you're creating a database for people whose old computer system used, for example, the Enter key to move between fields, you might decide to make FileMaker mimic that behavior to give their brains a break.

Part I: Introduction to FileMaker Pro

Your First Database

Organizing and Editing Records

Building a New Database

Part II: Layout Basics

Layout Basics

Creating Layouts

Advanced Layouts and Reports

Part III: Multiple Tables and Relationships

Multiple Tables and Relationships

Advanced Relationship Techniques

Part IV: Calculations

Introduction to Calculations

Calculations and Data Types

Advanced Calculations

Extending Calculations

Part V: Scripting

Scripting Basics

Script Steps

Advanced Scripting

Part VI: Security and Integration

Security

Exporting and Importing

Sharing Your Database

Developer Utilities

Part VII: Appendixes

Appendix A. Getting Help



FileMaker Pro 8. The Missing Manual
FileMaker Pro 8: The Missing Manual
ISBN: 0596005792
EAN: 2147483647
Year: 2004
Pages: 176

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net