Tải bản đầy đủ (.pdf) (92 trang)

filemaker pro 11 the missing manual phần 1 pot

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (16.16 MB, 92 trang )

FileMaker Pro 11
THE MISSING MANUAL
The book that
should have been
in the box
®ˇ

FileMaker Pro 11
Beijing  

  Cambridge  

  Farnham  

  Köln  

  Sebas topol  

  Taipei  

  Tokyo
Susan Prosser and Stuart Gripman
FileMaker Pro 11: The Missing Manual
by Susan Prosser and Stuart Gripman
Copyright © 2010 Susan Prosser and Stuart Gripman. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly Media books may be purchased for educational, business, or sales promotional use.
Online editions are also available for most titles: safari.oreilly.com. For more information,


contact our corporate/institutional sales department: 800-998-9938 or
Printing History:
June 2010: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, the O’Reilly logo, and “The book that
should have been in the box” are registered trademarks of O’Reilly Media, Inc. FileMaker Pro
11: The Missing Manual, The Missing Manual logo, Pogue Press, and the Pogue Press logo are
trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc.
was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and
authors assume no responsibility for errors or omissions, or for damages resulting from the use
of the information contained herein.
ISBN: 978-1-449-38259-9
[M]
v
Table of Contents
The Missing Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Part One: Getting Started with FileMaker
Chapter 1: Working with a Database . . . . . . . . . . . . . . . . . . 15
A Very Quick Database Tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Content Area
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Scroll Bars
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Zoom Controls
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Understanding Modes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Opening and Closing Database Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Opening a Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Closing a Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Adding Data to Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Creating a Record
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Entering Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Fields for Lots of Text
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Deleting Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Understanding Browse Mode Error Messages
. . . . . . . . . . . . . . . . . . . . . . 29
Navigating Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Navigating Record by Record
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Keyboard Shortcuts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Finding Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Performing a Find
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Understanding Find Mode Error Messages
. . . . . . . . . . . . . . . . . . . . . . . 35

Sorting Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Understanding Sorting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Beyond the Simple Sort
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Multiple Sort Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
vi
  
Same Database, Different Views
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Viewing a List
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Viewing a Table
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Creating a New Window
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Hiding Windows
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Automatically Arranging Windows
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Saving Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Saving a Copy of Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Saving a Clone of Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using FileMaker’s Help Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Chapter 2: Organizing and Editing Records . . . . . . . . . . . . . 49
Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Form View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
List View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Advanced Find Techniques
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Modify Last Find
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Multiple Requests
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Finding by Omitting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Constraining and Extending the Found Set
. . . . . . . . . . . . . . . . . . . . . . . 59
Refining Searches with Find Operators
. . . . . . . . . . . . . . . . . . . . . . . . . 61
Using the Find Pop-up Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Editing What’s in Your Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Drag-and-drop Editing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Using the Replace Command
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Find and Replace
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Changing Text Appearance
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Text Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Paragraph Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
The Text Ruler
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Formatting Tabs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Checking Spelling
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Spell Checking with Menu Commands
. . . . . . . . . . . . . . . . . . . . . . . . . 80
Spell Checking As You Type
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Managing Spelling Dictionaries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Preview Mode and Printing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Part Two: Building Your First Database
Chapter 3: Creating a Custom Database . . . . . . . . . . . . . . . 89
Creating a New Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Creating and Managing Fields in Table View
. . . . . . . . . . . . . . . . . . . . . . . . . 91
Creating Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Managing Field Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
vii

  
Creating Records in Table View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Inserting a File into a Container Field
. . . . . . . . . . . . . . . . . . . . . . . . . . 95
Exporting Field Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Inserting a File Using QuickTime
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Understanding Layouts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
The Layout Bar
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
The Layout Status Toolbar and Layout Mode
. . . . . . . . . . . . . . . . . . . . . . 99
Layout Objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Customizing a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Editing Text Objects and Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Using the Inspector
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Inserting a Picture on a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Adding Lines and Shapes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Formatting Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Customizing a Layout’s Body Part

. . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Creating a New Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
The Format Painter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Making Two Layouts Match
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Arrange and Align Tools
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Chapter 4: Adding Power to Your Database . . . . . . . . . . . . . 131
Creating a Simple Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Creating Fields with Manage➝Database
. . . . . . . . . . . . . . . . . . . . . . . 132
Adding New Fields to a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Creating a Related Table
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Understanding the Elements of a Relationship
. . . . . . . . . . . . . . . . . . . . 137
Creating a Key Field with an Auto-Enter Serial Number
. . . . . . . . . . . . . . . . 137
Creating a New Table
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Creating a Relationship Between Two Table Occurrences
. . . . . . . . . . . . . . . 143
Creating and Using Portals
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Adding a Portal to a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Resizing and Moving a Portal

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Context
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Creating Records Through a Portal
. . . . . . . . . . . . . . . . . . . . . . . . . . 151
Editing Records Through a Portal
. . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Performing Finds with Related Data
. . . . . . . . . . . . . . . . . . . . . . . . . . 154
Using Tab Controls
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Creating a Tab Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Editing Tab Controls
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Deleting a Tab Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Adding Merge Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Using Symbols to Show Important Info
. . . . . . . . . . . . . . . . . . . . . . . . 162
Writing a Basic Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Creating a Sort Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Creating a Button
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Applying a Script Trigger
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
viii

  
Creating a Dynamic Report with the Assistant
. . . . . . . . . . . . . . . . . . . . . . . 168
Creating a Trailing Group Report
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Changing the Default Account
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Summing Up
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Part Three: Thinking Like a Developer
Chapter 5: Creating and Managing a Relational Database . . . . 181
Understanding Relational Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Modeling Your Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Choosing Entities
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Finding Relationships
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
The Entity-Relationship Diagram
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Keys
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Join Tables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Creating a Relational Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Creating Relationships
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Sorting a Relationship
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

Managing the Relationships Graph
. . . . . . . . . . . . . . . . . . . . . . . . . . 207
Using Relational Database Power
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
One Table Occurrence, One Found Set
. . . . . . . . . . . . . . . . . . . . . . . . 212
Viewing Related Fields on a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . 214
Creating a Value List Based on a Related Field
. . . . . . . . . . . . . . . . . . . . 217
Lookups
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Creating Lookups
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Using a Relookup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Navigating Between Related Records
. . . . . . . . . . . . . . . . . . . . . . . . . 225
Reviewing Relationship Concepts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Bidirectionality
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Implicit Relationships in Action
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Chapter 6: Field Options . . . . . . . . . . . . . . . . . . . . . . . . 235
Understanding Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Text
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Number
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

Date
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Time
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Timestamp
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Container
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Summary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Auto-Enter Field Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Creation Values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Modification Values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Serial Number
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
ix
  
Value from Last Visited Record
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Calculated Value
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Looked-up Value
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

Validation Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Making Validation Stricter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Validation Requirements
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Storage Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Global Storage
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Repeating Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Indexing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Printing Field Definitions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Beyond Text: Container Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Pictures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
QuickTime
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Sound
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
File
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Chapter 7: Layout Tools . . . . . . . . . . . . . . . . . . . . . . . . . 269
Layout Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Parts in Form View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Parts in List View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Parts in Preview Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Part Setup Dialog Box
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
When to Use Each Type
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Arranging Parts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Layout Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Standard Form
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Table View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
List View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Report
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Blank Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Labels or Vertical Labels
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Envelope
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Renaming a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Setting Layout View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

Found Sets and Layouts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Layout Setup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Manage Layouts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
The Inspector’s Data Tab
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Field Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Advanced Field Controls
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Edit Box
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Drop-Down List
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Pop-Up Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Checkbox Set
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
x
  
Radio Button Set
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Drop-Down Calendar
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Auto-Complete
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Repetitions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

Display Data From
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Field Behavior
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Data Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Number Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Date Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Time Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Timestamp Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Graphic Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Buttons
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Creating Buttons with the Button Tool
. . . . . . . . . . . . . . . . . . . . . . . . . 317
Turning an Existing Layout Object into a Button
. . . . . . . . . . . . . . . . . . . . 319
Making a Button Not a Button
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Button Actions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Tab Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Customizing the Tab Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

Fixing the Tab Order in the People Database
. . . . . . . . . . . . . . . . . . . . . 324
Preserving the Automatic Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Merge Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Merge Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Tooltips
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Autoresizing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Autoresizing in List Layouts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Creating Layouts for Printing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Visualize the Result in Preview Mode
. . . . . . . . . . . . . . . . . . . . . . . . . 337
Print Margins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Columns
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Sliding Layout Objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Chapter 8: Understanding Calculations . . . . . . . . . . . . . . . 349
Understanding Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Creating a Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
The Structure of a Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

Using Fields in Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Using Constants in Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Using Operators in Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Expressions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Using a Related Field in a Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Understanding the Specify Calculation Dialog Box
. . . . . . . . . . . . . . . . . . . . . 370
Table occurrence context
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Field list
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Operators
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
xi
  
Function list
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Result Type
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Calculation Box
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Repetitions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

Changing the Standard Evaluation Behavior
. . . . . . . . . . . . . . . . . . . . . . 374
Auto-Enter Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Validate Data Entry with a Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Replacing Data Using a Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Comments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Chapter 9: More Calculations and Data Types . . . . . . . . . . . 383
Number Crunching Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Number Function Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Using Number Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Going Beyond Basic Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Reviewing the Data and New Business Rules
. . . . . . . . . . . . . . . . . . . . . 387
Planning the Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Constructing the Calculation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Text Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Text Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Text Formatting Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

Date and Time Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Math with Dates and Times
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Parsing Dates and Times
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Calculations that Create Dates and Times
. . . . . . . . . . . . . . . . . . . . . . . 408
Containers in Calculations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Calculations with Pictures, Sounds, Movies, and Files
. . . . . . . . . . . . . . . . . 410
Calculations with References
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Chapter 10: Understanding Scripts . . . . . . . . . . . . . . . . . . 413
Understanding Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Your First Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Preparing the Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Planning Your Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Creating Your Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Improving Your Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Shortcuts to the Edit Script Window
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
The Importance of the Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

When to Switch
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Running Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
The Scripts Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Buttons
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Script Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Performing Scripts When a File Is Opened and Closed
. . . . . . . . . . . . . . . . 431
Timer Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
xii
  
Organizing Your Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Creating Script Folders
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Creating Menu Separators
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Branching and Looping in Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Branching with If, Else If, Else, and End If
. . . . . . . . . . . . . . . . . . . . . . . 435
Testing Multiple Conditions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Looping
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

Script Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Creating a Simple Script Trigger
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Layout Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Object Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Chapter 11: Exploring Script Steps . . . . . . . . . . . . . . . . . . 455
Go to Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Go to Object
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Scripting for Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Navigating Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Editing Commands
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Selecting Text
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Editing Field Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
A Field Script in Action
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Other Steps That Work with Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Working with Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
Creating, Duplicating, and Deleting Records
. . . . . . . . . . . . . . . . . . . . . . 474

Navigating Among Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Opening, Reverting, and Committing Records
. . . . . . . . . . . . . . . . . . . . . 478
Copying Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Working with Portals
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Finding Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Performing People’s Find Requests
. . . . . . . . . . . . . . . . . . . . . . . . . . 484
Static Find Requests
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
Using a Variable to Create Dynamic Find Requests
. . . . . . . . . . . . . . . . . . 490
Constraining and Extending the Found Set
. . . . . . . . . . . . . . . . . . . . . . 493
Omitting Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Modify Last Find
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Sorting Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Sorting Records with an OnRecordLoad Trigger
. . . . . . . . . . . . . . . . . . . . 495
Working with Windows
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Creating Windows
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495

Bringing a Window to the Front
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Closing a Window
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Moving and Resizing Existing Windows
. . . . . . . . . . . . . . . . . . . . . . . . 499
Other Window-Related Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . 500
xiii
  
Working with Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Opening and Closing Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Save a Copy As
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Other File-Related Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Printing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Other Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Open URL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Dial Phone
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Set Web Viewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Execute SQL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505

Flush Cache to Disk
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Exit Application
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Part Four: Becoming a Power Developer
Chapter 12: Applying Developer Utilities . . . . . . . . . . . . . . 509
Copying and Pasting Database Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Importing Tables and Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Copying and Pasting Tables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Copying and Pasting Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
Copying Scripts and Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
Script Debugger
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Controlling Script Execution
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
Breakpoints
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Examining Errors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Pause on Error
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
The Call Stack
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Working with the Debugger Window
. . . . . . . . . . . . . . . . . . . . . . . . . 519
The Data Viewer

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
The Current Tab
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
The Watch Tab
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Disable Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
The Database Design Report
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
Generating the DDR
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
Using the DDR
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
Finding Broken Elements with the DDR
. . . . . . . . . . . . . . . . . . . . . . . . 530
Custom Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
Defining a Custom Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Editing Custom Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
Sharing Custom Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Custom Menus
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Editing a Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Creating a New Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Using Existing Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
xiv
  
Submenus
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
Removing a Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Installing Custom Menu Sets
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Developer Utilities
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Using the Developer Utilities
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
Delivering a Runtime Solution
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
File Maintenance
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
Chapter 13: Advanced Relationship Techniques . . . . . . . . . . 559
Advanced Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
Self-Join Relationships
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
Multiple Criteria Relationships
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Relationship Operators
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Portal Filtering
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Understanding Table Occurrences
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Table Occurrence Groups

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Listing the New Elements You’ll Need
. . . . . . . . . . . . . . . . . . . . . . . . . 576
Understanding Table Occurrence Groups
. . . . . . . . . . . . . . . . . . . . . . . 578
Creating a New Table Occurrence Group
. . . . . . . . . . . . . . . . . . . . . . . 581
Building the Assign Expenses Layout
. . . . . . . . . . . . . . . . . . . . . . . . . 584
Understanding Graph Arrangements
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Connecting Database Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Adding a Table Occurrence from Another File
. . . . . . . . . . . . . . . . . . . . . 591
Defining Data Sources Using a Path
. . . . . . . . . . . . . . . . . . . . . . . . . . 592
Using Multiple Relationship Techniques
. . . . . . . . . . . . . . . . . . . . . . . . . . 594
Creating the Invoice Finder Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . 595
Chapter 14: Reporting and Analysis . . . . . . . . . . . . . . . . . 601
Summary Fields and Sub-summary Parts . . . . . . . . . . . . . . . . . . . . . . . . . 601
Summary Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Other Summary Field Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Advanced Sub-summary Parts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Leading and Trailing Grand Summaries

. . . . . . . . . . . . . . . . . . . . . . . . 611
Sub-summary Parts and Printing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Web Viewer Objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Putting a Web Viewer on a Layout
. . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Web Viewer Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Conditional Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Conditional Formatting of Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Conditional Formatting of Text Objects
. . . . . . . . . . . . . . . . . . . . . . . . 620
Advanced Conditional Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Removing Conditional Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Basic Charting (Found Set Charts)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
Chart Formatting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
xv
  
Charting and Reports
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Picking the Right Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Choosing an Appropriate Layout Part

. . . . . . . . . . . . . . . . . . . . . . . . . 633
Using the Correct Sort Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Advanced Charting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Delimited Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Related Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Chapter 15: Advanced Calculations . . . . . . . . . . . . . . . . . . 643
Understanding Boolean Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
Using the Self Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
Using Storage Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
Understanding Stored and Unstored Calculation Fields
. . . . . . . . . . . . . . . . 648
Global Calculation Fields
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
Logical Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
Conditional Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
Constructing a Conditional Calculation
. . . . . . . . . . . . . . . . . . . . . . . . 656
The Let() Function and Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
Defining Calculation Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
The Life of a Variable

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
Nesting Let Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
Recursion
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
Step 1: Solve the First Case
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
Step 2: Assume Your Function Already Works, and Use It
. . . . . . . . . . . . . . . 665
Step 3: Find a Stopping Point
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
Plug-Ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
Installing Plug-ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Old and New Plug-ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Finding Plug-ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Creating Your Own Plug-ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Chapter 16: Advanced Scripting . . . . . . . . . . . . . . . . . . . . 673
Commenting Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Importing Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Communicating with Database Users
. . . . . . . . . . . . . . . . . . . . . . . . . . . 676
Showing a Simple Message
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
Asking a Simple Question

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
Organizing Complex Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
The Perform Script Script Step
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
Halt Script and Exit Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
Script Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
Script Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
Handling Errors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
The Set Error Capture Script Step
. . . . . . . . . . . . . . . . . . . . . . . . . . . 694
The Get ( LastError ) Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
The Allow User Abort Script Step
. . . . . . . . . . . . . . . . . . . . . . . . . . . 696
xvi
  
Advanced Script Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
Install OnTimer Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
Keystroke Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
Putting a Complex Script Together
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Planning the Script

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Considering Exceptions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
Creating Subscripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
Finishing the Subscripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
Testing Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
Part Five: Integration and Security
Chapter 17: Sharing Your Database . . . . . . . . . . . . . . . . . . 729
FileMaker Network Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
Setting Up a Host Computer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
Opening a Shared File
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
The Open Remote File Dialog Box
. . . . . . . . . . . . . . . . . . . . . . . . . . . 733
Sharing over the Internet
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
Turning on Web Sharing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
Connecting from a Web Browser
. . . . . . . . . . . . . . . . . . . . . . . . . . . 738
Custom Home Page
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
FileMaker Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
File Compatibility
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

Installing FileMaker Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
Administering FileMaker Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 747
Testing Your Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
Server Hardware
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
Chapter 18: Adding Security . . . . . . . . . . . . . . . . . . . . . . 761
How Security Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
Who Gets Access
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
What They Can Do
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
Privilege Sets
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
Understanding Privilege Sets
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
Understanding Individual Privileges
. . . . . . . . . . . . . . . . . . . . . . . . . . 765
Managing Accounts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
Adding a New Account
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
External Authentication
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
Extended Privileges
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
Creating an Extended Privilege
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788

Checking for an Extended Privilege
. . . . . . . . . . . . . . . . . . . . . . . . . . 789
Assigning Extended Privileges
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
Managing External File Access
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
xvii
  
Scripts and Security
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Detecting Privileges in a Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Handling Security Errors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
Running Scripts with Full Access Privileges
. . . . . . . . . . . . . . . . . . . . . . 795
Managing Security with Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
Chapter 19: Sharing Data with Other Systems . . . . . . . . . . . 799
Sharing Your Data with Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
Save/Send Records As
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
Snapshot Link
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
External SQL Sources
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
Setting Up ODBC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808
Connecting FileMaker to a SQL Data Source
. . . . . . . . . . . . . . . . . . . . . 812

Adding SQL Tables to a FileMaker Database
. . . . . . . . . . . . . . . . . . . . . . 814
Using SQL Tables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Exporting Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
Grouped Exports
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
Importing Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
Recurring Import
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830
Importing over Existing Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
Creating Tables on Import
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
Creating a New Database from an Import File
. . . . . . . . . . . . . . . . . . . . 836
Converting Older FileMaker Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . 837
Import Data Sources
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
File
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
Folder
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
Digital Camera
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
XML Data Source
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841

Bento Data Source
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
ODBC Data Sources
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
Importing and Exporting in a Script
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
Save Records Script Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
The Import Records Script Step
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
The Export Records Script Step
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
Part Six: Appendixes
Appendix A: Getting Help . . . . . . . . . . . . . . . . . . . . . . . . 851
Appendix B: FileMaker Error Codes . . . . . . . . . . . . . . . . . 863
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
xix
The Missing Credits
About the Authors
Susan Prosser (coauthor) saw FileMaker for the first time as a re-
porter, where the database ran the paper’s classified ads. That first
glimpse tempted her to a new career helping people organize and
manage their data. Susan’s first professional database is still used at
the US Fish & Wildlife Service nearly twenty years on. Since then,
Susan formed DBHQ (www.dbhq.net), which has used FileMaker to
help a semiconductor company manage legal documents, a financial advisor analyze
retirement programs, an NGO track providers of autism services to school districts,
a dart manufacturer track inventory/sales and a major bank track projections. One
of the first FileMaker Certified Developers, Susan has presented at FileMaker Dev-

Con and develops FileMaker training curricula. Susan tends her organic garden,
quilts, bakes sourdough bread, and tries to log 110+ miles per week on her bike.
Susan and husband Paul share their home with one semi-feral cat, one Vespa, and
eight bicycles. Send suggestions for achieving a balanced lifestyle or new names for
graph organization schemes to Follow prosserDBHQ on
twitter.
Stuart Gripman (coauthor) is a native of Akron, Ohio, who grew
up in suburban Orange County before migrating to San Francisco
to get out of the sun. After a two-year stint at FileMaker Inc. (née
Claris Corporation), he became Webmaster at StarNine Technolo-
gies. In 2000, Stuart founded Crooked Arm Consulting to provide
custom FileMaker databases for a wide variety of clientele. Crooked
Arm’s databases have since benefitted the U.S. space program, fine
The Missing Credits
xx
  
art patrons, system administrators, digital projection cinemas, vintners, oenophiles,
data recovery practitioners, architects, commercial artists, and a Grammy-winning
ensemble. Stuart enjoys spending time with his wife and son hiking, camping, cy-
cling, playing Legos, and baking snickerdoodles. Email:
Blog: .
About the Creative Team
Nan Barber (editor) is associate editor for the Missing Manual series. She lives in
Massachusetts with her husband and iMac. Email:
Adam Zaremba (production editor) recently received his M.A. from the Editorial
Institute at Boston University. He lives in Chestnut Hill, Mass., and would gladly pay
you Tuesday for a hamburger today.
Alison O’Byrne (copy editor) is a full-time freelance editor with over eight years ex-
perience specializing in corporate and government projects for international clients.
She lives with her family in Dublin, Ireland. Email: Web: www.

alhaus.com.
Christian Smith (technical reviewer) is a FileMaker 7/8/9/10 Certified Developer
and a member of FileMaker Business Alliance, FileMaker Technical Network, and
FMPug. Web: www.m3web.com.
Angela Howard (indexer) has been indexing for over 10 years, mostly for computer
books, but occasionally for books on other topics such as travel, alternative medi-
cine, and leopard geckos. She lives in California with her husband, daughter, and
two cats.
Acknowledgments
As usual, everyone at O’Reilly has been wonderful—special thanks to Angela How-
ard, Karen Shaner, and Alison O’Byrne. If there is any sanity in this book, it’s due to
Nan Barber, who excels at checking reality when things get tough. Tech reviewers
often do thankless work under incredible deadlines. I can’t change the deadline part,
but want to thank Christian Smith. Your thoughtful comments helped us make the
book better. Stuart, our collaboration was everything I hoped it would be. We must
agree to partake in adult beverages at DevCon and speak about the glamorous lives
of famous authors. Do we know any? Jamie, Joe, Krys, Erich, Chanelle and Paul:
Without my weekly meetings with you amazing, creative people I would be a puddle
of dripping goo by now. Paul: You put up with much, my good man. Thank you,
dear. Marlowe: I miss you every day, darling parrot.
—Susan Prosser
I wish to express most sincere thanks to my coauthor Susan Prosser. I appreciate
your leap of faith in inviting me into this project, your guidance and patience as
I learned the process and most of all, the good humor that sustained me through
the challenges along the way. Many thanks also to editor Nan Barber for giving me
The Missing Credits
xxi
  
the latitude to write with my own voice and diplomatically applying her wisdom
when that voice needed some modulation. My thanks also to our technical reviewer

Christian Smith, and all the kind, hard-working folks at O’Reilly—Alison O’Byrne,
Angela Howard, and Karen Shaner in particular. Thank you David Pogue, not only
for the Missing Manual series, but also for being so nice to me the last time we spoke
(in 1997 when you called for FileMaker tech support and I was the agent who as-
sisted you). I’m also deeply grateful to my parents Floyd and Sally, my sisters, and my
entire extended family for your support and enthusiasm. And most of all my beloved
wife, Jen, and our boy, Benjamin. Thank you for your sustaining support, love, and
patience. Benny, I love the robot you made for me. Thanks, Buddy.
—Stuart Gripman
The Missing Manual Series
Missing Manuals are witty, superbly written guides to computer products that don’t
come with printed manuals (which is just about all of them). Each book features a
handcrafted index; cross-references to specific pages (not just chapters); and Rep-
Kover, a detached-spine binding that lets the book lie perfectly flat without the as-
sistance of weights or cinder blocks.
Recent and upcoming titles include:
Access 2007: The Missing Manual by Matthew MacDonald
Access 2010: The Missing Manual by Matthew MacDonald
Buying a Home: The Missing Manual by Nancy Conner
CSS: The Missing Manual, Second Edition, by David Sawyer McFarland
Creating a Web Site: The Missing Manual, Second Edition, by Matthew MacDonald
David Pogue’s Digital Photography: The Missing Manual by David Pogue
Dreamweaver CS4: The Missing Manual by David Sawyer McFarland
Dreamweaver CS5: The Missing Manual by David Sawyer McFarland
Excel 2007: The Missing Manual by Matthew MacDonald
Excel 2010: The Missing Manual by Matthew MacDonald
Facebook: The Missing Manual, Second Edition by E.A. Vander Veer
FileMaker Pro 10: The Missing Manual by Susan Prosser and Geoff Coffey
Flash CS4: The Missing Manual by Chris Grover with E.A. Vander Veer
Flash CS5: The Missing Manual by Chris Grover

Google Apps: The Missing Manual by Nancy Conner
The Internet: The Missing Manual by David Pogue and J.D. Biersdorfer
The Missing Credits
xxii
  
iMovie ’08 & iDVD: The Missing Manual by David Pogue
iMovie ’09 & iDVD: The Missing Manual by David Pogue and Aaron Miller
iPad: The Missing Manual by J.D. Biersdorfer and David Pogue
iPhone: The Missing Manual, Second Edition by David Pogue
iPhone App Development: The Missing Manual by Craig Hockenberry
iPhoto ’08: The Missing Manual by David Pogue
iPhoto ’09: The Missing Manual by David Pogue and J.D. Biersdorfer
iPod: The Missing Manual, Eigth Edition by J.D. Biersdorfer and David Pogue
JavaScript: The Missing Manual by David Sawyer McFarland
Living Green: The Missing Manual by Nancy Conner
Mac OS X: The Missing Manual, Leopard Edition by David Pogue
Mac OS X Snow Leopard: The Missing Manual by David Pogue
Microsoft Project 2007: The Missing Manual by Bonnie Biafore
Microsoft Project 2010: The Missing Manual by Bonnie Biafore
Netbooks: The Missing Manual by J.D. Biersdorfer
Office 2007: The Missing Manual by Chris Grover, Matthew MacDonald, and E.A.
Vander Veer
Office 2010: The Missing Manual by Nancy Connor, Chris Grover, and Matthew
MacDonald
Office 2008 for Macintosh: The Missing Manual by Jim Elferdink
Palm Pre: The Missing Manual by Ed Baig
PCs: The Missing Manual by Andy Rathbone
Personal Investing: The Missing Manual by Bonnie Biafore
Photoshop CS4: The Missing Manual by Lesa Snider
Photoshop CS5: The Missing Manual by Lesa Snider

Photoshop Elements 7: The Missing Manual by Barbara Brundage
Photoshop Elements 8 for Mac: The Missing Manual by Barbara Brundage
Photoshop Elements 8 for Windows: The Missing Manual by Barbara Brundage
PowerPoint 2007: The Missing Manual by E.A. Vander Veer
Premiere Elements 8: The Missing Manual by Chris Grover
QuickBase: The Missing Manual by Nancy Conner
The Missing Credits
xxiii
  
QuickBooks 2010: The Missing Manual by Bonnie Biafore
QuickBooks 2011: The Missing Manual by Bonnie Biafore
Quicken 2009: The Missing Manual by Bonnie Biafore
Switching to the Mac: The Missing Manual, Leopard Edition by David Pogue
Switching to the Mac: The Missing Manual, Snow Leopard Edition by David Pogue
Wikipedia: The Missing Manual by John Broughton
Windows XP Home Edition: The Missing Manual, Second Edition by David Pogue
Windows XP Pro: The Missing Manual, Second Edition by David Pogue, Craig
Zacker, and Linda Zacker
Windows Vista: The Missing Manual by David Pogue
Windows 7: The Missing Manual by David Pogue
Word 2007: The Missing Manual by Chris Grover
Your Body: The Missing Manual by Matthew MacDonald
Your Brain: The Missing Manual by Matthew MacDonald
Your Money: The Missing Manual by J.D. Roth

×