7 FileMaker Power Moves

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

FileMaker Pro 7 has quickly become a boon and a bane for FileMaker aficionados, users, and developers—a boon because of its hundreds of new features, and a bane because even the most-experienced developers are finding that they are once again novices.

Instead of spending hours slogging your way through white papers, tech briefs, user manuals, and complete reference handbooks to master the interesting new features in FileMaker Pro ($299) (see Best Current Price ), here are seven powerful ways to take advantage of them right now.

1. Help Others Decipher Your Code

If you get run over by a VW Beetle—and let’s hope you don’t—and end up out of commission for a few months, you want your stand-in to be able to understand your code. FileMaker Pro 7 allows you to add comments that explain, in minute detail, how the database works.

While you have been able to add comments to scripts for some time, you can now add them to field definitions and calculation formulas as well. To add a comment to a field, simply write the comment in the Comment box (below the Field Name box) when you define the field. You can view these comments by going to File: Define: Database, clicking on the Fields tab, and toggling the Options/Comments column until the comments are visible.

In calculation-field definitions, you can turn any line of code into a comment by typing

at its start. This is useful both for explaining how a calculation formula works and for turning off parts of the formula temporarily while testing it.

2. Manage Data with Container Fields

Container fields have always been handy places to add nontextual data—company logos, audio notes, and dancing-baby videos—to a database. Using nothing but FileMaker Pro containers, companies have built vast audio and visual archives, even entire online museums and product catalogs.

Now, with FileMaker Pro’s new superpowered container fields, you can store almost any type of file in a container field. So you don’t have to manage documents related to each customer in a separate folder on the network. You can simply drop those documents right into a record.

TIP: You can also store FileMaker layouts in container fields. Try it: Go into Layout mode, select and copy all layout objects, go back into Browse mode, and paste them into a container field. Then copy the contents of the container onto a new blank layout (one that references the same table occurrence). You can do this to share layout objects with other developers and users on your network. It’s a great way to replicate layout objects rapidly.

3. Make Data Entry Goof-Proof

Getting users to enter data in the same way every time is no simple task. For instance, how many ways can you think of to type phone numbers (with hyphens, with brackets, with slashes, in different countries)?

Now you can standardize entries by creating a simple autoenter calculation, found in the Auto-Enter Options dialog box in a data-entry field’s definition. (Don’t forget to deselect the new Do Not Replace Existing Value Of Field [If Any] option. If it’s selected, FileMaker will reapply formatting each time a user edits the field.) For instance, you can ensure that a phone number is always reformatted to appear in the familiar North American 123-456-7890 format, no matter what the user types. Download an example file to see how to set this up.

4. Try New Text-Formatting Functions

Have you ever wanted to control the color, style, and font of a field’s contents dynamically? For instance, wouldn’t it be great if the text in your project-management database’s Status field turned bold and red when the due date had passed? With FileMaker’s new text-formatting functions, you can.

You can also use text-style functions to make key words or phrases stand out in a field containing a large block of text. For instance, if you attach the Auto-Enter calculation field

Substitute ( TextField; "Steve Jobs" ; TextStyleAdd ( "Steve Jobs"; Bold ))
to the field named TextField, all instances of Steve Jobs in that field will appear in bold.

Other new text-style functions let you control text color, font, style, and size. And you can use still more text-formatting functions to remove text styles.

5. Make Magic with Multiple Windows

FileMaker no longer limits you to viewing one layout in any particular table at a time. Say you want to search your Invoices table to find all orders from Indiana. Easy enough. But what if you want to see all orders from Indiana and all orders from Florida side-by-side?

In previous versions of FileMaker, this required loads of workarounds on the developer’s part. Now you can just do your initial search and select New Window from the Window menu. You’re free to run a completely different query on the Invoices table and compare the found sets in separate windows.

TIP: You can also call up a new window to perform multiple scripted actions across multiple files and tables off screen (for example, when you set the window’s position to a negative number such as -1,000). Another good use of new windows is to create custom pop-up dialog boxes by adding the New Window step to a script.

6. Use Script Parameters to Streamline Code

Script parameters let you dramatically reduce the number of lines of ScriptMaker code you write. A script parameter is basically a bit of data that a button can send into a script. Let’s say you have 20 navigation buttons and corresponding scripts, all identical except that each brings the user to a different layout. In FileMaker 7, you can instead have every button pass the identity of the destination layout to the script as a script parameter. The script then uses the Go To Layout script step but specifies the identity of the layout by calculation—that is, it defines the calculation simply as


TIP: The parent script can pass script parameters to subscripts. Also, you can pass multiple bits of data into a script by separating them in the parameter’s definition with separators such as the pipe (

) character. For example, passing the current time and date into a script inside a script parameter might look like this:
. Later, use the Middle function to unpack one script parameter (for example, the date but not the time) so you can use it.

7. Organize the Relationship Graph

FileMaker Pro 7 radically changes the way you build databases’ relationships. The key is the Relationships graph, which displays relationships visually. But if you’ve upgraded any databases—especially very complex ones with lots of relationships—you may find that the Relationships graph looks like a plate of spaghetti.

There are two things you can do to untangle it. First, always include in the name of each table occurrence a meaningful abbreviation of the table to which it refers. For instance, all table occurrences that refer to the Customers table could begin with the word Customers, or an abbreviation of it, as in Cust_Detail or Cust_SelfJoinByState. Second, use the color tool to colorize and visually associate table occurrences into meaningful groups.

Change Is Good

FileMaker Pro 7 has sent us all back to school, but the program’s new abilities make the effort worthwhile. Keep at it, and you’ll be an expert again in no time.

[ Chris Kubica is the president of custom-application developer Application Architects. ]

Use a simple naming convention and color-coding scheme to tame the chaos of FileMaker Pro 7’s Relationships graph.
1 2 Page 1
Page 1 of 2
Shop Tech Products at Amazon