Learn FileMaker Pro 16 - Home - Springer978-1-4842-2863-0/1.pdf · Learn FileMaker Pro 16 ... 14...

41
Learn FileMaker Pro 16 The Comprehensive Guide to Building Custom Databases Mark Conway Munro

Transcript of Learn FileMaker Pro 16 - Home - Springer978-1-4842-2863-0/1.pdf · Learn FileMaker Pro 16 ... 14...

Learn FileMaker Pro 16The Comprehensive Guide to Building

Custom Databases

Mark Conway Munro

Learn FileMaker Pro 16: The Comprehensive Guide to Building Custom Databases

Mark Conway Munro Lewisburg, Pennsylvania, USA

ISBN-13 (pbk): 978-1-4842-2862-3 ISBN-13 (electronic): 978-1-4842-2863-0DOI 10.1007/978-1-4842-2863-0

Library of Congress Control Number: 2017950736

Copyright © 2017 by Mark Conway Munro

This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.

Cover image designed by Freepik

Managing Director: Welmoed SpahrEditorial Director: Todd GreenAcquisitions Editor: Aaron BlackDevelopment Editor: James MarkhamTechnical Reviewer: Brian SanchezCoordinating Editor: Jessica VakiliCompositor: SPi GlobalIndexer: SPi GlobalArtist: SPi Global

Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

For information on translations, please e-mail [email protected], or visit http://www.apress.com/ rights-permissions.

Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.

Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book's product page, located at www.apress.com/978-1-4842-2862-3. For more detailed information, please visit http://www.apress.com/source-code.

Printed on acid-free paper

iii

Contents at a Glance

About the Author �����������������������������������������������������������������������������������������������xxxvii

About the Technical Reviewer ����������������������������������������������������������������������������xxxix

Foreword ���������������������������������������������������������������������������������������������������������������� xli

Acknowledgments ������������������������������������������������������������������������������������������������ xliii

Introduction ������������������������������������������������������������������������������������������������������������xlv

■Part I: Using FileMaker ����������������������������������������������������������������������� 1

■Chapter 1: Introducing FileMaker �������������������������������������������������������������������������� 3

■Chapter 2: Exploring the Application ������������������������������������������������������������������� 19

■Chapter 3: Exploring a Database Window ����������������������������������������������������������� 45

■Chapter 4: Working with Records ������������������������������������������������������������������������ 61

■Chapter 5: Transferring Data ������������������������������������������������������������������������������� 99

■Part II: Defining Data Structures ����������������������������������������������������� 117

■Chapter 6: Working with Database Files ����������������������������������������������������������� 119

■Chapter 7: Working with Tables ������������������������������������������������������������������������� 155

■Chapter 8: Defining Fields ��������������������������������������������������������������������������������� 171

■Chapter 9: Connecting Tables with Relationships ��������������������������������������������� 203

■Chapter 10: Managing Containers ��������������������������������������������������������������������� 233

■Chapter 11: Managing Value Lists ��������������������������������������������������������������������� 243

■ Contents at a GlanCe

iv

■Part III: Writing Formulas and Using Functions ������������������������������ 255

■Chapter 12: Writing Formulas ��������������������������������������������������������������������������� 257

■Chapter 13: Text Functions �������������������������������������������������������������������������������� 291

■Chapter 14: Text Functions (JSON) �������������������������������������������������������������������� 313

■Chapter 15: Text Formatting Functions ������������������������������������������������������������� 321

■Chapter 16: Number Functions �������������������������������������������������������������������������� 327

■Chapter 17: Date, Time, and Timestamp Functions ������������������������������������������� 335

■Chapter 18: Container Functions ����������������������������������������������������������������������� 343

■Chapter 19: Aggregate, Summary, and Repeating Functions ���������������������������� 357

■Chapter 20: Financial and Trigonometric Functions ������������������������������������������ 379

■Chapter 21: Logical Functions ��������������������������������������������������������������������������� 385

■Chapter 22: Get Functions ��������������������������������������������������������������������������������� 401

■Chapter 23: Design Functions ���������������������������������������������������������������������������� 445

■Chapter 24: Mobile Functions ���������������������������������������������������������������������������� 457

■Chapter 25: Creating Custom Functions ������������������������������������������������������������ 461

■Chapter 26: Introducing ExecuteSQL ����������������������������������������������������������������� 477

■Part IV: Designing Interfaces ���������������������������������������������������������� 499

■Chapter 27: Introducing Layout Mode ��������������������������������������������������������������� 501

■Chapter 28: Getting Started with Layouts ��������������������������������������������������������� 519

■Chapter 29: Exploring Layout Palettes �������������������������������������������������������������� 559

■Chapter 30: Creating Layout Objects ����������������������������������������������������������������� 589

■Chapter 31: Manipulating Objects ��������������������������������������������������������������������� 661

■Chapter 32: Using Themes and Styles ��������������������������������������������������������������� 681

■Chapter 33: Customizing Menus ������������������������������������������������������������������������ 693

■ Contents at a GlanCe

v

■Part V: Automating Tasks with Scripts ������������������������������������������� 719

■Chapter 34: Introduction to Scripting ���������������������������������������������������������������� 721

■Chapter 35: Common Scripting Tasks ��������������������������������������������������������������� 749

■Chapter 36: Debugging Scripts �������������������������������������������������������������������������� 793

■Chapter 37: Using Script Triggers ��������������������������������������������������������������������� 801

■Chapter 38: Extending Features with Plugins ��������������������������������������������������� 815

■Part VI: Sharing and Networking ���������������������������������������������������� 819

■Chapter 39: Introducing Network Sharing ��������������������������������������������������������� 821

■Chapter 40: Securing Database Access ������������������������������������������������������������� 851

■Chapter 41: Advanced Sharing and Analysis Tools ������������������������������������������� 879

■Chapter 42: Getting Connected �������������������������������������������������������������������������� 895

Index ��������������������������������������������������������������������������������������������������������������������� 899

vii

Contents

About the Author �����������������������������������������������������������������������������������������������xxxvii

About the Technical Reviewer ����������������������������������������������������������������������������xxxix

Foreword ���������������������������������������������������������������������������������������������������������������� xli

Acknowledgments ������������������������������������������������������������������������������������������������ xliii

Introduction ������������������������������������������������������������������������������������������������������������xlv

■Part I: Using FileMaker ����������������������������������������������������������������������� 1

■Chapter 1: Introducing FileMaker �������������������������������������������������������������������������� 3

The History of FileMaker in a Nutshell ����������������������������������������������������������������������������� 3

Nashoba Nutshell ����������������������������������������������������������������������������������������������������������������������������������� 3

Early FileMaker ��������������������������������������������������������������������������������������������������������������������������������������� 4

FileMaker 4 ��������������������������������������������������������������������������������������������������������������������������������������������� 4

Claris������������������������������������������������������������������������������������������������������������������������������������������������������� 4

FileMaker Inc� ����������������������������������������������������������������������������������������������������������������������������������������� 4

Exploring Database Basics ����������������������������������������������������������������������������������������������� 5

Defining a Database ������������������������������������������������������������������������������������������������������������������������������� 5

Database Structure ��������������������������������������������������������������������������������������������������������������������������������� 6

Relational Databases ������������������������������������������������������������������������������������������������������������������������������ 7

User Interface ����������������������������������������������������������������������������������������������������������������������������������������� 7

Scripted Procedures ������������������������������������������������������������������������������������������������������������������������������� 8

Identifying Different Database Architectures ������������������������������������������������������������������� 8

The Traditional Multitier Database Architecture�������������������������������������������������������������������������������������� 9

FileMaker’s Integrated File Architecture ����������������������������������������������������������������������������������������������� 10

■ Contents

viii

Taking a Bird’s Eye Anatomical and Functional Overview ���������������������������������������������� 11

Application Resources �������������������������������������������������������������������������������������������������������������������������� 13

Database File Resources ���������������������������������������������������������������������������������������������������������������������� 13

The FileMaker Product Family ���������������������������������������������������������������������������������������� 14

FileMaker Pro ��������������������������������������������������������������������������������������������������������������������������������������� 15

FileMaker Pro Advanced ����������������������������������������������������������������������������������������������������������������������� 15

FileMaker Server ���������������������������������������������������������������������������������������������������������������������������������� 16

FileMaker Go ����������������������������������������������������������������������������������������������������������������������������������������� 16

FileMaker WebDirect ���������������������������������������������������������������������������������������������������������������������������� 17

Summary ������������������������������������������������������������������������������������������������������������������������ 17

■Chapter 2: Exploring the Application ������������������������������������������������������������������� 19

Installing and Launching FileMaker Pro ������������������������������������������������������������������������� 19

Launching the Installer ������������������������������������������������������������������������������������������������������������������������� 19

Running the Installation Process ���������������������������������������������������������������������������������������������������������� 20

Launching the Application �������������������������������������������������������������������������������������������������������������������� 21

Default Windows ������������������������������������������������������������������������������������������������������������ 21

Get Started Screen ������������������������������������������������������������������������������������������������������������������������������� 21

Launch Center �������������������������������������������������������������������������������������������������������������������������������������� 22

Application Preferences ������������������������������������������������������������������������������������������������� 23

General Settings ����������������������������������������������������������������������������������������������������������������������������������� 23

Layout Settings ������������������������������������������������������������������������������������������������������������������������������������� 25

Memory ������������������������������������������������������������������������������������������������������������������������������������������������ 26

Plug-Ins ������������������������������������������������������������������������������������������������������������������������������������������������ 26

Permitted Hosts ������������������������������������������������������������������������������������������������������������������������������������ 27

Default Menu Bar ����������������������������������������������������������������������������������������������������������� 28

The Application Menu ��������������������������������������������������������������������������������������������������������������������������� 29

File Menu ���������������������������������������������������������������������������������������������������������������������������������������������� 30

Edit Menu���������������������������������������������������������������������������������������������������������������������������������������������� 34

View Menu �������������������������������������������������������������������������������������������������������������������������������������������� 35

Insert Menu ������������������������������������������������������������������������������������������������������������������������������������������ 36

■ Contents

ix

Format Menu ���������������������������������������������������������������������������������������������������������������������������������������� 36

Records Menu ��������������������������������������������������������������������������������������������������������������������������������������� 37

Scripts Menu ���������������������������������������������������������������������������������������������������������������������������������������� 38

Tools Menu ������������������������������������������������������������������������������������������������������������������������������������������� 38

Window Menu ��������������������������������������������������������������������������������������������������������������������������������������� 39

Help Menu �������������������������������������������������������������������������������������������������������������������������������������������� 40

Contextual Menus ����������������������������������������������������������������������������������������������������������� 40

Contextual Menus for Fields ����������������������������������������������������������������������������������������������������������������� 42

Contextual Menus for Record Content Area ������������������������������������������������������������������������������������������ 42

Contextual Menus for Web Viewers ������������������������������������������������������������������������������������������������������ 42

Contextual Menus for Window Components ����������������������������������������������������������������������������������������� 43

Contextual Menus for Calculation Formulas ����������������������������������������������������������������������������������������� 43

Summary ������������������������������������������������������������������������������������������������������������������������ 43

■Chapter 3: Exploring a Database Window ����������������������������������������������������������� 45

Using a Starter Solution ������������������������������������������������������������������������������������������������� 45

Listing FileMaker’s Starter Solutions ���������������������������������������������������������������������������������������������������� 45

Creating a Database from a Starter Solution ���������������������������������������������������������������������������������������� 46

Defining the Database Window �������������������������������������������������������������������������������������� 47

Identifying Window Areas ��������������������������������������������������������������������������������������������������������������������� 47

Defining Window Modes ����������������������������������������������������������������������������������������������������������������������� 48

Defining Content Views ������������������������������������������������������������������������������������������������������������������������� 49

Exploring the Window Header ���������������������������������������������������������������������������������������� 49

Status Toolbar (Browse Mode) �������������������������������������������������������������������������������������������������������������� 50

Formatting Bar �������������������������������������������������������������������������������������������������������������������������������������� 54

Window Ruler ��������������������������������������������������������������������������������������������������������������������������������������� 55

Managing Multiple Windows ������������������������������������������������������������������������������������������ 56

Creating a New Window ����������������������������������������������������������������������������������������������������������������������� 56

Closing a Window ��������������������������������������������������������������������������������������������������������������������������������� 57

Selecting a Window from the Menu ������������������������������������������������������������������������������������������������������ 57

Hiding and Showing Windows �������������������������������������������������������������������������������������������������������������� 57

■ Contents

x

Opening an Existing Database ���������������������������������������������������������������������������������������� 58

Opening a Database through the Launch Center ���������������������������������������������������������������������������������� 59

Managing Favorite Databases �������������������������������������������������������������������������������������������������������������� 60

Summary ������������������������������������������������������������������������������������������������������������������������ 60

■Chapter 4: Working with Records ������������������������������������������������������������������������ 61

Entering Data ������������������������������������������������������������������������������������������������������������������ 61Opening a Record ��������������������������������������������������������������������������������������������������������������������������������� 61

Understanding Field Focus ������������������������������������������������������������������������������������������������������������������� 62

Moving to Another Field with Tab Order ������������������������������������������������������������������������������������������������ 62

Modifying Field Contents ���������������������������������������������������������������������������������������������������������������������� 63

Formatting Field Contents �������������������������������������������������������������������������������������������������������������������� 64

Closing a Record ����������������������������������������������������������������������������������������������������������������������������������� 64

Managing Records ��������������������������������������������������������������������������������������������������������� 65Creating a New Record ������������������������������������������������������������������������������������������������������������������������� 65

Deleting a Record ��������������������������������������������������������������������������������������������������������������������������������� 65

Deleting All Records ����������������������������������������������������������������������������������������������������������������������������� 66

Duplicating a Record ���������������������������������������������������������������������������������������������������������������������������� 66

Searching for Records ���������������������������������������������������������������������������������������������������� 67Performing Fast Searches �������������������������������������������������������������������������������������������������������������������� 67

Using Find Mode ����������������������������������������������������������������������������������������������������������������������������������� 70

Working with Found Sets ����������������������������������������������������������������������������������������������� 84Defining a Found Set ���������������������������������������������������������������������������������������������������������������������������� 84

Changing the Records in the Found Set ����������������������������������������������������������������������������������������������� 84

Sorting Records in the Found Set ��������������������������������������������������������������������������������������������������������� 85

Modifying Field Values for Records in the Found Set ��������������������������������������������������������������������������� 87

Find and Replace ���������������������������������������������������������������������������������������������������������������������������������� 90

Spell Checking �������������������������������������������������������������������������������������������������������������������������������������� 91

Printing ��������������������������������������������������������������������������������������������������������������������������� 93Page Setup ������������������������������������������������������������������������������������������������������������������������������������������� 93

Using Preview Mode ����������������������������������������������������������������������������������������������������������������������������� 93

Print Dialog Options ������������������������������������������������������������������������������������������������������������������������������ 96

Summary ������������������������������������������������������������������������������������������������������������������������ 97

■ Contents

xi

■Chapter 5: Transferring Data ������������������������������������������������������������������������������� 99

Importing and Exporting Records ����������������������������������������������������������������������������������� 99

Supported File Types �������������������������������������������������������������������������������������������������������������������������� 100

Downloading Sample Data ����������������������������������������������������������������������������������������������������������������� 100

Importing Records ������������������������������������������������������������������������������������������������������������������������������ 101

Exporting Records ������������������������������������������������������������������������������������������������������������������������������ 110

Exporting Field Contents ���������������������������������������������������������������������������������������������� 115

Summary ���������������������������������������������������������������������������������������������������������������������� 116

■Part II: Defining Data Structures ����������������������������������������������������� 117

■Chapter 6: Working with Database Files ����������������������������������������������������������� 119

Creating a New Database File �������������������������������������������������������������������������������������� 119

Configuring a Sandbox Table ���������������������������������������������������������������������������������������� 120

Changing the Default Table Name ������������������������������������������������������������������������������������������������������ 120

Creating Data Entry Fields ������������������������������������������������������������������������������������������������������������������ 121

Creating a Calculation Field ���������������������������������������������������������������������������������������������������������������� 123

Creating a Summary Field ������������������������������������������������������������������������������������������������������������������ 123

Setting Up Layouts������������������������������������������������������������������������������������������������������������������������������ 125

Database File Options �������������������������������������������������������������������������������������������������� 130

Open Settings ������������������������������������������������������������������������������������������������������������������������������������� 131

Icon Settings ��������������������������������������������������������������������������������������������������������������������������������������� 132

Spelling Settings ��������������������������������������������������������������������������������������������������������������������������������� 133

Text Settings ��������������������������������������������������������������������������������������������������������������������������������������� 133

Script Triggers Settings ���������������������������������������������������������������������������������������������������������������������� 135

Maintaining Healthy Files ��������������������������������������������������������������������������������������������� 135

Database Maintenance Functions ������������������������������������������������������������������������������������������������������ 135

Avoiding Design and Training Deficiencies ����������������������������������������������������������������������������������������� 140

Restraining File Size ��������������������������������������������������������������������������������������������������������������������������� 143

Understanding File Damage ��������������������������������������������������������������������������������������������������������������� 144

■ Contents

xii

Specifying File Paths ���������������������������������������������������������������������������������������������������� 147

Formatting Paths �������������������������������������������������������������������������������������������������������������������������������� 148

Building Dynamic Paths ���������������������������������������������������������������������������������������������������������������������� 152

Summary ���������������������������������������������������������������������������������������������������������������������� 153

■Chapter 7: Working with Tables ������������������������������������������������������������������������� 155

Modeling Tables ����������������������������������������������������������������������������������������������������������� 155

Introducing the Manage Database Dialog (Tables) ������������������������������������������������������� 156

Table Properties ���������������������������������������������������������������������������������������������������������������������������������� 157

Naming Tables �������������������������������������������������������������������������������������������������������������� 157

Managing Tables ���������������������������������������������������������������������������������������������������������� 159

Selecting Tables ���������������������������������������������������������������������������������������������������������������������������������� 159

Adding Tables ������������������������������������������������������������������������������������������������������������������������������������� 160

Modifying a Table Name ��������������������������������������������������������������������������������������������������������������������� 169

Deleting Tables ����������������������������������������������������������������������������������������������������������������������������������� 169

Summary ���������������������������������������������������������������������������������������������������������������������� 170

■Chapter 8: Defining Fields ��������������������������������������������������������������������������������� 171

Defining Field Data Types ��������������������������������������������������������������������������������������������� 172

Entry Fields ����������������������������������������������������������������������������������������������������������������������������������������� 172

Display Fields ������������������������������������������������������������������������������������������������������������������������������������� 176

Exploring Field Content Types �������������������������������������������������������������������������������������� 176

Introducing the Manage Database Dialog (Fields) �������������������������������������������������������� 177

Naming Fields �������������������������������������������������������������������������������������������������������������� 178

Highlighting the Visibility of Field Names ������������������������������������������������������������������������������������������� 178

Defining Standard Fields ���������������������������������������������������������������������������������������������� 179

Ideas for Standard Fields �������������������������������������������������������������������������������������������������������������������� 179

Naming Standard Fields ��������������������������������������������������������������������������������������������������������������������� 180

Managing Fields ����������������������������������������������������������������������������������������������������������� 182

Selecting Fields ���������������������������������������������������������������������������������������������������������������������������������� 182

Adding Fields �������������������������������������������������������������������������������������������������������������������������������������� 183

Modifying a Field Name ���������������������������������������������������������������������������������������������������������������������� 185

■ Contents

xiii

Modifying a Field Type ������������������������������������������������������������������������������������������������������������������������ 185

Deleting Fields ������������������������������������������������������������������������������������������������������������������������������������ 186

Setting Field Options ���������������������������������������������������������������������������������������������������� 186

Options for Entry Fields ���������������������������������������������������������������������������������������������������������������������� 187

Options for Display Fields ������������������������������������������������������������������������������������������������������������������� 196

Expanding the Learn FileMaker Object Model �������������������������������������������������������������� 199

Defining Standard Fields �������������������������������������������������������������������������������������������������������������������� 199

Defining Custom Fields ����������������������������������������������������������������������������������������������������������������������� 200

Summary ���������������������������������������������������������������������������������������������������������������������� 201

■Chapter 9: Connecting Tables with Relationships ��������������������������������������������� 203

Introducing Relationships ��������������������������������������������������������������������������������������������� 203

Defining Relationships ������������������������������������������������������������������������������������������������������������������������ 203

Defining Uses for Relationships ���������������������������������������������������������������������������������������������������������� 204

Defining Connection Types ����������������������������������������������������������������������������������������������������������������� 205

Organizing Relationships �������������������������������������������������������������������������������������������������������������������� 209

Planning the Learn FileMaker Relational Object Model ���������������������������������������������������������������������� 212

Managing Data Sources ����������������������������������������������������������������������������������������������� 212

Introducing the Manage External Data Sources Dialog ���������������������������������������������������������������������� 212

Exploring the Edit Data Source Dialog ������������������������������������������������������������������������������������������������ 214

Introducing the Manage Database Dialog (Relationships) �������������������������������������������� 215

Working with Table Occurrences ���������������������������������������������������������������������������������� 216

Selecting Table Occurrences �������������������������������������������������������������������������������������������������������������� 216

Interacting with Table Occurrences ���������������������������������������������������������������������������������������������������� 217

Arranging Table Occurrences �������������������������������������������������������������������������������������������������������������� 218

Viewing Options ���������������������������������������������������������������������������������������������������������������������������������� 220

Formatting Table Occurrences ������������������������������������������������������������������������������������������������������������ 220

Editing Table Occurrences ������������������������������������������������������������������������������������������������������������������ 221

Adding Table Occurrences ������������������������������������������������������������������������������������������������������������������ 222

Deleting Occurrences ������������������������������������������������������������������������������������������������������������������������� 223

Printing the Relationship Graph ���������������������������������������������������������������������������������������������������������� 224

■ Contents

xiv

Building Relationships �������������������������������������������������������������������������������������������������� 224

Adding Relationships �������������������������������������������������������������������������������������������������������������������������� 224

Manipulating Relationships ���������������������������������������������������������������������������������������������������������������� 226

Adding Notes to the Graph ������������������������������������������������������������������������������������������� 230

Finalizing the Learn FileMaker Relational Model ��������������������������������������������������������� 231

Summary ���������������������������������������������������������������������������������������������������������������������� 232

■Chapter 10: Managing Containers ��������������������������������������������������������������������� 233

Inserting Files into Containers �������������������������������������������������������������������������������������� 233

Insert Menu ���������������������������������������������������������������������������������������������������������������������������������������� 234

Drag and Drop������������������������������������������������������������������������������������������������������������������������������������� 234

Copy and Paste ����������������������������������������������������������������������������������������������������������������������������������� 235

Understanding Container Storage Options ������������������������������������������������������������������� 235

Storing the Actual File ������������������������������������������������������������������������������������������������������������������������ 235

Storing a Reference to a File �������������������������������������������������������������������������������������������������������������� 235

Using Managed External Storage ��������������������������������������������������������������������������������� 237

Defining Base Directories ������������������������������������������������������������������������������������������������������������������� 237

Defining a Field to Store Container Data Externally ���������������������������������������������������������������������������� 240

Extracting Files from Containers ���������������������������������������������������������������������������������� 242

Summary ���������������������������������������������������������������������������������������������������������������������� 242

■Chapter 11: Managing Value Lists ��������������������������������������������������������������������� 243

Using Value Lists ���������������������������������������������������������������������������������������������������������� 243

Exploring the Value List Interface ��������������������������������������������������������������������������������� 244

Introducing the Value Lists Dialog ������������������������������������������������������������������������������������������������������ 244

Introducing the Editing Value List Dialog �������������������������������������������������������������������������������������������� 245

Creating Value Lists ������������������������������������������������������������������������������������������������������ 246

Using Custom Values �������������������������������������������������������������������������������������������������������������������������� 246

Using Values from Another File ����������������������������������������������������������������������������������������������������������� 246

Using Values from a Field ������������������������������������������������������������������������������������������������������������������� 247

Building Value Lists from Field Values ������������������������������������������������������������������������������������������������ 249

Summary ���������������������������������������������������������������������������������������������������������������������� 254

■ Contents

xv

■Part III: Writing Formulas and Using Functions ������������������������������ 255

■Chapter 12: Writing Formulas ��������������������������������������������������������������������������� 257

Introducing Formulas ��������������������������������������������������������������������������������������������������� 258

How Formulas Work���������������������������������������������������������������������������������������������������������������������������� 259

Defining Formula Components ������������������������������������������������������������������������������������� 260

Comments ������������������������������������������������������������������������������������������������������������������������������������������ 260

Constants �������������������������������������������������������������������������������������������������������������������������������������������� 261

Field References ��������������������������������������������������������������������������������������������������������������������������������� 262

Functions �������������������������������������������������������������������������������������������������������������������������������������������� 263

Operators �������������������������������������������������������������������������������������������������������������������������������������������� 265

Reserved Words ���������������������������������������������������������������������������������������������������������������������������������� 272

Variables ��������������������������������������������������������������������������������������������������������������������������������������������� 274

Exploring the Calculation Interface ������������������������������������������������������������������������������ 277

Exploring the Specify Calculation Dialog �������������������������������������������������������������������������������������������� 278

Writing Formulas ���������������������������������������������������������������������������������������������������������� 279

Getting Started with Simple Formulas ������������������������������������������������������������������������������������������������ 279

Inserting Components into Formulas �������������������������������������������������������������������������������������������������� 282

Creating Repeating Calculation Fields ������������������������������������������������������������������������������������������������ 286

Using Space to Your Advantage ���������������������������������������������������������������������������������������������������������� 287

Adding Calculations to the Learn FileMaker File ���������������������������������������������������������� 289

Company Contact Count ��������������������������������������������������������������������������������������������������������������������� 289

Contact Address Label ������������������������������������������������������������������������������������������������������������������������ 290

Summary ���������������������������������������������������������������������������������������������������������������������� 290

■Chapter 13: Text Functions �������������������������������������������������������������������������������� 291

Text Function Reference ����������������������������������������������������������������������������������������������� 291

Char ���������������������������������������������������������������������������������������������������������������������������������������������������� 292

Code���������������������������������������������������������������������������������������������������������������������������������������������������� 293

Exact ��������������������������������������������������������������������������������������������������������������������������������������������������� 293

Filter ��������������������������������������������������������������������������������������������������������������������������������������������������� 294

FilterValues ����������������������������������������������������������������������������������������������������������������������������������������� 294

Furigana���������������������������������������������������������������������������������������������������������������������������������������������� 295

■ Contents

xvi

GetAsCSS �������������������������������������������������������������������������������������������������������������������������������������������� 295

GetAsDate ������������������������������������������������������������������������������������������������������������������������������������������� 295

GetAsNumber �������������������������������������������������������������������������������������������������������������������������������������� 296

GetAsSVG �������������������������������������������������������������������������������������������������������������������������������������������� 297

GetAsText �������������������������������������������������������������������������������������������������������������������������������������������� 297

GetAsTime ������������������������������������������������������������������������������������������������������������������������������������������ 298

GetAsTimestamp��������������������������������������������������������������������������������������������������������������������������������� 298

GetAsURLEncoded ������������������������������������������������������������������������������������������������������������������������������ 299

GetValue ��������������������������������������������������������������������������������������������������������������������������������������������� 299

Hiragana ��������������������������������������������������������������������������������������������������������������������������������������������� 300

KanaHankaku ������������������������������������������������������������������������������������������������������������������������������������� 300

KanaZenkaku �������������������������������������������������������������������������������������������������������������������������������������� 300

KanjiNumeral �������������������������������������������������������������������������������������������������������������������������������������� 300

Katakana ��������������������������������������������������������������������������������������������������������������������������������������������� 300

Left ����������������������������������������������������������������������������������������������������������������������������������������������������� 300

LeftValues ������������������������������������������������������������������������������������������������������������������������������������������� 301

LeftWords ������������������������������������������������������������������������������������������������������������������������������������������� 301

Length ������������������������������������������������������������������������������������������������������������������������������������������������� 302

Lower �������������������������������������������������������������������������������������������������������������������������������������������������� 302

Middle ������������������������������������������������������������������������������������������������������������������������������������������������� 302

MiddleValues �������������������������������������������������������������������������������������������������������������������������������������� 303

MiddleWords ��������������������������������������������������������������������������������������������������������������������������������������� 303

NumToJText ���������������������������������������������������������������������������������������������������������������������������������������� 303

PatternCount ��������������������������������������������������������������������������������������������������������������������������������������� 303

Position ����������������������������������������������������������������������������������������������������������������������������������������������� 304

Proper ������������������������������������������������������������������������������������������������������������������������������������������������� 305

Quote �������������������������������������������������������������������������������������������������������������������������������������������������� 305

Replace ����������������������������������������������������������������������������������������������������������������������������������������������� 306

Right ��������������������������������������������������������������������������������������������������������������������������������������������������� 306

RightValues ����������������������������������������������������������������������������������������������������������������������������������������� 306

RightWords ����������������������������������������������������������������������������������������������������������������������������������������� 307

RomanHankaku ���������������������������������������������������������������������������������������������������������������������������������� 307

■ Contents

xvii

RomanZenkaku ����������������������������������������������������������������������������������������������������������������������������������� 307

SerialIncrement ���������������������������������������������������������������������������������������������������������������������������������� 307

SortValues ������������������������������������������������������������������������������������������������������������������������������������������ 308

Substitute ������������������������������������������������������������������������������������������������������������������������������������������� 309

Trim ����������������������������������������������������������������������������������������������������������������������������������������������������� 310

TrimAll ������������������������������������������������������������������������������������������������������������������������������������������������� 310

UniqueValues �������������������������������������������������������������������������������������������������������������������������������������� 311

Upper �������������������������������������������������������������������������������������������������������������������������������������������������� 311

ValueCount ������������������������������������������������������������������������������������������������������������������������������������������ 311

WordCount ������������������������������������������������������������������������������������������������������������������������������������������ 312

Summary ���������������������������������������������������������������������������������������������������������������������� 312

■Chapter 14: Text Functions (JSON) �������������������������������������������������������������������� 313

Introducing JSON ��������������������������������������������������������������������������������������������������������� 313

Defining the JSON Format ������������������������������������������������������������������������������������������������������������������ 313

Referring to JSON Elements ��������������������������������������������������������������������������������������������������������������� 315

JSON Function Reference �������������������������������������������������������������������������������������������� 317

JSONDeleteElement ���������������������������������������������������������������������������������������������������������������������������� 317

JSONFormatElements ������������������������������������������������������������������������������������������������������������������������� 317

JSONGetElement �������������������������������������������������������������������������������������������������������������������������������� 318

JSONListKeys ������������������������������������������������������������������������������������������������������������������������������������� 318

JSONListValues ����������������������������������������������������������������������������������������������������������������������������������� 319

JSONSetElement��������������������������������������������������������������������������������������������������������������������������������� 319

Summary ���������������������������������������������������������������������������������������������������������������������� 320

■Chapter 15: Text Formatting Functions ������������������������������������������������������������� 321

Text Formatting Function Reference ���������������������������������������������������������������������������� 321

RGB ����������������������������������������������������������������������������������������������������������������������������������������������������� 322

TextColor ��������������������������������������������������������������������������������������������������������������������������������������������� 322

TextColorRemove �������������������������������������������������������������������������������������������������������������������������������� 323

TextFont ���������������������������������������������������������������������������������������������������������������������������������������������� 323

TextFontRemove ��������������������������������������������������������������������������������������������������������������������������������� 324

TextFormatRemove ����������������������������������������������������������������������������������������������������������������������������� 324

■ Contents

xviii

TextSize ���������������������������������������������������������������������������������������������������������������������������������������������� 325

TextSizeRemove���������������������������������������������������������������������������������������������������������������������������������� 325

TextStyleAdd ��������������������������������������������������������������������������������������������������������������������������������������� 326

TextStyleRemove �������������������������������������������������������������������������������������������������������������������������������� 326

Summary ���������������������������������������������������������������������������������������������������������������������� 326

■Chapter 16: Number Functions �������������������������������������������������������������������������� 327

Number Function Reference ���������������������������������������������������������������������������������������� 327

Abs ������������������������������������������������������������������������������������������������������������������������������������������������������ 328

Ceiling ������������������������������������������������������������������������������������������������������������������������������������������������� 328

Combination ��������������������������������������������������������������������������������������������������������������������������������������� 328

Div������������������������������������������������������������������������������������������������������������������������������������������������������� 329

Exp ������������������������������������������������������������������������������������������������������������������������������������������������������ 329

Factorial ���������������������������������������������������������������������������������������������������������������������������������������������� 330

Floor���������������������������������������������������������������������������������������������������������������������������������������������������� 330

Int ������������������������������������������������������������������������������������������������������������������������������������������������������� 330

Lg �������������������������������������������������������������������������������������������������������������������������������������������������������� 331

Ln �������������������������������������������������������������������������������������������������������������������������������������������������������� 331

Log ������������������������������������������������������������������������������������������������������������������������������������������������������ 331

Mod ����������������������������������������������������������������������������������������������������������������������������������������������������� 332

Random ���������������������������������������������������������������������������������������������������������������������������������������������� 332

Round ������������������������������������������������������������������������������������������������������������������������������������������������� 333

SetPrecision ���������������������������������������������������������������������������������������������������������������������������������������� 333

Sign ���������������������������������������������������������������������������������������������������������������������������������������������������� 333

Sqrt ����������������������������������������������������������������������������������������������������������������������������������������������������� 334

Truncate ���������������������������������������������������������������������������������������������������������������������������������������������� 334

Summary ���������������������������������������������������������������������������������������������������������������������� 334

■Chapter 17: Date, Time, and Timestamp Functions ������������������������������������������� 335

Date Function Reference ���������������������������������������������������������������������������������������������� 335

Date ���������������������������������������������������������������������������������������������������������������������������������������������������� 336

Day������������������������������������������������������������������������������������������������������������������������������������������������������ 336

DayName �������������������������������������������������������������������������������������������������������������������������������������������� 336

■ Contents

xix

DayNameJ ������������������������������������������������������������������������������������������������������������������������������������������ 337

DayOfWeek ����������������������������������������������������������������������������������������������������������������������������������������� 337

DayOf Year ������������������������������������������������������������������������������������������������������������������������������������������ 337

Month ������������������������������������������������������������������������������������������������������������������������������������������������� 337

MonthName ���������������������������������������������������������������������������������������������������������������������������������������� 338

MonthNameJ �������������������������������������������������������������������������������������������������������������������������������������� 338

WeekOfYear ���������������������������������������������������������������������������������������������������������������������������������������� 338

WeekOfYearFiscal ������������������������������������������������������������������������������������������������������������������������������� 339

Year ����������������������������������������������������������������������������������������������������������������������������������������������������� 339

YearName ������������������������������������������������������������������������������������������������������������������������������������������� 339

Time Function Reference ��������������������������������������������������������������������������������������������� 340

Hour ���������������������������������������������������������������������������������������������������������������������������������������������������� 340

Minute������������������������������������������������������������������������������������������������������������������������������������������������� 340

Seconds ���������������������������������������������������������������������������������������������������������������������������������������������� 341

Time ���������������������������������������������������������������������������������������������������������������������������������������������������� 341

Timestamp Function Reference ����������������������������������������������������������������������������������� 341

Timestamp ������������������������������������������������������������������������������������������������������������������������������������������ 341

Summary ���������������������������������������������������������������������������������������������������������������������� 342

■Chapter 18: Container Functions ����������������������������������������������������������������������� 343

Container Function Reference �������������������������������������������������������������������������������������� 343

Base64Decode ������������������������������������������������������������������������������������������������������������������������������������ 343

Base64Encode ������������������������������������������������������������������������������������������������������������������������������������ 344

Base64EncodeRFC ������������������������������������������������������������������������������������������������������������������������������ 344

CryptAuthCode ������������������������������������������������������������������������������������������������������������������������������������ 345

CryptEncrypt ��������������������������������������������������������������������������������������������������������������������������������������� 346

CryptEncryptBase64 ��������������������������������������������������������������������������������������������������������������������������� 346

CryptDecrypt ��������������������������������������������������������������������������������������������������������������������������������������� 347

CryptDecryptBase64 ��������������������������������������������������������������������������������������������������������������������������� 347

CryptDigest ����������������������������������������������������������������������������������������������������������������������������������������� 347

GetContainerAttribute ������������������������������������������������������������������������������������������������������������������������� 348

Examples �������������������������������������������������������������������������������������������������������������������������������������������� 350

■ Contents

xx

GetHeight �������������������������������������������������������������������������������������������������������������������������������������������� 351

GetThumbnail ������������������������������������������������������������������������������������������������������������������������������������� 352

GetWidth ��������������������������������������������������������������������������������������������������������������������������������������������� 352

HexEncode ������������������������������������������������������������������������������������������������������������������������������������������ 353

HexDecode ������������������������������������������������������������������������������������������������������������������������������������������ 353

TextEncode ����������������������������������������������������������������������������������������������������������������������������������������� 354

TextDecode ����������������������������������������������������������������������������������������������������������������������������������������� 354

VerifyContainer ����������������������������������������������������������������������������������������������������������������������������������� 355

Summary ���������������������������������������������������������������������������������������������������������������������� 355

■Chapter 19: Aggregate, Summary, and Repeating Functions ���������������������������� 357

Aggregate Function Reference ������������������������������������������������������������������������������������� 357

Average ���������������������������������������������������������������������������������������������������������������������������������������������� 358

Count �������������������������������������������������������������������������������������������������������������������������������������������������� 360

List ������������������������������������������������������������������������������������������������������������������������������������������������������ 362

Max ���������������������������������������������������������������������������������������������������������������������������������������������������� 363

Min ����������������������������������������������������������������������������������������������������������������������������������������������������� 365

StDev ������������������������������������������������������������������������������������������������������������������������������������������������� 367

StDevP ����������������������������������������������������������������������������������������������������������������������������������������������� 369

Sum ��������������������������������������������������������������������������������������������������������������������������������������������������� 370

Variance ��������������������������������������������������������������������������������������������������������������������������������������������� 372

VarianceP ������������������������������������������������������������������������������������������������������������������������������������������� 374

Summary Functions ����������������������������������������������������������������������������������������������������� 376

GetSummary �������������������������������������������������������������������������������������������������������������������������������������� 376

Repeating Function Reference ������������������������������������������������������������������������������������� 377

Extend ������������������������������������������������������������������������������������������������������������������������������������������������ 377

GetRepetition ������������������������������������������������������������������������������������������������������������������������������������� 378

Last ���������������������������������������������������������������������������������������������������������������������������������������������������� 378

Summary ���������������������������������������������������������������������������������������������������������������������� 378

■Chapter 20: Financial and Trigonometric Functions ������������������������������������������ 379

Financial Function Reference ��������������������������������������������������������������������������������������� 379

FV �������������������������������������������������������������������������������������������������������������������������������������������������������� 379

■ Contents

xxi

NPV ���������������������������������������������������������������������������������������������������������������������������������������������������� 380

PMT ���������������������������������������������������������������������������������������������������������������������������������������������������� 380

PV ������������������������������������������������������������������������������������������������������������������������������������������������������ 380

Trigonometric Function Reference ������������������������������������������������������������������������������� 381

Acos ��������������������������������������������������������������������������������������������������������������������������������������������������� 381

Asin ���������������������������������������������������������������������������������������������������������������������������������������������������� 382

Atan ��������������������������������������������������������������������������������������������������������������������������������������������������� 382

Cos ����������������������������������������������������������������������������������������������������������������������������������������������������� 382

Degrees ��������������������������������������������������������������������������������������������������������������������������������������������� 382

Pi �������������������������������������������������������������������������������������������������������������������������������������������������������� 383

Radians ���������������������������������������������������������������������������������������������������������������������������������������������� 383

Sin ����������������������������������������������������������������������������������������������������������������������������������������������������� 383

Tan ����������������������������������������������������������������������������������������������������������������������������������������������������� 384

Summary ���������������������������������������������������������������������������������������������������������������������� 384

■Chapter 21: Logical Functions ��������������������������������������������������������������������������� 385

Logical Function Reference ������������������������������������������������������������������������������������������ 385

Case ��������������������������������������������������������������������������������������������������������������������������������������������������� 386

Choose ����������������������������������������������������������������������������������������������������������������������������������������������� 386

Evaluate ���������������������������������������������������������������������������������������������������������������������������������������������� 387

EvaluationError ���������������������������������������������������������������������������������������������������������������������������������� 388

ExecuteSQL ����������������������������������������������������������������������������������������������������������������������������������������� 389

GetAsBoolean ������������������������������������������������������������������������������������������������������������������������������������ 389

GetAVPlayerAttribute ������������������������������������������������������������������������������������������������������������������������� 389

GetField ���������������������������������������������������������������������������������������������������������������������������������������������� 390

GetFieldName ������������������������������������������������������������������������������������������������������������������������������������ 391

GetLayoutObjectAttribute ������������������������������������������������������������������������������������������������������������������� 392

GetNthRecord ������������������������������������������������������������������������������������������������������������������������������������ 394

If �������������������������������������������������������������������������������������������������������������������������������������������������������� 394

IsEmpty ���������������������������������������������������������������������������������������������������������������������������������������������� 395

IsValid ������������������������������������������������������������������������������������������������������������������������������������������������ 395

IsValidExpression ������������������������������������������������������������������������������������������������������������������������������� 395

■ Contents

xxii

Let ������������������������������������������������������������������������������������������������������������������������������������������������������ 396

Lookup ����������������������������������������������������������������������������������������������������������������������������������������������� 397

LookupNext ���������������������������������������������������������������������������������������������������������������������������������������� 398

Self ���������������������������������������������������������������������������������������������������������������������������������������������������� 399

Summary ���������������������������������������������������������������������������������������������������������������������� 399

■Chapter 22: Get Functions ��������������������������������������������������������������������������������� 401

Get Function Reference ������������������������������������������������������������������������������������������������ 401

Get ( AccountExtendedPrivileges ) ������������������������������������������������������������������������������������������������������ 404

Get ( AccountGroupName ) ����������������������������������������������������������������������������������������������������������������� 405

Get ( AccountName ) ��������������������������������������������������������������������������������������������������������������������������� 405

Get ( AccountPrivilegeSetName ) �������������������������������������������������������������������������������������������������������� 405

Get ( ActiveFieldContents ) ������������������������������������������������������������������������������������������������������������������ 406

Get ( ActiveFieldName ) ���������������������������������������������������������������������������������������������������������������������� 406

Get ( ActiveFieldTableName ) �������������������������������������������������������������������������������������������������������������� 406

Get ( ActiveLayoutObjectName ) ��������������������������������������������������������������������������������������������������������� 406

Get ( ActiveModifierKeys ) ������������������������������������������������������������������������������������������������������������������� 407

Get ( ActivePortalRowNumber ) ���������������������������������������������������������������������������������������������������������� 407

Get ( ActiveRepetitionNumber ) ���������������������������������������������������������������������������������������������������������� 408

Get ( ActiveSelectionSize ) ������������������������������������������������������������������������������������������������������������������ 408

Get ( ActiveSelectionStart ) ����������������������������������������������������������������������������������������������������������������� 408

Get ( AllowAbortState )������������������������������������������������������������������������������������������������������������������������ 409

Get ( AllowFormattingBarState ) ��������������������������������������������������������������������������������������������������������� 409

Get ( ApplicationArchitecture ) ������������������������������������������������������������������������������������������������������������ 409

Get ( ApplicationLanguage ) ���������������������������������������������������������������������������������������������������������������� 410

Get ( ApplicationVersion ) �������������������������������������������������������������������������������������������������������������������� 410

Get ( CalculationRepetitionNumber ) �������������������������������������������������������������������������������������������������� 411

Get ( ConnectionAttributes ) ���������������������������������������������������������������������������������������������������������������� 411

Get ( ConnectionState ) ����������������������������������������������������������������������������������������������������������������������� 411

Get ( CurrentDate ) ������������������������������������������������������������������������������������������������������������������������������ 412

Get ( CurrentExtendedPrivileges ) ������������������������������������������������������������������������������������������������������� 412

Get ( CurrentHostTimestamp ) ������������������������������������������������������������������������������������������������������������ 412

■ Contents

xxiii

Get ( CurrentPrivilegeSetName ) ��������������������������������������������������������������������������������������������������������� 413

Get ( CurrentTime ) ����������������������������������������������������������������������������������������������������������������������������� 413

Get ( CurrentTimestamp ) ������������������������������������������������������������������������������������������������������������������� 413

Get ( CurrentTimeUTCMilliseconds ) ��������������������������������������������������������������������������������������������������� 413

Get ( CustomMenuSetName ) ������������������������������������������������������������������������������������������������������������� 414

Get ( DesktopPath ) ����������������������������������������������������������������������������������������������������������������������������� 414

Get ( Device ) �������������������������������������������������������������������������������������������������������������������������������������� 415

Get ( DocumentsPath ) ������������������������������������������������������������������������������������������������������������������������ 415

Get ( DocumentsPathListing ) ������������������������������������������������������������������������������������������������������������� 416

Get ( EncryptionState ) ������������������������������������������������������������������������������������������������������������������������ 416

Get ( ErrorCaptureState ) �������������������������������������������������������������������������������������������������������������������� 417

Get ( FileMakerPath ) �������������������������������������������������������������������������������������������������������������������������� 417

Get ( FileName ) ���������������������������������������������������������������������������������������������������������������������������������� 417

Get ( FilePath ) ������������������������������������������������������������������������������������������������������������������������������������ 417

Get ( FileSize ) ������������������������������������������������������������������������������������������������������������������������������������� 418

Get ( FoundCount ) ������������������������������������������������������������������������������������������������������������������������������ 418

Get ( HighContrastColor ) �������������������������������������������������������������������������������������������������������������������� 418

Get ( HighContrastState ) �������������������������������������������������������������������������������������������������������������������� 419

Get ( HostApplicationVersion ) ������������������������������������������������������������������������������������������������������������ 419

Get ( HostIPAddress ) �������������������������������������������������������������������������������������������������������������������������� 419

Get ( HostName ) ��������������������������������������������������������������������������������������������������������������������������������� 420

Get ( InstalledFMPlugins ) ������������������������������������������������������������������������������������������������������������������ 420

Get ( LastError ) ��������������������������������������������������������������������������������������������������������������������������������� 420

Get ( LastExternalErrorDetail ) ����������������������������������������������������������������������������������������������������������� 421

Get ( LastMessageChoice ) ���������������������������������������������������������������������������������������������������������������� 421

Get ( LayoutAccess ) �������������������������������������������������������������������������������������������������������������������������� 421

Get ( LayoutCount ) ���������������������������������������������������������������������������������������������������������������������������� 422

Get ( LayoutName ) ���������������������������������������������������������������������������������������������������������������������������� 422

Get ( LayoutNumber ) ������������������������������������������������������������������������������������������������������������������������� 422

Get ( LayoutTableName ) �������������������������������������������������������������������������������������������������������������������� 422

Get ( LayoutViewState ) ��������������������������������������������������������������������������������������������������������������������� 423

Get ( MenubarState ) �������������������������������������������������������������������������������������������������������������������������� 423

■ Contents

xxiv

Get ( ModifiedFields ) ������������������������������������������������������������������������������������������������������������������������� 423

Get ( MultiUserState ) ������������������������������������������������������������������������������������������������������������������������ 424

Get ( NetworkProtocol ) ��������������������������������������������������������������������������������������������������������������������� 424

Get ( NetworkType ) ��������������������������������������������������������������������������������������������������������������������������� 424

Get ( PageNumber ) ��������������������������������������������������������������������������������������������������������������������������� 425

Get ( PersistentID ) ����������������������������������������������������������������������������������������������������������������������������� 425

Get ( PreferencesPath ) ���������������������������������������������������������������������������������������������������������������������� 425

Get ( PrinterName ) ���������������������������������������������������������������������������������������������������������������������������� 426

Get ( QuickFindText ) �������������������������������������������������������������������������������������������������������������������������� 426

Get ( RecordAccess ) ������������������������������������������������������������������������������������������������������������������������� 426

Get ( RecordID ) ���������������������������������������������������������������������������������������������������������������������������������� 427

Get ( RecordModificationCount ) �������������������������������������������������������������������������������������������������������� 427

Get ( RecordNumber ) ������������������������������������������������������������������������������������������������������������������������ 427

Get ( RecordOpenCount ) ������������������������������������������������������������������������������������������������������������������� 427

Get ( RecordOpenState ) �������������������������������������������������������������������������������������������������������������������� 428

Get ( RegionMonitorEvents ) �������������������������������������������������������������������������������������������������������������� 428

Get ( RequestCount ) �������������������������������������������������������������������������������������������������������������������������� 428

Get ( RequestOmitState ) ������������������������������������������������������������������������������������������������������������������� 429

Get ( ScreenDepth ) ��������������������������������������������������������������������������������������������������������������������������� 429

Get ( ScreenHeight ) ��������������������������������������������������������������������������������������������������������������������������� 429

Get ( ScreenScaleFactor ) ������������������������������������������������������������������������������������������������������������������ 430

Get ( ScreenWidth ) ���������������������������������������������������������������������������������������������������������������������������� 430

Get ( ScriptAnimationState ) �������������������������������������������������������������������������������������������������������������� 430

Get ( ScriptName ) ����������������������������������������������������������������������������������������������������������������������������� 430

Get ( ScriptParameter ) ���������������������������������������������������������������������������������������������������������������������� 431

Get ( ScriptResult ) ����������������������������������������������������������������������������������������������������������������������������� 431

Get ( SortState ) ��������������������������������������������������������������������������������������������������������������������������������� 432

Get ( StatusAreaState ) ���������������������������������������������������������������������������������������������������������������������� 432

Get ( SystemDrive ) ���������������������������������������������������������������������������������������������������������������������������� 432

Get ( SystemIPAddress ) �������������������������������������������������������������������������������������������������������������������� 433

Get ( SystemLanguage ) ��������������������������������������������������������������������������������������������������������������������� 433

Get ( SystemNICAddress ) ������������������������������������������������������������������������������������������������������������������ 433

■ Contents

xxv

Get ( SystemPlatform ) ����������������������������������������������������������������������������������������������������������������������� 434

Get ( SystemVersion ) ������������������������������������������������������������������������������������������������������������������������ 434

Get ( TemporaryPath ) ������������������������������������������������������������������������������������������������������������������������ 434

Get ( TextRulerVisible ) ����������������������������������������������������������������������������������������������������������������������� 435

Get ( TotalRecordCount ) �������������������������������������������������������������������������������������������������������������������� 435

Get ( TouchKeyboardState ) ��������������������������������������������������������������������������������������������������������������� 435

Get ( TriggerCurrentPanel ) ���������������������������������������������������������������������������������������������������������������� 436

Get ( TriggerExternalEvent ) ��������������������������������������������������������������������������������������������������������������� 436

Get ( TriggerGestureInfo ) ������������������������������������������������������������������������������������������������������������������� 437

Get ( TriggerKeystroke ) ��������������������������������������������������������������������������������������������������������������������� 437

Get ( TriggerModifierKeys ) ���������������������������������������������������������������������������������������������������������������� 437

Get ( TriggerTargetPanel ) ������������������������������������������������������������������������������������������������������������������ 438

Get ( UserCount ) �������������������������������������������������������������������������������������������������������������������������������� 438

Get ( UserName ) ������������������������������������������������������������������������������������������������������������������������������� 438

Get ( UseSystemFormatsState ) ��������������������������������������������������������������������������������������������������������� 439

Get ( UUID ) ���������������������������������������������������������������������������������������������������������������������������������������� 439

Get ( WindowContentHeight ) ������������������������������������������������������������������������������������������������������������� 439

Get ( WindowContentWidth ) �������������������������������������������������������������������������������������������������������������� 440

Get ( WindowDesktopHeight ) ������������������������������������������������������������������������������������������������������������ 440

Get ( WindowDesktopWidth ) ������������������������������������������������������������������������������������������������������������� 440

Get ( WindowHeight ) ������������������������������������������������������������������������������������������������������������������������� 440

Get ( WindowLeft ) ����������������������������������������������������������������������������������������������������������������������������� 441

Get ( WindowMode ) ��������������������������������������������������������������������������������������������������������������������������� 441

Get ( WindowName ) �������������������������������������������������������������������������������������������������������������������������� 441

Get ( WindowOrientation ) ������������������������������������������������������������������������������������������������������������������ 442

Get ( WindowStyle ) ��������������������������������������������������������������������������������������������������������������������������� 442

Get ( WindowTop ) ������������������������������������������������������������������������������������������������������������������������������ 442

Get ( WindowVisible ) ������������������������������������������������������������������������������������������������������������������������� 443

Get ( WindowWidth ) �������������������������������������������������������������������������������������������������������������������������� 443

Get ( WindowZoomLevel ) ������������������������������������������������������������������������������������������������������������������ 443

Summary ���������������������������������������������������������������������������������������������������������������������� 443

■ Contents

xxvi

■Chapter 23: Design Functions ���������������������������������������������������������������������������� 445

Design Function Reference ������������������������������������������������������������������������������������������ 445

DatabaseNames �������������������������������������������������������������������������������������������������������������������������������� 446

FieldBounds ��������������������������������������������������������������������������������������������������������������������������������������� 446

FieldComment ����������������������������������������������������������������������������������������������������������������������������������� 447

FieldIDs ���������������������������������������������������������������������������������������������������������������������������������������������� 447

FieldNames ���������������������������������������������������������������������������������������������������������������������������������������� 448

FieldRepetitions ��������������������������������������������������������������������������������������������������������������������������������� 448

FieldStyle ������������������������������������������������������������������������������������������������������������������������������������������� 449

FieldType ������������������������������������������������������������������������������������������������������������������������������������������� 449

GetNextSerialValue ���������������������������������������������������������������������������������������������������������������������������� 450

LayoutIDs ������������������������������������������������������������������������������������������������������������������������������������������� 450

LayoutNames ������������������������������������������������������������������������������������������������������������������������������������� 451

LayoutObjectNames ��������������������������������������������������������������������������������������������������������������������������� 451

RelationInfo ��������������������������������������������������������������������������������������������������������������������������������������� 452

ScriptIDs �������������������������������������������������������������������������������������������������������������������������������������������� 453

ScriptNames �������������������������������������������������������������������������������������������������������������������������������������� 453

TableIDs ��������������������������������������������������������������������������������������������������������������������������������������������� 453

TableNames ��������������������������������������������������������������������������������������������������������������������������������������� 454

ValueListIDs ��������������������������������������������������������������������������������������������������������������������������������������� 454

ValueListItems ����������������������������������������������������������������������������������������������������������������������������������� 455

ValueListNames ��������������������������������������������������������������������������������������������������������������������������������� 455

WindowNames ����������������������������������������������������������������������������������������������������������������������������������� 456

Summary ���������������������������������������������������������������������������������������������������������������������� 456

■Chapter 24: Mobile Functions ���������������������������������������������������������������������������� 457

Mobile Function Reference ������������������������������������������������������������������������������������������ 457

Location ��������������������������������������������������������������������������������������������������������������������������������������������� 457

LocationValues ���������������������������������������������������������������������������������������������������������������������������������� 458

RangeBeacons ����������������������������������������������������������������������������������������������������������������������������������� 459

Summary ���������������������������������������������������������������������������������������������������������������������� 460

■ Contents

xxvii

■Chapter 25: Creating Custom Functions ������������������������������������������������������������ 461

Defining Custom Functions ������������������������������������������������������������������������������������������ 461

Exploring the Custom Function Dialogs ������������������������������������������������������������������������ 462

The Manage Custom Functions Dialog ����������������������������������������������������������������������������������������������� 462

The Edit Custom Function Dialog �������������������������������������������������������������������������������������������������������� 464

Building Custom Functions������������������������������������������������������������������������������������������� 465

Creating a Simple Custom Function ��������������������������������������������������������������������������������������������������� 465

Adding Parameters to a Custom Function ������������������������������������������������������������������������������������������ 467

Accessing Fields from Custom Functions ������������������������������������������������������������������������������������������� 471

Building Recursive Custom Functions ������������������������������������������������������������������������������������������������ 472

Summary ���������������������������������������������������������������������������������������������������������������������� 475

■Chapter 26: Introducing ExecuteSQL ����������������������������������������������������������������� 477

Defining the ExecuteSQL Function ������������������������������������������������������������������������������� 478

How the ExecuteSQL Function Works ������������������������������������������������������������������������������������������������� 478

Understanding Some Limitations of ExecuteSQL ������������������������������������������������������������������������������� 480

Creating SQL Queries ��������������������������������������������������������������������������������������������������� 481

Defining SELECT Statements �������������������������������������������������������������������������������������������������������������� 481

Using the SELECT Statement �������������������������������������������������������������������������������������������������������������� 483

Inserting Literal Text in the Field List �������������������������������������������������������������������������������������������������� 489

Concatenating Results ������������������������������������������������������������������������������������������������������������������������ 490

Using the WHERE Clause �������������������������������������������������������������������������������������������������������������������� 491

Using the ORDER BY Clause ��������������������������������������������������������������������������������������������������������������� 492

Using the JOIN Clause ������������������������������������������������������������������������������������������������������������������������ 492

Using the GROUP BY Clause ��������������������������������������������������������������������������������������������������������������� 493

Using the UNION Clause���������������������������������������������������������������������������������������������������������������������� 494

Limiting the Results of a Query ���������������������������������������������������������������������������������������������������������� 494

Accessing the Database Schema �������������������������������������������������������������������������������� 496

Selecting FileMaker_Tables ���������������������������������������������������������������������������������������������������������������� 496

Selecting FileMaker_Fields ���������������������������������������������������������������������������������������������������������������� 497

Exploring Other SQL Features �������������������������������������������������������������������������������������� 498

Summary ���������������������������������������������������������������������������������������������������������������������� 498

■ Contents

xxviii

■Part IV: Designing Interfaces ���������������������������������������������������������� 499

■Chapter 27: Introducing Layout Mode ��������������������������������������������������������������� 501

Emphasizing the Importance of Layout Design ������������������������������������������������������������ 501

Using Layout Mode ������������������������������������������������������������������������������������������������������� 502

Identifying Layout Mode ��������������������������������������������������������������������������������������������������������������������� 502

Status Toolbar (Layout Mode) ������������������������������������������������������������������������������������������������������������� 504

Menu Changes (Layout Mode) ������������������������������������������������������������������������������������������������������������ 509

Summary ���������������������������������������������������������������������������������������������������������������������� 518

■Chapter 28: Getting Started with Layouts ��������������������������������������������������������� 519

Planning Layouts ���������������������������������������������������������������������������������������������������������� 519

Classifying Layouts into Type Categories�������������������������������������������������������������������������������������������� 519

Sketching a Layout Flow Chart ����������������������������������������������������������������������������������������������������������� 523

Working with Layout Parts ������������������������������������������������������������������������������������������� 524

Exploring Layout Regions and Controls ���������������������������������������������������������������������������������������������� 524

Defining Part Types ����������������������������������������������������������������������������������������������������������������������������� 526

Managing Parts ���������������������������������������������������������������������������������������������������������������������������������� 527

Adding Layouts ������������������������������������������������������������������������������������������������������������� 530

Creating a New Layout ����������������������������������������������������������������������������������������������������������������������� 530

Configuring Layouts ��������������������������������������������������������������������������������������������������������������������������� 550

Deleting Layouts ����������������������������������������������������������������������������������������������������������� 556

Using the Manage Layouts Dialog �������������������������������������������������������������������������������� 556

Optimizing Layout Performance ����������������������������������������������������������������������������������� 558

Summary ���������������������������������������������������������������������������������������������������������������������� 558

■Chapter 29: Exploring Layout Palettes �������������������������������������������������������������� 559

Exploring the Field Picker ��������������������������������������������������������������������������������������������� 559

Exploring the Inspector ������������������������������������������������������������������������������������������������ 561

Panel One — Defining Position Settings �������������������������������������������������������������������������������������������� 562

Panel Two — Style Settings ��������������������������������������������������������������������������������������������������������������� 568

Panel Three — Appearance Settings �������������������������������������������������������������������������������������������������� 568

Panel Four — Data ����������������������������������������������������������������������������������������������������������������������������� 576

■ Contents

xxix

Exploring the Layout Objects Palette ���������������������������������������������������������������������������� 585

Using the Shortcuts in the Layout Objects Palette Contextual Menu�������������������������������������������������� 586

Summary ���������������������������������������������������������������������������������������������������������������������� 588

■Chapter 30: Creating Layout Objects ����������������������������������������������������������������� 589

Introducing Layout Objects������������������������������������������������������������������������������������������� 589

Inserting an Object onto the Layout ���������������������������������������������������������������������������������������������������� 590

Configuring an Object ������������������������������������������������������������������������������������������������������������������������� 590

Working with Field Objects������������������������������������������������������������������������������������������� 591

Clarifying Field Terminology ��������������������������������������������������������������������������������������������������������������� 591

Field Basics ���������������������������������������������������������������������������������������������������������������������������������������� 592

Configuring Field Control Style ����������������������������������������������������������������������������������������������������������� 596

Exploring the Benefits of Pop-Up Menus for Two-Field Value List ������������������������������������������������������ 610

Bypassing Value List Entry Restrictions���������������������������������������������������������������������������������������������� 613

Using Placeholders ����������������������������������������������������������������������������������������������������������������������������� 616

Working with Text ��������������������������������������������������������������������������������������������������������� 619

Static Text ������������������������������������������������������������������������������������������������������������������������������������������� 620

Dynamic Placeholder Symbols ����������������������������������������������������������������������������������������������������������� 620

Merge Fields ��������������������������������������������������������������������������������������������������������������������������������������� 620

Merge Variables ���������������������������������������������������������������������������������������������������������������������������������� 621

Working with Button Controls �������������������������������������������������������������������������������������� 621

Working with Buttons ������������������������������������������������������������������������������������������������������������������������� 621

Popover Button ����������������������������������������������������������������������������������������������������������������������������������� 628

Button Bar ������������������������������������������������������������������������������������������������������������������������������������������� 632

Working with Panel Controls ���������������������������������������������������������������������������������������� 635

Tab Control ������������������������������������������������������������������������������������������������������������������������������������������ 635

Slide Control ��������������������������������������������������������������������������������������������������������������������������������������� 638

Working with Portals ���������������������������������������������������������������������������������������������������� 639

Illustrating How Portals Work ������������������������������������������������������������������������������������������������������������� 640

Exploring the Portal Setup Dialog ������������������������������������������������������������������������������������������������������� 640

Adding Objects to Portal Rows ����������������������������������������������������������������������������������������������������������� 642

Creating Records in a Portal ��������������������������������������������������������������������������������������������������������������� 642

■ Contents

xxx

Deleting Portal Rows �������������������������������������������������������������������������������������������������������������������������� 644

Filtering Portal Records ���������������������������������������������������������������������������������������������������������������������� 646

Working with Web Viewers ������������������������������������������������������������������������������������������� 650

Exploring the Web Viewer Setup Dialog ���������������������������������������������������������������������������������������������� 650

Interacting with Web Viewer Content ������������������������������������������������������������������������������������������������� 652

Building a Web Page Using Data from Fields �������������������������������������������������������������������������������������� 653

Working with Charts ����������������������������������������������������������������������������������������������������� 655

Creating Charts ����������������������������������������������������������������������������������������������������������������������������������� 657

Summary ���������������������������������������������������������������������������������������������������������������������� 660

■Chapter 31: Manipulating Objects ��������������������������������������������������������������������� 661

Selecting Objects ��������������������������������������������������������������������������������������������������������� 661

Resizing Objects ����������������������������������������������������������������������������������������������������������� 662

Moving Objects ������������������������������������������������������������������������������������������������������������� 662

Layout Positioning Helpers ����������������������������������������������������������������������������������������������������������������� 663

Arranging & Aligning Objects ��������������������������������������������������������������������������������������� 667

Align���������������������������������������������������������������������������������������������������������������������������������������������������� 668

Resize To ��������������������������������������������������������������������������������������������������������������������������������������������� 668

Distribute or Space ����������������������������������������������������������������������������������������������������������������������������� 669

Rotate ������������������������������������������������������������������������������������������������������������������������������������������������� 670

Group �������������������������������������������������������������������������������������������������������������������������������������������������� 670

Lock ���������������������������������������������������������������������������������������������������������������������������������������������������� 671

Object Stacking ���������������������������������������������������������������������������������������������������������������������������������� 671

Hiding Objects �������������������������������������������������������������������������������������������������������������� 672

Conditional Formatting ������������������������������������������������������������������������������������������������� 672

Condition Formula Options ����������������������������������������������������������������������������������������������������������������� 674

Conditional Format Settings ��������������������������������������������������������������������������������������������������������������� 675

Conditionally Formatting an Invoice Status Field ������������������������������������������������������������������������������� 675

Understanding Tab Order ���������������������������������������������������������������������������������������������� 677

Changing the Tab Order ���������������������������������������������������������������������������������������������������������������������� 677

Using Functions of the Set Tab Order Dialog �������������������������������������������������������������������������������������� 678

■ Contents

xxxi

Naming Objects ������������������������������������������������������������������������������������������������������������ 679

Summary ���������������������������������������������������������������������������������������������������������������������� 679

■Chapter 32: Using Themes and Styles ��������������������������������������������������������������� 681

Introducing Themes and Styles ������������������������������������������������������������������������������������ 681

Defining Styles ������������������������������������������������������������������������������������������������������������������������������������ 681

Defining Themes ��������������������������������������������������������������������������������������������������������������������������������� 685

Using Themes ��������������������������������������������������������������������������������������������������������������� 686

Choosing a Layout’s Theme ��������������������������������������������������������������������������������������������������������������� 687

Managing Themes ������������������������������������������������������������������������������������������������������������������������������ 688

Using Styles ������������������������������������������������������������������������������������������������������������������ 689

Changing an Object’s Style Assignment ��������������������������������������������������������������������������������������������� 689

Editing a Style’s Settings �������������������������������������������������������������������������������������������������������������������� 690

Summary ���������������������������������������������������������������������������������������������������������������������� 691

■Chapter 33: Customizing Menus ������������������������������������������������������������������������ 693

Exploring the Capabilities of Customize Menus ����������������������������������������������������������� 693

Getting Started with Custom Menus Basics ����������������������������������������������������������������� 694

Exploring Custom Menu Set Options �������������������������������������������������������������������������������������������������� 695

Understanding Customization Exceptions ������������������������������������������������������������������������������������������ 696

Exploring the Manage Custom Menus Dialog ��������������������������������������������������������������� 697

Creating a Custom Menu Set ���������������������������������������������������������������������������������������� 698

Adding Copies of Standard FileMaker Menus ������������������������������������������������������������������������������������� 699

Customizing Menu Items ���������������������������������������������������������������������������������������������� 704

Exploring the Edit Custom Menu Dialog ��������������������������������������������������������������������������������������������� 704

Modifying Standard Menu Items��������������������������������������������������������������������������������������������������������� 707

Adding a Custom Menu ���������������������������������������������������������������������������������������������������������������������� 709

Installing a Menu Set ���������������������������������������������������������������������������������������������������� 712

Exploring the Link Between Commands and Menus ���������������������������������������������������� 713

Creating a Status-Based Custom Menu ����������������������������������������������������������������������� 716

Summary ���������������������������������������������������������������������������������������������������������������������� 717

■ Contents

xxxii

■Part V: Automating Tasks with Scripts ������������������������������������������� 719

■Chapter 34: Introduction to Scripting ���������������������������������������������������������������� 721

Identifying the Benefits of Scripting ����������������������������������������������������������������������������� 721

Exploring Scripting Basics�������������������������������������������������������������������������������������������� 722

Calling Other Scripts ��������������������������������������������������������������������������������������������������������������������������� 723

Understanding the Importance of Context ������������������������������������������������������������������������������������������ 727

Exploring the Script Workspace ����������������������������������������������������������������������������������� 728

Workspace Toolbar ����������������������������������������������������������������������������������������������������������������������������� 729

Script Pane ����������������������������������������������������������������������������������������������������������������������������������������� 729

Script-Editing Pane ����������������������������������������������������������������������������������������������������������������������������� 731

Script Step Pane ��������������������������������������������������������������������������������������������������������������������������������� 732

Script Workspace Menu Changes ������������������������������������������������������������������������������������������������������� 734

Writing Scripts �������������������������������������������������������������������������������������������������������������� 738

Script Step Basics ������������������������������������������������������������������������������������������������������������������������������ 739

Summary ���������������������������������������������������������������������������������������������������������������������� 748

■Chapter 35: Common Scripting Tasks ��������������������������������������������������������������� 749

Allowing User Abort ������������������������������������������������������������������������������������������������������ 749

Setting Variables ���������������������������������������������������������������������������������������������������������� 750

Creating Navigation Scripts ������������������������������������������������������������������������������������������ 751

Go to Layout ���������������������������������������������������������������������������������������������������������������������������������������� 751

Go to Record/Request/Page ���������������������������������������������������������������������������������������������������������������� 753

Go to Related Record �������������������������������������������������������������������������������������������������������������������������� 754

Interacting with Fields �������������������������������������������������������������������������������������������������� 756

Go to Field ������������������������������������������������������������������������������������������������������������������������������������������� 757

Set Field ���������������������������������������������������������������������������������������������������������������������������������������������� 757

Set Field by Name������������������������������������������������������������������������������������������������������������������������������� 758

Set Selection �������������������������������������������������������������������������������������������������������������������������������������� 759

Set Next Serial Value �������������������������������������������������������������������������������������������������������������������������� 759

Get Directory ���������������������������������������������������������������������������������������������������������������� 761

■ Contents

xxxiii

Working with Records �������������������������������������������������������������������������������������������������� 762

Import Records ����������������������������������������������������������������������������������������������������������������������������������� 762

Export Records ����������������������������������������������������������������������������������������������������������������������������������� 763

Using Show Custom Dialog ������������������������������������������������������������������������������������������ 764

Configuring a Dialog ��������������������������������������������������������������������������������������������������������������������������� 764

Configuring a Dialog for Field Input ���������������������������������������������������������������������������������������������������� 766

Capturing the Button Click ������������������������������������������������������������������������������������������������������������������ 767

Conditionally Branching with If Statements ����������������������������������������������������������������� 767

Building Simple If Statements ������������������������������������������������������������������������������������������������������������ 768

Building Compound If Statement �������������������������������������������������������������������������������������������������������� 769

Building Nested If Statement �������������������������������������������������������������������������������������������������������������� 769

Performing Searches ���������������������������������������������������������������������������������������������������� 770

Working with Found Sets ��������������������������������������������������������������������������������������������� 771

Iterating with a Loop Statement ����������������������������������������������������������������������������������� 772

Looping Through a Found Set of Records ������������������������������������������������������������������������������������������� 772

Looping Through Lists of Data ������������������������������������������������������������������������������������������������������������ 774

Confirming a Dialog Field Value ���������������������������������������������������������������������������������������������������������� 775

Scripting Portal Functions �������������������������������������������������������������������������������������������� 777

Navigating to a Portal Row’s Record �������������������������������������������������������������������������������������������������� 777

Adding a Portal Row ��������������������������������������������������������������������������������������������������������������������������� 778

Managing Windows ������������������������������������������������������������������������������������������������������ 779

Creating a New Window ��������������������������������������������������������������������������������������������������������������������� 780

Introducing the Card Window ������������������������������������������������������������������������������������������������������������� 788

Managing Errors ����������������������������������������������������������������������������������������������������������� 790

Summary ���������������������������������������������������������������������������������������������������������������������� 791

■Chapter 36: Debugging Scripts �������������������������������������������������������������������������� 793

How Script Debugging Works ��������������������������������������������������������������������������������������� 793

Uses for the Script Debugger ������������������������������������������������������������������������������������������������������������� 794

Defining Basic Debugging Concepts ��������������������������������������������������������������������������������������������������� 794

Activating the Debugger ��������������������������������������������������������������������������������������������������������������������� 795

■ Contents

xxxiv

Exploring the Debugging Interface ������������������������������������������������������������������������������� 795

Debugging Options Under the Tools Menu ������������������������������������������������������������������������������������������ 795

Exploring the Script Debugger Window ��������������������������������������������������������������������������������������������� 796

Exploring the Data Viewer Window ���������������������������������������������������������������������������������������������������� 797

Using Custom Breakpoints ������������������������������������������������������������������������������������������� 798

Summary ���������������������������������������������������������������������������������������������������������������������� 799

■Chapter 37: Using Script Triggers ��������������������������������������������������������������������� 801

Script Trigger Reference ����������������������������������������������������������������������������������������������� 801

File Option Triggers ����������������������������������������������������������������������������������������������������������������������������� 802

Layout Triggers ����������������������������������������������������������������������������������������������������������������������������������� 804

Layout Object Triggers ������������������������������������������������������������������������������������������������������������������������ 809

Working with Script Triggers ���������������������������������������������������������������������������������������� 811

Finding Script-Triggered Objects �������������������������������������������������������������������������������������������������������� 812

Remembering Event Precedence ������������������������������������������������������������������������������������������������������� 812

Using Caution with Script Parameters ������������������������������������������������������������������������������������������������ 813

Exceptions to Event Triggers �������������������������������������������������������������������������������������������������������������� 814

Summary ���������������������������������������������������������������������������������������������������������������������� 814

■Chapter 38: Extending Features with Plugins ��������������������������������������������������� 815

Purchasing Plug-Ins ����������������������������������������������������������������������������������������������������� 815

360 Works ������������������������������������������������������������������������������������������������������������������������������������������� 815

Productive Computing ������������������������������������������������������������������������������������������������������������������������ 815

Trio Automatisering ����������������������������������������������������������������������������������������������������������������������������� 816

Finding Other Plug-ins ������������������������������������������������������������������������������������������������������������������������ 816

Locating Installed Plug-Ins ����������������������������������������������������������������������������������������������������������������� 816

Installing Plug-Ins �������������������������������������������������������������������������������������������������������� 817

Accessing Plug-In Functions ���������������������������������������������������������������������������������������� 817

Summary ���������������������������������������������������������������������������������������������������������������������� 818

■ Contents

xxxv

■Part VI: Sharing and Networking ���������������������������������������������������� 819

■Chapter 39: Introducing Network Sharing ��������������������������������������������������������� 821

How Network Sharing Works���������������������������������������������������������������������������������������� 821

Limitations to Sharing ������������������������������������������������������������������������������������������������������������������������ 823

Setting Up Peer-to-Peer Database Sharing ������������������������������������������������������������������ 823

Using a FileMaker Server ��������������������������������������������������������������������������������������������� 825

Understanding Client License Options and Limitations ���������������������������������������������������������������������� 825

Exploring FileMaker Server Basics ����������������������������������������������������������������������������������������������������� 827

Hosting Databases with FileMaker Cloud ������������������������������������������������������������������������������������������� 840

Accessing Databases from Outside FileMaker ������������������������������������������������������������� 841

Sharing Bookmarks with Snapshot Links ������������������������������������������������������������������������������������������� 841

Using the FileMaker URL �������������������������������������������������������������������������������������������������������������������� 842

Using AppleScript to Automate FileMaker ������������������������������������������������������������������������������������������ 845

Summary ���������������������������������������������������������������������������������������������������������������������� 849

■Chapter 40: Securing Database Access ������������������������������������������������������������� 851

Exploring the Benefits of Security �������������������������������������������������������������������������������� 851

Defining Default Security ��������������������������������������������������������������������������������������������� 851

Exploring the Security Dialog ��������������������������������������������������������������������������������������� 852

Exploring the Interface Modes ������������������������������������������������������������������������������������������������������������ 853

Creating Accounts �������������������������������������������������������������������������������������������������������� 856

Creating a New Local Account ������������������������������������������������������������������������������������������������������������ 856

Creating a New External Account ������������������������������������������������������������������������������������������������������� 858

Exploring Privilege Sets������������������������������������������������������������������������������������������������ 861

Default Privilege Sets ������������������������������������������������������������������������������������������������������������������������� 862

Creating Custom Privilege Sets ���������������������������������������������������������������������������������������������������������� 862

Exploring Extended Privileges �������������������������������������������������������������������������������������� 871

Defining Built-In Extended Privileges ������������������������������������������������������������������������������������������������� 871

Using Custom Extended Privileges ���������������������������������������������������������������������������������������������������� 872

Controlling File Access ������������������������������������������������������������������������������������������������� 876

Summary ���������������������������������������������������������������������������������������������������������������������� 877

■ Contents

xxxvi

■Chapter 41: Advanced Sharing and Analysis Tools ������������������������������������������� 879

Database Design Report ����������������������������������������������������������������������������������������������� 879

Generating a Design Report ���������������������������������������������������������������������������������������������������������������� 879

Exploring a Design Report ������������������������������������������������������������������������������������������������������������������ 881

Introducing Professional DDR Tools ���������������������������������������������������������������������������������������������������� 884

Developer Utilities �������������������������������������������������������������������������������������������������������� 885

Exploring the Developer Utilities Dialog���������������������������������������������������������������������������������������������� 885

Specifying Solution Options ���������������������������������������������������������������������������������������������������������������� 887

Summary ���������������������������������������������������������������������������������������������������������������������� 894

■Chapter 42: Getting Connected �������������������������������������������������������������������������� 895

Connect with Mark Munro �������������������������������������������������������������������������������������������� 895

Learn FileMaker Pro 16 Official Sites ��������������������������������������������������������������������������� 895

FileMaker Inc� �������������������������������������������������������������������������������������������������������������� 896

Database Design Report (DDR) Analysis Tools �������������������������������������������������������������� 896

Plug-Ins ������������������������������������������������������������������������������������������������������������������������ 896

Communities ���������������������������������������������������������������������������������������������������������������� 896

Technology Sites ���������������������������������������������������������������������������������������������������������� 897

Function Background Information �������������������������������������������������������������������������������� 897

Index ��������������������������������������������������������������������������������������������������������������������� 899

xxxvii

About the Author

Mark Conway Munro is an author, software developer and entrepreneur. A 1988 introduction to FileMaker led Mark to pursue a career as a developer. Soon after, he was using AppleScript and FileMaker for information management and process automation. In 1994, Mark founded Write Track Media, a computer consultancy to develop custom database and workflow automation solutions for clients.

Today, Mark continues in that mission, using AppleScript and FileMaker Pro in combination with other tools and technologies to build time-saving systems for a diverse list of clients. By fully understanding the virtue of using technology to free humans from repetitive computer tasks so they can pursue a higher level of productivity, Mark’s passion for the work is unwavering.

Mark is also the author of AppleScript: Developer Reference (2010, Wiley).

xxxix

About the Technical Reviewer

Brian Sanchez is a FileMaker developer, a consultant with wide experience, and a founding member of aACE Software. Brian’s experience is wide reaching. For nearly 20 years, he has designed and implemented custom apps for inventory tracking, digital catalogs built with FileMaker Go, plus asset management and pricing tools. His clients range from catering businesses to TV casting agencies to European vacationing services. Brian holds multiple FileMaker certifications. His development philosophy is to build systems with such integrity in the code and architecture that the client never needs to call again — unless they’re looking to upgrade the solution. Brian is the technical editor of Learn FileMaker Pro 16 (2017, Apress).

xli

Foreword

In the 1990s and 2000s, I ran TECSoft, an AppleScript and FileMaker Pro development shop in New York City. Our specialty was database publishing – the powerful ability of Apple’s AppleScript technology to intelligently extract data from FileMaker databases and to format it ready-for-print in page layout applications such as QuarkXPress and Adobe InDesign.

We worked closely with Apple and Claris, the predecessor of FileMaker Inc., to showcase the abilities of their technologies. In 1994, growing – and needing additional developer talent, we asked our pal Eric Silver, the then New York area sales rep at Claris, to be on the lookout for us. He told me about a FileMaker wizard he knew named Mark Munro working at Jack Morton, an AV production company in New York.

Mark was responsible for organizing Morton’s production project data and managing their workflow. We met and he explained their workflow and showed me how he had organized it in FileMaker so that management was able to track projects from start to finish, track the various assets involved, and track and accurately bill their clients for the time and materials involved.

Mark’s work was amazing and I immediately realized we had come across FileMaker gold. All aspects of his company’s workflow were logically organized in a functional workflow management tool – and most impressively of all – was clearly presently in an easy-to-follow interface. It is mind-bending to realize that Mark had accomplished this before FileMaker was a relational database.

We began working with Mark as a freelance FileMaker Pro and AppleScript gun slinger. We threw our most complicated and demanding projects at him – a huge workflow management and catalog publishing project at Sony Music, a very complex and mission-critical graphic file creation project with drop-dead deadlines for Associated Press, to name just a couple.

In short order, Mark had more than enough work to go out on his own as a full-time FileMaker and AppleScript developer. As TECSoft’s focus turned to working with Apple delivering AppleScript seminars and training sessions, we created the TECSoft Developers Consortium (TDC) to handle the huge demand for FileMaker and AppleScript integration projects our seminars generated. With Mark as TDC developer #1, we were able to create an international referral network of FileMaker Pro and AppleScript developers that became the largest FileMaker Pro and AppleScript brain trust on earth.

Mark has now been running his own successful development company, Write Track Media, for over 20 years. What Mark possesses, more than any other developer I’ve worked with, is a true talent for organization. Mark’s passion makes him eminently qualified to pass along his mastery of FileMaker’s powerful organization tool. He just had to write this book.

John Thorsen Jr.

Connected Hearth, LLC

xliii

Acknowledgments

This book was an enormous challenge and would not have been possible without the contributions and encouragement of many.

Some long overdue thanks to Peter Samelson and Tony Spina who played a role in my early introduction to FileMaker decades ago. To Sylvia Griffiths for hiring me at Jack Morton and to Laura Shuler for asking me to develop a budget management database. To John Thorsen, Jr., for development opportunities he offered me and for being such a prolific source of advice, knowledge, and humor.

Continuing thanks to all my incredible clients for finding new challenges that push me to find new technological solutions to improve their database and workflow systems.

To the whole team at Apress for providing me with this opportunity and for all their hard work in bringing everything together.

Most of all, a huge thanks to two close friends. To Brian Sanchez for his work reviewing the material with a keen eye for technical accuracy. His feedback led to many key improvements that greatly enhanced the quality of the material. Also, to Walker Stevenson for reading a draft of the manuscript and providing some additional technical notes and suggestions for improvement.

xlv

Introduction

Back in late-1988 while working at Tannen’s Magic Store in Manhattan, I was introduced to FileMaker. A discussion arose about using computers to improve the efficiency and accuracy of the pen and paper-based ordering system. To do that, we first needed to enter the inventory into a database. My boss handed me what was then a state of the art personal computer; a Macintosh SE, which was a small box with a tiny 9-inch black and white screen. It was loaded with a copy of the newly released FileMaker II by Claris Corporation. That version was expressed in Roman numerals and this was two years before the “Pro” suffix would be added and the versioning reset to 1.0.

With the computer, a small rolling cart and a long extension cord, I headed into the stock room to begin computerizing the inventory. I barely used a computer prior to that day and it was my first glimpse at FileMaker. I spent about ten minutes becoming acquainted with the software, then quickly created a database file and set up a handful of fields. This rapid adoption is not so much a testament to my intuitive ability with software but more attributable to the extremely primitive nature of that early version. The database I created was extraordinarily crude but it allowed us to begin entering product information and to print on paper “labels” that could be taped onto product boxes to improve the hand-written names and prices.

For the next few weeks, with the help of another employee, I entered batches of products into the database. There was no network at the store at the time, so we periodically shuttled the database by 3.5” floppy disk to the main office computer to print out box labels displaying the information. These were affixed to boxes as the next batch of products were entered. Finally, we had a complete database of every available product. From there, I developed an order management system that pulled product information from that inventory file and installed a small network of computers each with access to a server. The project changed order fulfillment at the store and the course of my life.

Fast forward almost three decades, about twenty significant version increments later and we reach FileMaker Pro 16, an astonishingly powerful piece of software. Keeping with tradition, it is packed with features for users and developers in an integrated application. It contains a development environment and a customizable runtime. It balances an ease of use making it approachable by beginners and contains powerful standard technologies and robust customization options demanded by professionals.

The age of the software and its multi-decade evolution shows in an esthetic hodgepodge of styles throughout the development interface. The design of some dialogs look a little dated when compared to the newer additions; palettes and workspaces sporting a modern design. This seems to hint at a steadfast dedication to stability and a desire to avoid the frequent pitfall of many software titles; changing things for the sake of changing things. This gradual evolution of components contributes to the stable nature of the software across time even as it routinely takes leaps to evolve and keep pace with new technologies.

■ IntroduCtIon

xlvi

The complexity of different modes and perspectives so tightly integrated in a single application, and the sheer number of functions, tools and customization options available proved a challenge when deciding how to best present the material in a book. In the end, I divided the material into the following six parts, logically arranged in a hierarchy so that each chapter builds on the previous:

• Part 1 — Using FileMaker

• Part 2 — Defining Data Structures

• Part 3 — Writing Formulas and Using Functions

• Part 4 — Designing Interfaces

• Part 5 — Automating Tasks with Scripts

• Part 6 — Sharing and Networking

My hope is that the arrangement of material might serve both those who want to read it cover to cover and those who use it as a reference guide to look up specific topics and examples. I would enjoy hearing from you about your experience with the book and am open to suggestions for how to improve future editions. If you want to send feedback, ask a question, or read exclusive online content, visit my website for the book:

www.learn-filemaker.com

Unlike those early versions I used decades ago, FileMaker Pro 16 is a mature application with a solid track record, evolving feature set, substantial user base that should appeal to professional developers. And, while no one today should expect to learn it in ten minutes, it is still approachable for beginners and casual programmers. I hope this book convinces people to give it a try, both seasoned professionals and newcomers who are beginning their adventure into the world of custom database development.

Mark Conway MunroMay 2017 / Lewisburg, PA