Filemaker Pro 8.5 Tutorial File Maker Fmp85 En

User Manual: filemaker FileMaker Pro 8.5 - Tutorial Free User Guide for FileMaker Software, Manual

Open the PDF directly: View PDF PDF.
Page Count: 62

FileMaker® Pro 8.5
Tutorial
© 2004–2006 FileMaker, Inc. All Rights Reserved.
FileMaker, Inc.
5201 Patrick Henry Drive
Santa Clara, California 95054
FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries, and
ScriptMaker and the file folder logo are trademarks of FileMaker, Inc.
FileMaker documentation is copyrighted. You are not authorized to make additional copies or
distribute this documentation without written permission from FileMaker. You may use this
documentation solely with a valid licensed copy of FileMaker software.
All persons and companies listed in the examples are purely fictitious and any resemblance to
existing persons and companies is purely coincidental.
Credits are listed in the Acknowledgements document provided with this software.
For more information, visit our web site at www.filemaker.com.
Edition: 01
Contents
Lesson 1
FileMaker Pro basics
How to use this tutorial 7
We begin with a demonstration 7
We explain how it works 7
You build the structures 7
Where to find the lesson files 7
If you need to start over 8
Database concepts 8
What is a database? 8
Why use a database? 8
How is a database organized? 8
How is field data displayed? 9
FileMaker Pro basics 9
About FileMaker Pro modes 9
For more information 9
Lesson 2
Browsing information
Open a database and move between records 11
View information in different ways 12
See a different layout 12
View your layouts as forms, lists, and tables 13
For more information 14
Lesson 3
Finding and sorting records
Find records based on criteria in a single field 15
Find records based on criteria in separate fields 16
Find records that match multiple criteria in the same field 16
Find records that match a range of criteria in the same field 17
Narrow your search 18
Sort your found set 18
For more information 19
Lesson 4
Creating a database and entering records
Create a simple database and define fields 21
Look at the sample file 21
About field definitions 22
Create a database 22
Enter data into the database 23
Create the first record 23
Create another record 23
Modify data in a record 23
For more information 23
Lesson 5
Customizing what you see
Customize your view in Layout mode 25
Look at the sample layouts 25
About layouts and tables 26
About customizing layouts 26
Customize a layout 26
Resize, move, and add a field 26
Select and resize a field 26
Move a field 27
Add a field 27
Display a number as currency 27
Add color to a layout part 28
4 FileMaker Pro Tutorial
Add custom text to a layout 29
Add text 29
Change text size and color 29
Add a graphic to the layout 29
For more information 30
Lesson 6
Creating lists, mailing labels, and form letters
Create a columnar list 31
Look at the sample list 31
Create a columnar list 31
Create mailing labels 32
Look at the sample labels 32
About label layouts 32
Create a label layout 33
Create a form letter 34
Look at the sample letter 34
About form letter layouts 34
Create a form letter 34
For more information 36
Lesson 7
Simplifying data entry
Enter data using value lists 37
Look at the sample value list 37
Define a value list 37
Assign a value list to a field and
display it as radio buttons 38
Generate values with a calculation field 39
See how calculations speed data entry 39
Create a calculation field 39
Test your calculation 40
Automatically enter a serial number 41
Look at a serial number example 41
Create a field for serial numbers 41
For more information 41
Lesson 8
Automating tasks with buttons and scripts
Perform a task using a button 43
Look at a sample button 43
Create the button 43
Perform a series of tasks using a script 44
Run a script in the sample file 44
About scripts 44
Create a script to preview the Labels Layout 44
Assign a script to a button 45
For more information 46
Lesson 9
Creating and running reports
Generate a report with grouped data 47
Look at a sample report 47
About subsummary reports 48
Create a subsummary report 48
Generate a report with grouped data and totals 50
Look at a sample report 50
Create a report with grouped data and totals 51
Save and send a report as a PDF file 53
For more information 53
Contents 5
Lesson 10
Making databases relational
View data from one related record 55
See how relationships work in the sample files 55
About related tables 56
Display a related record in a file 56
View data from a list of related records 57
Work with related records in the sample file 57
About working with lists of related records 58
Display a list of related records 58
For more information 59
Lesson 11
Keeping your data safe
How to back up your database 61
When to back up 61
For more information 61
6 FileMaker Pro Tutorial
Lesson 1
FileMaker Pro basics
Welcome to the FileMaker® Pro tutorial. This tutorial shows
you how you can manage your information in FileMaker Pro.
You will learn how to use FileMaker Pro software to:
1 locate and sort information
1 create and enter records in a simple database
1 create mailing labels
1 create calculations, buttons, and scripts
1 create and run reports
1 create relationships between FileMaker Pro database tables
It takes approximately four hours to complete this tutorial, which
can be done in one session or several shorter sessions.
How to use this tutorial
These lessons are based on the membership database of a fictitious
travel firm, The Corporate Travelers Club. Corporate travelers who
are members of this club save their businesses money on travel costs,
and the club’s expenses are offset by an annual membership fee.
FileMaker Pro is used to track the members’ names, addresses,
and membership status, as well as to generate labels and form letters
to contact members.
It’s best to complete these lessons sequentially, as the concepts
introduced in early lessons are assumed to be understood in
later lessons. However, because the lessons are self-contained,
it’s possible to skip lessons entirely, or to complete them later
if desired.
This tutorial assumes that you are familiar with your computer’s
operating system. Opening files, locating folders, and other activities
that require some knowledge of your computer’s OS are a necessary
part of completing this tutorial.
Files included with this tutorial are intended to illustrate the features
of FileMaker Pro, and as such, might be unsuitable for use as
templates for further development.
We begin with a demonstration
To show you the goal of each lesson up front, we guide you through
a sample file that illustrates a feature or concept. This way, you
will always know a lesson’s objectives.
We explain how it works
As we introduce new techniques and concepts, we will explain
how to use them in other situations.
You build the structures
Because using FileMaker Pro is the most effective way to learn
the application, each lesson features a hands-on activity designed
to guide you through menus, screens, and concepts step by step.
Where to find the lesson files
If the tutorial files were installed, they are in:
FileMaker Pro 8.5\English Extras\Tutorial
You can also download the tutorial files by choosing Help menu >
Learning Center. In the Documentation area, click tutorial files.
8 FileMaker Pro Tutorial
The sample files illustrate the concepts explained in the lessons,
and let you see how features work before you build them. Refer back
to the sample file associated with each lesson if you need to.
The working files mimic the sample files, except the features being
taught in particular lessons have been removed. You will add these
missing items and structures as you complete each lesson.
If you need to start over
If you make a mistake or need to start over, replace your existing
Tutorial folder with a new copy. See “Where to find the lesson files”
on page 7 for more information.
Database concepts
What is a database?
A database is a method of organizing and analyzing information.
You’ve probably used several databases recently without realizing it.
A date book, a parts list, and even your own address book are
databases.
Why use a database?
Storing information in a database file has many benefits. A database
doesn’t just hold information—it helps you organize and analyze
the information in different ways. For example, databases allow you
to group information for reports, sort information for mailing labels,
count your inventory, or find a particular invoice.
Computerized databases offer many additional advantages over their
paper-based counterparts: speed, reliability, precision, and the ability
to automate many repetitive tasks.
How is a database organized?
A database file is organized into one or more tables. Tables store
records. Each record is a collection of fields.
Imagine your address book is a FileMaker Pro database file. Each
listing in your address book is one record in an Address Book table.
Each record has information, such as name, address, city, and so on.
Each of these pieces of information—name, address, and city—is
stored in a separate field.
Sample02.fp7
Sample03.fp7
Sample04.fp7
Sample05.fp7
Sample06.fp7
Sample07.fp7
Sample08.fp7
Sample09.fp7
Sample10.fp7
MyFile05.fp7
MyFile06.fp7
MyFile07.fp7
MyFile08.fp7
MyFile09.fp7
MyFile10.fp7
Sample Files Working Files
Overview of the FileMaker Pro Tutorial folder structure
English Extras
Tutorial
FileMaker Pro 8.5 folder
FileMaker Pro basics 9
How is field data displayed?
FileMaker Pro displays fields on layouts. Each layout is based on
a single table, and displays records from that table.
Imagine that your database has a Tasks table in addition to the
Address Book table. A layout based on the Address Book table will
display fields and records from the Address Book table. A layout
based on the Tasks table will display fields and records from the
Tasks table.
FileMaker Pro basics
Unlike most word processing or spreadsheet programs,
FileMaker Pro saves your work automatically. Consequently, it’s
important to carefully consider your actions when making sweeping
changes to your files, especially when deleting records. Once records
are deleted, they are completely removed from your database.
As you will learn in lesson 11, you should back up your files on
a regular basis. Backups can save you many hours of unnecessary
work and worry in the event that your files become lost or damaged,
or records are inadvertently deleted.
About FileMaker Pro modes
When you work in FileMaker Pro, you work in one of four modes.
1 Use Browse mode to enter data and view records.
1 Use Find mode to locate a record or a group of records quickly.
1 Use Layout mode to specify how information will appear on
the screen or when you print it.
1 Use Preview mode to see what the pages will look like when
you print them.
Once you have opened a database, you can switch from one mode
to another using either the View menu, mode buttons, or the mode
pop-up menu at the bottom of the application window.
For more information
For more information on FileMaker Pro basic concepts, see chapter 1
of the FileMaker Pro User’s Guide.
You can also find comprehensive information about procedures
and concepts in FileMaker Pro Help. To access FileMaker Pro Help,
choose Help menu > FileMaker Pro Help.
To access the FileMaker Learning Center on the web, where you
can find resources such as ready-made solutions and the FileMaker
Knowledge Base, choose Help menu > Learning Center.
Name of layout
Number of the
current record
Fields
Filename
Mode buttons
Current mode
(Browse)
10 FileMaker Pro Tutorial
Lesson 2
Browsing information
You view, enter, or change data in Browse mode. This is the simplest
way to interact with your database.
In this lesson you will:
1 open a database with data already in it
1 move between records
1 view information in different ways by switching layouts
1 see the difference between form view, list view, and table view
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
Open a database and move
between records
To open the sample database for this lesson:
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample02.fp7.
4. Notice that the database is in Browse mode. FileMaker Pro
defaults to Browse mode when a database is opened.
In the status area, notice that there are 30 records and that the first
record is displayed.
5. Click the right page of the book icon to move forward one record
at a time, and click the left page to move back one record at a time.
6. Drag the slider to the right and release to move forward a number
of records at one time. Drag the slider to the left and release to move
backwards a number of records.
You can also click the current record number, type the record
number you want, then press Enter (Windows) or Return (Mac OS).
Tip The Records menu also provides commands to move between
records. Choose Records menu > Go to Record and choose either Next,
Previous, or Specify.
The current mode is
identified at the top
of the status area
Slider
Book icon
Number of
records
Record currently
displayed
Status area
12 FileMaker Pro Tutorial
View information in different ways
Even though you enter information only once in FileMaker Pro,
you can use that information in many ways. Layouts let you view
some or all of your fields.
Because it is not necessary to see all of your fields in each layout,
layouts are a powerful tool for working with or printing just the
information you need to accomplish a particular task.
See a different layout
To see some layouts in action, use the Sample02.fp7 sample file
you just opened.
1. Click the Layout pop-up menu, located above the book icon.
A list appears showing the layouts available in this file.
2. Notice the check mark next to the Data Entry layout, your
current layout. The Data Entry layout shows all of the fields in
the Sample02.fp7 table.
Steve Williams
789 Ninth Avenue
New York, NY 10001
Juanita Alvarez 555-1234
Michelle Cannon 555-1234
Andre Common 555-1234
Marie Durand 555-1234
Jean Durand 555-1234
William Johnson 555-1234
John Lee 555-1234
Patrick Murphy 555-1234
Le Nguyen 555-1234
Kentaro Ogawa 555-1234
Mary Smith 555-1234
John Smith 555-1234
Sophie Tang 555-1234
Steve Williams 555-1234
Betty Wilson 555-1234
Phon e Lis t
Dear Sophie,
Thank you for reserving a cruise with us. We
value your business and appreciate the
opportunity to serve you.
If you have any questions about your
reservations, please call us—we want you to
be satisfied with your cruise.
Sincerely,
John Lee
The same data can be arranged differently with multiple layouts
Layout
pop-up menu
The Data Entry layout displays all of the fields in the Sample02 table
Browsing information 13
3. Choose the List of Members layout from the Layout pop-up menu.
This layout shows each record as one row in a columnar list. Notice
that the List of Members layout contains only four of the fields that
were present in the Data Entry layout. Because fewer fields are
present on this layout, some data is simply not displayed, however,
no data has been removed from the database.
4. Go to the Layout pop-up menu and return to the Data Entry layout.
No data has been lost.
View your layouts as forms, lists, and tables
You can view your layouts in three different ways: as a form, as a list,
and as a table.
1 Form view displays your current layout one record at a time.
1 List view shows your current layout as a list, with one record
appearing beneath another.
1 Table view shows you many records at one time in a grid.
Generally, layouts can be toggled between form view, list view,
and table view while the database is in Browse mode.
Switch between form view, list view, and table view in the same
layout to see how they are different.
1. In Sample02.fp7, switch to the List of Members layout. You
see many records, displayed as a list.
2. Choose View menu > View as Form.
You now see a single record, displayed in the same layout. Only
the viewing option has changed.
3. Choose View menu > View as Table.
The View as Table feature allows you to view many records at
once in a grid.
4. Choose View menu > View as List to return to the original view
of the List of Members layout.
5. When you are finished with this lesson, close the file by choosing
File menu > Close.
The List of Members layout displays only four of the fields present on the
Data Entry layout
Form view
List view
Table view
The List of Members layout, viewed as a form, then as a list, and finally as a table
14 FileMaker Pro Tutorial
For more information
You have opened a database, browsed through records,
switched layouts, and learned the differences between form view,
list view, and table view. For more about browsing information in
FileMaker Pro, see chapter 1 of the FileMaker Pro User’s Guide.
Lesson 3
Finding and sorting records
Your database is a collection of records. Sometimes you’ll work
with all of the records in the database (to mail out an annual catalog
for each customer, for example). Often, however, you’ll work with
a subset of your database—people who come from a particular city,
for example, or records that fall within a particular range of dates.
In FileMaker Pro, this process of searching for records that match
particular criteria is called finding records. Once you’ve found the
records you want to work with, you can change their order by sorting
them. Records can be sorted in ascending or descending order.
In this lesson, you will:
1 find records matching criteria in a single field and multiple fields
1 find records matching a range of data
1 narrow your searches by omitting records
1 sort records in ascending and descending order
Important Copy the Tutorial folder to your hard drive or verify
that it is installed before beginning this lesson. See “Where to find
the lesson files” on page 7 for more information.
Find records based on criteria in
a single field
In the membership database, find all of the members that are
from New York City.
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample03.fp7.
4. Notice that the database is in Browse mode.
The first record is for a member from New York City.
5. Right-click (Windows) or Control-click (Mac OS) the City field.
6. From the shortcut menu, choose Find Matching Records.
Your find request returns records for four members who live in
New York. This is the found set.
7. Click the book icon or slider to view each of the four records
in the found set.
Choose this item from
the shortcut menu
Number of records
in the found set Total number of records
in the database
16 FileMaker Pro Tutorial
Find records based on criteria in
separate fields
You can find records that match multiple criteria, for example
members who are both from the United States and are new members.
This type of search is commonly referred to as an AND search.
To perform an AND search in FileMaker Pro, type each search
criterion directly into the appropriate field in Find mode.
To find all members who live in the United States and are new
members:
1. Choose View menu > Find Mode.
Use Find mode to perform more advanced searches. In Find mode,
you create a find request using the fields in the layout you see.
Type the criteria you want to search for directly into the fields on
the request.
2. Type USA in the Country field.
3. Locate the Membership Type field, and select the New radio
button.
4. Click the Find button in the status area.
Your find request returns a found set of two records for the two
new members who live in the United States.
5. To find all of the records in your database, choose Records menu >
Show All Records.
Note It is not necessary to choose Show All Records before
performing a Find, as FileMaker Pro finds records from the entire
database by default.
Find records that match multiple criteria
in the same field
Sometimes you need to find records that match more than one
criterion in a single field. For example, you may need to find all
members located in either New York or London. This type of search
is commonly referred to as an OR search, because your found set will
consist of records that match any one of the find criteria.
Select the New radio button
in the Membership Type field
Find
button
Finding and sorting records 17
To perform an OR search in FileMaker Pro, you will need to use
multiple find requests.
1 Type the first search criterion into the appropriate field of the
first find request.
1 Create a second find request and enter the second search criterion
in the same field.
When you click the Find button, FileMaker Pro will retrieve all
of the records that match any of the criteria you’ve entered.
To find all members living in New York or London:
1. Choose View menu > Find Mode.
2. Type New York in the City field.
3. Choose Requests menu > Add New Request.
Notice that the status area shows that there are two requests.
4. Type London in the City field of this second request.
5. Click Find in the status area.
Your find request returns a found set of six records for six members
who live in either New York or London.
Find records that match a range of criteria
in the same field
Sometimes, you might want to find records that match a range
of criteria within a single field. For example, you might want to find
all of the records that fall within a one-month period, or locate all
of the sales invoices numbered between 500 and 1000.
To perform this type of search in FileMaker Pro, you use a special
range symbol in your find request to specify the lower and upper
limits of your find criteria.
To find the members who paid their membership fees between
January 1, 2004 and June 30, 2004:
1. Choose View menu > Find Mode.
2. Type 1/1/2004 in the Date Paid field.
3. In the status area, click the Symbols pop-up menu. Select range
from the list, or type an ellipsis (...).
Your find request should now have 1/1/2004... in the
Date Paid field.
4. Immediately after the ellipsis (...), type 6/30/2004.
5. Click Find.
Your search returns six records, for six members who paid their
fees within the first six months of the year 2004.
Number of requests
Symbols
pop-up menu
18 FileMaker Pro Tutorial
Narrow your search
Sometimes, you might need to find records that match certain
criteria while at the same time excluding others (for example, finding
all of the records that were added in a given year except for those
added in February, or finding all customers who reside in New York
state except for those in New York City). You can perform these
types of finds by using a combination of multiple find requests
and omitting certain records.
Because FileMaker Pro processes multiple find requests in the
order they are created, it is possible to create very specific, layered
searches in this manner. Omitting records in a search does not delete
them from the database.
To find the records of members who paid their fees in the first
six months of 2004, except for those who paid their fees in February:
1. Choose View menu > Find Mode.
2. Type 1/1/2004 in the Date Paid field.
3. In the status area, click the Symbols pop-up menu. Select range
from the list, or type an ellipsis.
4. After the ellipsis, type 6/30/2004.
5. Choose Requests menu > Add New Request. Notice that the status
area shows that this is the second request.
6. Type 2/1/2004 in the Date Paid field.
7. In the status area, click the Symbols pop-up menu and select range
from the list, or type an ellipsis.
8. After the ellipsis, type 2/29/2004 in the Date Paid field.
9. Click Omit in the status area to select it.
10. Click Find.
Your search returns five records for five members who paid
their fees within the first six months of 2004, except the month
of February.
Sort your found set
Once you have a found set of records to work with, you might want
to sort those records. For example, you might want to display the
records in alphabetical order, or sort them from newest to oldest.
To sort records in alphabetical order by the members’ last names:
1. Go to the Layout pop-up menu and choose the List of Members
layout. This layout will make it easier to see the results of the sorting.
2. Choose Records menu > Sort Records.
3. If any fields appear in the Sort Order column on the right side
of the dialog box, click Clear All.
4. In the list of available fields, select Last Name and click Move.
Omit checkbox
Finding and sorting records 19
Notice the sort direction symbol to the right of the Last Name field
increases in size from left to right. This indicates that when the
database is sorted by this field, the data will be in ascending order
(from a to z).
5. Click Sort.
The names in the List of Members are now in alphabetical order
by last name.
6. When you are finished with this lesson, close each open file
by choosing File menu > Close.
For more information
You have found records based on a variety of criteria, and narrowed
your searches by using Omit. You have sorted the results of your
searches. For more information on finding and sorting records in
FileMaker Pro, see chapter 1 of the FileMaker Pro User’s Guide.
Sort direction buttons
become active when
a field is selected
20 FileMaker Pro Tutorial
Lesson 4
Creating a database and entering records
In the previous lessons, you saw how to use a simple database with
existing data. Now you will create your own file and add records.
In this lesson you will:
1 create a simple database
1 define fields to hold different kinds of data
1 create records
1 enter data
1 modify data
If you are not familiar with database basics, you should do the
first two lessons in this tutorial before continuing.
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
Create a simple database and define fields
Look at the sample file
The sample file is the model for the file you’ll create. It shows you
how fields are defined and that different field types hold different
types of data.
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample04.fp7.
4. Choose File menu > Define > Database.
5. In the Define Database dialog box, click the Fields tab if it is
not already selected.
6. Choose Members from the Table pop-up menu if it is not
already selected.
You see all of the fields in the Members table.
7. Notice the fields are of different types. The First Name and
Last Name fields are of type Text. Fee Paid is of type Number, and
Date Paid is of type Date.
8. Click OK.
9. Notice that the data in each field corresponds to the field type,
such as numbers in the number field and a date in the date field.
22 FileMaker Pro Tutorial
About field definitions
You create a field for each category of information you want,
such as First Name or City. To find, sort, calculate, and display data
correctly, the field type should match the kind of data it contains
(text, number, date, and so on). For example, you can’t search for
text values in a field of type Number.
You will learn about other field types in later lessons.
Create a database
1. Choose File menu > New Database.
2. If you see the New Database dialog box, choose Create a new
empty file, then click OK. If not, go to step 3.
3. Go to the Working Files folder and select it as the location for
this file.
4. For File Name, type MyFile04.
5. Click Save.
The Define Database dialog box appears. By default, FileMaker Pro
creates a table for you, with the same name as your file. You can
change this name later if you want to.
You will now create fields to store information.
6. To create the first field, type First Name in the Field Name box.
7. Notice that the field type is Text.
8. Click Create.
9. Type Last Name in the Field Name box.
10. Click Create.
11. Type Fee Paid in the Field Name box, select Number from
the Type list, then click Create.
12. Type Date Paid in the Field Name box, select Date from
the Type list, then click Create.
13. Click OK.
You see the empty fields in a new, blank record. Field labels identify
the fields. Your file is ready for data entry.
FileMaker Pro automatically saves your changes as you work.
Specify the field type
Name
a field
Field labels
Enter data here
Creating a database and entering records 23
Enter data into the database
Now you can begin to enter members’ data.
Create the first record
1. If you don’t see field boxes, press Tab to begin data entry.
2. Type Jane in the First Name field.
3. Press Tab to move to the next field.
4. Type Doe in the Last Name field.
5. Type 25 in Fee Paid.
You will learn how to format number fields to display as currency
in the next lesson.
6. Type 11/11/2004 in Date Paid.
The completed record should look like this:
Create another record
1. Choose Records menu > New Record.
2. As you did for Jane Doe’s record, enter data for John Smith,
who paid 75 dollars on 2/2/2004.
Your database now contains two records. Click the book icon to see
each record.
Modify data in a record
Suppose you realize that Jane Doe paid 75 dollars, not 25. You can
easily correct the entry.
1. Go to Jane Doe’s record.
2. Select the amount in Fee Paid.
3. Type the new amount, 75.
4. Click an empty area outside a field to save the change.
5. When you are finished with this lesson, close each open file
by choosing File menu > Close.
For more information
You have created a simple database and defined fields, and added
and modified records. For more information, see chapters 1 and 2
in the FileMaker Pro User’s Guide. You can also use or build on
the database template files included with FileMaker Pro. For more
information on entering data in different field types and by different
methods, including import, see lesson 7 in this tutorial and
chapters 1 and 4 in the FileMaker Pro User’s Guide.
24 FileMaker Pro Tutorial
Lesson 5
Customizing what you see
You can enhance the way your data looks by adding graphics
and other effects.
In this lesson, you will:
1 learn how layouts determine what you see
1 add, resize, and move fields
1 display values in a number field as currency
1 add text to a layout, and change its size and color
1 add graphics
1 see where to find other ways you can customize a layout
Important Copy the Tutorial folder to your hard drive or verify
that it is installed before beginning this lesson. See “Where to find
the lesson files” on page 7 for more information.
Customize your view in Layout mode
Look at the sample layouts
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample05.fp7.
4. Choose Data Entry from the Layout pop-up menu if it is not
already selected.
Notice that the layout is structured like a standard form, with
field labels on the left and data on the right. Also, all fields in the
Members table are present on the Data Entry layout.
5. Choose Fee Information from the Layout pop-up menu.
6. Notice that although this is the same record in the same table,
the data is displayed differently:
1 First Name and Last Name are side by side
1 You see only five fields:
1 First Name, Last Name, City, Country, and Fee Paid
1 The amount in Fee Paid is prefaced with a currency symbol.
You will make these changes to MyFile05 later in this lesson.
7. Choose View menu > Layout Mode.
Layout
pop-up menu
26 FileMaker Pro Tutorial
You use Layout mode to customize the appearance of your data.
Although the data is still in the file, you do not see it here. Instead,
you see the names of the fields.
About layouts and tables
Each layout is based on a single table, and shows records from
that table. If your file contains only one table, all layouts in your file
will be based on that table. If your file contains more than one table,
you must choose which table your layout will use at the time you
create the layout, although you can change this later if necessary.
The table you choose as the basis for your layout is important
because it determines which fields and records are available for
use on that layout. Fields and records that are not stored in the current
table can still be used, but must be accessed through relationships.
For more information on relationships, see lesson 10, “Making
databases relational.”
About customizing layouts
Design layouts in Layout mode. You can include any combination
of fields, text, and graphics on a layout. You can change the font
and color of fields and text. You can also change the formatting
of Number or Date fields.
Changes you make in Layout mode affect only the way data appears.
The data itself remains as it was entered.
Tip Leave the sample file open to refer to as you build these features
in the working file.
Customize a layout
You will change a simple layout in this lesson’s working file to
make it look like the Fee Information layout in the sample file.
1. Open the Tutorial folder on your hard drive.
2. Open the Working Files folder.
3. Open MyFile05.fp7.
4. Choose View menu > Layout Mode.
5. Choose Fee Information from the Layout pop-up menu.
You see a plain layout. You will modify this layout in different ways
in the following sections.
Resize, move, and add a field
Select and resize a field
1. In Layout mode, click the First Name field to select it.
2. Drag the handle at the lower-right corner of the field to the
left until the field is smaller, yet large enough to display the longest
first name you expect in your file.
3. Choose View menu > Browse Mode.
4. Click Save to save changes to this layout, if prompted.
FileMaker Pro can save layout changes automatically, or prompt
you to save changes before leaving Layout mode. To save layout
changes automatically, select the Save layout changes automatically
checkbox in the Save changes to this layout dialog box.
5. In Browse mode, flip through the records.
If the field doesn’t display all names completely, return to Layout
mode and make the field larger.
6. Repeat this process for Last Name.
Click and drag the
handle to resize
Click to select
Customizing what you see 27
Move a field
1. Choose View menu > Layout Mode.
2. Click inside the Last Name field and drag it beside the
First Name field.
In the next steps, you’ll align these fields.
3. Press Shift and click the First Name field to add it to your
selection. Both the First Name and Last Name fields are selected.
4. Choose Arrange menu > Align > Top Edges.
The Last Name field moves until it aligns with the top of the
First Name field.
5. Drag the Last Name field label above the Last Name field.
6. Drag the First Name field label above the First Name field.
Experiment with the Align commands to align the field labels
with each other.
7. Choose View menu > Browse Mode to see your results.
Add a field
If a field has been defined in a table, you can display it on any
layout based on that table. In this database, some defined fields
are not on this layout. You will add one of these fields now.
Note You can also place fields from other tables on your layouts,
as explained in Lesson 10.
1. Choose View menu > Layout Mode.
2. Using the Field tool, drag the field to the layout, and place it below
the First Name field.
3. In the Specify Field dialog box, select the City field.
4. Click OK.
5. Choose View menu > Browse Mode to see your field.
You see a city entered in each record. City data was entered
previously, and the field holds the data.
Display a number as currency
You can display a number as currency, even though only the number
is typed into the field.
1. Choose Window menu > Sample05.
2. Choose View menu > Browse Mode.
3. In the Fee Information layout, look at Fee Paid and notice that
the number displays as currency.
4. Click the number to see the data actually entered in the field.
Formatting affects only the way data is displayed. It does not
change the data.
5. Choose Window menu > MyFile05.
6. Choose View menu > Layout Mode.
7. Select the Fee Paid field.
8. Choose Format menu > Number.
Field tool
Drag the new field
28 FileMaker Pro Tutorial
9. Select options as shown in the following Number Format
dialog box.
10. Click OK.
11. Choose View menu > Browse Mode to see the formatted data.
Add color to a layout part
You will change the color of the top of the layout to match the colors
of other layouts in the file.
1. Choose Window menu > Sample05.
2. Choose View menu > Layout Mode and look at the header at the
top of the layout.
This is your model.
3. Open MyFile05.fp7 if it is not already open.
4. Choose View menu > Layout Mode.
5. Choose Fee Information from the Layout pop-up menu.
6. Select the Header tab to make that part of the layout active.
Windows: The Header label will become lighter in color when
selected.
Mac OS: The Header label will become darker in color when
selected.
7. Choose the fill color palette.
8. Choose Other Color from the fill color palette.
The header part uses a custom color.
9. Mac OS: Select the sliders icon and choose RGB Sliders
from the Colors dialog box pop-up menu. (Windows users can skip
this step.)
10. Enter these values in the Color dialog box:
11. Do one of the following:
1 Windows: Click Add to Custom Colors, then OK.
1 Mac OS: Click OK.
The header is now colored.
Color Value
Red 170
Green 191
Blue 170
Fill color palette
Customizing what you see 29
Add custom text to a layout
You will add the name of the organization to the top of the layout,
then format the text.
Add text
1. Choose Window menu > Sample05.
2. Choose View menu > Layout Mode and look at the heading at
the top of the layout.
This is your model.
3. Open MyFile05.fp7 if it is not already open.
4. Choose View menu > Layout Mode.
5. Select the text tool.
6. Click the top of the layout where you want to begin the line
of text.
7. Type The Corporate Travelers Club.
8. Click the selection tool to end the text entry.
Change text size and color
1. Click the Corporate Travelers Club text to select
the text block.
2. Choose Format menu > Text.
3. Choose Times from the Font list.
4. Choose Custom from the Size list, and type 28.
5. For Color, choose white or another color.
6. Click OK.
Add a graphic to the layout
Add a logo beside the club name.
1. Choose Window menu > Sample05.
2. In the Fee Information layout, choose View menu > Layout Mode
and notice where the logo appears on the layout.
3. Open MyFile05.fp7 if it is not already open.
4. Choose View menu > Layout Mode.
5. Click beside the Corporate Travelers Club text, where
you want to place the club logo.
You will see no change onscreen yet.
6. Choose Insert menu > Picture.
7. Open the Working Files folder.
8. Make sure all file types are showing, and select logo.gif.
9. Click Open.
10. Drag the logo to move it if necessary.
Text tool
30 FileMaker Pro Tutorial
11. Choose View menu > Browse Mode to see the finished layout.
12. When you are finished with this lesson, close each open file
by choosing File menu > Close.
For more information
You have learned how to enhance the appearance of your data
by using graphics, custom text, field formatting, and creative
positioning of objects on layouts.
There are many other ways to customize the appearance of fields
and layouts.
For example, after you’ve created a layout, you can:
1 add effects like embossing or patterns to objects
1 use lines or boxes to highlight or separate information
1 add scroll bars to individual fields
1 change background or field color
When you create a new layout, you can apply color and style using
a theme.
For more information on these enhancements, see FileMaker Pro
Help. The database templates that come with FileMaker Pro also
show ways to enhance layouts. For more information on how to use
the templates, see Customizing Starter Solutions in the Electronic
Documentation folder (inside the English Extras folder).
Lesson 6
Creating lists, mailing labels, and form letters
You can easily create layouts to view and print information in many
different ways.
In this lesson, you will create:
1 a list of your records
1 mailing labels
1 a form letter
Important Copy the Tutorial folder to your hard drive or verify
that it is installed before beginning this lesson. See “Where to find
the lesson files” on page 7 for more information.
Create a columnar list
A columnar list shows many records simultaneously. Each row
is one record. Each column holds one category of data, such as
Last Name or Phone Number.
Look at the sample list
You can create a list of records that shows just the information
you want to see.
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample06.fp7.
4. Choose the List of Members layout from the Layout pop-up menu.
You see a columnar list showing some of your fields.
5. Choose View menu > Layout Mode to view the layout that produces
the columnar list you just looked at.
Each field on the layout appears once, but the list displays many
records.
Create a columnar list
1. Open the Tutorial folder on your hard drive.
2. Open the Working Files folder.
3. Open MyFile06.fp7.
4. Choose View menu > Layout Mode.
5. Choose Layouts menu > New Layout/Report.
Layout
pop-up menu
32 FileMaker Pro Tutorial
6. For Layout Name, type List of Members.
7. Select Columnar list/report for the new layout type and click Next.
8. Select the Columnar list/report layout again, then click Next.
9. Double-click each of the following fields in the order you want
it to appear in the list:
1 Last Name
1 First Name
1 Company
1 Membership Type
These fields move to the Layout fields list.
10. Click Next.
11. Click Next again to accept the default sort order.
12. Select Standard from the list of layout themes, and click Next.
13. Click Next on each of the two remaining panels to accept the
defaults.
14. Click Finish.
The data in all records for the fields Last Name, First Name, Company,
and Membership Type appears in the List of Members layout. The
completed layout is displayed in Preview mode, which shows items
as they will appear when printed.
Create mailing labels
Look at the sample labels
1. Choose Window menu > Sample06.
2. Choose View menu > Browse Mode.
3. Select Labels in the Layout pop-up menu.
You see the mailing label for the current record.
4. Choose View menu > Preview Mode.
You see a page of labels as it will print.
5. Notice that not all records have the same number of lines of text.
Records with four-line addresses display all lines. In records needing
only three lines, the extra line is automatically omitted so there is
no blank line in the labels.
6. Choose View menu > Layout Mode.
You see the names of fields that will appear on the labels.
About label layouts
Label layouts use merge fields. Merge fields expand or contract to
fit the data in the field, and take no space if the field is empty. Merge
fields are for display and printing only. You can’t enter data into
merge fields.
Merge fields
Creating lists, mailing labels, and form letters 33
Create a label layout
In this section, you will use the New Layout/Report assistant to:
1 create a label layout
1 select fields to include on the labels
Create the label
1. Choose Window menu > MyFile06.
2. Choose View menu > Layout Mode.
3. Choose Layouts menu > New Layout/Report.
4. For Layout Name, type Labels.
5. Select Labels for the new layout type.
6. Click Next.
7. Choose Avery 5160 from the Use label measurements for list.
8. Click Next.
Now you’re ready to specify the label contents.
Choose the fields that will appear on the labels
1. Double-click First Name in the list.
First Name moves to the Label Contents area. The insertion point
flashes.
2. After First Name, type a space.
3. Double-click Last Name in the list.
4. After Last Name, press Enter (Windows) or Return (Mac OS).
This moves the cursor to the next line.
5. Double-click Home Address 1 in the list, then press Enter
(Windows) or Return (Mac OS).
6. Double-click Home Address 2 in the list, then press Enter
(Windows) or Return (Mac OS).
7. Double-click City in the list.
8. Type a comma, then a space.
9. Double-click Country in the list.
Now you have set up the merge fields. Your label contents should
look like this:
10. Click Next.
34 FileMaker Pro Tutorial
11. Click View in Layout mode.
12. Click Finish.
13. When you finish viewing your label layout, choose View menu >
Preview Mode.
Your labels should look like those in the sample file.
Create a form letter
Look at the sample letter
1. Choose Window menu > Sample06.
2. Choose View menu > Browse Mode.
3. Choose Welcome Letter from the Layout pop-up menu.
4. Flip through the records and look at the letter. You might need
to scroll down to see all of it.
5. Notice the personalized address and salutation for each record.
6. Also notice that the wording in each letter is the same, except
that the company name for each record appears in the first paragraph.
The text flows around the company name, regardless of its length.
This letter is ready to print, for every record in the database.
About form letter layouts
The letter is simply a layout containing text, merge fields, and
a graphic.
1. Choose View menu > Layout Mode.
2. Click anywhere on the text.
You see the handles in the corners of the entire text block. All of
the text is in a single text block.
3. Notice that Company is a merge field in the body of the letter.
The address and salutation also use merge fields.
Create a form letter
To create this letter, you will:
1 create a blank layout
1 create a text block to contain your letter
1 add merge fields for the recipient’s name and address
1 type the letter
1 customize the letter with the recipient’s company name
1 add the closing
Create a one-page blank layout
1. Choose Window menu > MyFile06.
2. Choose View menu > Layout Mode.
3. Choose Layouts menu > New Layout/Report.
4. For Layout Name, type Welcome Letter.
5. Select Blank layout for the new layout type.
6. Click Finish.
7. On the layout, click the Header tab, then press Backspace
(Windows) or Delete (Mac OS).
8. Click the Footer tab, then press Backspace (Windows) or
Delete (Mac OS).
This letter will not use a header or footer.
9. Drag the Body tab down to about 11 inches.
When you release the mouse button, you will see the page boundary.
If you don’t see the page boundary, drag the Body tab down farther.
Body tab Page boundary
Creating lists, mailing labels, and form letters 35
10. Now drag the Body tab up to just above the page boundary.
The page boundary line will disappear. Dragging the body tab above
the page boundary limits your form letter to a single page.
11. Use the scroll bar at the bottom of the screen to scroll a few
inches to the right.
You see a heavy dotted line along the right side. This is the right-side
page boundary. Your letter will be within these boundaries.
12. Scroll back all the way to the left.
13. Scroll up to the top of the layout.
Create the text block
You will create a text block with a 2 inch margin on all sides.
1. Click the text tool .
2. Drag a rectangle starting about 2 inches from the top left side
of the layout, and ending about 2 inches from the bottom right side,
as indicated by the page boundary lines.
When you release the mouse, the insertion point flashes in the top left
of the text box. You will type the letter inside this box.
Add the address
1. Choose Insert menu > Merge Field.
2. Select First Name in the list and click OK.
3. Type a space.
4. Choose Insert menu > Merge Field.
5. Select Last Name in the list and click OK.
6. Move to the next line (enter a line space):
1 Windows: Press the Enter key above the Shift key on the
keyboard.
1 Mac OS: Press Return.
7. Add merge fields for the street address, city, and country, with
appropriate spaces, new lines, and punctuation.
Type the letter
1. Press Enter (Windows) or Return (Mac OS) twice to create two
line spaces at the end of the address.
2. Start the salutation line: type Dear and a space.
3. Insert merge fields for the first and last name, separated by a space.
In your own letters, you can use more fields (for example, a title
field) for a more elegant salutation.
4. Type a comma and two line spaces.
5. Type the letter:
The Corporate Travelers Club welcomes you and
your company to our organization.
We look forward to doing business with you and
hope you have many pleasant trips with us!
If you misspell a word, you’ll see a red dotted line under it.
To turn off this special underlining in this file, choose File menu >
File Options. In the File Options dialog box, click the Spelling tab.
Clear Indicate questionable words with special underline.
The text tool
is selected
36 FileMaker Pro Tutorial
Customize the letter with the company name
1. Click after the word company in the first paragraph.
2. Type a comma and a space.
3. Insert a merge field for the company name.
4. Type another comma.
Add the closing
1. Click at the end of the text and enter two line spaces.
2. Type With regards, then enter four line spaces.
3. Type John Jones and a comma.
4. Enter a line space, then type President.
Your layout should look like the letter in the sample file.
5. Choose View menu > Browse Mode to see your letter.
It should look like the letter in the sample file without the
letterhead. See lesson 5 to learn how to add a logo.
6. When you are finished with this lesson, close each open file
by choosing File menu > Close.
For more information
In this lesson, you have created list, label, and form-letter layouts.
You can create as many layouts as you like, to organize your
information in any way you like. To learn how to create other
layouts, see lesson 9 in this tutorial and chapter 2 in the
FileMaker Pro User’s Guide.
Clear this checkbox
to turn off underlining
of misspelled words
Lesson 7
Simplifying data entry
You can simplify the way you enter data in FileMaker Pro and
improve accuracy by using value lists, calculation fields, and
data auto-entry.
In this lesson, you will:
1 see how value lists can aid data entry
1 write and test a calculation formula
1 use a field’s auto-entry options to automatically enter data
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
Enter data using value lists
Value lists let you choose the value you want from a scrolling list,
a pop-up menu, checkboxes, or radio buttons. These lists can contain
predefined values, or can be constructed dynamically based on
the values in a particular field. They are an efficient way to enter
frequently used values into your database.
Look at the sample value list
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample07.fp7.
4. Choose Data Entry from the Layout pop-up menu if it is not
already selected.
5. Locate the Membership Type field on the current record.
You see two radio buttons, one for New and one for Continuing.
These correspond to the two choices in the Membership Types
value list.
6. Click one to enter the corresponding value in the field.
Define a value list
1. Open the Tutorial folder on your hard drive.
2. Open the Working Files folder.
3. Open MyFile07.fp7.
4. Choose Data Entry from the Layout pop-up menu if it is not
already selected.
5. Choose File menu > Define > Value Lists.
6. Click New.
7. Name the new value list by typing Membership Types.
A value list with predefined values, displayed as radio buttons
38 FileMaker Pro Tutorial
8. Click in the large box and enter the values for this list, New and
Continuing, by typing each value on its own line.
9. Click OK to close the Edit Value List dialog box.
10. Click OK to finish.
Assign a value list to a field and display it as radio buttons
1. Choose View menu > Layout Mode.
2. Select the Membership Type field.
3. Choose Format menu > Field/Control > Setup.
4. For Display as, choose Radio Button Set.
5. For Display values from, choose Membership Types.
6. Click OK. Your radio buttons should be visible in Layout mode.
7. In Browse mode, test your value list and buttons by clicking them.
Select Radio Button Set
Select Membership Types
value list
Membership Type field
formatted as radio buttons
Simplifying data entry 39
Generate values with a calculation field
When you want FileMaker Pro to perform a calculation for you,
for example to determine the amount of tax owed or the proper fee
to be paid, you use a calculation field. Calculation fields are one of
the FileMaker Pro field types. FileMaker Pro can perform simple and
complex calculations.
The calculation formula uses values from the current record or
related records. The formula can use values from all field types. You
can use calculations to return text values (for example, combining
the contents of first name and last name fields into a full name field),
dates, times, timestamps, and the contents of container fields.
See how calculations speed data entry
Members of the Corporate Travelers Club pay an annual fee. New
members pay a fee of $200, while continuing members pay $100.
The following steps show the calculation you are going to build.
The calculation returns a membership renewal fee based on
membership type.
1. Choose Window menu > Sample07.
2. Choose Data Entry from the Layout pop-up menu if it is not already
selected.
3. Create a new record by choosing Records menu > New Record.
Notice there’s no data in the Renewal Fee field.
4. In the Membership Type field, click New. The Renewal Fee field
indicates 200.
The Renewal Fee field is a calculation field.
5. In the Membership Type field, click Continuing. The value in
Renewal Fee changes to 100.
6. Delete this record by choosing Records menu > Delete Record.
Deleting this record is necessary to set up a later part of this lesson.
7. Click Delete in the confirmation dialog box.
Create a calculation field
There are several different ways of formulating a calculation, each
of which can yield the correct result. The following method uses an
If statement to compare the data entered in the Membership Type
field with one of the membership types. The calculation returns
one of two results.
1. Choose MyFile07.fp7 from the Window menu.
2. Choose File menu > Define > Database.
3. In the Define Database dialog box, click the Fields tab if it is
not already selected.
4. For Field Name, type Renewal Fee.
5. For Type, select Calculation to make this a calculation field.
6. Click Create.
The Specify Calculation dialog box appears.
Select Calculation
40 FileMaker Pro Tutorial
7. Scroll through the list of formulas in the upper-right
corner of the Specify Calculation dialog box until you locate
If (test ; resultOne ; resultTwo). Double-click this formula so
that it appears in this dialog box.
This formula has three parts: a test, a result if the test evaluates
as true (result one), and a result if the test evaluates as false
(result two). You will replace the placeholders test, resultOne,
and resultTwo with the actual components of the calculation.
8. Select the placeholder test and type Membership Type =
“Continuing” exactly as it appears here.
9. Select the placeholder resultOne, and type 100.
10. Select the placeholder resultTwo, and type 200.
11. Make sure the calculation result is set to Number.
12. Click OK.
If you receive an error message, make sure that all spaces and
punctuation are identical to the formula shown above.
13. Click OK to close the Define Database dialog box.
The Renewal Fee field appears at the bottom of the layout.
Depending on the size of your screen, you may need to scroll down
to see it.
Your calculation formula is now complete. When data is entered
in the Membership Type field, FileMaker Pro will compare it to the
word we are testing for, “Continuing.” The test is true if it matches
this word, and the calculation will return your first result, 100. If it
doesn’t match, the test is false, and the second result is returned.
Test your calculation
To see if your calculation works, try changing the value in the
Membership Type field to Continuing, and notice the result in
the Renewal Fee field—it should change as the membership type
changes.
Field list
Verify the type
of data to be
returned by
the calculation
Formula list
Replace these placeholders
with your calculation
The completed calculation
Simplifying data entry 41
Automatically enter a serial number
FileMaker Pro lets you automatically enter certain types of data—
for example, incremental numbers—when you create a new record.
Look at a serial number example
1. Choose Window menu > Sample07.
2. Go to the last record in the database.
3. Locate the Member Number field, and note the current number
of this record.
4. Create a new record by choosing Records menu > New Record.
The value in the Member Number field of the new record is
increased by one.
Note If you did the first activity in this chapter, you will notice
that the value in Member Number is 32, even though there are now
31 records in the Sample07.fp7 database. FileMaker Pro continues
to increment serial numbers even if intervening records have been
deleted, such as record 31 in this case.
Create a field for serial numbers
1. Choose Window menu > MyFile07.
2. Choose File menu > Define > Database.
3. In the Define Database dialog box, click the Fields tab if it is
not already selected.
4. For Field Name, type Member Number.
5. Select Number as the field type.
6. Click Create.
7. Click Options.
8. Select Serial number on the Auto-Enter tab. You don’t need to
change the Generate choice, or the amounts for next value or
increment by for this exercise.
9. Click OK, then click OK again to close the dialog box.
The new field appears at the bottom of the layout. (You might
need to scroll down to see it.)
10. Test your new field entry option by choosing Records menu >
New Record. Each time you create a new record, the value in the
Member Number field increments by one.
To learn how to change the position of the new field, see lesson 5.
11. When you are finished with this lesson, close each open file
by choosing File menu > Close.
For more information
You have learned how to simplify data entry by defining and
formatting value lists, calculation fields, and auto-entered serial
numbers. For more information on calculation fields and field
auto-enter options, as well as defining and formatting value lists,
see FileMaker Pro Help.
Select Serial
number
42 FileMaker Pro Tutorial
Lesson 8
Automating tasks with buttons and scripts
FileMaker Pro lets you automate many database tasks with buttons
and scripts. These powerful features can save you a lot of time by
performing a series of actions with a single click.
In this lesson you will:
1 make and use a button to perform a task
1 create and run a simple script to perform a multi-step task
1 use a button to perform a script
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
Perform a task using a button
Look at a sample button
A button is an object on a layout that you can click to perform many
FileMaker Pro commands. You can use a button to switch layouts
in your database.
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample08.fp7.
4. Locate the button labeled Go to List of Members at the top of
Layout #1.
5. Click the button. You should now be viewing the List of Members
layout (as indicated by the Layout pop-up menu).
Create the button
1. Open the Tutorial folder.
2. Open the Working Files folder.
3. Open MyFile08.fp7.
4. Choose Data Entry from the Layout pop-up menu if it is not
already selected.
5. Select View menu > Layout Mode to switch to Layout mode.
6. Click the button tool .
7. Draw the button at the top of the layout.
8. In the Button Setup dialog box, select the Go to Layout command
from the list.
9. In the Options area, select the List of Members layout.
10. Select Rounded button for button style.
Place the button here
44 FileMaker Pro Tutorial
11. Click OK.
12. Notice that the insertion point is now in the center of your button.
Type Go to List of Members in your button to identify it.
13. Click outside the button.
If you need to move the button, select it and drag it to the desired
location, as with any other layout element.
To test your button, go to Browse mode and click it. The button takes
you to the List of Members layout.
Perform a series of tasks using a script
As you have just seen, you can use a button to perform a single
command. To make FileMaker Pro perform a sequence of
commands, use a script.
Run a script in the sample file
1. Choose Window menu > Sample08.
2. Choose Scripts menu > Preview Labels Layout.
You should now see the Labels layout, in Preview mode. This
script lets you preview labels before you print.
About scripts
A script lets you construct a series of instructions for FileMaker Pro
to perform. Like buttons, scripts allow you to automate most of the
FileMaker Pro menu commands, as well as activate some commands
not found in the FileMaker Pro menu structure. Simple scripts
can perform a single task, while complex scripts might combine
elements (such as user feedback and control) with programming
techniques (such as branching and looping) to make powerful,
dynamic instruction sets.
Create a script to preview the Labels Layout
1. Choose Window menu > MyFile08.
2. Choose Scripts menu > ScriptMaker.
3. Click New.
4. In the Script Name text box, type Preview Labels Layout.
5. Select the Go to Layout script step and click the Move button. (You
can also select and move script steps by double-clicking them.)
6. In the Script Step Options area, select the Labels layout from the
list of available layouts.
Specify
the List of
Members
layout
Select
Rounded
button
Automating tasks with buttons and scripts 45
7. From the list on the left, scroll down and select the Enter Preview
Mode script step, and move it over to your script.
8. Click OK, then click OK again to close the dialog box.
9. To run the script you have just created, choose Scripts menu >
Preview Labels Layout. FileMaker Pro displays the Labels layout and
switches to Preview mode.
Assign a script to a button
While buttons are generally more convenient for users, scripts are
a more powerful feature, allowing you to combine many menu
commands into a single executable action. Using a button to run
a script gives you the best of both features.
To assign the script you just created to the button you created earlier:
1. In MyFile08.fp7, choose Data Entry from the Layout pop-up menu.
2. Choose View menu > Layout Mode.
3. Double-click the button you created earlier in this lesson.
4. In the Button Setup dialog box, select the Perform Script script step
from the top of the list on the left.
In the Options area, for Current Script click Specify. Select Preview
Labels Layout from the list of available scripts, and click OK. Leave
the rest of the default button settings as they are and click OK.
If you have not already created this script, follow the steps described
in “Create a script to preview the Labels Layout” on page 44.
Specify a target
layout for the
script step
The finished script
46 FileMaker Pro Tutorial
Rename the button
1. Click the text tool .
2. Click the button once. The text insertion point appears in the
button.
3. Type Preview Labels Layout to rename this button. It may
be necessary to resize this button after renaming it.
Test the button
1. In Browse mode, test the button by clicking it.
Clicking this button performs the script, which displays the Labels
layout and switches to Preview mode.
2. When you are finished with this lesson, close each open file by
choosing File menu > Close.
For more information
In this lesson, you have created buttons and scripts, and used these
two features together. For more information on creating buttons and
scripts, see FileMaker Pro Help.
Lesson 9
Creating and running reports
The process of retrieving and organizing data from a database
is called reporting. Summary reports present just the totals
of your data; they do not break information into smaller groups.
Subsummary reports, also referred to as reports with grouped data,
categorize information by a particular field or fields, allowing you to
group information hierarchically. This subsummarized information
can then be subtotaled, averaged, or counted.
In this lesson you will:
1 generate a report with grouped data
1 generate a report with grouped data and totals
1 save a report as a PDF file and send it as an email attachment
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
Generate a report with grouped data
Look at a sample report
This example shows a report that groups the members by
membership type. The report has been saved to a script.
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample09.fp7.
4. Choose Scripts menu > Membership Type Report to generate the
membership type report.
5. Examine the resulting report.
First, notice that you are in Preview mode. Preview mode is
necessary to view summarized data on the screen. Second, notice
how the members are grouped by the membership type, and further
alphabetized by last name within each category.
6. Click the Continue button in the status area to complete the script
and return to the Data Entry layout.
This report groups data by
the Membership Type field,
also referred to as
the break field
48 FileMaker Pro Tutorial
About subsummary reports
A report with grouped data requires a number of elements to
work properly.
Subsummary reports include:
1 a subsummary part in the report layout for each level of detail you want
to break out. The New Layout/Report assistant creates these for you.
1 a field or fields to group records by. These fields are referred to
as break fields.
1 records sorted by these break fields, in the order the subsummary
parts appear on your report layout.
Create a subsummary report
To create the Membership Type Report:
1. Open the Tutorial folder on your hard drive.
2. Open the Working Files folder.
3. Open MyFile09.fp7.
4. In Layout mode, choose Layouts menu > New Layout/Report.
5. For Layout Name type Membership Type Report.
6. Select Columnar list/report for the new layout type and click Next.
7. Select Report with grouped data, and click Next.
Select the fields used in this report
1. Select the first field to be used in this report, Membership Type,
and move it to the Layout fields list.
2. Select and move the Last Name field.
3. Select and move the First Name field.
4. Click Next.
Creating and running reports 49
5. Move the Membership Type field to the Report categories list
to organize the records by membership type.
Membership Type is referred to as a break field because you are
using the contents of this field to break the records into categories
for your report.
6. Click Next.
7. Move the Last Name field to the Sort order list.
This sorts the records in each group of membership types
alphabetically by members’ last names. Notice that the break field
Membership Type appears automatically at the top of the Sort order
list to enable FileMaker Pro to group records by this category.
8. Click Next.
Select a theme and create the header and footer
1. Select the Standard theme to set the text size, color, and style
of the finished report.
2. Click Next.
3. Go to the Top center list in the Header area and select Large
Custom Text.
4. Type Membership Type Report for the header of the
report and click OK.
5. Go to the Bottom center list and select Page Number to number
the pages in the report’s footer.
50 FileMaker Pro Tutorial
6. Click Next.
Create a script to run this report again
1. Click Create a script.
2. Leave Script Name as it appears. Click Next.
3. Click View the report in Preview mode if it is not already selected.
4. Click Finish.
Your finished report should look like the report pictured on page 47.
Generate a report with grouped data and totals
In the previous exercise, you created a report that grouped data in
categories based on common field values. In this exercise, you will
create a similar report that also includes subtotals for each category
and a grand total for the entire report.
Look at a sample report
This subsummary report:
1 groups the members by membership type
1 subtotals the fees collected for each membership type
1 provides a grand total of these fees
1. To view the finished sample report, choose Window menu >
Sample09.
2. Choose Scripts menu > Membership Fee Report to generate the
membership fee report.
3. Examine the resulting report.
As in the previous example, the members are grouped by
membership type. Additionally, the fees collected for each
membership type are subtotaled beneath those members’ names,
and a grand total of all fees appears at the bottom of the report.
4. Click the Continue button to complete the script and return to
the Data Entry layout.
A report with grouped data and totals requires the same elements
as a report with grouped data: a subsummary part in the report layout
for each category, a field or fields to group records by, and a sort
of the database by these fields.
Subtotals
Grand Total
Creating and running reports 51
Two additional elements are also required:
1 a grand summary layout part
1 summary field(s) to display totals, averages, or counts
Create a report with grouped data and totals
To create the Membership Fee Report:
1. Choose Window menu > MyFile09.
2. In Layout mode, choose Layouts menu > New Layout/Report.
3. For Layout Name, type Membership Fee Report.
4. Select Columnar list/report for the new layout type and click Next.
5. Select Report with grouped data and then select Include subtotals
and Include grand totals.
6. Click Next.
Select the fields used in this report
1. Select the first field to be used in this report, Membership Type,
and move it to the Layout fields list.
2. Select and move the Last Name field.
3. Select and move the First Name field.
4. Select and move the Fee Paid field.
5. Click Next.
6. You want to organize the records by Membership Type. Move this
field to the Report categories list.
7. Click Next.
8. Move the Last Name field to the Sort order list to sort the records
in each group of membership types alphabetically by members’
last names.
9. Click Next.
Specify subtotals and grand totals
A summary field is a type of field you can specify when you define
fields. Summary fields allow calculations across all of the records
in your found set. In general, when you need to total data across
a number of records, you must use a summary field.
In the Membership Fee Report, you want to see subtotals for
fees paid by each type of member, New and Continuing, and to
see a grand total of both groups’ fees at the end of the report.
To accomplish this, you will need to specify subtotal and grand
total summary fields in the New Layout/Report Assistant.
The summary field you will use is Membership Revenue, which
has already been defined for you. Membership Revenue totals
the fees entered in the Fee Paid field.
1. For Summary field, click Specify and select Membership Revenue
from the list of available fields, then click OK.
2. For Category to summarize by, use the default value of Membership
Type.
52 FileMaker Pro Tutorial
3. For Subtotal placement, use the default value of Below record group.
4. Click Add Subtotal to add the Membership Revenue field as
the subtotal. This tells FileMaker Pro to create a subtotal of the
membership fees that are paid beneath each membership category.
5. Click Next.
6. For Summary field, click Specify and select Membership Revenue
from the list of available fields, then click OK.
This tells FileMaker Pro to use the Membership Revenue field in
the grand total.
7. Click Add Grand Total to add the Membership Revenue field as the
grand total at the end of the report. This tells FileMaker Pro to create
a grand total of membership fees.
8. Click Next.
Select a theme and create the header and footer
1. Select the Standard theme to set the text size, color, and style
of the finished report.
2. Click Next.
3. Go to the Top center list and select Large Custom Text.
4. Type Membership Fee Report for the header of the report
and click OK.
5. Go to the Bottom center list and select Page Number to number
the pages in the report’s footer.
6. Click Next.
Create a script to run this report again
1. Click Create a script.
2. Leave Script Name as it appears. Click Next.
3. Click View the report in Preview mode if it is not already selected.
4. Click Finish.
Your finished report should look like the report pictured on page 50.
Creating and running reports 53
Save and send a report as a PDF file
After you run a report, you can save it as a PDF file and send it as
an email attachment.
To send the Membership Fee Report as a PDF file:
1. Choose Scripts menu > Membership Fee Report.
This runs the script you created in the previous exercise and displays
the report in Preview mode.
2. Choose File menu > Save/Send Records As > PDF.
3. Specify where you want to save the PDF file.
4. For File Name (Windows) or Save As (Mac OS), type
Membership Fee Report.
5. For Save, choose Records being browsed.
6. Select Create email with file as attachment.
7. Click Save.
FileMaker Pro creates the PDF file and passes it to your email
program. The PDF file appears as an attachment in an email message
that you can then address and send.
8. When you are finished with this lesson, close each open file by
choosing File menu > Close.
For more information
In this lesson, you generated reports with grouped data, and
reports with grouped data and totals. You also saved a report as
a PDF file and sent it as an email attachment. For more information
on creating reports, see FileMaker Pro Help.
54 FileMaker Pro Tutorial
Lesson 10
Making databases relational
Relational databases let you easily view related data and streamline
data entry. You can enter data once, then view and use that data
in related tables or files.
In this lesson, you will:
1 see how relational databases work
1 define a relationship
1 display data from one related record
1 display a list of related records
The sample file in this lesson uses two tables:
1 a Members table with records for individual Corporate Travelers
Club members
1 a Companies table for companies where these members work.
Each company has many members.
Important Copy the Tutorial folder to your hard drive or verify that
it is installed before beginning this lesson. See “Where to find the
lesson files” on page 7 for more information.
View data from one related record
See how relationships work in the sample files
1. Open the Tutorial folder on your hard drive.
2. Open the Sample Files folder.
3. Open Sample10.fp7.
4. Choose the Companies layout from Layout pop-up menu, and
browse through the records.
The Companies layout is based on the Companies table, and shows
records from that table. The Companies table has three records,
one record for each of the three companies that has members in
the Corporate Travelers Club. Each company record also contains
a portal that displays the club members from that company.
5. Choose the Corporate Account Information layout from the
Layout pop-up menu.
Corporate Account Information is based on the Members table,
and shows the company information for each of the 30 members
in the database.
6. In Corporate Account Information, create a new record for
Jane Doe.
7. For Company, click the Company field and choose ABC Company.
8. Notice that the address for ABC Company automatically appears.
56 FileMaker Pro Tutorial
About related tables
The Companies table and Members table are related tables.
When you enter a company name in a record in the Members
table, FileMaker Pro identifies the record for that company in the
Companies table. FileMaker Pro then displays the address from this
matching company record in the Members table.
How does this happen? The Members table has a relationship to the
Companies table. The relationship is based on matching data in the
Company field in both tables. The Company field is the match field.
The Members file displays the company address using related fields.
You will learn both parts of this process: how to define the
relationship and how to display data using the relationship.
Display a related record in a file
Define a relationship to another table
1. Open the Tutorial folder on your hard drive.
2. Open the Working Files folder.
3. Open MyFile10.fp7.
MyFile10.fp7 has the same tables as the sample file, but without
the relational structure. You will build the structures now.
4. Choose File menu > Define > Database.
5. Click the Relationships tab.
You see the relationships graph. The relationships graph shows
all the tables in the current file.
When you work with tables in the relationships graph, you are using
them to organize your view into your data. Each table occurrence
in the relationships graph represents a separate view into your data.
When you create a relationship between two tables, you make the
data stored in either table accessible to the other table, according to
the match fields and the criteria you establish for the relationship.
6. In the Members table, click the Company field and drag a line
to the Company field in the Companies table.
7. Release the mouse button. You see the relationship you
have created.
Records are related when data in the Company field in one table
matches the data in the Company field in the other table.
8. Click OK.
Display data from a related record
Once you’ve defined the relationship, you can modify a layout to
display data using that relationship. Here, you want to display the
company address.
1. In MyFile10, choose the Corporate Account Information layout
from the Layout pop-up menu.
2. Choose View menu > Layout Mode.
Making databases relational 57
3. Using the Field tool , drag a field onto the layout.
You see the Specify Field dialog box displaying the list of fields
in this table.
4. Click Current Table (“Members”) and choose the Companies table
from the list.
You now see a list of the fields in the related table Companies. The
colons (::) before each field name show that these are related fields,
not fields defined in the Members table you are currently working in.
These related fields will display data from the related table.
5. Click ::Company Address.
6. Select Create label, then click OK.
7. Repeat steps 3-6 for ::City and ::Country.
8. Move the fields if necessary, and make the fields large enough
to display all the data they contain. The fields should look like this:
9. Choose View menu > Browse Mode and flip through the records to
view company addresses from the Companies table in the Corporate
Account Information layout that is based on the Members table.
View data from a list of related records
Suppose you want to show all club members for each company.
You also want to add new members to the Members table without
entering the company name for each.
Work with related records in the sample file
View a list of related records
1. Choose Window menu > Sample10.
2. Choose the Companies layout from the Layout pop-up menu.
3. Browse through the records.
You see a list of members at each company. They are all individuals
in the Members table.
Add to the list
1. Go to the ABC Company record.
2. Add a new member by clicking the first empty line under First Name.
3. Type Joe, then press Tab and type Williams in the
last name field.
Choose
the table from
the table pop-up
menu
Displays a list of
members from
the related table
Click here to enter
a new member
for this company
58 FileMaker Pro Tutorial
View the new record in the related table
1. Go to the Data Entry layout, which is based on the Members table.
2. Go to the last record.
You see Joe Williams’ record, with the company information
filled in. You automatically created this record when you typed
Joe Williams into the list in the Companies table.
Add a new record and view it in the list
1. In the Data Entry layout, create a record for a new member
who works at ABC Company.
2. Now return to Companies layout, and look at the ABC Company
record.
You see the new member in the list (scroll down if necessary).
About working with lists of related records
In “View data from one related record” on page 55, a relationship
between the Members and Companies tables displays data (company
addresses) from the Companies table. Here, the same relationship
displays data (member names) from the Members table.
Relationships are bidirectional.
There is more than one matching record in the related table because
there is more than one member from each company. A portal in
the Companies table displays all the members for each company.
When you added Joe Williams to the list of members who work at
ABC Company, the relationship automatically created a record for
Joe Williams in the Members table. ABC Company is automatically
entered into the match field because the name was added to the portal
of the ABC Company record.
A new member added to the Members table automatically appears
at the end of the members list in the matching company record in
the Companies table.
Display a list of related records
Create a portal to display matching records
1. Choose Window menu > MyFile10.
2. Choose the Companies layout from the Layout pop-up menu.
A relationship must always be defined before you can display data
from related records. You will use the relationship to the Members
table you defined earlier in this lesson.
This relationship must be edited to allow the creation of related
records.
3. Choose File menu > Define > Database, and click the Relationships
tab, if it isn’t already selected.
4. In the relationships graph, double-click the relational operator
to display the Edit Relationship dialog box.
5. In the Members table, select Allow creation of records in this table via
this relationship. This lets you add a name to the Members list.
Select
this
checkbox
Making databases relational 59
6. Click OK, then click OK again to close the Define Database
dialog box.
7. Choose View menu > Layout Mode.
8. Click the portal tool and draw a box to hold the list of names.
9. In the Portal Setup dialog box, show related records from the
Members table.
10. Leave the Initial row value at 1. Change the Number of rows
value to 7.
Each row displays one matching member record.
11. Select Show vertical scroll bar.
12. Click OK.
Add the fields in the portal
1. In the Add Fields to Portal dialog box, select the ::First Name field
and move it to the Included fields list.
2. Select and move the ::Last Name field.
3. Click OK.
4. Use the text tool and create field labels for the First Name and
Last Name field labels above their respective fields in the portal.
The portal should look like this when you are done.
5. Choose View menu > Browse Mode to view your list of members.
6. Test your new structure: type the name of a new member at
ABC Company, then look to see if it appears in the Data Entry
layout. (It will be the last record.)
7. When you are finished with this lesson, Exit or Quit
FileMaker Pro to close all open files.
For more information
You have seen how to use and create simple relationships.
This tutorial covers just the basics; there are many important points
to consider when building a relational database system. Be sure to
read chapter 3 in the FileMaker Pro User’s Guide and the relational
information in FileMaker Pro Help before using relationships in your
own files.
60 FileMaker Pro Tutorial
Lesson 11
Keeping your data safe
Power failures, disk problems, and other unexpected computer
problems can happen to anyone at any time. To help prevent data
loss, regularly back up all important documents on your computer,
including your databases.
In this lesson you will learn:
1 how and when to back up your database
1 where to learn about other ways to protect your files
How to back up your database
There are many ways to back up a file. This is one way.
1. Determine the size of the database:
Windows: Right-click the icon for the file, then choose Properties.
Mac OS: Click the icon for the file, then choose File menu > Get Info.
2. Identify a disk or volume that has enough available space for
a copy of the database.
3. Open the database you want to back up.
4. Choose File menu > Save a Copy As.
5. Click Save.
Important Next time, back up to a different disk or volume. Never
back up over the only or most recent copy of your file. You should
have several different backups at all times.
When to back up
You should back up:
1 as often as necessary to be sure you can restore all of your data
in an emergency.
1 before you make a major or irreversible change like deleting
records, deleting a field, or replacing data using the Import or
Replace features.
Remember, it takes far less time to back up a file than it does to
recreate a lost or damaged file!
For more information
This lesson has shown you one way to protect a database. For
other ways to prevent and overcome difficulties with your files,
see FileMaker Pro Help.
Accept the default
filename for your
copy, or change
the name
Select the disk
and folder where
you want to save
your copy
Save a copy of
current file
62 FileMaker Pro Tutorial

Navigation menu