I haven't used other databases; but, from what I've heard, FileMaker has the easiest Layout tools by far. It takes very little time to take a bunch of data, such as a tabbed-text file (see last month's column) and turn it into a usable and visually-pleasing DB.
Of course, first you have to create the field definitions. In most cases that's pretty straightforward. The main thing is to be sure that you have the type chosen properly for your data, ie. Text, Number, Date, etc.. The Options can get a bit complicated; I'll go into that in a later article. I'm in a Layout kind of mode right now :-)
There are a few ways to create Layouts, and a few tricks to speed things up. Upon creating a new layout, when in Layout Mode, it's good to choose the right kind; Columnar, Page, Envelope, etc.. I usually choose Blank, so I can do whatever I want.
Dragging a Field over from the Tool Bar is a way to get started. A dialog box asks what field it should be. You choose any field, in either that DB file, or any related DB file.
[I'm afraid I'll have to go into relationships later as well. Basically it means that if one thing exists in one file, and the same thing exists in another file (ID#'s usually), they can be linked, so that any field that is in the same record can appear or be used in calculations in either file.]
Now, once you've got a field on the layout, you have to decide where to put it. Generally, there are three layout parts on a Browse layout; Header, Body and Footer. Each has its uses. I use the Header and Footer for things that stay pretty much the same, or at least stay the same for a named group of Records. (We're talking about List View layouts here. For Form view layouts, you really only need the Body part; just delete the others.)
An example of the first case would be Buttons. It's good to put your groups of buttons in about the same place on different layouts, to cut down on confusion. I put them mostly in the footer, where they're less distracting. But they could be in the Header instead. There's no set rules; use your own judgement, but keep it consistent within one solution (a group of files that work together).
In the Header I put things like the title of the layout, or the name of whatever group of records I'm looking at. Say, if I'm looking at a layout with fields holding data about one particular Job, I would put the Job Name field in the Header.
Another obvious use of headers is to hold the text labels of fields in columns. That way they only appear once at the top, with the records scrolling beneath them.
Most of the fields will go in the Body part. In List View (Select Menu), each record in the Body part will only take up as much room as you give it. If you only have narrow-height fields spread out horizontally, in a typical column layout, then pull the body tab up to the bottom of the fields. Your records will appear as horizontal lines, many to a page, much like a spreadsheet.
On the other hand, if you only want to see one record at a time, with lots of fields arranged on the whole screen, then choose View as Form.
In both cases the Header and Footer will still be the same.
You can create one of each kind of layout, and switch between them, to see either one record in detail, or a list of records, with only the most important fields showing.
OK, now that we've got a field on the layout. Let's make another. This is where FileMaker shines. If you want the new field to have the same layout as the first, there is a trick. Just hold the Command key and click on the first. You've just reset the defaults for all new fields. Just draw another.
If, on the other hand, you just want one more, and you want it to be the same size (changeable later), then click down on the first, start dragging and hold the Option key. If you hold the Shift key as well, movement will be constrained to either horizontal or vertical.
When you release the mouse, the Field dialog box will appear and ask you what field you want it to be. You can also change a field to another later by double-clicking on it.
It will also ask whether you want it to make a field label at the same time. That saves some time, if you want one. The field labels seem to follow the default formatting of the fields, with the difference that they are bold.
They're text objects, but they're smart, and will change to reflect a change in the name of the field. This can save ungodly amounts of time if it's a tabbed-text file conversion. All you have to do is name the fields in the Field Definitions, and the generic f1's, etc. will change to reflect your names.
Now for the real tricks.
Let's say that you paid little attention to fonts, sizes, etc. while you were sticking fields and labels in; you were just trying to get the darn thing to work. It finally did; but now it looks terrible. Don't worry, there are quick ways to fix things.
First of all, there are two ways to select all of any kind of object. Just click on one of them, then hit Option-Command-A. If it's a field, it will select all fields; if it's a text object, it will select all text objects. The other way is to select the tool in the Tool Bar and Command-A.
Once you have all that you want selected, there is an amazing trick to change them, a FileMaker special. If you have one that already has the formatting you want, hold the Control key and click on it, holding the mouse. A dialog box will drop down with all kinds of choices.
You can use this box to set all kinds of characteristics, and the changes will apply to all selected objects. The usual choice is the first, Text. Let go on this one and a dialog box will appear, with all the text choices, even color.
But there is even a faster way. If you Option-double click on the one with what you want, then the Text box will open. If you hit the Enter key at this point, all of the selected objects will acquire the characteristics of your chosen one; or you can make new choices.
You can also Option-double click on a field to change its number, date or time formatting, depending on its type.
To pick up speed, use the Command keys for other things as well.
| Cmd-Opt-B | Borders |
| Cmd-Opt-F | Field Formatting (which is all kinds of things, not text) |
| Cmd-Opt-T | Sliding/Printing (decide whether something prints, or moves up or left when printing) |
| Cmd-Shft-B | Bold (use Shift key, as just Cmd- does Modes) |
| Cmd-B | Browse mode |
| Cmd-L | Layout mode |
| Cmd-F | Find mode |
| Cmd-U | Preview (print view) |
| Cmd-S | Sort (FM saves automatically) |
| Text Alignment | |
| Cmd-[ | Left, Cmd-\ is center, Cmd-] is right (pretty intuitive) |
My last trick with Layouts is how to duplicate them. If it's in the same file, just choose Duplicate from the Mode Menu, when in Layout Mode. Then give it a new name with Layout Setup (same Menu).
If you want it in a different file, you should define which fields you want to be the same in the other file first. Then just Select All (Cmd-A) in the first file (in Layout Mode), Copy (Cmd-C), then Paste (Cmd-V) in a new blank layout in the destination file.
If you made the layout big enough, it will all be there. If you had one small thing (anything) exactly in the top left corner, then the pasted layout will be in the same place as the original.
Buttons can also be copied/pasted within the same file and across files; but, in the second case, you will have to double-click them to reassign operations (be sure to check this, because FM will assign them a script, but it won't often be right one); or recreate Scripts and Relationships, then reassign.
We'll have to get to all that later. See you then. Send comments, questions, toys to Fenton Jones