IntroductionWelcome| 00:00 | (Music playing.)
| | 00:02 | Hi, I am Cris Ippolite. Welcome to
FileMaker Pro 10 Essential Training.
| | 00:05 | FileMaker Pro is the leading database
software popular for its ease-of-use,
| | 00:10 | that's used by everybody from Fortune
500 companies to individuals who just
| | 00:13 | want to be a little bit more organized,
and I will be your guide through the
| | 00:17 | starting steps of the new
features of FileMaker Pro 10.
| | 00:20 | For the past 10 years I have been
President and Founder of iSolutions,
| | 00:23 | a Los Angeles based custom software and
design firm and I have worked with literally
| | 00:27 | hundreds of clients, solving small
issues or setting up big infrastructures, and
| | 00:32 | the biggest question I always get is
how can I save time and money? Well,
| | 00:35 | that's what I am going to show you in
this course. How FileMaker will save you
| | 00:40 | time and money, allowing you to
be more productive in less time.
| | 00:43 | In FileMaker Pro Essential Training,
you'll learn the basics behind how a
| | 00:46 | database works, how to manage various
types of fields, how to work with layouts
| | 00:52 | and how to look at your data in a
number of different ways. I will show you how
| | 00:55 | to build interesting and attractive
reports including subsummary reports and
| | 00:59 | dynamic reports that you can change on
the fly. We will even look at the Script
| | 01:03 | Triggers feature and show you how to
add the ability to trigger events in your
| | 01:07 | new or existing database.
| | 01:09 | Throughout the course I will be
providing guidance and examples based on my
| | 01:13 | experience with my clients and we will
be working with the bunch of integrated
| | 01:16 | data based around a mythical travel
company that will act as the example for all
| | 01:19 | our needs. And now without any
further delay, it's time for us to dive into
| | 01:23 | FileMaker Pro 10 Essential Training.
| | Collapse this transcript |
| Understanding the FileMaker family| 00:01 | Before we get started with our
exercises, I would like to take a moment to
| | 00:04 | introduce you to the four different
products in the FileMaker 10 product family.
| | 00:07 | First, there is FileMaker Pro 10. This
is the product that we are going to be
| | 00:11 | using throughout this title. It's the
standard user version of FileMaker Pro
| | 00:15 | that allows you to create your own
databases, modify your databases, basically
| | 00:20 | do everything that we are going
to be talking about in this title.
| | 00:22 | FileMaker Pro 10 Advanced has all the
functionality of FileMaker Pro 10, but it
| | 00:27 | also has some additional tools that
developers find useful like Script
| | 00:31 | Debuggers, the ability to create
Custom menus, allows you to create runtime
| | 00:35 | versions of your FileMaker Pro
applications and that type of thing. It costs a
| | 00:39 | little bit more, but if you want that
extra functionality, if you are going to
| | 00:41 | be maintaining databases using FileMaker,
this is really the product that you should have.
| | 00:46 | Then there are two different FileMaker
server products. FileMaker Server 10 is
| | 00:51 | an application that gets installed on a
dedicated server machine and it's used
| | 00:55 | to be able to share all the different
files that you create in FileMaker to
| | 00:59 | many different users all at the same
time. So for example, you can have your
| | 01:02 | FileMaker databases shared for up to
250 consecutive users who are all using
| | 01:07 | FileMaker Pro or FileMaker Pro
Advanced and you also have the ability to
| | 01:10 | publish your databases to the Web
using either XSLT, PHP, or publish out your
| | 01:15 | data as raw XML. All of that's
built right into FileMaker Server 10.
| | 01:19 | Now if you'd like to be able to share
your databases using a technology that's
| | 01:23 | called Instant Web Publishing or if
you want FileMaker to be the host for any
| | 01:27 | kind of ODBC or JDBC connectivity, then
you will need to purchase the FileMaker
| | 01:32 | 10 Server Advanced upgrade.
| | 01:34 | So you can see that we have got
product here for the FileMaker end user,
| | 01:39 | the FileMaker developer and then also
different options for deploying your
| | 01:42 | application whether it's just be on a
network or deploying it out to the Web or
| | 01:46 | even be in the host of a ODBC or JDBC
connection, but the product that we are
| | 01:50 | going to be using moving forward is
FileMaker Pro 10. So let's take a look at
| | 01:54 | FileMaker Pro 10 staring off with
the FileMaker Pro Quick Start screen.
| | Collapse this transcript |
| The FileMaker Quick Start screen| 00:00 | The first thing that you will see when
you open up FileMaker is what's called
| | 00:04 | the FileMaker Quick Start screen. So
the first thing that you want to do is
| | 00:07 | launch the FileMaker application.
I am using a Mac, so I will go into my
| | 00:12 | Applications folder and I will find
FileMaker. And if you are on Windows, you
| | 00:20 | can go under your Start menu to Program
Files and choose FileMaker Pro 10.
| | 00:24 | And you see the FileMaker Quick Start
screen. You can go ahead and close your
| | 00:29 | Applications window.
| | 00:31 | Now the FileMaker Quick Start concept
has been around in various different
| | 00:34 | versions of FileMaker, but in this new
version, there is a couple of new useful
| | 00:37 | features. The button that you will open
up to by default is the Create Database
| | 00:41 | option. You see that you have three
different options, but under the Create
| | 00:45 | Database option, you can start by
creating an empty database and then of course
| | 00:49 | you'll just hit OK and it prompt
you for creating a name in a new empty
| | 00:53 | database. Or you can create a
database from an existing file and this is
| | 00:57 | something that's new to FileMaker
Pro 10. Specifically, you can use the
| | 01:01 | following files as sources for creating
a FileMaker database: an Excel 95-2004
| | 01:07 | workbook or .xls file, or an Excel
workbook in 2007-2008 which has the .xlsx
| | 01:15 | suffix, and of course tab-delimited,
comma-separated text files, a Merge file,
| | 01:20 | and then also this is something that's
new to FileMaker 10, you can create a
| | 01:24 | FileMaker database using a
Bento database as your source file.
| | 01:28 | In each one of these cases it really
works just like either importing one of
| | 01:32 | these files or dragging the file on
to FileMaker Pro icon like you could in
| | 01:36 | previous versions and then it will
convert that into a FileMaker file and
| | 01:41 | prompt you through the different
options that you have to set up in your
| | 01:43 | FileMaker database.
| | 01:45 | So you can either create an empty
database, create a database from an existing
| | 01:48 | file, or create a database using a
Starter Solution, which we will cover in an
| | 01:53 | upcoming video. The other option
that you have is to open up an existing
| | 01:57 | database. You will see here that
FileMaker will remember your most recently
| | 02:00 | open files and when you select the
Recent Files options you see them all listed
| | 02:04 | here. And if you have a lot of
different files here, you can use the Filter to
| | 02:07 | filter down just the file
that you are looking for.
| | 02:11 | Also you can set up Favorite Files
either locally or on remote servers. This is
| | 02:16 | where FileMaker Server would be
hosting up the file, and also you can simply
| | 02:20 | browse the files. Of course this will
look a little bit different between Mac
| | 02:23 | and Windows, but in both cases you will
see a Remote button found on the window
| | 02:27 | that will allow you to pick the
different FileMaker server that you are looking for.
| | 02:31 | For the last item on the Quick Start
screen are the different resources that
| | 02:36 | FileMaker's providing to you to help
you learn and understand FileMaker.
| | 02:39 | You'll see that it's broken down it into
See It, Use It, Learn It, and More. Under
| | 02:44 | See It you will see a video that is
basically an introduction to FileMaker; Use It,
| | 02:49 | a hands-on tour of some of the more
vital components creating and using a
| | 02:52 | FileMaker database; and then Learn It,
expanding your skills with some in-depth
| | 02:56 | tutorial that they provided to you.
And then of course More allows you to
| | 03:00 | connect to the very useful
FileMaker Resource Center.
| | 03:02 | So all of these here are at your
disposal when you open up the FileMaker Quick
| | 03:06 | Start screen. Now of course I'd
recommend using this when you are first getting
| | 03:09 | used to FileMaker, because it's good
to have all these options at your finger tips,
| | 03:12 | but once you start getting more
used to it you probably not want to have
| | 03:15 | this screen pop up every time and in
that case you can just simply go and check
| | 03:19 | Do not show Quick Start again, and
then the next time you open up FileMaker
| | 03:22 | Pro, it won't present this one screen.
| | Collapse this transcript |
| Using the exercise files| 00:00 | If you are the premium member of the
lynda.com Online Training Library or if
| | 00:04 | you are watching this tutorial on a
DVD ROM, you will have access to the
| | 00:08 | exercise files used throughout this
title. The way that the exercise files are
| | 00:11 | laid out as they all come in one
folder and each folder is broken into
| | 00:15 | different chapters and you can find
the appropriate exercise files by looking
| | 00:19 | for the folder with the
name of the movie number.
| | 00:21 | So for example, if you are watching
the movie in Chapter 01 movie number 04,
| | 00:25 | you'd go to 01_04 and simply double
click on the FileMaker file. Each of the
| | 00:29 | movies has its own dedicated FileMaker file,
so you can start from any point in the title.
| | 00:34 | If you are a monthly subscriber or an
annual subscriber to lynda.com, you don't
| | 00:38 | have access to the exercise files,
but you can follow along from scratch on
| | 00:42 | your own files. So let's get started.
| | Collapse this transcript |
|
|
1. Getting StartedWhat is a database?| 00:00 | Before working with the database, it's
important to understand what a database
| | 00:04 | actually is. The definition of the
database is the collection of like
| | 00:07 | information with underlying attributes.
You are actually already familiar with
| | 00:11 | databases and you may not even know it.
| | 00:13 | You have probably seen databases in
the form of things like Address Books in
| | 00:16 | your computer or one record equals
one individual whose information you are
| | 00:19 | trying to store and in this case the
like information that you are storing
| | 00:23 | would be different individuals in
different context and the underlining
| | 00:26 | attributes are actually things like
phone numbers, email, instant message,
| | 00:30 | address, street address, that type of thing.
| | 00:32 | You are also probably familiar with
the databases from your web experiences.
| | 00:36 | For example, lynda.com is just a
huge database system. It's a database of
| | 00:40 | products that allows the user to
search on those databases and give them
| | 00:43 | information that they might find
necessary. The role of the database is
| | 00:47 | twofold. First, the database itself
physically stores the data and is stored along
| | 00:52 | with the database files so that all
the data lives together in one place.
| | 00:56 | But in addition to storing the data, it
also contains the information on how to
| | 00:59 | identify the data within the storage
mechanism. A good example of this is a
| | 01:03 | spreadsheet. If we take a look at the
spreadsheet here, we see that this one
| | 01:07 | stores individuals or customers and
in this case each piece of information
| | 01:11 | that's stored in the spreadsheet is an
attribute. For example, First Name, Last
| | 01:15 | Name, Start Date, Title, or Status.
These are all in attributes of a customer or a person.
| | 01:21 | You will also notice that when we
look at a spreadsheet the information is
| | 01:24 | organized in columns and rows. You
will see columns for example, First Name,
| | 01:29 | Last Name, Start Date, Title, and
Status, and rows one through four. Now the
| | 01:35 | spreadsheet itself stores the data,
so as I move this spreadsheet around,
| | 01:38 | the data will travel along with it. So
that's how it works as a storage mechanism.
| | 01:42 | But in addition to that it also
explains or describes the information that's
| | 01:46 | contained within it. You will see
that the first row is really just the
| | 01:49 | description of the data that's being
stored in each of the following rows. We
| | 01:53 | can tell this intuitively by looking
at this spreadsheet that Estrella is in
| | 01:56 | fact the Last Name, because it
comes under the column Last Name.
| | 02:00 | Now when it's comes to FileMaker
databases, the rows are actually
| | 02:03 | represented as records and that's
the terminology that I am going to use
| | 02:06 | throughout the rest of this title. So
then a record is a grouping of a bunch
| | 02:09 | of different pieces of information
or attributes that all describe one
| | 02:12 | instance of the information that's being managed.
| | 02:15 | So in this case this iteration or
instance is a customer and all these
| | 02:19 | different pieces of information
describe that one customer. The columns in
| | 02:22 | FileMaker, we call these attributes
fields and each piece of data describes one
| | 02:27 | of the records. So at any
intersection we see that Estrella is actually the
| | 02:30 | Last Name of the fourth record in
this database. So hopefully a little
| | 02:34 | background on databases that you are
already familiar with will help you
| | 02:37 | understand the concepts
discussed later in this title.
| | Collapse this transcript |
| Flat files vs. relational databases| 00:00 | What makes an application like
FileMaker different than a spreadsheet?
| | 00:04 | There are actually many different ways you
can store data on a computer, in a word
| | 00:07 | processing document or an Excel
spreadsheet. These are examples of what are
| | 00:10 | called, in the database circles, Flat
files. That's where it's just one single
| | 00:14 | table that stores information and it's
independent from all the other tables
| | 00:18 | that may have even related data. But a
true relational database is designed to
| | 00:22 | make it even easier to enter
and retrieve general purpose data.
| | 00:25 | Imagine if the customer spreadsheet
had more than just these five records.
| | 00:29 | Imagine if it had 5 million.
It wouldn't be very easy for us to manipulate,
| | 00:33 | extract, and work with the data and
turn it into reports in just a spreadsheet
| | 00:36 | form. Another one of the main goals of
the relational database is to eliminate
| | 00:40 | redundant date entry and in database storage.
| | 00:42 | So for example, if I enter in Dennis
Copley's information, I want to enter it
| | 00:46 | into the system once, so that if I
have to go back and write a letter to each
| | 00:49 | individual customer in the database,
I don't have to type in Dennis Copley's
| | 00:52 | information again. I write in the
address once and it propagates throughout the
| | 00:56 | system as it's needed, and that's just
one of the advantages of what's called
| | 01:00 | relational database system. Let's now
take a look at FileMaker Pro and start
| | 01:03 | working with some databases.
| | Collapse this transcript |
| How FileMaker works| 00:00 | I would like to show you some reasons
why FileMaker is such a great application
| | 00:04 | for developing databases. First off,
as you can see here, we can store
| | 00:07 | information within our application, we
can create new records if we'd like to,
| | 00:11 | we can delete records or even search
for records that we're storing inside the
| | 00:15 | tables. What's nice about FileMaker is
that it's a relational database, which
| | 00:19 | means that we can store related values.
| | 00:21 | So for example, if this individual is
linked to other contacts in the database,
| | 00:25 | you see that we can link those two
records together, and if the contact has
| | 00:29 | multiple addresses for example, we can
link one contact to multiple addresses,
| | 00:33 | which is really the essence of
having one table related to another.
| | 00:36 | What's key about this is that all
these different tables can fit into one
| | 00:40 | FileMaker file. So you don't have to
manage multiple different files like, for
| | 00:43 | example, when you have to create a
new spreadsheet every quarter or something
| | 00:46 | like that. All the files and all the
data can just be tagged appropriately and
| | 00:50 | stored in one easy-to-share FileMaker database.
| | 00:53 | In addition, FileMaker has all sorts of
cool functionality, like being able to
| | 00:57 | add content from the web into your
FileMaker layout, as you see here with
| | 01:00 | websites and mapping. You can work with
your data in a bunch of different ways
| | 01:05 | and organize data and even media,
like images, video or music.
| | 01:09 | But the strength of FileMaker is
that it provides the ability to create a
| | 01:11 | database very easily. Probably
one of the easiest database creation
| | 01:15 | environments around and also
Windows and Mac FileMaker Pro users on the
| | 01:18 | same network can access the
same database file simultaneously.
| | 01:22 | With the advanced security model that
comes with FileMaker, you can determine
| | 01:26 | what your users can do and see. Then
up to 250 different users can share the
| | 01:31 | database simultaneously, all having
their own session and all being logged into a server.
| | 01:35 | You can even publish your FileMaker
database to the web. You can use several
| | 01:39 | different technologies that
FileMaker is compatible with like instant web
| | 01:42 | publishing or PHP if you've heard of
those, and you can share data from other
| | 01:46 | applications.
| | 01:47 | So for example, if you've got
accounting software and you want to link that to
| | 01:51 | your FileMaker database, you can do so.
FileMaker also comes with a complete
| | 01:54 | step-by-step tool on how to take
records in your database and export those out
| | 01:59 | as either Adobe PDF or Excel files.
All sorts of different things you can do
| | 02:03 | with FileMaker.
| | 02:03 | We're going to cover a lot of these in
this title. But for those of you that
| | 02:07 | have never worked with FileMaker before
and you're thinking okay, what is this?
| | 02:10 | You get that it's a database. But what
you've really got here with FileMaker is
| | 02:13 | the ability to create a fully
functional and powerful database application
| | 02:16 | using FileMaker Pro without having to
know anything about databases or computer
| | 02:20 | science or anything like that.
| | 02:21 | By the time you're done with this title,
I assure you that you'll be able to
| | 02:24 | create FileMaker Pro databases, deploy
them, share them with people, understand
| | 02:28 | their limitations, build reports, and
all sorts of different things like that.
| | 02:32 | So let's get going with learning a little
bit more about this great database application.
| | Collapse this transcript |
| Essential preferences| 00:01 | The first time you launch FileMaker,
it's probably a good idea to get familiar
| | 00:04 | with the different preferences that are
available to you. You can open up your
| | 00:07 | Preferences under the FileMaker Pro
menu if you're a Mac user, or if you're a
| | 00:12 | Windows user, you'll find it
at the bottom of your Edit menu.
| | 00:15 | So opening up the Preferences, you'll
see that you have five different tabs,
| | 00:19 | the General, Layout, Memory, Plug-Ins,
and Fonts. And I'll just be touching on
| | 00:23 | just a couple of the
important preferences here for you.
| | 00:26 | So first you see the General tab and
all the options here are selected as
| | 00:30 | defaults and you can toggle these if
you would like. One that you might want to
| | 00:34 | turn off would be the Show FileMaker
Quick Start Screen. It's a good idea to
| | 00:38 | show the Quick Start Screen the first
couple of times that you open up the
| | 00:41 | application, and then it's up to you
whether or not you want to show recently
| | 00:44 | opened files, but it can be pretty
handy to open up files that either are
| | 00:48 | hosted on the server somewhere
and not has to dig around for those.
| | 00:51 | The other thing and this is really
kind of specific to Mac users is the User
| | 00:55 | Name. This is the user name that
FileMaker uses to identify who you are, and
| | 01:00 | we'll talk about that in later movies.
But there also is the information that's
| | 01:04 | put into the User Name field when you
have to log in to a FileMaker database.
| | 01:09 | So by default, it puts whatever your
name is or the system name, but a good
| | 01:13 | idea is to change that. You can choose
other and type in Admin, as we'll talk
| | 01:19 | about in the Security chapter. That is
one of the default accounts in each one
| | 01:23 | of the FileMaker files. So just a
little tip to select the other option, type
| | 01:27 | in Admin. Keep in mind though for the
Windows users that you don't have the
| | 01:30 | ability to do that.
| | 01:33 | Then on Layouts, you'll notice that
there is only one that's selected and
| | 01:36 | that's Add newly defined fields to the
current layout. What that means is when
| | 01:40 | you define a field in your Manage
Fields dialog window, it's going to
| | 01:43 | automatically appear on the layout
that you currently have on screen. It's
| | 01:46 | probably a good idea when you're in
the middle of creating new files, but if
| | 01:50 | you're just maintaining files, you
probably want to turn this option off.
| | 01:54 | Memory, you can leave everything as a
default. This is an area that you'll
| | 01:57 | probably never have to touch. Plug-
Ins, you'll see that there is just one
| | 02:01 | default plug-in installed and that's
AutoUpdate. That will actually allow
| | 02:04 | FileMaker server to push out plug-in
updates to your application, but a plug-in
| | 02:08 | is something that a third-party
manufacturer creates, and it's something that
| | 02:11 | you would install and then you would
get some instructions on how to configure
| | 02:15 | those plug-ins from that manufacturer.
| | 02:18 | Under Fonts, you can specify the
default font. And if you use any international
| | 02:22 | fonts, this is where you can manage
those as well. So like with many other
| | 02:26 | applications, preferences are
something you probably want to check out the
| | 02:29 | first couple of times you open up the
application and then you can really leave
| | 02:31 | them set as you start to work
with the databases themselves.
| | Collapse this transcript |
| Touring the interface| 00:00 | Once you have FileMaker installed
and you've done a quick look at the
| | 00:03 | Preferences, it's now time to start
working with the application. And the first
| | 00:07 | step is going to be to look at the
interface in the different modes that
| | 00:09 | FileMaker uses.
| | 00:11 | Specifically with FileMaker 10,
because one of the big improvements in
| | 00:14 | FileMaker 10 is the change in the
way that you look at the files, most
| | 00:19 | specifically in the Layout toolbar.
| | 00:21 | If you have worked with FileMaker Pro
in previous versions, you'll notice that
| | 00:25 | on the left-hand side of each one of
your files, you had something that was
| | 00:28 | called the Status Area. Additionally
across the top, you used to have something
| | 00:31 | that was called the toolbar, and in
FileMaker 10, those two concepts have been
| | 00:36 | merged together into something that
you see on the top of the screen here,
| | 00:39 | which is called the Status toolbar.
| | 00:41 | Additionally, it's got all sorts of
great new features and different ways of
| | 00:45 | looking at the information on screen
that it did not have before. And it should
| | 00:48 | be noted that this is the first time
that the interface has been updated in any
| | 00:52 | version of FileMaker in 10
versions. So this is pretty exciting.
| | 00:54 | If you look on screen, you'll notice
in the Status Area section of the Status
| | 00:59 | toolbar. You'll see that this is an
area where you can manage the different
| | 01:02 | records that you've got and we'll look
at these in the various movies that we
| | 01:05 | go through, most specifically when we
talk about finding and searching for
| | 01:08 | groups of records. But this is where
you can use this Book icon to navigate
| | 01:14 | from record to record. If you're
looking for a specific record, you can just
| | 01:17 | click in here and then type in that number.
| | 01:18 | We'll work with the pie chart a little
bit more when we talk about working with
| | 01:21 | found sets. Additionally, there are
some default icons on screen, like the New
| | 01:26 | Record and the Delete Record icons.
Those of course, are available under your
| | 01:30 | Records menu. Additionally, the
ability to enter Find mode can be found here
| | 01:35 | and under Sort.
| | 01:36 | Now, these aren't the only options that
you've got available to you in the new
| | 01:39 | Status Area. In fact, what you can do
is go under your View menu; you'll notice
| | 01:44 | that you've got similar menus from
previous versions of FileMaker. But under
| | 01:48 | the View menu, you'll see that there
is an option here for customizing the
| | 01:51 | Status toolbar. This is brand new to
FileMaker. You notice that in addition to
| | 01:56 | the Show All, New Record, Delete Record,
Find and Sort, you've got all sorts of
| | 02:00 | different options that you can use here.
You can put any one of these on your
| | 02:04 | toolbar if you'd like to and you can
show just the icon or the icon and text,
| | 02:08 | and it's as simple as dragging and dropping.
| | 02:10 | So for example, if I wanted to put the
Manage on my toolbar, I can just drag it
| | 02:14 | in the toolbar area and release. If I
wanted to take it off, I just drag it
| | 02:18 | down and you get that poof effect on
the Mac, but the dragging and the dropping
| | 02:22 | are cross-platform.
| | 02:24 | So as you get more familiar with some
of these features, you might want to
| | 02:26 | place them up on the Status area of
your file and this is where you can
| | 02:30 | actually customize each one of those.
| | 02:32 | Additionally, you'll see that there is
an option for even showing the Status
| | 02:36 | toolbar. So you can hide the Status
toolbar, which is sometimes common in
| | 02:40 | applications that are deployed
amongst multiple users. But make sure that
| | 02:44 | you're providing that same
functionality on screen. You see here you would have
| | 02:47 | the New Record, the Find Record,
and Show All, in this case.
| | 02:51 | You can either hide or unhide the
Status area by pressing this button down here
| | 02:55 | in the bottom left-hand corner as well.
You see now that gives me more space
| | 03:00 | vertically. Finally, you'll see that
under the View menu, you also have a
| | 03:04 | Layout bar and a Formatting bar,
which are the two other areas of your
| | 03:07 | interface here that you should be familiar with.
| | 03:09 | But first in the Layout bar, this is
where you can choose from the different
| | 03:13 | layout that you'll be seeing on screen.
Simply, clicking this drop-down menu
| | 03:17 | will provide a list of all the
different layouts that you've created in your
| | 03:19 | file that are available to you and
allow you to toggle between each one.
| | 03:23 | One of the improvements from the
previous version is since the Status area was
| | 03:27 | only 30 pixels wide, it would truncate
the names of your layouts and you would
| | 03:31 | usually only get to see the first word
or so. Now, you've got a lot more room
| | 03:35 | to work with and it will fit
more information in a larger space.
| | 03:39 | Here are the different ways that you
can view your records. You can view them
| | 03:41 | in what's called Form view, which is
one record at a time, List view, which is
| | 03:45 | multiple records in a continuous list,
or as a table, which makes it look a lot
| | 03:50 | like a spreadsheet.
| | 03:51 | Also, you can get to your editing of
the layout by going on the far right here
| | 03:55 | for the Edit Layout button, which
brings you into Layout mode. Then you see the
| | 03:59 | Formatting bar which can be toggled
by either selecting this button here or
| | 04:03 | de-selecting the button, which when
you're working with different pieces of
| | 04:06 | texts, you can change the font style
or font color if you would like to. So
| | 04:12 | that's really for your text
formatting almost exclusively.
| | 04:15 | The other thing you should be familiar
with about FileMaker's interface is that
| | 04:18 | there are different modes within
FileMaker. Under your View menu, you can see
| | 04:22 | that there is Browse, Find,
Layout, and Preview mode.
| | 04:25 | Browse mode is what we're looking
at right now and that's the mode that
| | 04:27 | FileMaker uses to add and edit records.
This is what your Status toolbar will
| | 04:32 | look like in Browse mode. But each one
of these modes, the Status toolbar takes
| | 04:36 | on a different look and feel. Of course,
it can be customized in each one of
| | 04:39 | these modes as well.
| | 04:39 | So let's quickly look at what it looks
like in Find mode. Find mode allows you
| | 04:43 | to enter in different search criteria
for you to create found sets of data
| | 04:47 | that's been stored in your FileMaker database.
| | 04:50 | So as a result, you see the buttons
have changed. Instead of new records, you
| | 04:53 | see there is one called New Request
and New Request is one of the groups of
| | 04:57 | criteria that you would create and
we'll cover this more in the movie where we
| | 05:01 | discuss finding data. You also see the
buttons for Perform Find and Cancel Find
| | 05:05 | have been added to the toolbar as well.
| | 05:07 | The other thing to make note of is
Including and Omitting, and then the
| | 05:11 | Operators, which are now added to this
top Status toolbar, and we'll discuss
| | 05:14 | those in a later movie also.
| | 05:16 | The next mode is Layout mode. Layout
mode is the mode that you will be in when
| | 05:21 | you're creating or modifying your
layouts within your FileMaker database.
| | 05:25 | So therefore, you have a lot of tools
that are specific only to creating and
| | 05:28 | modifying. Like for example, the
Text tool, which allows you to select
| | 05:32 | different text on screen or type
different text into your layout. And Drawing
| | 05:35 | tools for anything from Lines to
Rectangles to Ovals and so on and we'll be
| | 05:40 | using some of these as we go
through the different movies.
| | 05:43 | Also, the ability to add the Field
Control which allows you to select a field
| | 05:47 | and then add different properties to it.
We'll be covering that later as well.
| | 05:51 | Adding a button, adding something
called the Tab Control or a Portal or a Web
| | 05:55 | Viewer, all are going to be
items that we cover in later movies.
| | 05:59 | Then these options here allow you to
drag new fields onto the layout by just
| | 06:04 | selecting and dropping, and new parts,
which we'll talk about in the reporting
| | 06:07 | section. You can toggle out of this
layout by selecting the new Exit Layout
| | 06:11 | button that you see on screen.
| | 06:13 | This will prompt you to either save
your layout or revert back to the original,
| | 06:17 | and you'll also see that there is two
new buttons there to do so. The Revert
| | 06:20 | button represents the Don't Save option
and the Save layout represents the Save option.
| | 06:25 | So now that we're familiar with what
everything is called on screen and where
| | 06:28 | we can find it, it's time to start
using some of these tools by creating some
| | 06:32 | FileMaker databases.
| | Collapse this transcript |
|
|
2. Database Creation EssentialsCreating databases from templates| 00:00 | Once you're familiar with the
application and how to set it up and a little bit
| | 00:04 | of information on the interface,
you're going to want to start creating
| | 00:07 | databases, and the easiest way to
create a database is either by importing a
| | 00:11 | different file format and having that
create a database for you and then you
| | 00:15 | can add fields, layouts, and such to it,
or just by using a template. FileMaker
| | 00:19 | ships with these things that
are called Starter Solutions.
| | 00:23 | They're meant to be fully functional
FileMaker solutions that can just be
| | 00:27 | created, saved, and then you can
start adding data to them. Let me show you
| | 00:30 | what I am talking about there.
| | 00:31 | If you open up FileMaker and go to New
Database under the File menu, you'll see
| | 00:39 | your Quick Start screen again. And
you have three different options for
| | 00:42 | creating a database. The third option
as you see selected here is Create a
| | 00:46 | database using the Starter Solution.
| | 00:48 | Here, it lists all the different
Starter Solutions that are available to you
| | 00:51 | and you see that they're grouped
logically in sort of business units. You've
| | 00:54 | got finance related ones, project
management related ones, and even some for the Home.
| | 01:00 | But if you pick anyone of these, for
example, Contact Management, and hit OK,
| | 01:06 | you'll be prompted to save this and
we'll save this one to the Desktop. Up on
| | 01:13 | screen comes the Contact Management
Starter Solution. You can just start by
| | 01:18 | creating new records as is and use
all the different fields that they've
| | 01:23 | created for you, or you can go inside
the File and you'll learn the different
| | 01:28 | ways throughout this title on how you
can modify a FileMaker database. But it's
| | 01:31 | wide open for you. You can go in and
modify tables, fields, relationships, add
| | 01:35 | layouts, modify things on screen,
all sorts of new stuff here.
| | 01:39 | One interesting note is in FileMaker 10,
this is the first time that FileMaker
| | 01:43 | has updated these Starter Solutions
since they started shipping them with
| | 01:46 | version 7. So now, they take
advantage of some things that didn't exist in
| | 01:50 | version 7. Like the ability to resize
the file on screen, as you see here,
| | 01:56 | different things like Web Viewers,
which are now integrated, and different
| | 02:00 | management of container fields.
| | 02:03 | So 13 of the Starter Solutions have
gotten a complete rebuild and the others
| | 02:07 | have gotten this new look and feel
that also, by the way, takes advantage of
| | 02:11 | the new Status toolbar, because a
lot of their Starter Solutions had New
| | 02:15 | Record, Delete Record, and Find Icons
installed in them. Now, of course you
| | 02:19 | don't need that if you're
showing the Status toolbar area.
| | 02:22 | Most importantly if you're using one
of the Starter Solutions is you should
| | 02:25 | understand and be comfortable with the
fact that you can go on and modify this
| | 02:29 | in anyway that you would like. If
you're using a 30-day trial version of
| | 02:33 | FileMaker, keep in mind that you
can make modifications to the Starter
| | 02:36 | Solutions that ship with that trial
version and those don't expire with the
| | 02:40 | application.
| | 02:41 | FileMaker gets a lot of questions on
that and you should feel free to go ahead
| | 02:45 | and modify these Starter Solutions as
you wish, knowing that those changes will
| | 02:49 | be saved with the file moving forward.
| | 02:51 | So Starter Solutions are a great way
to get familiar with FileMaker without
| | 02:55 | having to do any programming. So I
encourage you to go take a look at a couple
| | 02:58 | of different ones and see
which one suits you best.
| | Collapse this transcript |
| Creating databases from scratch| 00:00 | There is a couple different methods
you could use to create a FileMaker
| | 00:03 | solution. The first of which would be
to use one of the templates or Starter
| | 00:08 | Solutions that we discussed in a
previous movie and they are prebuilt for you.
| | 00:11 | You can just go on and make
modification but they're pretty much ready to roll.
| | 00:15 | The other option, which is actually a
lot more popular, is to create one from
| | 00:18 | scratch or to build all the components
from the ground up. That's what we're
| | 00:21 | going to talking about in this movie.
So creating a FileMaker database from
| | 00:25 | scratch will always start in one
location and that is under the File menu where
| | 00:30 | you can go to File > New Database,
which will pop-up the FileMaker Quick Start
| | 00:34 | screen. And in this case what you are
going to do is you're going to select the
| | 00:38 | Create an empty database option.
| | 00:39 | You will notice the first thing that
you are prompted to do is to name your
| | 00:44 | database. You'll see that all
FileMaker databases end with .fp7. That is the
| | 00:49 | file format suffix for FileMaker Pro,
and we'll call this one Test and just
| | 00:55 | save it to our Desktop. And you notice
now that it's created a FileMaker file
| | 01:00 | for us and it's prompted us with the
Manage Database window. This allows us to
| | 01:06 | manage things like tables, fields, and
relationships and it has already taken
| | 01:10 | us to the Field tab.
| | 01:12 | The reason for that is because if you
look under Tables, it's created a default
| | 01:17 | table. The logic there is that you
can't define any of these things called
| | 01:21 | fields or even create different
relationships or layouts unless you first have
| | 01:25 | a table. And a table inside of
FileMaker database is where you store all your
| | 01:29 | data and you can have multiple
different tables inside of a FileMaker file. So
| | 01:33 | here's where you can add all those and
make modifications to those if necessary.
| | 01:37 | You'll also note that the first table
name has taken on the name of our file.
| | 01:41 | Traditionally, the name of your file
won't necessarily be one of the tables
| | 01:45 | inside of it but FileMaker takes the
name that you have provided for the
| | 01:48 | FileMaker file and uses that to name
your initial table. But you can go in here
| | 01:54 | and type over this and hit Change to
make that modification. You can do this at
| | 01:59 | any time as well.
| | 02:00 | Once you have created tables, you can
then create the different fields and you
| | 02:04 | can have multiple tables within your
file, which will allow you to then create
| | 02:08 | relationships between these tables.
And these are all things that we're going
| | 02:11 | to be talking about in later movies.
But a FileMaker Pro database like any
| | 02:15 | other database is presented to the
database developer as a collection of these
| | 02:19 | tables. Each of them are going to
contain some numbers of fields as you see
| | 02:22 | here. And by the way if you've worked
in other database environments before you
| | 02:26 | may be accustomed to the term
columns instead of fields but it's the same
| | 02:29 | concept here.
| | 02:30 | So, FileMaker database can contain a
single physical file or be composed of
| | 02:34 | multiple physical files that are all
linked in internally using FileMaker
| | 02:37 | relationships. And those relationships
are managed here in the Relationship tab.
| | 02:42 | So now that you have your database
created or the shell of the database created
| | 02:46 | you can start adding things like
fields, layouts, relationships and all the
| | 02:50 | different things that we
cover in the upcoming movies.
| | Collapse this transcript |
| Creating databases from existing files| 00:01 | If you are creating a new FileMaker
solution there is a couple of different
| | 00:03 | methods that you could use. The
first of which would be to use one of the
| | 00:06 | existing templates or Starter
Solutions that ship with FileMaker or to create
| | 00:11 | one from scratch or build it up from
the ground up. And then the third option
| | 00:15 | is if you are managing data in another
application, you can use the files from
| | 00:19 | that other application as the starting
point for creating a FileMaker solution.
| | 00:23 | And in that case you would be creating
your database from an existing file. And
| | 00:26 | that one is really easy. You just go
into FileMaker and you'll go under the
| | 00:29 | File menu to New Database. And in this
case you're going to choose the option
| | 00:35 | that's called Create a database from an
existing. And then of course you choose
| | 00:39 | which file format.
| | 00:40 | So here are the different file
formats that can be used to create a new
| | 00:44 | FileMaker database. There is the Excel
95-2004 format, which is the .xls, or
| | 00:50 | the new 2007-2008 format .xlsx. And
then any other application that you might
| | 00:57 | have your data currently stored in no
matter what it is you can most likely
| | 01:00 | output that data to either a Tab
Delimited text file or a Comma Separated .csv
| | 01:05 | file or even a Merge file for that matter.
| | 01:07 | And we'll look at a couple of these
options. But also what's brand new to
| | 01:11 | FileMaker 10 is the ability to use a
Bento Source to create your new FileMaker
| | 01:16 | database. So if you've been working
with Bento, which by the way is a Mac OS X
| | 01:20 | Leopard only application. So let's
take a look at a couple of these options.
| | 01:24 | Let's say we choose the Tab Delimited
text file. When you select that option
| | 01:28 | and hit OK, it's going to do the same
thing as if you took a Tab Delimited file
| | 01:32 | and dragged it on top of a FileMaker
icon which will do the same thing, create
| | 01:37 | a FileMaker database based on this data.
| | 01:40 | So, if you choose inside the chap02 02_
02 folder and choose Adventures.txt and
| | 01:47 | hit Open, you'll see that we've got
some options for First Row, how we want to
| | 01:51 | handle that. And then it asks us
what we want to name this new file and
| | 01:54 | traditionally it will just take the
previous name of the file and add the word
| | 01:57 | Converted on it. Then we hit Save and
you see here FileMaker has created a new
| | 02:02 | database shell for you.
| | 02:03 | You've got your one table in here and
you can go in and modify the name anyway
| | 02:08 | that you would like. Add new tables to
it. And then you see that there are some
| | 02:12 | fields that are already defined, one
field for every column in the source file.
| | 02:18 | And the table is here so that you can
actually create relationships between the
| | 02:22 | different tables.
| | 02:24 | You'll also note that you've got two
different layouts that are created for
| | 02:26 | you. One is a detail or Form view,
which just shows one record at a time and
| | 02:31 | allows you to cycle through each one
of the records that you just pulled in.
| | 02:34 | And then the other one is a Table view,
which allows you to review all the
| | 02:39 | different records in the database. But
this is a great way to get started if
| | 02:43 | you just have some raw data. But the
new feature in FileMaker 10 for the Mac
| | 02:48 | users is Create a database
from an existing Bento Source.
| | 02:51 | So you'll see the dialog window for
selecting a Bento Source. And you'll notice
| | 02:56 | that there are various different
Libraries and in this case I happen to have
| | 03:00 | the Libraries that are shipped by
default with Bento. So here you see the
| | 03:04 | Projects library. And when you
select the library, you can select the
| | 03:08 | collection within the library. And if
you're interested in more information on
| | 03:11 | what things like Libraries and
Collections and even Bento might be, feel free
| | 03:15 | to check out my Bento Essential
Training course on the lynda.com online
| | 03:18 | training library.
| | 03:19 | But all you need to know for this is
that a Bento database is organized into
| | 03:23 | Libraries and Collections. And so here
you can choose anyone of the Libraries
| | 03:27 | and the Project library is the one
that Bento ships with. And inside that
| | 03:30 | library it will have different
collections and here we can select Entire
| | 03:34 | Library and hit Continue. It will ask
us what we want to name the file and
| | 03:39 | where we want to save it and just like
before it will pull all that information
| | 03:43 | into your FileMaker database and allow
you to modify the FileMaker database it
| | 03:48 | built on top of that structure.
| | 03:51 | You also get the standard Form view
and the standard List view. But the thing
| | 03:56 | that I find most interesting about the
ability to create a FileMaker database
| | 03:59 | using Bento as a source is the file
name. If you create a new database select
| | 04:05 | your Bento Source, look closely at the
Select Bento Source window. You'll see
| | 04:10 | the Address book, iCal Events and iCal
Tasks as Libraries that are available to
| | 04:15 | you to as an import source. What this
basically allows you to do is select the
| | 04:19 | Address Book on your Mac and import all
that data in as a FileMaker table with
| | 04:24 | just a couple of clicks which is great.
| | 04:25 | You can do that also for iCal Events
and iCal Tasks. So you see if I pick
| | 04:29 | Address Book and Entire Library, I am
a couple clicks away from essentially
| | 04:35 | converting my Address Book database
into a FileMaker database along with all the data.
| | 04:40 | So no matter how you want to create a
FileMaker database whether it's from one
| | 04:43 | of the existing templates or from
scratch with your own specifications. Or if
| | 04:48 | you got some data that you want to
convert into FileMaker and build from there.
| | 04:51 | FileMaker allows you various
different choices when it comes to creating a
| | 04:54 | FileMaker database solution.
| | Collapse this transcript |
|
|
3. Managing FieldsManaging the Fields window| 00:01 | A FileMaker database is really a
combination of various different tables and
| | 00:05 | fields and layouts, all combined
together to make one FileMaker solution.
| | 00:10 | Any given FileMaker file can hold an
effectively limitless number of tables and
| | 00:14 | each of those tables can have an
effectively limitless number of fields defined
| | 00:18 | within them. The fields and the table
definitions are handled in something
| | 00:22 | that's called the Manage Database
dialog. That dialog can be found under the
| | 00:26 | File menu, under Manage and then Database.
| | 00:31 | You will see here that the tables
are the first tab and these are all the
| | 00:36 | different buckets of information. So
you will have a different table for each
| | 00:39 | type of information that you are
storing. Here we see we have got adventure,
| | 00:42 | trip, customer, booking and guide.
All discreetly different types of
| | 00:45 | information and therefore
they all get their own table.
| | 00:48 | A field in FileMaker Pro is a slot in
the database table that can be used to
| | 00:52 | hold information that's specific to a
single database record. For example, you
| | 00:56 | see that we have got this one record
for Chris Dorvillie, which is in our
| | 01:00 | Customer table, and we have got all
these different slots that are defined for
| | 01:05 | us to be able to store information. And
each field is defined independently of
| | 01:09 | each other and all those are done
under the Manage Database window as well.
| | 01:13 | These are all the things that you
should spec out before you start building
| | 01:15 | your project. So, for example, you
might want to know what types of information
| | 01:19 | you are going to store and then what
are some of these attributes of that
| | 01:21 | information so that they can be
turned into tables and then corresponding
| | 01:25 | groups of fields. The attributes will
become fields in your database and each
| | 01:29 | field in a FileMaker database must
have a specific field type. Choosing an
| | 01:33 | appropriate field type for a field
is going to allow FileMaker to decide how
| | 01:37 | best to store the data in a field and
then also how to retrieve that data when necessary.
| | 01:42 | And although FileMaker does have some
flexibility as to what kind of data can
| | 01:46 | be stored in fields of specific types,
it's really essential to choose the
| | 01:49 | appropriate field types based on your
database design. Again something that you
| | 01:52 | are going to want to determine before
you are going to start creating your database.
| | 01:55 | Now an overview of all these different
FileMaker field types will follow but
| | 02:00 | here are those types of fields as a
list. You can see those over here next to
| | 02:03 | the Filed Name in the Type dropdown
menu. The first and most common is the
| | 02:08 | Text, then we have Number, Date, Time,
Timestamp, Container and then the
| | 02:13 | Calculation and the Summary fields.
It's important that you first have an
| | 02:17 | understanding of where you go
within FileMaker to define these fields.
| | Collapse this transcript |
| Using text fields| 00:01 | When building a database solution,
it's important to spec out what types of
| | 00:04 | fields will be necessary inside your
database. In this case you see that we
| | 00:07 | have got a first name and a last name
field. You manage fields under the File
| | 00:12 | menu, under Manage > Database and
select the Fields tab. The most common type
| | 00:18 | of field is the Text field. You would
type in a field name and then select Text
| | 00:23 | as you type and hit Create.
| | 00:24 | The Text field type is appropriate for
any sort of data that can be stored as
| | 00:28 | Text and it does not need more specific
handling. Numbers and Dates for example
| | 00:33 | can be stored in the Text field but in
doing that they are going to lose their
| | 00:36 | number-ness or date-ness and can
only be addressed as plain text in those
| | 00:41 | cases. Couple of things you should be
aware of about Text fields, they may hold
| | 00:45 | up to about 2 gigabytes of information
which is roughly the equivalent of about
| | 00:49 | a billion characters or the entire
book of Moby Dick into one field.
| | 00:54 | Now the question of course should be
why you would want to do something like
| | 00:57 | that. It's really just a statement
about how much storage capabilities you have
| | 01:02 | within any given field in FileMaker.
Unlike other fields in FileMaker, Text
| | 01:06 | fields can store formatting
information as well as the raw data. So this
| | 01:10 | includes things like color, type face,
point size. But it can also include
| | 01:14 | basic paragraph level formatting
such as indents, tab stops and return characters.
| | 01:19 | Text fields are going to be the most
common types of field that you will use
| | 01:22 | because you can fit all sorts of
different types of data within the Text field.
| | 01:25 | You could use a Text field to store
things like billing address, city, state,
| | 01:30 | zip or even an E-mail address for
example, because it can store any type of
| | 01:34 | data that you can type into a field
that does not require any special handling.
| | Collapse this transcript |
| Using number fields| 00:01 | Deciding on what field type to choose
when you are defining fields in your
| | 00:04 | database is always very important.
Sometimes you are going to define a field
| | 00:07 | that requires special handling. For
example, like in a Number field. You will
| | 00:11 | want to use a Number field in any
case where data needs to be treated as a
| | 00:15 | number, pretty obvious. As you see
when you go into your Manage Database
| | 00:20 | dialog, you can choose a Number over a
Text field. Now in a Text field you can
| | 00:24 | store numbers, but they lose their
number-ness if that makes any sense.
| | 00:28 | For example, I could store the number
1 in a Text field and the number 2 in
| | 00:34 | another Text field and try to add the
two of them together and they won't be
| | 00:37 | recognized as numbers and therefore I
couldn't get the result of 3. So if I did
| | 00:42 | want to do some math against data
that's stored in a field, I would decide to
| | 00:46 | use Number as my field type.
| | 00:48 | So, for example, if the field needs to
be sorted in numerical order, first part
| | 00:52 | of the mathematical equation, you are
always going to go with Number fields.
| | 00:55 | A Number field can store up to 800
digits of numeric precision, which is 400 to
| | 01:01 | either side of the decimal point. Now
you may not actually need that level of
| | 01:04 | precision, but even if you just need to
have a number, a Number field is going
| | 01:08 | to be a critical choice for you.
| | 01:09 | FileMaker Pro won't prevent the entry
of non-numeric data into a Number field
| | 01:15 | and unless of course there is some
validation and we will talk about that in a
| | 01:18 | later movie. So you can enter text
characters in, they will just simply be ignored.
| | 01:22 | So, in general if you need to enter
mixed numeric and alphabetical data into a
| | 01:27 | field, you should consider using a
Text field. But if the data that's stored
| | 01:31 | inside a field requires any special
numeric handling then you should always
| | 01:34 | select a Number field.
| | 01:37 | So, in general if you need to enter
mixed numeric and alphabetic data into a
| | 01:41 | field you should consider using a Text
field. And if you need to store data in
| | 01:45 | a field that may possibly be used in
a mathematical equation, it's always a
| | 01:49 | good idea to choose the numeric filed type.
| | Collapse this transcript |
| Using date fields| 00:01 | When you are deciding on a field
type when defining fields inside of your
| | 00:04 | FileMaker database, some fields may
require special handling much like the Date
| | 00:09 | field. FileMaker Pro's date handling
is actually quite flexible and it's able
| | 00:13 | to store and retrieve any date between
the year 1/1/0001 and 12/31 of the year
| | 00:20 | 4000.
| | 00:22 | So it recognizes a date as long as
it fits within that range. Internally
| | 00:26 | FileMaker stores the date value as an
integer or a whole number that's going to
| | 00:30 | represent the number of days elapsed
since 1/1/0001 or the very first date of
| | 00:37 | calendar time. So even though FileMaker
stores this information as an integer,
| | 00:41 | it can look a little bit
different to your users.
| | 00:43 | So, for example, let's create a Date
field by typing a field name, in this case
| | 00:49 | I will just say Date in the Field Name
and under Type selecting Type. Hitting
| | 00:54 | the Create button and hitting OK. We
see that this date is shown up on the
| | 00:59 | bottom of my layout and I can type in
1/1/2009 and this is now that I have
| | 01:07 | committed the record to the database,
after I hit commit its actually just
| | 01:11 | storing the integer into the database
and FileMaker does all the handling from there.
| | 01:16 | And if you go into Layout mode, so View
> Layout and select your Date field and
| | 01:22 | go under the Format menu to Date, you
will see that you can leave the data
| | 01:27 | formatted as entered or you can
select Format as. And these are all the
| | 01:31 | different formats that FileMaker
displays to the user even though it's only
| | 01:35 | storing integer internally.
| | 01:37 | So as far as your user is interacting
with the data, this is the way that you
| | 01:40 | can control the format of the data.
But since it's an integer that's stored
| | 01:45 | within your database, it's just a
number. That means that you can do things
| | 01:48 | like add one date to another date
giving you 30 days from today's date for
| | 01:54 | example. Or the elapsed time between a
hire date and a fire date for example,
| | 01:59 | can give you the total number of days
elapsed or even timecards, the day that
| | 02:05 | they punched in on project versus the
day that they closed the project and give
| | 02:08 | you elapsed time, those types of things.
| | 02:10 | So, well FileMaker supports a wide
variety of the date entry as far as
| | 02:14 | formatting is concerned it always will
display these internally as an integer
| | 02:18 | allowing you to not only store date
data but also use it in its own type of
| | 02:22 | mathematical equation. So when you are
deciding on what field types to choose,
| | 02:27 | if you are going to be entering
information that's specific to the date or that
| | 02:30 | needs to be used to determine elapsed
time, then you will want to select the
| | 02:34 | Date field type.
| | Collapse this transcript |
| Using time/timestamp fields| 00:00 | When you are defining fields inside
of FileMaker database, you are going to
| | 00:04 | have to choose what type of field you
want to define. There are a couple of
| | 00:08 | different field types that accommodate
special handling of data that's stored
| | 00:12 | inside the fields. And two of those
are the Time and Timestamp field types.
| | 00:18 | When you are defining a field under
the Manage Database dialog, you will see
| | 00:22 | that each field has its own type and
here we have one that's called Departure
| | 00:25 | Time, which is actually a Time field.
And so when the Time type is selected
| | 00:30 | even structured FileMaker just stores
the data to represent either a time of
| | 00:34 | day or duration of a specific time.
| | 00:36 | So, for example, you see I have got
Departure Time, I could type in 4:15 pm and
| | 00:43 | FileMaker would store that information
or I could type in 4, which would just
| | 00:47 | simply mean a duration of 4 hours.
Internally FileMaker is storing the time
| | 00:52 | value as an integer representing the
duration of seconds from 12 o'clock
| | 00:55 | midnight. So if I put in the value 12:
01 am, the value that's actually stored
| | 01:02 | inside of the field internally in
FileMaker is the number 60 representing 60
| | 01:07 | elapsed seconds in the day.
| | 01:09 | This can be useful if you are trying to
determine elapsed time, like you have a
| | 01:13 | time that you are storing in a database
field for the check in time versus the
| | 01:17 | checkout time, you can just subtract
the check in time from the checkout time
| | 01:22 | integer which will give you the
number of elapsed seconds. And then you can
| | 01:25 | just multiply those by 60 to either
determine how many minutes, how many hours
| | 01:29 | and so on have elapsed in that time period.
| | 01:31 | A Timestamp field combines the
functions of both the Date and the Time date
| | 01:35 | types. You see an example of that here,
you see I have got the date and I have
| | 01:40 | a time both together. Now this is also
stored as an integer internally within
| | 01:44 | FileMaker so that you can determine
elapsed time over the course of several
| | 01:48 | days if need be. And this is
actually stored as a number of seconds from
| | 01:53 | 1/1/0001, so from day number one in
calendar dates stored as the number of
| | 01:59 | seconds from midnight on 1/1/0001.
| | 02:03 | So, if you are going to be determining
elapsed time or storing in times of day
| | 02:07 | or even date combinations with those
times as well, you are going to want to
| | 02:10 | choose the Time data type
or the Timestamp data type.
| | Collapse this transcript |
| Using container fields| 00:00 | When you are defining fields inside
your FileMaker database you have some
| | 00:03 | choices on what type of field that you
want to create. Many of the fields are
| | 00:08 | pretty self explanatory like Text
fields and Date fields and Number fields, but
| | 00:12 | there is a special kind of field that
is somewhat unique to FileMaker database
| | 00:15 | that's called a Container field.
FileMaker Pro's Container field is a versatile
| | 00:19 | data type, in that it can store any
sort of binary data. Binary is just a
| | 00:24 | generic term for data that can't be
represented just as text. Container fields
| | 00:28 | in FileMaker can be used to hold binary
data in four broad classes. Images, so
| | 00:34 | for example if you wanted to have a
field, like you see here on this layout, a
| | 00:38 | Container field where I store an image,
you can store QuickTime files, any
| | 00:43 | movie, sound or any other type of
file that's capable of display in the
| | 00:47 | QuickTime Player. In OLE object which
is a Windows platform only or files of
| | 00:52 | any type, really like PDF files, Excel
files or any type that you can imagine,
| | 00:57 | really all they are just 1's and 0's of
data that are represented its either in
| | 01:01 | image or moving pictures but at the
core they are just small, tiny pieces of
| | 01:05 | data that you are storing
inside a FileMaker field.
| | 01:07 | Let's take a look at a couple of
these. You will see under File > Manage
| | 01:12 | Database that we have a field that's
called Photo. We have chosen Container as
| | 01:18 | the field type and then if I go into
View > Layout Mode I have placed the Photo
| | 01:25 | field on my layout and you see that it
looks a little bit different than the
| | 01:27 | rest of the fields in your Layout mode.
Back in Browse, if I select the field
| | 01:33 | and choose Insert, I can select Picture
and I will choose this picture and you
| | 01:40 | see now that I can store an image
inside the Container field and so that means
| | 01:44 | that anyone on my database records
I can have a corresponding image.
| | 01:47 | Now if I want to have multiple images
I can just define more Container fields
| | 01:50 | per each record or if I want to store
multiple images as one package then I can
| | 01:55 | zip them up and I can store the Zip
file in here. Clicking inside the field and
| | 01:59 | hitting Delete or Remove that and now
just to show the versatility of the field
| | 02:03 | I am also going to store a movie or
a QuickTime movie in this case, right
| | 02:09 | inside the field itself. The
interesting thing about playing either a movie
| | 02:13 | file or a sound file inside of a
container field is when you are in Browse mode
| | 02:16 | viewing the record that stores the
data, you can also play this. As you see
| | 02:22 | here, I have a moving video playing
inside my FileMaker database record the
| | 02:26 | same would be true for an audio file,
you can here the audio of this file
| | 02:29 | playing. I can select that and hit
Delete and Remove the file completely.
| | 02:35 | I can also store file types, PDF files,
Excel files, in this case I have a text
| | 02:39 | file, see I can also right click in
here and select Insert > File and unlike
| | 02:45 | the image or the movie what
actually shows up is the Files icon.
| | 02:49 | Now the other thing that's interesting
about Container field is not only can I
| | 02:51 | store the information in this field,
the Users can also navigate to the record
| | 02:55 | and then extract the data out of the
field as well. So if I was a user and I
| | 03:00 | landed on this database record I could
click inside the field and right click
| | 03:05 | and choose Export Field Contents and
now it will then save this file that's
| | 03:09 | been stored inside the database to
my desktop or whatever location that I choose.
| | 03:14 | When you are choosing the files to
store inside of the record, keep in mind
| | 03:17 | that the database will increase in
size by exactly the size of the file that
| | 03:22 | you place inside the container. So in
English what that means is that if you
| | 03:27 | have a 2 megabyte image, let's say and
you store that inside a container field
| | 03:32 | on a record your database file has
just increased by 2 megabytes in size. So
| | 03:36 | this is something that important that
you keep tabs on even though you can
| | 03:39 | store up to 4 gigabytes of file size
inside of one of these fields, it is
| | 03:43 | probably not recommended that you do that.
| | 03:46 | Binary objects can be embedded
directly into the Container field like you saw
| | 03:49 | me do here or stored as a reference.
So for example by going and say Insert >
| | 03:55 | Picture and I choose the Author
notice down here it says, Store only a
| | 04:00 | reference to this file, if I choose
that and hit Open it still displays the
| | 04:04 | image in the same resolution and
quality as it would have if I embedded it but
| | 04:08 | in this case it's just storing the
path to the location of the image in using
| | 04:12 | the QuickTime engine to
display the image itself.
| | 04:15 | Now this is a much more efficient way
to store images just as a reference or
| | 04:20 | for that matter movies or files or
whatever you store inside the Container
| | 04:23 | field, keep in mind that the moment to
that path breaks so will be display of
| | 04:27 | the image. So if you have the static
location for files that you store in the
| | 04:31 | Container field, it's a great idea
to start those as a reference instead.
| | 04:35 | So storing object by reference
leaves the object on some external storage
| | 04:38 | device such as a server or hard
drive and creating a link to that storage
| | 04:41 | location, this can save considerable
space but necessitates that the external
| | 04:45 | volume always be accessible to all
users of the system if this is shared on the
| | 04:49 | network and that the file's location
not be changed without updating the reference.
| | 04:53 | So there are some unique circumstances
where you would store it as a reference
| | 04:56 | versus embedding but as you can see
FileMaker Provides you with the really
| | 05:00 | unique and interesting type of field,
a Container field that allows you to
| | 05:04 | store all sorts of things, Files, Data,
other FileMaker files, Images, Movies,
| | 05:10 | Sound, really an unlimited
amount of media and file storage.
| | Collapse this transcript |
| Using calculation and summary fields| 00:01 | You can choose to define various
different field types within your FileMaker
| | 00:05 | database, as you can see under the
File > Manage > Database dialog. So for
| | 00:09 | example, you see we have more
traditional types, like Text, Number, Data, Time,
| | 00:14 | Timestamp, and even the Container
field that stores media, but you will see
| | 00:18 | that this list even has a separator
that keeps the Calculation and Summary
| | 00:22 | field types independent from the
regular fields. That really has to do with the
| | 00:25 | fact that all the other field types,
besides calculations and summaries, really
| | 00:29 | just store data.
| | 00:30 | A calculation is a data value that
gets computed based on a formula that's
| | 00:35 | defined by the database's developer.
Now calculations are pretty critical to
| | 00:38 | FileMaker database development and have
their own chapter later in this title,
| | 00:42 | but let me show you an example of the
calculation field that's already defined
| | 00:45 | in this database.
| | 00:47 | Note here under the field Type, we have
Calculation and this one is full name.
| | 00:52 | Here when I click on Options, you see
that I get a special dialog that we'll
| | 00:56 | cover later in this title, but here
you see that I am able to take the first
| | 01:00 | name field and the last name field
and using some supported characters,
| | 01:04 | concatenate the two of those together.
| | 01:08 | If I take a look at that by going in
to Layout mode, dropping a field on the
| | 01:16 | layout, choosing full name, and then
going back in to Browse, you will see that
| | 01:27 | it dynamically presents the data based
on the contents of the two fields that
| | 01:33 | are referenced.
| | 01:35 | A Summary field doesn't necessarily
work with data in different fields but it
| | 01:38 | works with the number of records
inside of a table. So for example, if you
| | 01:42 | switch over to the List view, you see
that we have got a series of different
| | 01:46 | contacts in our customer list that are
all listed here in list form, but what
| | 01:52 | if we want to know, how many of
these records we have at any given time?
| | 01:55 | Well, in that case, we can go and
create a Summary field. So let's choose
| | 02:01 | Summary, we will create a field here
called CustomerCount. When I hit Create on
| | 02:09 | summary, you will notice that it says
what do you want to do here? You want a
| | 02:12 | total, an average, a count, minimum,
maximum, these are all the different
| | 02:15 | options of summaries, but what I want
to do is a Count of and then I can pick
| | 02:20 | any one of these values. Now I have
told it to count the number of ids that it
| | 02:25 | encounters. This is a field that will
give you information based on a found set
| | 02:29 | within your database. So for example,
if I hit OK and we give in to Layout
| | 02:34 | mode, and if we take this
CustomerCount and using our Arrow keys after its
| | 02:40 | selected move it down to the footer,
and we go back in the Browse mode and hit Save.
| | 02:46 | You see now that it tells us that
there are 1,523 records, which actually
| | 02:51 | matches our total that you see in
our Status toolbar. So the more you
| | 02:56 | understand about calculations, which
you can learn later in this title, the
| | 03:00 | more robust your
FileMaker application can become.
| | Collapse this transcript |
| Modifying and organizing fields| 00:00 | When working with fields inside
FileMaker it's important to have an
| | 00:03 | understanding of how you can make
modifications to those fields. In the same
| | 00:07 | place that you add fields to your
FileMaker database which is under the File >
| | 00:11 | Manage > Database window, it's
important to note that you can use the same
| | 00:15 | window to manage and maintain
existing fields in your FileMaker database.
| | 00:20 | First thing to understand about this
window is that you can organize the way in
| | 00:23 | which you are seeing fields displayed
inside the window by clicking on either
| | 00:28 | the Type or Field Name header to
sort the different fields. So if you are
| | 00:32 | looking for a specific field, it's
going to be a lot easier for you to locate
| | 00:35 | it if you sort it by Field Name first.
| | 00:37 | A lot of times developers will put
things like Zs, or underscores, or spaces in
| | 00:44 | their field name, just so that it
shows up in a specific order when they are
| | 00:47 | selecting the sort value. You will
notice that you can choose how you view your
| | 00:51 | fields by either field name, the
order in which they are created, the field
| | 00:57 | type, which groups them into the
different types, or even by a custom order
| | 01:01 | that allows you to move
these things around on screen.
| | 01:04 | So if you are working with a group of
fields you might want to move those all
| | 01:07 | down into one section then you can
access all those or view all those in one
| | 01:11 | spot using custom order; or if you want
to look at a field that you just added
| | 01:15 | to a database, you can see on the
bottom what the most recently added fields are.
| | 01:19 | Now the Options and Comments, it
appears that though the data is disappearing,
| | 01:23 | but actually what you are doing is you
are toggling between the Options and the
| | 01:27 | Comments fields.
| | 01:28 | When we talk about calculations, you
will see a little bit more information
| | 01:32 | about what these options are, but
there are also different field options when
| | 01:36 | it comes to storage and serial values
that we'll discuss in later movies. And
| | 01:41 | that information gets displayed here as well.
| | 01:44 | The one important thing to take a look
at is the field comments. It's always a
| | 01:48 | good idea to comment your fields. So
for example, if you have a field that's
| | 01:52 | called id, it might make sense to you,
but if you ever pass this on another
| | 01:56 | user, if somebody else wants to
maintain the database, they may not know what
| | 02:00 | id means when they first look at it.
| | 02:02 | So one of the things you can do is type
-in values into the Comment field and
| | 02:12 | then you can save these with the field
itself. There we go. I have just saved
| | 02:17 | it. So now you see that the Comments,
if I click on the Comments instead of
| | 02:21 | Options, you see that information
displayed. It's helpful for you because quite
| | 02:25 | frankly you might define a field and a
database and then knock it around to it
| | 02:28 | for another year and you might not
even know what's thought process you were
| | 02:31 | using when you created these. So it's
always a good idea to comment as many of
| | 02:34 | your fields as possible.
| | 02:35 | You should also know that you can
select existing fields and duplicate them if
| | 02:40 | need be, or even select those fields
and delete them using the various buttons
| | 02:45 | that you see here down on the bottom of
the screen. And another good developer
| | 02:49 | practice is to print backup copies of
your field list for each table. And you
| | 02:56 | simply do that by either selecting a
field and then hitting Print, or selecting
| | 03:01 | all the fields and hitting Print. You
will see then what this gives you is a
| | 03:06 | backup of all the fields that you
defined in your database. This is a good
| | 03:09 | idea, if you are about to do a lot of
changes, you at least have a record of
| | 03:13 | how the fields were defined in the
database before you start to making all your
| | 03:16 | modifications.
| | 03:18 | So it's a good idea to get familiar
with the Manage Database Fields tab and all
| | 03:22 | the different buttons here, so that you
know how to maintain your fields moving
| | 03:26 | forward in your database.
| | Collapse this transcript |
|
|
4. Auto-Enter Field OptionsUnderstanding auto-entry field options| 00:00 | When you are defining fields inside
your FileMaker databases, you have a couple
| | 00:04 | of decisions to make. The first of
which is the type of field that you are
| | 00:07 | going to be defining and the next
would be any additional options that may be
| | 00:11 | necessary for that field.
| | 00:12 | So before you can make those decisions,
we'll need to get you familiar with the
| | 00:16 | different options that are
available when you are defining a field.
| | 00:18 | So first if you open up File > Manage
> Database, this is where you get your
| | 00:23 | Manage Database dialog window where
you see all of your fields listed.
| | 00:26 | Selecting any one of the different
fields will allow you to change the field
| | 00:30 | name or type or add comments and then
hit Change, or you will also see that
| | 00:34 | when you choose a field, you can then
choose the Options button. Pressing on
| | 00:38 | the Options button reveals the options
for Field and whatever the field name is
| | 00:42 | that you've selected.
| | 00:43 | The first tab you see addresses Auto-
Enter options. FileMaker Pro allows
| | 00:48 | developers to specify a range of
different options for automatically populating
| | 00:52 | the contents of a field. So on screen
here you see the Auto Entry tab of the
| | 00:56 | options for Field dialog.
| | 00:58 | What Auto Enter means is that when a
new record is created in the database, it
| | 01:03 | will automatically enter a value into
that field on your behalf. There are
| | 01:07 | various different options that you can
choose to select which type of data gets
| | 01:10 | entered into the field automatically.
| | 01:12 | So a FileMaker field can automatically
track information about when a record
| | 01:16 | was created or last modified for
example. That's what you see here at the top
| | 01:20 | of the screen.
| | 01:21 | So the first two that we are going to
look at are Creation and Modification.
| | 01:25 | Now, you will note that each one of
these has a drop-down menu where you can
| | 01:29 | select what type of data gets put into
the field automatically when the record is created.
| | 01:35 | Now, in our case, you see that I have
selected the Departure Time field and it
| | 01:39 | only gives me the options to choose time,
and the reason for that is because I
| | 01:44 | have chosen a field with the field type
of time. Same thing is true for number,
| | 01:48 | if I select days and hit Options. You
will see now that it allows me inside the
| | 01:52 | Number field. I can put a Date, which
is actually stored as an integer, so it's
| | 01:56 | a number. Same with Time and Timestamp
also stored as integers. But also, I can
| | 02:01 | store the Name and Account Name inside
of any one of these fields besides the
| | 02:05 | Time field if need be.
| | 02:07 | Text also allows us to store any one of
these field values, but the idea behind
| | 02:12 | this is that when a new record is
created, you want to store information on
| | 02:17 | when it was created, at what time
it's created, who created, that type of
| | 02:21 | thing. These are necessarily fields
that you are going to display on your
| | 02:23 | layout, but these are fields that
are going to be helpful as housekeeping fields.
| | 02:27 | You will notice that we have a
couple of those already defined inside the
| | 02:30 | database. If you look down here and
scroll all the way down to the bottom, you
| | 02:34 | see that these are z_, which allows
us to sort everything by the fields and
| | 02:39 | have all of our
housekeeping fields grouped together.
| | 02:42 | But you will notice that in the case
of Creation Account; this is going to
| | 02:45 | store the information on the person
who was logged in when the record was
| | 02:48 | created. You see that we have got the
Creation check box selected and Account
| | 02:53 | Name is chosen. Let me first note the
difference between Name and Account Name.
| | 02:58 | First of all, Name represents the
computer name or the name of the computer,
| | 03:02 | which you are using at the time that
the record is created. Account Name is the
| | 03:07 | name that you use to login to the
FileMaker database or your credentials for
| | 03:10 | that database.
| | 03:12 | So the idea is you can have a user
that can access the database from multiple
| | 03:15 | different computers and their Account
Name will show up in every record that
| | 03:19 | they create. But if you want to see
where, as far as a location is concerned,
| | 03:23 | is to where the record was created,
you can choose Name, which you will store
| | 03:27 | in the computer name.
| | 03:27 | So let's say you have a shipping
computer or an accounting computer, those
| | 03:31 | types of things. You can get
information from both the computers or locations
| | 03:36 | and the individuals as well.
| | 03:38 | The same is true for modification. If
you look down here z_modification account
| | 03:43 | or timestamp. When I hit Options,
you will see that Modification and then
| | 03:47 | Timestamp is chosen. This is a very common one.
| | 03:49 | This means that whenever anybody goes
into your database and modifies any of
| | 03:53 | the values on the record; it will
automatically change the value that's stored
| | 03:57 | inside the Modification field.
| | 03:59 | These are great because some
developers find it useful to have a set of
| | 04:02 | housekeeping fields that are defined
for every table they create. For example,
| | 04:06 | Creation Date and Time or simply
Creation Timestamp, Modification Date and Time
| | 04:10 | or Modification Timestamp, a Creation
Account Name, Modification Account Name;
| | 04:15 | those are all common set. You see
those represented here in the sample file.
| | 04:19 | As I mentioned earlier, these aren't
necessarily field values that you are
| | 04:21 | going to display on a layout, but when
you are troubleshooting problems within
| | 04:24 | the system or trying to isolate pieces
of bad data, it's going to be immensely
| | 04:28 | helpful for you to have these values
stored on the fields, so that you can
| | 04:31 | drill down into specific sub-sets
when trying to troubleshoot a problem.
| | Collapse this transcript |
| Using the auto-enter serial options| 00:00 | FileMaker allows various different
field options when defining fields inside
| | 00:05 | your database and one of the more
commonly used ones is what's called the Auto
| | 00:09 | Enter Serial number. You will
notice if you go under File to Manage and
| | 00:13 | Database, you will see that for
example in the Adventure table, we have an ID
| | 00:18 | field that's defined and if you press
the Options button, you will see that
| | 00:22 | under the Auto-Enter tab, it has a
check-box under Serial number and you see
| | 00:26 | there is a few different options that
you can choose here. But let's just stop
| | 00:29 | for a moment and take a look
at what's actually happening.
| | 00:31 | What this indicates is that when a
record is created, it's going to give it its
| | 00:34 | own unique value and since we are
choosing the Auto-Enter option for a field
| | 00:38 | that means that FileMaker is going to
manage what that value is. And that will
| | 00:42 | allow us to guarantee the uniqueness of
the value that's being created in this field.
| | 00:47 | This is going to be key when we talk
about relationships later on in this title
| | 00:50 | because each field will need to
be uniquely identified in order for
| | 00:54 | relationships that would be
created between tables and records.
| | 00:57 | In this case, you see that Auto-
Enter Serial means that when a record is
| | 01:00 | created, it will automatically enter
a serial value and it will continue to
| | 01:04 | manage the next value in the Increment
Level. So let's take a look at that. If
| | 01:08 | I say OK, and OK, and if you go to
View and Layout, this is the mode which
| | 01:14 | allows us to add new fields
to the layout if we want to.
| | 01:17 | I will select this option up on the
top of the screen; the Field tool and I
| | 01:22 | will just drag it to the layout and
then specify the ID field and now we will
| | 01:29 | go back into Browse mode after hitting
Save and we are going to create a new
| | 01:33 | record. So the new record shows a
number 1. If I create another new record, it
| | 01:38 | shows a number 2, number 3, and so on.
I can delete these records as you will see,
| | 01:44 | and hitting a new record goes to 4.
| | 01:49 | So it doesn't matter if the records
exist. It just has a tally going that it's
| | 01:53 | storing internally that knows what the
next value is going to be. That way you
| | 01:56 | are always guaranteed to have unique values.
| | 01:58 | There is a couple of options for you
to choose from though. If you go into
| | 02:01 | Manage > Database, ID, Options,
you will see that you can choose whether
| | 02:07 | or not you generate this value on the
creation of a record or on the commit of a record.
| | 02:12 | Now, the concept of committing a
record is the action that actually makes the
| | 02:17 | data save to your database. Now,
FileMaker essentially is an auto-save
| | 02:21 | database. So any data that you put
inside of a field gets automatically saved.
| | 02:25 | But there is a brief moment in time
between when you add the data in the field
| | 02:28 | and when you click outside of the field
that that data has not yet been saved.
| | 02:32 | So if for some reason you want to
manage very closely the serial values,
| | 02:37 | you can change to On Commit and we will
check out how that behavior is different.
| | 02:42 | So now, let's say we are on number 4
there, so we'll delete number 4. Now, the
| | 02:48 | next record would be number 5. Now I
can click into this field and I can type a
| | 02:52 | bunch of data into it if I'd like to.
All the while, I haven't yet committed
| | 02:57 | this record to the database, but if I
click outside the field, that commits the
| | 03:01 | record therefore saving the data and
then you see it gives me the number 5.
| | 03:07 | Or if I hit New Record, typed a bunch
of values in here, and now I wanted to
| | 03:13 | delete the record that I have, the
next serial value has been maintained so I
| | 03:17 | can use it on this upcoming record. For
example, if I take Record, it will say
| | 03:21 | 6 and so on and so forth.
| | 03:24 | Really ID fields or serial values
defined in your database should not be
| | 03:29 | something that the users are
necessarily seeing, to be something that's stored
| | 03:32 | internally inside the database. So
most likely the default is going to be
| | 03:35 | generating on creation and storing
the next serial value from there.
| | 03:39 | There is one area where this could
trip you up, however, and that is when you
| | 03:43 | are importing data into your database.
Let's say you have got records in your
| | 03:47 | database already and the FileMaker
database is managing what the next serial
| | 03:51 | value is going to be to ensure that
you never get duplicates. It's the
| | 03:54 | FileMaker file that is actually
storing the data on the next value.
| | 03:58 | So if you import more data coming from
another source, let's say another file
| | 04:02 | into this FileMaker database, it needs
to be able to know that it should update
| | 04:07 | the next serial value. I will show
you how we can do that. It's a pretty easy function.
| | 04:11 | So let's do an example of going File >
Import and we will choose Tab-Separated
| | 04:18 | files and choose Adventures. Then again,
we will talk more about importing but
| | 04:22 | the idea here is we are going to bring
in 16 new records to the database and so
| | 04:26 | what we wanted to do is increment our
next serial value by 16 and we had it on
| | 04:30 | number 7 prior to this.
| | 04:32 | So I will just select Import and this
window that pops up is the one that's
| | 04:36 | important to the success here. If you
do not have Perform Auto-Enter options
| | 04:40 | while importing selected, it's not
going to reset your serial number. This
| | 04:44 | means that even though you have added
16 records to the database, the next
| | 04:49 | serial value could potentially be a duplicate.
| | 04:52 | This is important if you are installing
different builds of a solution and you
| | 04:55 | are importing your data into them. It
might mess up your internal serial values
| | 05:00 | if you are not managing these properly.
| | 05:02 | So the trick here on managing these is
simply to check this box, hit Import,
| | 05:06 | and you see 16 new records have been
added to the database. Let's go onto File >
| | 05:10 | Manage > Database, Options and we
see now instead of a number 7,
| | 05:16 | it's automatically updated the next
value in the shell to a number 23.
| | 05:20 | So of the Auto-Enter options,
the Auto-Enter Serial Number is an excellent
| | 05:24 | option for being able to uniquely
identify records within your database table.
| | Collapse this transcript |
| Using the auto-enter calculated values| 00:00 | One of the more useful Auto Enter
options for defined fields is the Auto Enter
| | 00:05 | by Calculation option. You look
under File > Manage > Database in the
| | 00:10 | Lucky_You_Tours_04_03 Exercise File.
You will see that we have a field that's
| | 00:15 | called Amount Due.
| | 00:17 | If you select Amount Due under the
Booking table and hit Options, you will see
| | 00:21 | that under the Auto-Enter tab, we
have a check box next to the Calculated
| | 00:24 | value. Now, in order to see the
calculated value, you have to hit Specify.
| | 00:28 | Anytime you are in Auto-Enter, it means
that when a new record is created, put
| | 00:33 | this value into the field. So here,
in this case, what it does is it takes
| | 00:37 | values from other fields and it just
says, after running a calculation, give me
| | 00:41 | the result of this
calculation and put that into the field.
| | 00:44 | So here you see Amount Billed minus
Amount Paid will equal Amount Due. Now, you
| | 00:49 | might think to yourself, why not just
create a calculation for this field?
| | 00:52 | Well, the idea of an Auto-Enter
calculation versus an actual calculation field
| | 00:57 | is that like any other Auto-Enter, when
you create a new record, it's going to
| | 01:01 | take a snapshot in time as to what
the data is at the moment that record is
| | 01:05 | created and then insert that into
the field. A calculation value will
| | 01:09 | constantly update as time goes by.
| | 01:11 | So let's say in our example that on
Monday of this week, the amount billed for
| | 01:20 | any particular customer was $1,500. But
on Tuesday of that week, the amount due
| | 01:26 | as of that date was $1,750. Well, that
means that this value is going to change
| | 01:31 | inside this field as each day goes by
as the amount build value changes. But if
| | 01:35 | all we care about is what amount
billed minus amount paid was on the day that
| | 01:40 | we created this record,
then we use an Auto-Enter Calc.
| | 01:44 | The other thing about Auto-Enter Calc
records and by the way if you hit OK and
| | 01:49 | create a new Record, you see if I put
an amount billed as 100 and amount paid
| | 01:55 | is 50. When I commit the record by
clicking outside of it, the Amount Due
| | 01:59 | automatically shows up as 50.
| | 02:00 | The other thing that's nice about
the Auto-Enter Calc versus the regular
| | 02:03 | calculation is I could go in here if
I'd like to and I can override that value
| | 02:09 | and change it to whatever value that I like.
| | 02:11 | So when you are interested in taking
snapshot values from various different
| | 02:14 | fields and those certain database
records, it's always a good idea to use
| | 02:18 | Auto-Enter calculation
option when defining your field.
| | Collapse this transcript |
| Setting field filter options| 00:01 | In a previous video, I discussed the
field option for Auto-enter Calculation
| | 00:05 | and now I would like to show you a
technique that's based on Auto-Enter
| | 00:08 | Calculation. We call this one field
filtering. If you open up your file,
| | 00:12 | Contact_04_04, you will notice that
what we have is a contact database that
| | 00:18 | has, for example, a social security
number field and a phone number field.
| | 00:21 | One of the common issues with data
that's been entered into a database is that
| | 00:26 | users will enter data into a field and
enter it in various different formats.
| | 00:31 | So for example, instead of social
security number, they could just enter it in
| | 00:34 | as 324 without dashes and then maybe
they do slashes. The phone number one
| | 00:40 | makes more sense in that, users can
enter in 888-212-5489 or (888) like you see
| | 00:48 | here with the space, but if you just
want your data to be uniform there is a
| | 00:52 | way that you can change it as
it's been saved to the database.
| | 00:55 | Let's take a look at how that works.
If you go into File > Manage > Database,
| | 01:00 | you see the phone number field has the
Auto-enter Calculation value chosen. So
| | 01:05 | we can access that by going into
Options and here we are at the Auto-enter tab.
| | 01:09 | So when you open up the Specify
Calculation dialog don't pay too much attention
| | 01:13 | to the calculation itself, because
this is kind of a tricky calculation.
| | 01:17 | We will cover the logic of this
later in the Calculation chapter but for
| | 01:21 | whatever it's worth, you can
actually copy and paste this right into your
| | 01:24 | database solution and it will have the
same effect. So what this actually does
| | 01:27 | is that it will strip out all the
first three numbers and wrap those in
| | 01:31 | parenthesis, put a space and then take
the next three numbers, follow that by a
| | 01:36 | dash and then it will
display the right four numbers.
| | 01:41 | So basically, your users are going to
enter in all these numbers in succession
| | 01:44 | without any dashes, without any
parenthesis and when they tab out of the field
| | 01:47 | and hit Enter, it's going to
reformat it. The key to this technique, this
| | 01:52 | filtering is that the field that we
are actually applying the Auto-enter
| | 01:56 | Calculation formula is the phone
number field. But in the definition of the
| | 02:00 | Auto-enter Calculation, you see that
in various spots, we are referencing itself.
| | 02:06 | So to take a moment, to explain
what's going on there, what's actually
| | 02:09 | happening in this formula is that
it is saying the value that the user
| | 02:13 | originally entered into the field is
what's represented by these placeholders
| | 02:17 | in their calculation. So if the user
just enters in a stream of ten different
| | 02:22 | values without any dashes or parenthesis,
that's the pre-commit value that you see here.
| | 02:28 | So the value before it is saved is
what's represented in this calculation. And
| | 02:33 | then you notice here, the key to
making this all work is that you see that
| | 02:37 | there is a checkbox, which is one of
the options for the Auto-enter Calculated
| | 02:40 | value, which is called Do not replace
existing value (if any). So let's try and
| | 02:44 | see what happens if we check this value.
| | 02:47 | The syntax of this message is a little
bit difficult to comprehend. It really,
| | 02:51 | instead of saying Check means Do not
replace with existing field, it should
| | 02:55 | just say Replace with a checkmark or
not. So in this case, let's see what
| | 02:58 | happens if we type a value into the
field with the Do not replace existing
| | 03:03 | value checked. So I will go and I will
create a new record and I will go into
| | 03:07 | phone number.
| | 03:08 | Now keep in mind, we haven't
committed this record to the database yet. I
| | 03:11 | haven't hit Enter. So therefore, it
has not yet been committed is what the
| | 03:16 | terminology is there. So I will just
enter in and you can see I have just
| | 03:22 | entered in 8882124620. So I have just
got the ten characters in there and now I
| | 03:28 | am going to click outside the field and
commit it and you see what it has done
| | 03:31 | is it has simply applied the same
value that the user entered in, into the
| | 03:36 | field itself after it was committed.
| | 03:38 | Now the reason that it did that is
because I said don't replace an existing
| | 03:42 | value in the field. So the existing
value here is the value that the user typed
| | 03:46 | into the field. But if I uncheck
this and I allow the calculated value to
| | 03:51 | replace any existing value. So that
means, the value that the user is typing in
| | 03:54 | before I commit. That means at on
commit it will apply this calculation to the
| | 04:00 | value that I put inside the field.
| | 04:01 | So, Do not replace existing value, we
use it, as is. Pre-commit and post-commit
| | 04:06 | but leaving the value not checked
will apply the calculation formula to the
| | 04:11 | value that I entered in Pre-commit
and then reveal the filtered value,
| | 04:15 | post-commit of the record. It's easier
if I show you. So let's take a look. OK
| | 04:20 | and we will Delete this record, Create
a new one and I will type in, 8882124620
| | 04:28 | and now I click outside of this and
commit and you see now, it has applied the
| | 04:32 | formula to the field and it
automatically formatted in the way that I have
| | 04:35 | instructed with the calculation formula.
| | 04:37 | The same is true by the way for Social
Security and you see here, we have just
| | 04:44 | put dashes in there, so it formats it
properly and this technique is commonly
| | 04:48 | called field filtering.
| | Collapse this transcript |
| Looking up values from other fields| 00:00 | One of the Auto-enter Options available
to you when you are setting up a field
| | 00:05 | inside a FileMaker is something that's
called Auto-enter Lookup and you will
| | 00:08 | see if you go inside the Lucky_You_
Tours_04_05 file under File > Manage >
| | 00:14 | Database. You go into Tables and select
booking, double click on that. You will
| | 00:20 | see that we have a field here that
uses the Auto-enter Lookup option. It's
| | 00:24 | called amount billed and if we go into
Auto-enter Lookup and hit Options,
| | 00:30 | we'll see that it's a number field but
as with any other Auto-enter Option, when
| | 00:34 | the record is been created, it's
automatically going to enter some value into
| | 00:38 | the field. So in the case of the
Lookup value, it's using a relationship
| | 00:42 | between two tables. Now keep in mind,
if you haven't gotten familiar yet with the
| | 00:47 | relationships, the concept of
relationships, you can go checkout the chapter on
| | 00:51 | relationships but the idea
is that two different tables,
| | 00:54 | in this case there is a trip id and a
booking id, meaning one trip can have
| | 00:58 | many bookings, and they are related
together using the Trip id as the unique
| | 01:02 | value. So with that in mind, let's
take a look at how the Lookup value would
| | 01:06 | work. Well, if you hit Specify, these
are the options that you are going to
| | 01:10 | choose. You say I am starting in the
Booking table, which is the table that
| | 01:14 | this layout is based off of and I want
to lookup a value from the Adventure table.
| | 01:19 | So the Adventure table has all these
following fields and so in here I say
| | 01:25 | I want the price coming from the
Adventure table. So we will say OK and OK again
| | 01:31 | and so in order for this to work. What
it's going to do is populate the amount
| | 01:35 | billed with the price of whatever
the chosen trip is. So first I need to
| | 01:39 | manually select. I will say as far as
adventures are concerned, we will say the
| | 01:44 | Irish Adventure. So I will
go in and I will copy the id.
| | 01:47 | Now this is just the unique value, you
see that every one of these trips has
| | 01:50 | its own value. So that way, it knows
go find the record that matches 1001 and
| | 01:57 | then put the value of price, which is
1235, into the amount billed field. So
| | 02:03 | let's try this out. We hit a new
record and I am just going to manually paste
| | 02:07 | in here 1001, which is the trip id.
Now keep in mind that there are all sorts
| | 02:12 | of more sophisticated methods I am
creating related records and populating
| | 02:16 | these key fields.
| | 02:18 | But for this example, we will paste
in 1001 and we will click OK and now you
| | 02:23 | see it has automatically looked up
what the price was in the related value,
| | 02:27 | 1235, 1235 and placed it inside the
amount billed and of course, amount due,
| | 02:35 | see now what's happening there.
Amount due is actually an Auto-enter
| | 02:39 | Calculation that does
amount billed - amount paid.
| | 02:43 | So that would actually be 1235-0=1235.
So the Lookup are used in very specific
| | 02:51 | cases because you could easily create a
calculation field that just shows amount
| | 02:55 | billed based on the related value and
that's quite common. But the reason that
| | 02:58 | you wouldn't do that is because when
you use an Auto-enter Calculation or a
| | 03:03 | Lookup, what it's doing is taking a
snapshot of a piece of data at a moment in
| | 03:08 | time that the record is created.
| | 03:10 | So the idea here is this. I am
creating a booking and all I really care about
| | 03:15 | is how much this trip cost at the
moment that I booked it, because let's say a
| | 03:20 | year later this trip then gets
changed to, instead of 123,5 it becomes 1435.
| | 03:31 | Does the value on the booking change? No,
but if this was a calculation field,
| | 03:36 | it would change. It would
continue to change as time went by.
| | 03:39 | So you don't want that in your data
all of the time. Sometimes you want it to
| | 03:42 | retroactively update all your data
and it's very common when it comes to
| | 03:45 | pricing on products or services or in
this case, trips. You only want to know
| | 03:50 | let's say the price at a moment in time
when the record was created. So if you
| | 03:54 | ever need to do that, just grab a
related value at a moment in time, at the
| | 03:58 | moment that the record is created.
| | 04:00 | You can use an Auto-enter Lookup and
additionally, what's nice about this is
| | 04:03 | you can make manual changes if you
needed to, unlike your calculation where if
| | 04:07 | you went in, it would tell you it's not
modifiable. Here I can go in and I can
| | 04:11 | modify the value in any way, shape or
form that I like. So again, if you are
| | 04:14 | interested in pulling in a related
value via a relationship at the moment that
| | 04:18 | a record is created, a net field,
define it as an Auto-enter Lookup.
| | Collapse this transcript |
|
|
5. Validation and Storage Field OptionsSetting field validation and custom messages| 00:01 | When you are making decisions about
what fields to add to your database, you
| | 00:03 | may also want to apply some rules
about the data that's getting entered into
| | 00:07 | those fields. This concept
is called field validation.
| | 00:11 | If you open up your file Lucky_You_Tours
_05_01 and go to the Manage > Database,
| | 00:16 | and then the Table for Customer, you
will see a series of fields inside the
| | 00:21 | database. Now, the concept of field
validation probably isn't as foreign to you
| | 00:25 | as you may think.
| | 00:26 | If you've ever been on a website
before and you have been filling out
| | 00:28 | information and then you try to
advance to the next page and it came back and
| | 00:32 | said the Email field is required
before you can proceed. That is a form of
| | 00:36 | field validation. In that case, they
applied a rule that said that this field
| | 00:40 | must not be empty. You can apply
those same types of rules to fields within
| | 00:44 | FileMaker databases.
| | 00:46 | Let's take a look at an example. Let's
say you want to make sure that the user
| | 00:49 | does not leave the Email field empty
when creating a record. That is just a
| | 00:54 | field option or a field validation
option that you can apply by selecting the
| | 00:58 | field, hitting the Option button,
and then clicking over to the Tab for Validation.
| | 01:03 | You will see here that you have a
series of different options that are
| | 01:05 | available to you. For example, if we
take a look at these, we have got strict
| | 01:09 | data type meaning it can either be
numeric only, make sure that it's a four
| | 01:14 | digit year and your date or make sure
that it is a properly formatted time of
| | 01:18 | day. That's what strict data type
option would be, or you could make sure that
| | 01:22 | it's not empty. We will check
that one here in this example.
| | 01:26 | So in this case, the user will not be
able to proceed with their activities
| | 01:29 | until they have entered a value inside
this field. You could also choose unique
| | 01:34 | value or existing value. Additionally,
you see that you can make the user
| | 01:38 | choose from a range or even some sort
of calculated value that would result
| | 01:43 | itself in either a true or false
statement that you can apply towards a
| | 01:46 | validation. So really you can apply
whatever type of validation rule that you see fit.
| | 01:51 | In this case, we will keep it pretty
simple and we will say just make sure that
| | 01:53 | the value is not empty. So we will
say OK and then we have email, and I am
| | 01:59 | going to enter a value in to the
fields and I am going to click outside the
| | 02:04 | field. Now you notice a message
popped up that said email, the field, is
| | 02:09 | defined to require a value. Do you
want to allow this field to remain empty?
| | 02:13 | And as the user who is entering data, I
can either say Yes, leave it empty, or
| | 02:17 | No, do not leave it empty or revert the
record back to pre-committed versions.
| | 02:23 | If I try again, you will notice that if
I put an email address in this time and
| | 02:32 | now commit, I get no errors. So that's
all enforced by the email field having
| | 02:39 | an option for validation to
require it not to be empty.
| | 02:43 | Now, one of the things you may have
noticed here is that it allowed the user to
| | 02:46 | override this. So you can take sort of
a hard or soft approach to how you are
| | 02:50 | enforcing this rule. If it's really
just a suggestion, then you can allow the
| | 02:55 | user to override during data entry.
But if this is a hard-fast rule and you
| | 03:00 | want to make sure that the user adheres
to this before proceeding, it's a good
| | 03:04 | idea to uncheck this check box.
| | 03:07 | That way when you create a new record,
it says, email is defined to require a
| | 03:13 | value. You must enter a value. Now,
you see it doesn't allow me to revert to
| | 03:16 | the previous value and it doesn't allow
me to override that. I just say OK and
| | 03:20 | it goes right back to email. No
matter what I do, I get that message.
| | 03:24 | So if you have a really hard rule on
data entry and it's not just for creating
| | 03:28 | new records. This validation applies
when a record is modified as well. So for
| | 03:33 | example, you see when we enter that
value in, we are okay there. But if I go
| | 03:39 | back and pick one of these and I edit
it, and I pull that value out of the
| | 03:43 | field, you see that I get this even
though the record is a previous record that
| | 03:47 | has this value associated.
| | 03:48 | The only thing that might be a little
confusing is email is defined to require
| | 03:52 | a value. You must enter a value. Users
might not respond to that so well. So if
| | 03:57 | go into Manage > Database-- you see
it's very strict. It won't even allow you to
| | 04:03 | proceed into Manage >
Database without a value in there.
| | 04:05 | If you go in, you will notice that you
have the ability to change the message
| | 04:09 | that pops up. So for example, here I
can say -- you could even give it a little
| | 04:17 | personal touch. Now, oops! You must
enter a value in the Email field. That
| | 04:28 | might make a little bit more sense to a
user and now you can proceed from there.
| | 04:31 | So let's take a look at another example.
If I go into the Adventure Detail,
| | 04:36 | you will notice here that we have got a
Days and a Nights field, which is just a
| | 04:42 | numeric value. We can enter in the
number of days and number of nights.
| | 04:46 | The thing is that it doesn't make sense
for you to have more nights than days.
| | 04:50 | For example, you are always traveling
on one of the days, so you are going to
| | 04:52 | have one extra day no matter what. So
we want to make sure that users that are
| | 04:56 | entering these values into the database
don't mess up and accidentally put for
| | 05:00 | example 17 into that field.
| | 05:03 | Let's take a look at how we would
modify that. Let's go into Manage > Database
| | 05:08 | and if we go towards the Nights field,
that is here. So we say that Nights less
| | 05:20 | than Days. Let's take a
look at what happens now.
| | 05:28 | So if I enter in 18, you see that it
says Nights is defined to contain a value
| | 05:34 | something that's really not that
descriptive to the user, but here I can revert
| | 05:37 | the record back to the original amount.
But instead, this is probably a great
| | 05:42 | example of where I might want to put
in a custom message that says, Number of
| | 05:49 | nights must be at least one less
than the number of days. Try again.
| | 05:59 | We are not going to let them override it.
We will just say OK. So now a user is
| | 06:05 | entering in. Says number of days must
be at least one less than the number of
| | 06:10 | nights. Let's try again, revert record,
back to the original. If I say 13, now it saves.
| | 06:16 | So there is a couple of different
options for applying rules to the data entry
| | 06:21 | either as soft suggestions or as
hard rules that can be enforced by using
| | 06:26 | Auto-Enter validation on your field options.
| | Collapse this transcript |
| Understanding always vs. data entry validation options| 00:00 | In the previous movie, we discussed
applying validation rules to your field
| | 00:05 | options when setting them up inside
FileMaker. This will allow you to control
| | 00:09 | the data that's either being entered
into a new record or modified in an
| | 00:12 | existing record, and applying rules to
it to make sure that you don't get data
| | 00:16 | in there that you don't want. In the
example that we discussed, we looked at
| | 00:19 | the Nights field.
| | 00:21 | We go to File > Manage > Database and
we look at Nights. You see that there is
| | 00:27 | an option here that says, Make sure
that nights is always less than days and if
| | 00:32 | not, show this option that says, Oops!
Nights must be one less than days. Let's
| | 00:39 | see what happens if it doesn't pass.
It says, Oops! Nights must be one less
| | 00:43 | than days, and it gives you
an opportunity to change that.
| | 00:45 | So one of the things that you may not
have noticed and it's important to take
| | 00:49 | into account is under Nights, you
notice up here that we have got the ability
| | 00:54 | to control whether or not we are
going to validate this data in the field
| | 00:58 | always or only during data entry.
| | 01:00 | Well, what's the difference between
those? Well, you may not think there is a
| | 01:03 | difference unless you knew that there
are other ways that you can get data into
| | 01:06 | a field or modify data that's in a field.
| | 01:08 | So for example, one of those would be
via a script or during an import or if
| | 01:12 | you are doing batch replaces of
groups of records, or even doing something
| | 01:16 | that's called a re-lookup. When the
default option of Only during data entry is
| | 01:20 | selected, this means that only when
a person is sitting in front of the
| | 01:23 | application and changing those values
in a data entry environment, will this
| | 01:28 | validation be applied.
| | 01:29 | That's generally what you want,
because in most cases when you are importing
| | 01:33 | data in or when you are creating a
script and modifying data in a script,
| | 01:36 | that's an environment that's controlled
by a developer or someone that can sort
| | 01:40 | of restrict or enforce those rules on
their own. But let's take a look at how
| | 01:43 | that would work.
| | 01:44 | If I switch this over to Always, this
means that no matter what, whether I am
| | 01:48 | importing, or running a script against
this record or a user entering a value
| | 01:52 | into the field, I am going to get an
error if the validation rule is not passed.
| | 01:59 | Let's see how that performs using the
example of importing records. We will go
| | 02:02 | to File > Import Records, and we will
cover more about importing records in the
| | 02:06 | Importing chapter. But to follow along
this exercise, you can go onto 05_02 and
| | 02:10 | select the adventures.txt,
open that up, and then hit Import.
| | 02:16 | Now, in the Import Summary, you
notice that it says, total records added or
| | 02:20 | updated 18. But out of those 18, 11
of them were not added to the database
| | 02:24 | because they violated some rule.
| | 02:26 | So what this indicates to us is that
they've violated one of our validation
| | 02:29 | rules which means that the Nights
value was greater than the Daysm which is
| | 02:34 | probably a good idea in this particular
example to enforce that rule. But if we
| | 02:38 | delete those records and try this again,
we will note that if we go to File >
| | 02:43 | Manage > Database, down to Nights. I am
going to say only during data entry. So
| | 02:49 | in this case, bypass this rule if the user is
going to do an import like we are going to do.
| | 02:54 | So we say File > Import Records > File,
05_02, Open, Import, Import and
| | 03:03 | now you see that all 18 records have
been added to the database. One thing you
| | 03:07 | should be aware of however is that if
you go in and try to change any of these
| | 03:12 | values, the validation rule will be applied.
| | 03:17 | So if you ever want to have some
control over only data entry, then you would
| | 03:22 | select only during data entry. Otherwise,
you can apply an Always that data can
| | 03:27 | get updated within your
FileMaker database records.
| | Collapse this transcript |
| Reviewing storage options (global fields)| 00:00 | When you are defining fields inside a
FileMaker database, after you've defined
| | 00:05 | the fields type, you can choose
different field options like auto-entry and
| | 00:08 | validation criteria; all of that is
done through the Manage > Database dialog.
| | 00:14 | But you will also notice that there is
another option if you select a field and
| | 00:18 | select options.
| | 00:19 | In addition to Auto-Enter, in addition
to Validation you will see that there is
| | 00:22 | one that's called Storage. And on
this tab, this is where you can determine
| | 00:25 | whether or not a field will have
global storage. Let's first talk about what
| | 00:29 | Global Storage is.
| | 00:30 | For those of you that have worked with
FileMaker in previous versions, versions
| | 00:34 | that were prior to version 7, you
probably remember that there used to be a
| | 00:39 | field type that was called Global. And
what a Global field is, or in current
| | 00:44 | incarnations of FileMaker what a field
with Global Storage actually is, it's a
| | 00:49 | field that has the same value for
every record in the database. Let's take a
| | 00:53 | look at how that would actually work.
| | 00:56 | Let's define a new field that's called
Global. I am going to select Text and
| | 01:01 | hit Create and I will hit OK, and this
field shows up on my layout if I go to
| | 01:09 | View > Layout mode. I am going to
select this and say Cut and go into Adventure
| | 01:19 | List. Okay, so let's put that value on screen.
| | 01:24 | Okay, so right now it's a regular
text field, so I can put Value, value2,
| | 01:31 | value3, all I have done is just define
a field that has its own value for each
| | 01:36 | one of the records in the database.
It's the same thing as the firstname field
| | 01:39 | or the lastname field or email or
whatever, nothing different there.
| | 01:42 | So in this case, if we look at the
field Global, it is not set to Use global
| | 01:47 | storage, so that means it's just like
every other field, so every field by
| | 01:51 | default is set to not have global
storage. Let's take a look at what happens
| | 01:56 | when I switch this from Not Global
to Global Storage. Database > Global >
| | 02:04 | Options and I am going to check this box.
| | 02:07 | The first thing you see is it says,
Turning global storage on or off will cause
| | 02:10 | all existing data in the field to be
lost. So, for example, those values that I
| | 02:14 | typed into the field these will be lost
if I toggle over to Global. I am going
| | 02:17 | to say OK, OK again, and now notice
that all my field values are gone. When I
| | 02:24 | type a value into the field and then
hit OK, notice that every record in the
| | 02:28 | database has now grabbed that value.
Global Storage is used really for a
| | 02:34 | temporary storage location for scripts.
So it's really like a field that's
| | 02:37 | defined inside a table, rather than a
field that's defined inside of a record,
| | 02:41 | and the reason I got rid of global
fields as a field type was because right
| | 02:46 | around that same version, which
was around FileMaker 7, FileMaker had
| | 02:49 | introduced Script Variables, which is
something that we will talk about in the
| | 02:53 | scripting section, but it did away with
the need for having to define a global
| | 02:57 | value. But global values, you are just
looking at storing one value inside of a
| | 03:02 | table, meaning that there's not going
to be a separate value for each record.
| | 03:05 | You can create a whole series of global
fields. You can store user preferences.
| | 03:09 | For example, you can have a global
container with global storage. And the other
| | 03:13 | interesting thing is that these are
session-based values. So that means that
| | 03:19 | each time I login, I can have my own
value in the database, meaning they are
| | 03:24 | going to have a different experience.
An important behavior of these globally
| | 03:27 | storage fields is that in a multiuser
environment like I just described, global
| | 03:31 | values are specific to each user session.
| | 03:33 | So when a FileMaker Pro or even an
instant web publishing client connects to a
| | 03:37 | hosted database, they are going to
inherit the values that were in use when the
| | 03:41 | file was last physically opened on a
local computer. Any modification of those
| | 03:45 | initial values during that session will
persist only for the duration of their
| | 03:50 | session. So that's why using global
fields might be a good idea for storing
| | 03:53 | user preferences or even session
preferences, or just temporarily storing
| | 03:57 | information that a user is working on
in the middle of the script because all
| | 04:00 | those things are specific only for
the duration of that session. Now if the
| | 04:04 | client then closes and then reopens a
file, all the global fields will be reset
| | 04:08 | to their initial values.
| | 04:09 | I think the best way to look at this
is you will know when you need a global
| | 04:12 | field, and if you are looking for
global fields and you don't know where they
| | 04:16 | are because you used to work with
versions prior to 7, keep in mind that it's
| | 04:20 | an option now rather than a field type.
So you go inside Text Fields > Options
| | 04:25 | and you can turn on Global
Storage, or turn that off as well.
| | 04:30 | So although you may never need a field
with global storage and you can build an
| | 04:34 | entire solution without using it. In
case you need it, understand that instead
| | 04:38 | of it being a field type,
it is now a field option.
| | Collapse this transcript |
| Indexing options for fields| 00:00 | One of the final decisions that you
have to make when you are defining a field
| | 00:04 | in FileMaker database is whether or not
you are going to index that field. But
| | 00:08 | in order for you to make that decision,
you first need to know what an index is.
| | 00:11 | This option can be found under
Manage > Database, under the Options in the
| | 00:20 | Storage tab, and you see down below
here you've got the ability to choose None,
| | 00:23 | Minimal, and All. So
what does this mean exactly?
| | 00:26 | Well, FileMaker has the ability to
index the values that are inside of a field,
| | 00:29 | so it can be used for certain functions
like searching, or sorting, or creating
| | 00:34 | value list, or more importantly
generating relationships between tables, but in
| | 00:38 | order for that functionality to work
effectively FileMaker needs to have a full
| | 00:41 | inventory on what data is found in
any given field inside this database.
| | 00:46 | So if you use the analogy, if you
got your yearbooks when you were in high
| | 00:49 | school, you used to get these big
yearbooks, and you used to say to
| | 00:51 | yourself, okay, I want to find the
pictures of me in this yearbook. Now one
| | 00:55 | option that you could have done is page
through one page at a time, looking at
| | 00:58 | every single page and writing down
which page numbers have photos of you in
| | 01:02 | there. But most likely what you did is
you went right to the back to a section
| | 01:06 | that's called the Index, and in that
Index it had a list of names; next to each
| | 01:10 | name were the page numbers where those
individuals could be seen photographed.
| | 01:14 | The idea there is that it should only
take you a minute or so to find the page
| | 01:18 | that you are looking for in the analogy
of the yearbook, rather than having to
| | 01:21 | go through every single page and do the inventory
yourself. FileMaker follows that same logic.
| | 01:26 | So let's say you are searching for the
word climbing. If I go into Find and
| | 01:34 | hit climbing, you see that it came back
and tell me that 21 records match that
| | 01:38 | criteria. And the reason it came back
so quickly, even though there are only 44
| | 01:42 | records in this database, you could
have 44,000 or 444,000 in your database and
| | 01:47 | it will still come back very quickly,
and the reason for that is because when
| | 01:50 | Indexing is turned-on, FileMaker will
create an inventory of all the values
| | 01:54 | that are found inside of a certain field.
| | 01:56 | That way when you put in search
criteria in this example, it goes and it looks
| | 02:00 | against that index; it doesn't have
to go to every single record in the
| | 02:04 | database and compare your criteria to
the criteria that's in the field. It's
| | 02:08 | also helpful to take a look at the
fields index to get a little better
| | 02:10 | understanding of how that works.
| | 02:12 | If the Field Indexing is turned on on a
field, you can click inside of a field,
| | 02:17 | and if you are a Windows user you
can hit Ctrl+I or a Mac user you can
| | 02:22 | Command+I, and up pops the View Index
window. What this is saying is in the
| | 02:26 | Title field in this database, here are
the following values that can be found
| | 02:32 | inside the field in this version of the
database. So you see that they are all
| | 02:36 | listed here in alphabetical order.
| | 02:37 | Not only are they indexed, but you will
notice that in the case of there being
| | 02:43 | two records with Kilimanjaro and
Safa in there, you will notice that
| | 02:46 | that's only listed once. So it is a non
-duplicated list of unique values that
| | 02:52 | are found inside this field. It's
important that this happens because you may
| | 02:56 | have done a search before where you've
waited for ever and ever and ever and
| | 02:59 | you get this progress bar on screen
and it goes so slow that you can't figure
| | 03:03 | out why this is taking so long.
That's because that field is unindexed.
| | 03:06 | So once the field is indexed, it will
go quicker. It initially does have to
| | 03:10 | create the index and this usually
happens when you are defining a field, or you
| | 03:13 | are turning Indexing on, or you are
searching in it for the first time. Then it
| | 03:17 | will go and create that index once the
index is created, then everything goes a
| | 03:20 | lot quicker afterwards. An unindexed
search, for example, is significantly faster.
| | 03:25 | Now the other thing that you can see
here is that there are actually two types
| | 03:28 | of indexes. There is a Word index and a
Value index. And what we are looking at
| | 03:32 | right here is the Value index, meaning,
it doesn't discern whether or not there
| | 03:37 | are several words like Australian Rock
and Water, instead it just says this one
| | 03:42 | value exists inside the field.
| | 03:44 | Now a Word index instead of a Value
index, you can see that by checking the
| | 03:49 | Show individual words and here you see
each individual word that exists inside
| | 03:54 | the field. Now that's how we ended up
coming up with climbing, because when I
| | 03:57 | did a search for climbing and
photography, you will notice that climbing
| | 04:02 | happens to be one of the words. But
also if I did Climbing/Photography would
| | 04:07 | also match as a value match, because
searching does both word matches and value matches.
| | 04:12 | In addition to searching, the Value
index is also used for relationships, value
| | 04:16 | lists, and auto-complete field control
options, and unlike the Value index, the
| | 04:21 | Word index that you see here on screen
includes only the first 100 characters
| | 04:26 | of a field. So the Word index contains
every entry for every word in the field
| | 04:30 | regardless of how much text is entered
into the field. This index is used when
| | 04:33 | performing searches on text fields. You'll
probably get a better idea when you see this.
| | 04:39 | So here is the Value index of this
big paragraph field. So this is saying,
| | 04:43 | every one of these lines is a
different paragraph that was created, but if I
| | 04:46 | want to break that down into the
individual words, you can see that there is a
| | 04:51 | lot more unique words inside of
this large description fields.
| | 04:56 | So if we go back into the setup of the
field, Manage > Database, really pick
| | 05:00 | any one of these fields and hit Options.
And you will notice that the default
| | 05:04 | is Automatically create indexes as
needed. So when you first create a field,
| | 05:08 | that will say None and say
Automatically create as needed. And if you ever do a
| | 05:11 | search inside the field, then it's
going to trigger the creation of the index.
| | 05:17 | If you have this unchecked and say None,
it will never trigger the creation of the index.
| | 05:22 | So by default, Automatically creating
these will turn it to Minimal or All. All
| | 05:27 | is only in effect when it comes to
text fields so that's where both a Value
| | 05:31 | index and a Word index will be created.
A Minimal is just when a Word index is
| | 05:35 | created. So then you might think, why
not just turn Indexing on, on all my
| | 05:39 | fields? I want them all to run very
quickly, I want to be able to use them in
| | 05:42 | relationships and value lists.
| | 05:43 | Well, there are actually a couple of
downsides to Indexing that you have to be
| | 05:46 | careful about. First, all this
information that you see here actually has to be
| | 05:53 | stored somewhere. So in addition to
the data that exists inside the field
| | 05:56 | itself, all this data has to be
recreated in the index and that gets saved
| | 05:59 | inside the cache of the FileMaker file.
| | 06:01 | A heavily indexed database can be
almost twice as large as one with no indexes
| | 06:05 | at all. I personally have seen
databases go from 10 megabytes in size to 300
| | 06:10 | megabytes in size just by indexing all
the fields. It all depends on how many
| | 06:14 | records that you've got, how much data
goes inside of any particular field, and so on.
| | 06:18 | And the second, once a field is indexed,
the index must be maintained as data
| | 06:22 | changes are made. So this is going
to introduce performance issues for
| | 06:25 | operations that may modify data on
large sets, such as imports or the deleting
| | 06:29 | of sets of records. So if you are
sharing your database with multiple users,
| | 06:33 | you are now pushing that much more data,
not just the data in the field and
| | 06:36 | the changes that you made, but now you
have to push out the updated index to
| | 06:39 | all your users as well.
| | 06:40 | So to really approach this in the best
fashion, you want to make sure that you
| | 06:44 | are taking full advantage of indexing,
but your best bet is to just leave the
| | 06:49 | default value of Automatically create
indexes on is needed. This way you will
| | 06:53 | get all the performance, get all the
storage of indexes without having to incur
| | 06:57 | all of the pitfalls of
indexing all of your fields.
| | Collapse this transcript |
|
|
6. Working with RecordsCreating and duplicating records| 00:00 | The main function of a FileMaker
database is to store data. In this movie we
| | 00:04 | are going to be discussing how to add
data in the form of creating records.
| | 00:08 | If you'll pull up the file Lucky_You_
Tours_06_01, you will notice that it has
| | 00:12 | one record of data and we know that
because in the upper left hand corner in
| | 00:16 | the Status toolbar, we see that there
is a total number of records of 1 and we
| | 00:19 | that we are on that first record.
| | 00:21 | A record in the database is an
instance of whatever we are storing in the
| | 00:25 | database. So in this case this is the
Adventure Detail table and we are storing
| | 00:29 | information on one of the adventures.
It's a lot like having a row inside of a
| | 00:33 | spreadsheet. There's different ways
that you can add records to a database and
| | 00:37 | the most common are going under the
Records menu where you will see the New
| | 00:41 | Record option. Selecting this option
will automatically create a new record in
| | 00:44 | your FileMaker database.
| | 00:46 | You can also use the buttons that are
found in the Status toolbar, you see by
| | 00:50 | default you have a New Record button
here. Pressing this button will allow you
| | 00:54 | to also create one of these new records.
When you do create a New Record, you
| | 00:58 | will notice that everything on screen
goes blank. Now it's important that both
| | 01:02 | you and your users understand that you
haven't deleted anything by hitting that
| | 01:05 | button, but instead you have created a
new blank record that will allow you to
| | 01:08 | enter new data into your database.
You'll see that all of the fields on the
| | 01:12 | screen are blank, except for this
field right here. This field has been setup
| | 01:16 | to do what's called Auto Enter.
| | 01:18 | If you are interested in more
information on that, take a look at the movie I
| | 01:21 | am setting up Auto Entry options for
your fields. When you click inside of a
| | 01:24 | field, you will know which field is
active, because the outer edges of the
| | 01:27 | field are highlighted and your cursor
is blinking. This will allow you to add
| | 01:31 | New Information into the field. So,
after you have selected all the appropriate
| | 01:37 | information, you can click outside the
field and now it is automatically saved.
| | 01:42 | And it's important that both you and
the users of your database understand that
| | 01:45 | by just typing in information into
these fields after creating a new record,
| | 01:49 | it's going to automatically save that
data to your database. There is no Save
| | 01:53 | button in FileMaker because of the
database and a lot of users who use other
| | 01:57 | applications aren't used to this
because in most cases you have to hit Save to
| | 02:00 | commit any of the changes that you have
made, but in the case of FileMaker and
| | 02:04 | other databases, you just type the
information into the field and do what's
| | 02:07 | called committing your changes to the
database. In the case of FileMaker you
| | 02:11 | can just simply tab out of the field or
click into an area that doesn't have a
| | 02:14 | field and now your
information is saved in the database.
| | 02:18 | Another way to add records to the
database is to do what's called Duplicating a
| | 02:21 | Record. So if you already have a
record in your database and most of the
| | 02:26 | information for your record is going to
be the same, you can save yourself some
| | 02:29 | data entry by just duplicating this
record. The commands for duplicating the
| | 02:33 | record can be found in the same
locations as adding a record. For example,
| | 02:37 | under the Records menu, you see
Duplicate Record. You also see the
| | 02:41 | corresponding quick keys,
which are Command+D, or Ctrl+D.
| | 02:45 | So in this case I will use the Quick
Keys option, and when I create this New
| | 02:48 | Record, take a look at what happens on
screen. You see that now I have three
| | 02:52 | records, whereas I had two before.
You will also notice that all the
| | 02:56 | information in this record is exactly
the same as the original, except for this
| | 03:00 | ID field. Because this ID was setup as
an Auto Enter Serial Option, it has just
| | 03:06 | advanced the ID number to the next
value. However, everything else in this
| | 03:10 | record is available for editing, so we
can go in and type in a new value and
| | 03:16 | then of course commit our changes.
| | 03:18 | This is how you create records,
which is of course the building blocks of
| | 03:21 | creating a database.
| | Collapse this transcript |
| Editing and locking records| 00:00 | Once you have added records to your
FileMaker database, or if you already have
| | 00:04 | records in your FileMaker database,
you have the ability to edit the data
| | 00:07 | that's in the fields. You can control
whether or not users, or even certain
| | 00:11 | users can edit values inside your
database through accounts and privileges, and
| | 00:15 | if you want more information on that
checkout the videos in the security section.
| | 00:19 | But assuming that you have allowed
users to make edits to the data that is in
| | 00:22 | your database, all they will need to do
is click into one of the fields and it
| | 00:27 | puts a border around the field showing
that it's the active field available for
| | 00:30 | editing. You will also see that the
cursor is blinking and in each field that
| | 00:35 | has data that you want to edit, you
can either click in and here I am hitting
| | 00:39 | the Delete button to make
adjustments to the data that's in the fields.
| | 00:43 | Once you have made a change and you
click outside of the fields, you have now
| | 00:46 | done what's called committing the
entry and once a record is committed, it's
| | 00:50 | automatically saved to the database.
So you can instruct your users that they
| | 00:54 | don't have to hit File > Save or
anything like that to actually save the data
| | 00:57 | that they have just changed. Probably
there is one way in a text field, if the
| | 01:02 | user goes in and makes a change, let's
say here they have hit Delete, you can
| | 01:06 | go under the Edit menu and say Undo
Delete. And you can Redo Delete as well.
| | 01:11 | You can do this multiple times, as
long as the user has not committed the change.
| | 01:15 | So for example, if I make another
change, you will see that I can do Undo
| | 01:21 | Delete two different times, but once I
commit the record, you will see now that
| | 01:26 | I cannot undo. Those options are grayed
out. The other important thing to note
| | 01:30 | about editing records is that only
one user can be editing a record in the
| | 01:34 | database at the same time. It's very
common to share your FileMaker databases
| | 01:37 | on a network, so in that case you
may have multiple users that are all
| | 01:41 | interested in working with a single record.
| | 01:42 | Let's take a look at what that will
look like. I am going to open up a new
| | 01:45 | window, which is basically just
another copy of the same layout that I am
| | 01:51 | currently on. Now let's say I am a user
here that has clicked inside the field
| | 01:56 | that not only clicked inside the field,
but has begun to edit. As you see here
| | 02:00 | now I have made a change.
| | 02:02 | Now if I am another user that sharing
the same file and attempt to make to an
| | 02:06 | edit, you see that on screen it says,
this record cannot be modified in this
| | 02:09 | window, because it has already been
modified in a different window. Now that's
| | 02:12 | the message that appears on screen if
you have two windows open of the same
| | 02:16 | file. But you will see a little bit
more description if it's another user
| | 02:19 | that's sharing the database.
| | 02:20 | For example, you'll see their
information, their account name, so in that case
| | 02:24 | you can possibly contact that person
and say hey, are you editing this field,
| | 02:28 | can I get in there when you are done?
And this isn't a bug or anything to work
| | 02:31 | around in FileMaker, it's actually in
there by design, because this way if two
| | 02:34 | users are trying to edit the same record,
only one of them is aware that their
| | 02:37 | changes have been saved, so the other
person is restricted from doing so, so
| | 02:41 | that there isn't any confusion
as to who got the last change.
| | 02:44 | This is something that will need to be
taking into consideration when you are
| | 02:47 | training your users. So not only can
you add records to FileMaker database, but
| | 02:51 | it also allows you easy ways to make
these edits. It's just important that you
| | 02:54 | understand when the changes
are saved to the database.
| | Collapse this transcript |
| Deleting records| 00:00 | Deleting records out of your
FileMaker database is pretty easy to do. And
| | 00:04 | actually may be a bit too easy. I will
show you how to delete data out of your
| | 00:08 | FileMaker database and talk to you
about some ways that you might want to
| | 00:11 | protect your database
against accidental deletions.
| | 00:14 | First, just like with creating and
duplicating records, you can create a new
| | 00:18 | record by going either under the
Records menu and selecting Delete Record,
| | 00:23 | or you can also use the quick keys, which
on Mac would be Apple+E, or on Windows
| | 00:27 | Ctrl+E, and you will also see that
there is a button in the toolbar that's
| | 00:31 | called Delete Record. So selecting
any one of those options will delete the
| | 00:34 | record that you have.
| | 00:35 | You see here that we have got three
records in the database, so if I go to this
| | 00:39 | record and hit Delete, FileMaker will
prompt you with the option of whether or
| | 00:42 | not they actually want to delete the
record, which is a nice failsafe. And the
| | 00:45 | default of course is Cancel. But if
they hit Delete, you will see now that we
| | 00:49 | only have two records in the database.
| | 00:50 | However, if you didn't intend to do
that, you will notice that you can't undo
| | 00:54 | the deletion of the record. Just like
when you create a record or edit a record
| | 00:58 | in a FileMaker database, deleting a
record is final. You should also be aware
| | 01:02 | that under the Records menu, right
below Delete Record is Delete All Records.
| | 01:07 | This doesn't have a corresponding
quick key luckily, but your user should be
| | 01:10 | aware that if they accidentally select
this option instead of Delete Record,
| | 01:13 | they will see that it will include the
total number of records in the database
| | 01:17 | with the words Delete All, instead of
just Delete. They should be cautioned
| | 01:20 | during user training not to hit
Delete All, unless they absolutely need to.
| | 01:24 | So, in the event if someone
accidentally deletes your database, this is
| | 01:27 | probably a good time to talk to you
about backing up your data. You can create
| | 01:30 | copies of your database and store them
outside of wherever you are having the
| | 01:34 | database hosted, or if you use
FileMaker Server, you can read the documentation
| | 01:38 | on how to setup schedule backups. But
it's very important since the data is
| | 01:42 | usually the lifeblood of an organization
that you have some sort of backup plan in place.
| | 01:47 | So, in working with databases, everyone
is bound to make mistakes. So FileMaker
| | 01:51 | allows you the ability to delete
records so that you can correct your mistakes
| | 01:54 | and therefore maintain the
integrity of your database.
| | Collapse this transcript |
| Committing records| 00:00 | I would like to take a moment and
talk about the concept of committing a
| | 00:03 | record. I have mentioned it a few
times in previous movies but I wanted to
| | 00:07 | concentrate on it here. First of all,
FileMaker will auto-save any new records
| | 00:11 | that are created or any changes to
existing records. Since it stores the data
| | 00:15 | and it's not a working file
environment any changes that you make will
| | 00:18 | automatically be committed to the database.
| | 00:20 | Committing is quite useful as a
matter of fact if you note the movies under
| | 00:23 | Auto-Entry options for your fields,
you'll see that many of those are based on
| | 00:27 | records either being committed or
created so this concept is in place on
| | 00:31 | purpose. The idea of committing
works like this. If you click inside of a
| | 00:35 | field, currently right now that field
is on hold with FileMaker, it allows you
| | 00:40 | an environment to make a change and it
won't actually commit that change to the
| | 00:45 | database until you do a number of
different things that will commit the record.
| | 00:49 | Of course, before you do any of
these you still have the ability to undo
| | 00:52 | whatever changes you just made.
| | 00:54 | So what are some of the things that
commit the changes to the record? First of
| | 00:57 | all, pressing the Enter key on your
keyboard and you'll notice that the record
| | 01:00 | is now committed because the
highlighted area around the field that you were
| | 01:03 | just editing has gone away, but also if
you switch different modes, for example
| | 01:07 | switching from Browse mode to Find mode,
that will commit your record. And also
| | 01:12 | if you switch Layout.
| | 01:13 | So if I click into this field and I
switch over to the Adventure list you'll
| | 01:19 | see that that change has been committed.
And also creating a new record in the
| | 01:22 | database, so if I go into this field
and I hit Stadium and now I create a new
| | 01:28 | record, you'll see that the original
field value has been committed. Also if
| | 01:33 | you are in the middle of editing a
record or adding data to a record and you
| | 01:39 | close the file, or if you close the
window directly that will automatically
| | 01:44 | commit the record. So committing the
record will automatically save the data to
| | 01:47 | your layout.
| | 01:48 | So if this type of environment is maybe
a little unusual to your users there is
| | 01:52 | one way that you can add one more fail-safe
before the data is committed to the database.
| | 01:56 | If we go into View > Layout and then
go under the Layout menu to Layout Setup
| | 02:03 | you will see that there is an option
here that's called Save Record changes
| | 02:06 | automatically. By default any new
layout that you create will have this option
| | 02:10 | checked. However, if you go in and
uncheck this option and hit OK and go back
| | 02:15 | into Browse mode you'll notice that
users will now be prompted to save the
| | 02:21 | changes to their record before they
proceed. So I can say Don't Save and it
| | 02:25 | just reverts the record back to its
original state. Or I can say Save, which
| | 02:31 | then commits the change to the record.
This type of experience might be a
| | 02:34 | little bit more familiar to your users
so that option is always there if you need it.
| | 02:38 | So it's important to understand what
the idea of committing records means in
| | 02:41 | FileMaker and how you can control
whether or not items are automatically saved or not.
| | Collapse this transcript |
| Recovering files| 00:00 | In this movie we're going to talk
about the concept of recovering files.
| | 00:04 | Recovering of file isn't something
that you do as regular maintenance, as a
| | 00:07 | matter of fact; it's an emergency
procedure to allow you to extract your live
| | 00:11 | data from a file to import it into
another copy of your file that has not
| | 00:15 | experienced problems.
| | 00:16 | There are various things that will
cause damage to the FileMaker file and it's
| | 00:19 | actually quite uncommon, but most of it
involves interruption in your database.
| | 00:23 | So for example if you are hosting a
FileMaker database on server and the server
| | 00:27 | happens to crash in the middle of a
procedure, or if somebody loses connection
| | 00:31 | to a database while they are running
a pretty involved task, these are the
| | 00:34 | types of things that could cause
damage in your FileMaker files.
| | 00:37 | So in the unlikely event that you
experience recovery most likely what you'll
| | 00:42 | see is when you open up the file you'll
see an error that pops up when you are
| | 00:46 | trying to open the file that looks
like this. It will say something along the
| | 00:49 | lines of warning: consistency check
has been detected with problems in this file.
| | 00:52 | And when you run into that it won't
allow you to open the file or it'll close
| | 00:56 | the file if it's partially opened, and
keep in mind that you'll never see this
| | 01:00 | on a server hosted file because
FileMaker server has a consistency check built
| | 01:03 | into it and if the file does not pass
the check it won't allow it to be open
| | 01:07 | for hosting, this will
prevent any further damage.
| | 01:10 | So most likely you're going to run into
this error when you are just opening up
| | 01:13 | a file off of your desktop or just
opening something up locally in a copy of
| | 01:16 | FileMaker. When you do experience that
error what you want to do at this point
| | 01:20 | is extract the live data from that
file so you can put it into a backup.
| | 01:24 | The way in which you do that is by
running the Recover command. You can find
| | 01:28 | the Recover command by opening up
FileMaker Pro, going under the File menu and
| | 01:33 | selecting Recover. At this point it's
going to ask you to select the damaged
| | 01:36 | file and choose RecoverMe, you can
select a file to go right into recovery at
| | 01:43 | this point or you can just perform a
consistency check manually here. This is
| | 01:46 | the same check that server performs
when it opens up a file to be hosted.
| | 01:51 | Here you see in this case I have run a
consistency check that didn't find any
| | 01:54 | problems, but most likely if you've
gotten the error it will find some problems
| | 01:58 | in the form of bad blocks and if you
want to take a look at a little bit more
| | 02:01 | detail what if found you can open up
the log file and this is just a simple
| | 02:06 | text file that's saved after you
perform the recovery and this can be opened up
| | 02:10 | inside FileMaker and you can create
a database out of this if you'd like.
| | 02:14 | But if in fact you do find consistency
check issues then just select the file
| | 02:19 | you want to recover by hitting the
Select button and you can just run the
| | 02:22 | recovery now. Now it's important to
understand what's actually happening here.
| | 02:25 | The Recover function is actually
going to generate a new database using the
| | 02:30 | shell of the damaged database and then
it's got some options to rebuild some of
| | 02:34 | the scheme and structure. But keep in
mind that you are not actually doing
| | 02:37 | anything to the original.
| | 02:38 | When an original database is damaged,
it's done; you don't want to use it
| | 02:42 | anymore. Unfortunately I have run into
issues with clients where they've had
| | 02:46 | mysterious things going on with their
FileMaker files and it's because they've
| | 02:50 | recovered and then put the recovered
file back up on the network, very bad
| | 02:54 | thing to do there, what you want to
make sure that you're doing is recovering
| | 02:57 | the file just to extract data from it,
and then take a backup of the file, a
| | 03:01 | backup that passes a consistency check
and import all that data into it. That's
| | 03:07 | an important thing to know in case
if you've ever run into any damage.
| | 03:09 | But when you are recovering the file
you have the couple of more options in
| | 03:12 | FileMaker 10 than you used to. If you
select the Use Advanced Options button
| | 03:17 | you'll notice that you can choose to
copy the file block as is, which means
| | 03:21 | just give me a copy but don't make
any changes to it. Copy the logical
| | 03:25 | structure which will give you
everything but the data, so to create a new shell
| | 03:30 | for you which probably isn't going
to help you much if you are trying to
| | 03:34 | extract your data, or the default
option, Scan blocks and rebuild the file,
| | 03:38 | this will drop any invalid blocks
and blocks are just elements inside the
| | 03:42 | database that FileMaker is keeping
track of when it's performing these
| | 03:45 | consistency checks.
| | 03:46 | But this is going to give you the best
bet for recovering the data out of your
| | 03:50 | damaged file. And what it will do when
you hit OK and then Save, it's going to
| | 03:55 | ask you where do you want to save the
recovered copy. Go ahead and do that and
| | 03:59 | you see that it's created a new file
for you and created a recover log, which
| | 04:02 | again you can open up and see what's
been done. See there are quite a bit of
| | 04:06 | things that are being rebuilt,
everything from files to fields, to layout
| | 04:09 | elements, all sorts of different things.
| | 04:13 | And now you can dismiss this and hit OK.
Now what you want to do is take the
| | 04:16 | recovered version, open it up and
then go in here and export the data, save
| | 04:24 | your data on some kind of compatible
format and then you'll go find a clean
| | 04:28 | version of this file and
import the new data into it.
| | 04:31 | So the important thing here is that
although some file damage may occur, it's
| | 04:36 | important that you never put a
recovered, damaged file back onto your network
| | 04:41 | because this just could create even
more damage down the road. So any event
| | 04:44 | that you ever do get a message about
recovering your file, make sure you follow
| | 04:47 | these important steps and you'll be
able to get your file back in no time.
| | Collapse this transcript |
|
|
7. Creating LayoutsCreating layouts | 00:01 | Anybody developing or maintaining a
FileMaker database solution is likely to
| | 00:05 | spend a good portion of time in what's
called Layout mode. This is the mode in
| | 00:08 | which you create layouts, reports or
basically anyway that you want your users
| | 00:12 | to interface with the data that's
been stored inside your database. The way
| | 00:15 | that you can access Layout mode is by
going under View to Layout Mode or either
| | 00:22 | doing Apple+L or Ctrl+L on your quick
keys, and also you can access it down on
| | 00:26 | the bottom left-hand corner of your
screen by toggling over to the Layout option.
| | 00:31 | Now you see it takes the active layout
and puts you into the mode that allows
| | 00:35 | you to make changes. You can exit
Layout mode by pressing the button in the
| | 00:39 | upper right-hand corner or save any
of your changes or revert any of the
| | 00:43 | changes that you've made by pressing
these buttons right next to the Exit button.
| | 00:47 | You can delete existing layouts if
you like, or you can duplicate existing
| | 00:51 | layouts and use those as a template
for making modifications. All of those
| | 00:55 | options are found above. You'll see
here if you go to Layouts > Delete Layout
| | 01:01 | you'll be prompted to make sure that
you wanted to delete this layout. If
| | 01:04 | you've intended to delete the layout
you can hit the Delete button at this
| | 01:07 | point or just hit Cancel.
| | 01:09 | Also you can hit Duplicate Layout which
will create a new layout as you see it
| | 01:13 | here in advance from 15-16 because
unlike when we are in Browse mode and this
| | 01:17 | gives us the number of records, here
it's actually telling us how many total
| | 01:21 | layouts there are. And also you can
see all of the existing layouts in your
| | 01:24 | database by clicking on this Layout
drop-down menu. You'll notice that there
| | 01:28 | are more layouts in here in some cases
than there are in Browse mode because
| | 01:32 | you have the ability to turn off
the visibility of the layout. We'll be
| | 01:35 | discussing that in the later movie.
| | 01:36 | But most importantly you can create
new layouts for your databases and you do
| | 01:41 | so by selecting the New Layout Report
button while in Layout mode or going
| | 01:45 | under the Layouts menu to select New
Layout Report or using Apple+N or Ctrl+N
| | 01:50 | quick key. And this will
prompt the Layout Assistant.
| | 01:53 | And in the next movie we're going to
discuss some of the options available to
| | 01:57 | you when using the Layout Assistant to
create a new layout in your database.
| | Collapse this transcript |
| Using the Layout Assistant to create forms, lists, labels, and envelopes| 00:01 | Creating layouts in FileMaker is the
basis for being able to provide interface
| | 00:04 | for users to work with your data and in
order to create layouts, you will first
| | 00:08 | need to be in Layout mode which you
can access by going into View and Layout,
| | 00:14 | at which point you can now use the
Layout Assistant. You can invoke the Layout
| | 00:18 | Assistant while in Layout mode by
pressing either the New Layout Report button
| | 00:22 | or going under the Layouts
menu, to New Layout or Report.
| | 00:27 | And when you do so, you will be
prompted with this window that's called New
| | 00:29 | Layout/Report and this window gives you
several different options for creating
| | 00:33 | new layouts,. We will look at a couple
of them here but I will explain the rest.
| | 00:37 | First you will see that you have to
make a choice. You have to choose what
| | 00:41 | table inside your database this layout
is going to be based off of. So every
| | 00:46 | layout in the FileMaker database has
to be based off of a certain table. That
| | 00:49 | provides context for the fields
that you will be adding to the layout.
| | 00:53 | You see here in this example, we have
got five different tables and we will
| | 00:57 | just choose the Adventure option and
then next FileMaker gives you a generic
| | 01:02 | layout name, but you will want to add
your own name. When users see it in the
| | 01:08 | Layout menu, they will know
exactly what this layout is based off of.
| | 01:12 | And also you can choose whether or
not you want to include it in the Layout
| | 01:14 | menu because some layouts that you
create don't necessarily need to be seen by
| | 01:19 | users and some of them are just there
to be use inside of scripts but in most
| | 01:22 | cases, you will want to create layouts
and allow them to be seen and accessed
| | 01:27 | through to Layout menu while in Browse mode.
| | 01:30 | And then that leaves you with the type of
layout that you want to create. You see that
| | 01:34 | FileMaker provides you with some
templates. And we will take a look at creating
| | 01:38 | a standard form and even a list/
report but you also have options for Table
| | 01:42 | view, which will create a spreadsheet-
like view of your data. There is also the
| | 01:48 | ability to create labels. This is a
pretty easy one, this allows you to pick
| | 01:51 | certain fields that you want to appear
in a label and then you can pick different
| | 01:55 | Avery label layout numbers and it
automatically create label layouts for you.
| | 02:00 | The same is true for Envelopes. You can
pick different envelope size numbers.
| | 02:04 | A couple of the default ones are
included in here and those will take the
| | 02:08 | envelope style numbers and then add
whatever your desired fields may be. And
| | 02:13 | lastly you can create just a Blank
Layout, which allows you to start from scratch.
| | 02:18 | But going back up to the Standard Form,
you will notice also when you click
| | 02:21 | into each one of these you get a
preview on the right hand side and a little
| | 02:25 | description down below here, so you
see for Standard Form, this will show one
| | 02:29 | record at a time.
| | 02:30 | By hitting Next, it allow us to pick
which field that we want to show up on a
| | 02:34 | layout, so let's pick a couple of
different fields and you can either click on
| | 02:38 | this and hit Move or you can double-
click on the field or you can choose
| | 02:45 | multiple different fields by holding
down the Shift key and then hitting Move
| | 02:50 | or you can hit Move All to move all
the fields in your database over, and if
| | 02:54 | you have made any kind of
mistakes, you can just hit Clear All.
| | 02:58 | So in this case, we will double-click
on a couple of fields and now once the
| | 03:07 | fields are over in the Layout Fields
window, you can change the order in which
| | 03:11 | they appear on your layout. So I can
move title to the top by holding down and
| | 03:15 | dragging, and now we will know the
order in which the fields will be placed on
| | 03:19 | the layout after we are done with the assistant.
| | 03:22 | Hitting Next takes us to the pane where
we choose the new theme that we want to
| | 03:26 | apply. You don't have to choose a
theme; you can hit default which will just
| | 03:30 | give you white backgrounds and then
you can add your own manually or you can
| | 03:34 | use some of the ten new themes that
FileMaker has added to FileMaker 10.
| | 03:40 | FileMaker 10 has adopted some of the
themes that you may have seen if you ever
| | 03:44 | used Bento, if you are a Mac OS
X user. And ten of those themes, for
| | 03:49 | example, Orange Mist have been added to
FileMaker 10. If we take a look at some
| | 03:54 | of these, you see that they have
combinations of font styles and colors, header
| | 03:58 | color versus body colors, and
different things that they match the desired layout.
| | 04:03 | These have been updated from previous
versions of FileMaker and these are some
| | 04:08 | of the older ones that FileMaker had,
which aren't quite as desirable. So let's
| | 04:11 | pick Breeze and then we will hit Finish.
| | 04:14 | Now you would see that it navigates you
to the layout that you have created and
| | 04:19 | you will also see that the new layout
that you have created is now available
| | 04:22 | on the dropdown menu and if you have
chosen to see that in the Layouts menu in
| | 04:27 | Browse mode, you will also see it here.
| | 04:32 | Let's go back in the Layout mode and
create a List View. New Layout/Report and
| | 04:37 | we will rename it, choose List, hit
Next and as you will see when we cover
| | 04:43 | creating sub summary reports, you can
also use a Layout Assistant to create a
| | 04:47 | sub summary report or a
report with grouped data.
| | 04:50 | In this case, we will choose Columnar
List Report and you will hit Next and
| | 04:55 | again choose the field that you want
to have show up. Hit Next again, and in
| | 05:03 | the case of a List View when the user
navigates over to this view, they may
| | 05:07 | want a default sort order. So I can
pick Country and it will then sort these
| | 05:14 | values in the List View based on country.
| | 05:17 | You can find more information on
sorting in the movies on sorting records,
| | 05:22 | and the next option is to pick a theme.
We will choose Earth, in this case. This is
| | 05:28 | information that can appear inside
either your header or your footer and these
| | 05:31 | are totally optional but sometimes
desirable when creating a layout.
| | 05:35 | You see here that they can appear
either in the top left, top right, or in the
| | 05:38 | center, and the same goes for the
bottom and you can choose either to insert
| | 05:42 | the page number, the current date,
layout name, custom tags, small custom tags,
| | 05:47 | or even a logo, if you would like to.
| | 05:49 | Here we will pick the current date and
at the bottom right, we will do the page
| | 05:54 | number. Now we hit Next and the
reason it asks us if we wanted to choose a
| | 05:58 | sort value so you could save that
inside of a script. You could learn more
| | 06:02 | information about scripting in the
movies on creating scripts in FileMaker.
| | 06:07 | Here without even having to know how to
create a script, FileMaker will create
| | 06:10 | one on your behalf and allow the user
to navigate to the layout you have just
| | 06:13 | created and apply the sort order.
| | 06:17 | But here we will say do not create
script, which then gives us the option to
| | 06:21 | view this either Browse mode or Layout
mode. Let's say Layout mode and we hit
| | 06:26 | Finish and now we can see that the
current date is actually just represented in
| | 06:32 | layout mode is a slash slash,
so you could add some of these
| | 06:36 | manually to your report
that you created on your own.
| | 06:39 | And the same is true for page number
which is just number sign, number sign. So
| | 06:43 | now a couple of things to know, you
will see here that the new report has been
| | 06:48 | added to the Adventure list and you
see the table that it's based off of.
| | 06:52 | You can also see the names of the
fields and you can either revert to the
| | 06:56 | changes that you just made-- in this
case, I have resized that page layout--
| | 06:59 | or save them. And once I have saved them,
I can Exit Layout which will take me back
| | 07:03 | to Browse mode and at this point I
can see all my records and today's date
| | 07:08 | and then page numbers and you will
notice that we have a question mark under
| | 07:11 | the page numbers. And that's because
in Browse mode, it doesn't yet know how
| | 07:14 | many pages it will actually
create when we print it.
| | 07:17 | So what you can do is go into Preview
mode or select the Preview button.
| | 07:22 | The Preview button will allow you to see
what your pages will look like when they
| | 07:25 | are printed and also will allow you
to generate page numbers. So creating
| | 07:30 | layouts for your FileMaker data is the
way that you will allow users to be able
| | 07:34 | to be interface with the data that's
been stored in the database. One of the
| | 07:37 | easiest ways to do that is
by using the Layout Assistant.
| | Collapse this transcript |
|
|
8. Working with LayoutsThe Layout Setup dialog | 00:01 | Once layouts are created, you have
various ways to configure them. In this
| | 00:04 | movie, we are going to discuss the
different options available for configuring
| | 00:07 | layouts. First, you will need to get
into Layout mode. You go under the View
| | 00:11 | menu and choose Layout Mode or you can
use your quick key option. Here you see
| | 00:15 | its Command+L; on Windows it's Ctrl+L.
| | 00:17 | Once you are in Layout mode, you can
then access the Layout Setup dialog, which
| | 00:23 | we will be discussing in this movie.
You go under the Layout Option and select
| | 00:28 | Layout Setup; you will see this dialog
appear on screen. Also you should note
| | 00:34 | that next to the Layout list, you see a
little pencil icon and when you select
| | 00:39 | on that, you also get the Layout Setup dialog.
| | 00:43 | So either one of those two areas will
get you to this dialog. The dialog is
| | 00:47 | made up of four different tabs and on
the first tab, the default tab, you see
| | 00:50 | it's called General. This is where you
can change the name of the layout if you
| | 00:55 | want to and this is the layout name
that will appear in the layout list.
| | 00:58 | You can also toggle between including
or not including this layout in the list
| | 01:02 | of layouts and also you can choose to
change the table that the layout is based
| | 01:08 | off of, and by default each layout
is set to save the record changes
| | 01:12 | automatically. If you want users to be
prompted with a message when they try to
| | 01:16 | make changes inside the fields, then
you can uncheck this option to allow that to appear.
| | 01:21 | Show field frames and records are
active will allow users to see what field
| | 01:25 | that are currently editing by
highlighting the borders of that field. And then
| | 01:29 | you see you have menu Sets and
these would be probably set to default.
| | 01:33 | The next tab is the Views tab. Each
layout that you create can be seen in up to
| | 01:38 | three different views. The layout that
we are looking at here has only the Form
| | 01:42 | View selected and that means we go in
back in the Browse mode and save those
| | 01:48 | changes, you will notice under the
View menu, not only can you toggle between
| | 01:52 | the different modes but also you can toggle
between the different ways to view a layout.
| | 01:56 | But you see in this layout, we have
only got View as a Form checked, so if we
| | 02:00 | go back in the Layout mode and go into
Views, if we choose List View and Table
| | 02:07 | View which we will get back to in a
second and hit OK, we can then save these
| | 02:12 | changes. And now when we go under the
View menu, you see that we can view this
| | 02:16 | either as a form, which is one record at
a time, or a list, which is the same layout,
| | 02:21 | but now you see that it's giving us
multiple records. Not necessarily desirable
| | 02:25 | when you creating this detailed view
type layout. Or a table, which is really
| | 02:30 | meant for administering the data on
layout but it gives you the ability to look
| | 02:33 | at things in a spreadsheet type view.
| | 02:36 | Back to Layout mode, however, and you
will notice under Views you can see you
| | 02:40 | can toggle these on or off. By default
they're all going to be turned on. So
| | 02:44 | you will have to come in here and
remove this setting, if you only want to be
| | 02:47 | viewing a certain area and it's good
practice to have detailed views, one
| | 02:52 | record at a time, only viewable in
Form View. And then the multiple record
| | 02:56 | views only available in List View
to avoid confusion from the users.
| | 03:00 | The Table View or the spreadsheet type
view has a properties button next to it.
| | 03:04 | When you select the Properties button,
you see that there is different options
| | 03:06 | for how you can choose your grids. So
we can view our data both horizontally
| | 03:11 | and vertically and if we wanted to we
can come up with different styles here,
| | 03:15 | but generally most
people keep this at default.
| | 03:18 | And by default, having a header part,
which you see here, there is a header or a
| | 03:22 | footer, which is what's on the bottom,
are not included in a Table View.
| | 03:27 | Sometimes you may want to put some
information in the header, in addition to
| | 03:30 | the header that's already included
and in that case, you would select the
| | 03:33 | include header part and you
can do the same for footer.
| | 03:36 | There are some functions here that are
available when you are in the Table View
| | 03:40 | that allow you to resize columns,
reorder columns, and sort data when selecting them
| | 03:44 | and if we take a look at those, when in
Browse mode, we will go view as a table
| | 03:49 | and you will see that when turned-on,
it allows the user to resize the columns,
| | 03:54 | they can click on any one of the
columns to sort it appropriately and you can
| | 03:58 | even click down and drag
over to reorder the columns.
| | 04:04 | This can also be accessed when you
are in Browse mode by hitting the Modify
| | 04:07 | button and then you can move these
around in different orders however you
| | 04:12 | desire. And in this case, you can even
add new fields onto the Table View that
| | 04:17 | will not actually show up in Layout
mode but will just be in the view itself.
| | 04:21 | I'll go back into Layout mode, hit the
Layout Setup dialog. The next tab you
| | 04:29 | will see involves printing. By default,
you will have fixed page margins which
| | 04:33 | have no value selected and if you have
custom page margins for printing,
| | 04:39 | you can insert those here.
| | 04:41 | Also if you have a Label layout, this
will be active so you can either wrap
| | 04:47 | your multiple layouts across first or
down first. And this is where you can
| | 04:51 | toggle in between those two options.
| | 04:53 | In the last tab, Script Triggers, will
be covered in the Script Triggers chapter
| | 04:58 | later in this title. So if you are
interested in more information on these
| | 05:01 | options, please go take a look at the
videos in the Script Triggers chapter.
| | 05:07 | So each layout that you create has
several different options, all of which that
| | 05:11 | can be configured using
the Layouts Setup dialog.
| | Collapse this transcript |
| Layout parts overview| 00:00 | When you are working with layouts in
FileMaker, you'll notice that they are
| | 00:04 | divided up into several different
parts. For example, if we go into View to
| | 00:08 | Layout Mode, you'll notice on the left-
hand edge that there are two parts here:
| | 00:13 | one of them is the Header part
and one of them is the Body part.
| | 00:16 | In this movie, I am going to describe
the different roles of these parts and
| | 00:19 | how you can manipulate the parts
that are currently on your layout.
| | 00:22 | First of all, you should know that each
layout must have at least one part. And
| | 00:26 | layout parts can contain fields,
portals, buttons, text and any other layout
| | 00:31 | object. The dotted horizontal lines
that you see here mark the division between
| | 00:36 | layout parts and the part label
appears at the left end of the divide line.
| | 00:41 | Also you notice how this is a vertical
part name instead of a horizontal. You
| | 00:47 | can toggle those on the bottom left-
hand corner of the screen down on this
| | 00:50 | button and you'll notice then that you
can read them across Header and Body.
| | 00:56 | Lot of developers like to get those
out of the way by toggling them on the
| | 00:59 | left-hand side, unless they are
actually working on the layout.
| | 01:01 | Layout parts are broken into two groups
: Non-summary parts and Summary parts.
| | 01:07 | Let's take a look at the Non-summary
parts. First you should know that under
| | 01:11 | the Layout menu you can go to Part Setup.
If you select Part Setup, you'll see
| | 01:17 | the different parts that are
currently available on your layout. If you hit
| | 01:21 | Create you can see how you can add
those parts and looking at the Part
| | 01:25 | Definition dialog, we'll go through
each and I'll provide you a definition of their role.
| | 01:30 | The Title Header that you see selected
here appears only ones at the top of the
| | 01:34 | very first screen or page and replaces
the normal header only on that page. So
| | 01:40 | if you have a Title Header specified
on your printout, you'll only see that
| | 01:43 | header on the first page and not any of
the other pages. You can have only one
| | 01:47 | Title Header in a layout.
| | 01:49 | And one thing about the Title Header
is if you put any fields in the Title
| | 01:52 | Header, you should know that they
will only preview and print data from the
| | 01:55 | very first record in your found sets.
So you really don't want to put any kind
| | 01:59 | of data on there because it will be
hard for you to know which record it's
| | 02:02 | pulling from each time that the report
is generated. So generally in the Title
| | 02:05 | Header you are putting things like
name of the report, maybe a logo, or some
| | 02:09 | graphics, or even a title
page if you make it large enough.
| | 02:12 | Conversely, the Header which you see
we've already got on the screen so that
| | 02:15 | it's grayed out in Part Definition
dialog, it will appear on the top of every
| | 02:20 | screen or page, unless of course you
get the Title Header which supersedes the
| | 02:23 | header on the very first page.
| | 02:26 | You use this for titles, for common
headings, for example, on a column or
| | 02:30 | report, you might put the column names
here and you can only have one header in
| | 02:34 | a layout as well. That's
why you see it grayed out.
| | 02:37 | Just like with a Title Header if you
put any fields in the header, when you
| | 02:41 | preview and print them it will only
show the data from the first record on that
| | 02:44 | page. And on the very bottom you see
that we've got a footer, which acts just
| | 02:49 | like the header except these
appear on the bottom of the page.
| | 02:53 | Then the same is true for the Title
Footer which bit acts just like the Title
| | 02:57 | Header, excepted only appears ones at
the bottom of the first screen or page
| | 03:02 | and replaces the normal footer as specified.
| | 03:04 | You can have only one Title Footer
on the layout and just like with the
| | 03:07 | headers, if you put any fields in the
Title Footer when you preview or print
| | 03:11 | them, it will only show data from
the last record on the first page. That
| | 03:15 | leaves you with the Body. You can
only have one body part inside of your
| | 03:18 | layouts and each object that you put
in the body including fields, or text
| | 03:23 | objects, and graphics will appear
ones for every record in the found set.
| | 03:27 | So if you create a body that's of this
size and you are looking at in list view
| | 03:31 | it will repeat this entire size
probably many times you have records in the
| | 03:35 | database. Generally body parts that
are this large are made just for detail
| | 03:39 | views. If you are creating a list view,
for example, on Adventure:lists, you
| | 03:45 | will notice that the body part is
smaller because when viewed in Browse mode it
| | 03:51 | repeats for every record
that is in the found set.
| | 03:54 | Back in to the Layout mode and the
Part Setup, there are also Summary parts,
| | 03:59 | which we'll be discussing in the
report section. Those generally facilitate
| | 04:04 | group reports or sub-summary reports.
| | 04:06 | There are different ways to add parts
to your layout. For example, we've looked
| | 04:10 | at hitting the Create buttons so the
Part Definition dialog pops up, and you
| | 04:14 | can select the different options and
then hit OK and they will be added to this
| | 04:18 | list, or you can go up to the Status
toolbar and you'll notice about right here
| | 04:25 | called the Part tool. And if you click
on it and drag it you'll notice that it
| | 04:29 | will plays a part at the desired
location and then prompt you to choose what
| | 04:33 | type of part that you like.
| | 04:35 | You can also change the arrangement of
the parts, as you see here the Header
| | 04:41 | and the Footer are locked at the top
and the bottom, respectively but if you
| | 04:44 | have other items inside you can just
roll over them, click down and move them
| | 04:48 | up or down to change the
ordering which the parts are listed.
| | 04:51 | Having and understanding of the
different parts that are available to you will
| | 04:53 | help you when you are planning
and creating your different layouts.
| | Collapse this transcript |
| Exploring the layout tools and Status toolbar in Layout mode| 00:00 | Ones you have created layouts in
your database, you can edit a layout by
| | 00:04 | working with the objects on a layout,
by positioning or arranging them or even
| | 00:07 | resizing them and making
other changes to their appearance.
| | 00:09 | You'll do so in Layout mode and with the
use of the tools that you'll find in the
| | 00:14 | toolbar. So if we go into Layout mode
by going to View > Layout Mode, you'll
| | 00:19 | notice that the tools in the toolbar or
all the icons will change when you are in
| | 00:23 | Layout mode. I like to tell you what
each one of these do, so that you know
| | 00:26 | what tools that you have available to you.
| | 00:28 | First you'll see that by default,
you have the Selection tool active. That
| | 00:33 | allows you to select different items
on your layout and you can see that an
| | 00:38 | item is selected because it gets the
four corners around it, the four blocks
| | 00:42 | around each corner. And once selected
you can move these and resize them and
| | 00:47 | reposition them through out your layout.
| | 00:50 | Next, you see that you've got this T,
which is actually your Text Drawing tool,
| | 00:55 | so when you click down on the layout,
you can see that you can add text that
| | 01:01 | isn't connected with the field for example.
| | 01:03 | And these next four items are Drawing
tools. You see here that you've got a
| | 01:07 | Line Drawing tool, a Rectangle Drawing
tool, a Rounded Rectangle Drawing tool
| | 01:15 | or even an Oval. And you can these in
conjunction with the fields and colors
| | 01:20 | and different layout objects to create
your desired design for your FileMaker layout.
| | 01:26 | Next you'll also see that there are a
series of five different buttons that
| | 01:29 | allow you to add new layout objects
to your layout. The first is the Field
| | 01:34 | Control tool, which we'll be covering
in a later movie. This is the Button tool,
| | 01:39 | which allows you to create a
button that you can assign with the script.
| | 01:42 | We'll cover that in the scripting movie.
| | 01:44 | The Tab Control allows you to add a
tab control which is with this is right
| | 01:48 | here. We'll cover that in the tab
control film, and also the ability to add
| | 01:53 | Portals and Web Viewers, both of
which will be cover in their own movie.
| | 01:57 | Also you can add a new field to a
layout by clicking on the Field tool dragging
| | 02:02 | and then releasing on to the layout
and it will pop up and allow you to pick
| | 02:05 | the table and then the
field that you want to add.
| | 02:08 | The same is true, if you happen to
choose the Part tool. One thing that you
| | 02:12 | should be aware of is the Format Painter,
which is this paintbrush here. If you
| | 02:16 | want to apply the same types of formats
like coloring or fonts or font size for
| | 02:21 | example, you can select an item that
has the format assigned to it. Click on
| | 02:25 | the Format Painter and then click on
the next layout element that you want to
| | 02:30 | apply that format. As you see here,
I have applied that to the Yes, No field.
| | 02:35 | I can then undo that formatting if I
don't want that to be committed to the layout.
| | 02:40 | The couple of tips when you are in
Layout mode using some of these tools. If you
| | 02:44 | want to select multiple objects at one
time, you can drag select. Right now I am
| | 02:49 | holding down my mouse key and then
dragging and then now releasing, and you see
| | 02:54 | that it's allowed me to group all
of these together as one selection.
| | 02:59 | Also if I select a field and while
holding down the Control key on Windows or
| | 03:05 | the Option key on Mac and while
holding down those keys, I drag and it will
| | 03:09 | create a copy, applying the same
formatting into the field but allowing me to
| | 03:13 | choose a different field. And also Shift
+Dragging. If I hold down the Shift key
| | 03:19 | on Windows or the Option+Shift on Mac,
it will constrain an object to move on a
| | 03:24 | horizontal or vertical axis in
relation to its starting position.
| | 03:28 | On the Windows platform, Shift+Ctrl+
Dragging will both constrain and duplicate,
| | 03:33 | and on the Macintosh you would Option
+Shift+Drag for the same operation.
| | 03:38 | Last, you can find the size of the
different objects. If you see here you have
| | 03:41 | this palette that's floating over
here, which is called the Object Size
| | 03:45 | palette. You can also go under View,
to Object Info to get this palette to appear.
| | 03:52 | You'll notice that all these are set
to zero until I select an object on
| | 03:56 | screen. This will allow me to size
everything at the exact same size if that's
| | 04:00 | what I am desiring to do, or allows
me to figure out what the width of
| | 04:05 | something would be or the height of the
something or its location based on the
| | 04:09 | left edge, the top edge, or
the bottom edge of the screen.
| | 04:13 | You'll also notice that I can toggle
between pixels or inches or centimeters,
| | 04:18 | although pixels seems to be the most
desired unit of measure when working with
| | 04:22 | FileMaker layouts.
| | 04:23 | These are the most useful tips when
you are working in Layout mode, getting
| | 04:27 | familiar with them will allow you
more flexibility when fine-tuning the
| | 04:30 | layouts that you have
created in your FileMaker database.
| | Collapse this transcript |
| Arranging and aligning layout options| 00:00 | In Layout mode you can group any
combination of objects so you can edit or move
| | 00:04 | them together, or change the stacking
order of objects to get different effects
| | 00:08 | when the objects overlap. You can even
rotate or align things or resize them
| | 00:12 | accordingly. All of this happens when
you are in Layout mode. If you go to View
| | 00:17 | > Layout Mode, take a look at some of
the options that you have here in your
| | 00:21 | Layout bar. First of all on the
Layout bar, you can see the Customer Detail
| | 00:25 | happens to be the active layout and
if I click on this I can see all the
| | 00:28 | different layouts that are available to me.
| | 00:30 | I can get to the Layout Setup dialog
and see the table that this is based off
| | 00:34 | of, and either revert or save any of
the changes that I am working on. But if
| | 00:37 | you look over here, you will notice
that we've got two buttons here, one that's
| | 00:40 | called the Arrange Palette and
one that's called the Align Palette.
| | 00:44 | If we take a look at the Arrange
Palette first, you see that a palette pops up
| | 00:48 | on screen, and by the way you could
drag this to the top of your screen and
| | 00:52 | have this here permanently if you'd
like, or if you want to save the real
| | 00:55 | estate you can have this just floating
around or you can reposition it as you
| | 00:59 | desire. But what this will do is
allow you to pick certain items.
| | 01:03 | If you look here, this Show All button
is actually several different items that
| | 01:08 | are all -- what's called grouped
together. Now you will notice here, these two
| | 01:12 | buttons, I have got one for Ungroup
and one for Group. Group is grayed out,
| | 01:15 | because this is already grouped
together. But if I select Ungroup, you notice
| | 01:19 | now because you see that there are
different selected corners on here, they
| | 01:23 | have doubled in this case. That means
that this icon is now independent from
| | 01:28 | the text, but when designing a layout,
sometimes you say okay, I've got these
| | 01:32 | in a position where I want them. I
don't want them to ever be separated from
| | 01:35 | each other by either drag-
selecting or holding down the Shift key and
| | 01:39 | selecting multiple items and then
choosing Group. Now you can move them around
| | 01:44 | as one piece. This is a
pretty common layout technique.
| | 01:49 | Also, once you've got something into a
position and you want to keep it that
| | 01:53 | way, you can select the Lock option.
When selected, you will able to see when
| | 01:58 | something is locked, because you will
see that the four corners are grayed out.
| | 02:03 | This means that you have selected it
but there isn't anything that you can do
| | 02:05 | to move it around or make any
changes until you unlock that layout piece.
| | 02:09 | It's a good idea to sometimes lock
some of these things in place, so that if
| | 02:14 | you accidentally run across while
making other changes you don't affect your
| | 02:17 | original layout.
| | 02:18 | Also, if you have got multiple items
layered on top of each other, you are
| | 02:21 | going to want to have some control. So
sometimes when you have more than one
| | 02:25 | object layered on top of each other,
you want to control, which of those
| | 02:28 | objects is in the forefront. You see
here that we have got, Bring to Front,
| | 02:33 | Bring Forward, Send to Back and Send Backward.
| | 02:35 | Here I have got a layout object which
is a rectangle and on top of it I've got
| | 02:41 | the Show All button, and if I select
the Show All button and say Send to Back,
| | 02:46 | you see that it's still selected but
it's now behind the gray bar which of
| | 02:49 | course isn't the desired effect in
this case. So I can select the Bring to
| | 02:54 | Front button, which will then layer this on top.
| | 02:56 | So this controls the back and forward
of each one of the layers and it allows
| | 03:00 | you to either send something all the
way to the back or step it through the
| | 03:04 | different layers depending
on how many that you've got.
| | 03:06 | Also, you can move layout objects
around on screen, if you'd like by selecting
| | 03:10 | one and hitting the Rotate. This is
sometimes common if you want to have a
| | 03:16 | Columnar Report and you want to have
your field labels show up vertically
| | 03:19 | rather than horizontally, or if for
some reason you want to have something show
| | 03:23 | up completely upside down or 180 degrees.
| | 03:26 | Now you will notice also that we have
got a bunch of fields on screen here, but
| | 03:30 | they are not lined up properly and you
could go into each one of them and use
| | 03:35 | your object info to try to align them
up properly by using your Up and Down
| | 03:38 | arrows or your Left and Right arrows to
position it the perfect pixel location,
| | 03:43 | or you could select your Align Palette
which again can be used as a permanent
| | 03:47 | toolbar or you can reposition it in a
floating palette and this will allow you
| | 03:52 | a bunch of different options.
| | 03:53 | So for example here, let's say we
want to align these two up, I can either
| | 03:56 | align Left Edges, the Centers, the
Right Edges, Top Edges, Vertical Centers or
| | 04:01 | Bottom Edges. And by the way all of
these options that appear on these palettes
| | 04:05 | can also appear under the Arrange.
And you see here under Align, if I say
| | 04:10 | Bottom Edges, it automatically aligns
up the Bottom Edges of these two fields.
| | 04:15 | So now I want to line-up the rest of
these, and a good idea when you are
| | 04:18 | aligning up multiple fields is to
pick one of them to be an anchor. In this
| | 04:22 | case, I will pick the Anchor as the
first name field and I will go under
| | 04:25 | Arrange to lock. That way this
position won't move, but then as I either
| | 04:29 | drag-select or hold down the Shift key
and do multiple selections, I can now go
| | 04:35 | and line-up all of the Left Edges and
you see they all fit toward the Anchor
| | 04:39 | location as its furthest left edge.
| | 04:42 | In addition to that you will notice a
couple of these fields like for example,
| | 04:45 | this one here looks a little bit
taller than the rest of them. If I want to
| | 04:49 | make those uniform, I can select on
the one that I want to copy and I can say
| | 04:54 | over here it tells me from the very top
to the bottom edge its 23 pixels. I can
| | 04:58 | then select this one, select it and
type 23 and hit Enter, and you see that it
| | 05:03 | has given it a uniform height.
| | 05:05 | Also you can control the spaces in
between. If you don't want to have to
| | 05:09 | measure all the spaces in between but
you want them to be distributed evenly,
| | 05:13 | you can again drag-select or Shift-
select all these options and then go to
| | 05:18 | either the Distribute Horizontally or
Distribute Vertically option. I select
| | 05:23 | that and you see that it adjusted
the Home City and I can do the same
| | 05:27 | horizontally as well, and it will
distribute the space in between each one of
| | 05:31 | these. And when I have a group of
these selected, I can also use my up arrows
| | 05:36 | to position them manually if I so desire.
| | 05:38 | So getting familiar with some of these
tools is going to help you when you want
| | 05:42 | to fine-tune the layouts that you
have created in your FileMaker database.
| | Collapse this transcript |
| Managing layouts| 00:01 | When you are in Layout mode in a
FileMaker database and you get there by going
| | 00:05 | to View > Layout Mode, you will
notice that on the Layout toolbar, when you
| | 00:10 | click on it you see that there are
several different layouts. If you have many
| | 00:13 | different layouts you see them all in
a specific order, and you will notice
| | 00:17 | also when you go into Browse mode
that some of those layouts can be seen in
| | 00:21 | Browse mode and some of them cannot.
| | 00:24 | In order to be able to manage that you
will need to go into the Manage Layouts
| | 00:28 | window. There are few different ways
to get to the Manage Layouts window and
| | 00:32 | most of these are new inside FileMaker 10.
| | 00:35 | The first way is to go under the File
menu, choose Manage and then Layouts, or
| | 00:41 | you now see it as the very first
option in your Layout list under Manage
| | 00:46 | Layouts, and then also if you have
the icon in your toolbar for manage,
| | 00:50 | clicking on it will take you to the
Manage Layouts option, and then presents
| | 00:54 | you with this window.
| | 00:55 | The window allows you to change the
order in which the layouts are displayed as
| | 01:01 | you see here by clicking down and
holding it, and also I can check or uncheck
| | 01:05 | whether or not this will
be viewed in Browse mode.
| | 01:08 | So for example, we have the Adventure
Detail now visible in Browse mode, and if
| | 01:13 | we double-check that we will see
Adventure Detail, and now I will go into
| | 01:19 | Layout mode and hit Manage Layouts
and uncheck that box and hit OK. Go back
| | 01:26 | into Browse mode and now we
see that we cannot get to that.
| | 01:30 | So sometimes you may create layouts
that are just report layouts or generally
| | 01:34 | layouts that you will navigate users
to via a script or some kind of stored
| | 01:37 | routine. So in those cases you might
want to hide them in Browse mode, and you
| | 01:42 | will do so by using the
Manage Layouts dialog window.
| | 01:47 | You will also notice that you can click
on a layout and hit Layout Setup, which
| | 01:50 | will navigate you to all the different
layout setup options. So all of these
| | 01:53 | things can be accomplished
through the Manage Layouts window.
| | Collapse this transcript |
|
|
9. Formatting Layout ObjectsFormatting text| 00:00 | When designing layouts in FileMaker
sometimes you might want to manipulate text
| | 00:04 | that you've placed on a layout. I am
going to introduce you to a couple of
| | 00:06 | tools that will allow you to do so.
| | 00:08 | Navigate to the TPS Report layout and
go into Layout mode. You see here that
| | 00:15 | we've got a piece of text that's in the
center of the layout. I will introduce
| | 00:18 | you to a couple of tools that will let
you manipulate the size, color, font, and so on.
| | 00:22 | So when you have the text selected,
you can go to Format and then under the
| | 00:26 | Format menu choose Text. This will
allow you to manipulate the font, the size,
| | 00:32 | the color, and even the style of
the text that you have on screen.
| | 00:36 | So for example, let's say in this case
we want to make this a Bold, 24 point,
| | 00:43 | Red font, and I will hit OK and
you see that it's made that change.
| | 00:49 | Additionally, you can go into the
Format menu and individually choose the Font,
| | 00:53 | the Size or the Style. You also have
options in here for aligning text. In this
| | 00:57 | case, let's center it a bit, and you
can also do Orientation or you choose your
| | 01:02 | color independently as well.
| | 01:05 | There are different ways to place text
on a layout. For example, here what I
| | 01:08 | have done is I have just typed a
piece of text into the title header so it
| | 01:12 | shows up as the opening page of a list
view report. I did so by clicking on the
| | 01:17 | Text tool and simply clicking into the
area where I want the text to appear and
| | 01:22 | typing the text. I will hit the Delete
key to delete that when it's selected.
| | 01:26 | I can also place other types of text on
screen. If I choose the Field tool and
| | 01:32 | select the Create label option. After
choosing a field you will see that the
| | 01:36 | label appears as text that I can then
go and manipulate. Drag-select those and
| | 01:42 | delete them.
| | 01:44 | Also you will see that there are
other types of text, Current Date, Current
| | 01:47 | Time, User Name, those all appear as
text on your layout as well. And lastly,
| | 01:52 | you can actually insert a field that
appears as text. So if you select Merge
| | 01:57 | Field and choose one of your field
options, you will see it comes over as text
| | 02:03 | that you can then manipulate using the
regular text tools. But it will actually
| | 02:09 | show the value of the field when you
are in Browse mode. So if we take a look
| | 02:13 | at Browse mode, you see that that
turns out to be a field value as we go
| | 02:21 | through each one of the records in the database.
| | 02:23 | So back in Layout mode. Even though,
this is text it can still be treated as an
| | 02:27 | object. So for example, objects can
have Fill Color applied to them, and you
| | 02:32 | will note if you select this and right-
click, you will see that you can apply
| | 02:36 | Fill Color or a Pattern, different
effects, Pen Color, Pen Pattern and Pen
| | 02:44 | Width. And just like we talked about
with fields, when you have a text object
| | 02:49 | on screen you can select other text
objects and for example, lock it. Go down
| | 02:57 | here and Shift+Select today's date and
go under Arrange and Align > Centers.
| | 03:05 | So when text is placed on a layout it
can be treated just like its own object.
| | 03:09 | So sometimes when you are working
with your layouts, you might have text
| | 03:12 | independent from the data contained
within fields and the tools that we have
| | 03:16 | just discussed will help you format
those appropriate to the layout design.
| | Collapse this transcript |
| Placing and formatting objects and graphics| 00:00 | In addition to layout objects, texts
and fields you can also add images not
| | 00:04 | contained within container fields to
your layout. Navigate to the TPS Report
| | 00:08 | layout. If you go into Layout mode you
will see that we have some text with the
| | 00:14 | formatted fill color and that's in the
title header, and then the body, you see
| | 00:19 | we've got some fields and
some text in the footer as well.
| | 00:23 | When you view this in Browse mode, it
will give you a cover letter and then in
| | 00:30 | Preview mode you can see how it will
print. You've got cover letter on the
| | 00:33 | front page and a list of
context on the subsequent pages.
| | 00:37 | Let's say we want to add a logo to
this layout. We will go back into Layout
| | 00:41 | mode and I will go to Insert and we
will say Picture, and we will navigate to
| | 00:47 | 09_02 and pick the LuckyLogo and you
see by simply placing it on the layout.
| | 00:57 | And then now going back into Browse
mode after saving the layout, you see now
| | 01:01 | that our front page now
contains that graphic image as well.
| | 01:06 | Back into Layout mode you see that we
have some functionality here to control
| | 01:09 | how the graphic is displayed. First, if
we delete this you will notice that if
| | 01:14 | you insert a picture you can also
store only a reference to the file. Now
| | 01:19 | that's only advised if the image that
you are starting to reference to in the
| | 01:22 | file itself are going to always live in
the same location, but if you are going
| | 01:25 | to be hosting this in a shared environment
this is probably not going to work for you.
| | 01:28 | Keep in mind though that you should
always use caution when working with images
| | 01:32 | on FileMaker layouts, and the reason
is because of file size. If you have a
| | 01:35 | FileMaker file that's let's say 1
megabyte in size and you place a 1 megabyte
| | 01:40 | image on one of the layouts, you now
have a FileMaker file that's 2 megabytes
| | 01:44 | in size. So you can mitigate that by
storing as a reference, but if it's a
| | 01:47 | shared file, you won't have the
opportunity to do so. So then you might just
| | 01:51 | want to format the file down to a
resolution that's more reasonable.
| | 01:55 | Once you have an image on your layout,
notice that you can go under Format to
| | 02:00 | Graphic and you can control how it
actually fits within the frame. So for
| | 02:07 | example, you see that I have got a
text frame that is now twice the width of
| | 02:12 | the image, and going under Format to
Graphic allows me to either maintain the
| | 02:17 | original proportions, align to Center,
align to Center and so on. But in this
| | 02:23 | case, we will do Undo Formatting to
keep it in its original look and feel.
| | 02:27 | Once you have an image on a layout, it
just acts like any other object. So if
| | 02:30 | you want to align it with the text
objects, you can hold down your Shift key,
| | 02:37 | select both of them, and I can use my
Align tool to align the centers, and just
| | 02:44 | like any other object you see I can
align it appropriately with other objects
| | 02:47 | on screen. I can also control the size.
For example, here I can type-in 150 and
| | 02:54 | hit Enter, and I can increase the
height of the image size if I so desire.
| | 02:58 | There are other ways besides going
into Insert that you can place images on
| | 03:02 | layout. You can simply copy and paste,
copy the image from another application
| | 03:07 | and paste it on to your FileMaker
layout, and if your OS supports it, you can
| | 03:12 | drag images from other applications
like browsers right on to your FileMaker
| | 03:16 | layout. You just need to be in Layout mode.
| | 03:19 | So if you find yourself working with
objects and graphics, use the tools that I
| | 03:22 | have just described to get the
desired look and feel on your layouts.
| | Collapse this transcript |
| Formatting fields and applying field attributes| 00:00 | When you place fields on a layout
you don't have to settle for just their
| | 00:03 | flat, plain look and feel. You can use
some of the Field Attribute tools to give
| | 00:07 | them a different, more professional
look. Navigate over to the Trip Detail
| | 00:10 | layout. In Layout mode you will see
the different fields that we have got on
| | 00:14 | this layout. If you select one of the
fields and go up into your Layout bar and
| | 00:20 | select this button here with the two
A's it will reveal the Formatting bar. And
| | 00:25 | here you have got a couple of
different options. For example you can control
| | 00:28 | the color of the line of the border of
the field. So in this case you see that
| | 00:33 | it's selected as blue, but if we give
it a black you will see it will match the
| | 00:38 | rest of the them or I can click any
other colors that I would like, just to
| | 00:42 | give it a highlight if necessary.
| | 00:43 | Also I can control the thickness of
the line depending on what it is that you
| | 00:47 | are trying to accomplish, but we will
go back to a hairline or either one point
| | 00:54 | and remove the color and just make
it black. Also, you can fill in the
| | 00:58 | background of the field with a color.
If I click on the Fill button I can
| | 01:04 | choose a color and give it a little
bit of a hue, let's say we do this and
| | 01:11 | sometimes you can highlight different
fields that require data entry or that
| | 01:14 | type of thing by using a fill and lastly,
there is an effect that you can use.
| | 01:18 | If you select a field, go under Effect,
you can go to add a drop shadow and
| | 01:24 | that gives a little effect that you
can see when you are going into Browse
| | 01:27 | mode. I am just going to Browse mode
and save the layout and you can kind of
| | 01:30 | see here that we have got a bit of a
fill color, you can probably see it better
| | 01:34 | if we remove the fill and increase the
line. Now you can see a bit of the Drop
| | 01:42 | Shadow effect or you can do what's
called an Embossed, which makes it look like
| | 01:54 | it's risen up from the rest of the
background. O back in Layout mode you can
| | 01:58 | select this and you can do an Engrave,
which gives it the opposite effect,
| | 02:02 | sort of a sunken effect.
| | 02:05 | And if you come up with a group of
attributes that you would like to apply to
| | 02:11 | the field you can apply them to the
rest of the fields in your layout by either
| | 02:15 | doing one of two things. You can
select all of the different fields like I am
| | 02:20 | doing here and go and choose one of
these attributes. Of course, you would have
| | 02:24 | to do those one at a time or you can
select this item and go to your Format
| | 02:29 | Painter and you can then select the
Format Painter to apply these to the rest
| | 02:35 | of the fields on your layout if you
like. If you double click on the Format
| | 02:38 | Painter you see that it will allow
you to click multiple fields and you can
| | 02:42 | apply the same format to each.
| | 02:47 | Some fields do not have field
borders and you can control that by first
| | 02:51 | unlocking your Format Painter,
clicking on the Select tool and selecting a
| | 02:56 | field and right-clicking and going to
Field Control > Borders. This is where you
| | 03:01 | can determine whether or not you are
going to have a Top, Left, Bottom, Right,
| | 03:06 | whatever combination that you would
like and then you can apply those or remove
| | 03:11 | those on the field using the right-
clicking and going to the Field Borders.
| | 03:16 | Another option that you have is having
a different color of the field fill from
| | 03:20 | the background and we looked at that
when I went in here and I selected that
| | 03:23 | color but also what you can do--
one trick to make sure that your fill color
| | 03:28 | exactly matches the background color is
selecting one of these fields and then
| | 03:32 | you will see here that you have got
next to the Fill, you have also got a Fill
| | 03:35 | Pattern. Now I will be honest with you
and tell you that you are probably never
| | 03:38 | ever going to use any of these fill
patterns. As a matter of fact, you won't.
| | 03:43 | And what you do notice here is you have
got two that are in the upper left hand
| | 03:46 | corner of this grid. The first of which
indicates that you are going to have a
| | 03:50 | different color than the foreground
color and so that means that you are going
| | 03:54 | to have a contrasting background
versus fill color. But if you select this
| | 03:58 | option to the left, you see what it
does is it makes the fill color of the
| | 04:01 | field transparent. So if you want to
just have your fields match the background
| | 04:06 | color you can Shift+Select all those
and go into Fill and hit Transparent if
| | 04:12 | you like. Sometimes that might be
the effect that you are looking for.
| | 04:16 | So in addition to the way that a field
looks when you are in Layout mode you
| | 04:20 | can control the way that the data
within the field is formatted. So for example
| | 04:24 | if you choose one of these fields down
here that are number fields, Days and
| | 04:29 | Nights, I will Shift+Click and select
both of those. I will go under the Format
| | 04:34 | and choose Number. This will bring up
the number format for selected objects.
| | 04:39 | And when you going for a number you
have a couple of options at your disposal.
| | 04:42 | For example you can just leave the data
formatted as entered or you can choose
| | 04:47 | a decimal and this is where you
can control how many decimal places.
| | 04:50 | So for example if you have data that is
coming in, let's say it looks like this
| | 04:55 | right here, I could go on and do a
fix number of decimal digits and it will
| | 04:59 | round it for you. And also if it
happens to be dollars in Currency or any
| | 05:03 | currency for matter you can choose Use
notation, Currency and then you can do
| | 05:08 | Trailing/Outside or even a percent if
you would like to. Both of those are
| | 05:12 | options for displaying this on your
layout. You can also decide not to display it
| | 05:17 | if the number is 0 or to have it
show up as red if it's below 0 and of
| | 05:24 | course, black if it is above 0. And
lastly, if you anticipate having thousands
| | 05:28 | you can use the thousands separator by
just choosing Use thousands separator.
| | 05:33 | Now you should be aware that this
will only apply for this field on this
| | 05:37 | layout. This will have no effect on
this same field on any other layouts.
| | 05:41 | If you want to actually change the data
that's inside the field no matter where it
| | 05:45 | appears in your FileMaker solution
then what you will have to do is use Text
| | 05:48 | Formatting functions. You can find
out more information about that in the
| | 05:52 | Calculation chapter. Just like there
are options for Number fields you can
| | 05:58 | choose a Date field and go under Format,
you see now that Number is grayed out
| | 06:02 | because it recognized the field type,
and in Date it's got its own values.
| | 06:06 | Now just like with numbers, in the case
of dates this isn't actually changing
| | 06:10 | the data inside the field. It's just
changing the way that it views on this
| | 06:14 | layout. So let's first look at how
this data shows up in Browse mode. So
| | 06:20 | 7/11/2006. If we go back in the Layout
mode, select that field, let's say we
| | 06:30 | change it to the format that shows
the day of the week as well and hit OK,
| | 06:35 | View, save, you see now that
these are a little bit different. Here is
| | 06:40 | that data that's actually entered into
the field, but you see if we had enough
| | 06:43 | room, of course, that the data
would show up in a different format.
| | 06:48 | So you have got a couple of different
formats that you can choose from there.
| | 06:53 | Even though FileMaker stores data in
specific ways internally you can use the
| | 06:57 | Field Attribute tools to
control how users view the data.
| | Collapse this transcript |
| Setting field behaviors| 00:00 | Sometimes when you place a field on a
FileMaker layout, it's really just there
| | 00:04 | for display rather than to allow
users to edit the data within the field. A
| | 00:08 | good example of this would be the ID
for any given record in your database. Lot
| | 00:13 | of times this is not something that you
want the users to be modifying, but you
| | 00:17 | do want to have it on screen for
reference. But as you see here, when I place
| | 00:20 | the filed on screen, by default, it
allows the user to click inside and make
| | 00:25 | any modifications that they like to.
| | 00:27 | If you want to control the way that
the users interact with the data in your
| | 00:30 | field or not, you can do that through
field behaviors. What you see here is we
| | 00:35 | have some fields that we want users to
interact with and some that we don't all
| | 00:38 | on the same layout. We go into Layout
mode and select the field and either got
| | 00:45 | to Format > Field/Control > Behavior or
right click on the field, Field/Control
| | 00:51 | > Behavior. This dialog window pops up for you.
| | 00:54 | Here simply put, you can choose
whether or not you want to see this field in
| | 00:58 | Browse mode or in Find mode or
neither or both. Why would you want to have
| | 01:04 | something in Browse mode but not find?
Well, if you don't want the user to
| | 01:07 | modify the value, then don't allow
them to see it in Browse mode. If you want
| | 01:11 | them to be able to search on that
value when in Find mode adding criteria for
| | 01:15 | search, but not modifying the actual
data and any records, then allow them
| | 01:19 | access in Find mode.
| | 01:21 | By default, each field that's placed on
the layout is accessible on both Browse
| | 01:25 | and Find mode, but as you'll see here,
when we uncheck the Browse box, hit OK,
| | 01:30 | go on to Browse mode, save our changes.
Now as I click, you see that I cannot
| | 01:37 | click into this field, but when I go
on to Find mode I can enter criteria.
| | 01:44 | There is also a couple of other
things you can control under the Field
| | 01:50 | Behaviors dialog. If we go back into
Layout mode, we'll just take a quick look at those.
| | 01:54 | Right click on the ID field, go to
Field/Control > Behavior and you will see
| | 01:59 | that you can apply visual spell
checking. If you do not want to have visual
| | 02:04 | spell checking in a field, then you
would check this box, but if you do want to
| | 02:07 | allow visual spell checking, you
might want to leave it unchecked.
| | 02:11 | Visual spell checking is something
where, when you are in Browse mode, users
| | 02:16 | can see these little dotted lines
underneath some of the words. Sometimes
| | 02:20 | that's useful during data entry to
allow users to correct the values that they
| | 02:23 | have put inside of a field. Here
you can just right click on one of the
| | 02:27 | underlined areas and see Suggested
Spellings. When you are in Layout mode, you
| | 02:33 | can right click on a field and
turn that off if you would like to.
| | 02:38 | The final item that you see here is Go
to next object using and then either the
| | 02:43 | Tab key, Return key or Enter Key. What
that does is it controls how users are
| | 02:48 | tabbing through each field on the
layout. You will see in an upcoming movie
| | 02:52 | where we can set the Tab Order for the
fields on a layout and by default, what
| | 02:56 | allows users on their keyboard to tab
from field to field is the Tab key. But
| | 03:00 | you can have one certain field on your
layout or several of them, Tab using a
| | 03:05 | different key, or all three of these keys.
| | 03:07 | One thing you should keep in mind
however is that, pressing the Enter key will
| | 03:10 | commit the changes in a field, so if
you turn this Enter key on, it is not
| | 03:15 | going to commit the changes in the field,
but instead skip on to the next field
| | 03:18 | that's not yet committing the record.
If that's the effect that you are going
| | 03:22 | for, this is one of the
ways that you can control that.
| | 03:24 | Many fields on your FileMaker layouts
will have their own independent usage
| | 03:27 | roles and working with the Field
Behavior dialog will allow you to control those.
| | Collapse this transcript |
| Using auto-complete| 00:00 | If you or your users are familiar
with using Web Browsers, you might be
| | 00:04 | familiar with the feature of typing
ahead. So for example if you click into the
| | 00:08 | Country field in the Lucky_You_Tours
09_05 file under the Adventure Detail
| | 00:12 | layout and delete the data, type in the
letter G and you will see what happens
| | 00:19 | here is that the rest of the word,
reenland, types ahead for you. That way you
| | 00:24 | can just tab outside the field and it
will automatically pull in an existing value.
| | 00:29 | This feature in FileMaker is called
using Auto-complete on a field. Now, I am
| | 00:33 | going to show you how to do that in
this video. If you go onto Layout mode, you
| | 00:38 | can pick a field on the layout that
is eligible for Auto-complete. Now it's
| | 00:42 | important to know what types of
fields are eligible for Auto-complete.
| | 00:45 | First it has to be a Text field and you
have to be able to index it and if you
| | 00:49 | want to learn more about the rules
of indexing, you can see the video on
| | 00:52 | indexing. But mainly it has to be its
own text field and not be a calculation
| | 00:57 | that contains related or global values.
Once you've identified an eligible
| | 01:01 | field like County, you can select that
field and go to Format > Field Control
| | 01:07 | setup and you can also get to there
through right-clicking on the field and you
| | 01:12 | can check the Auto-complete using
Previously Entered Values option. It's just a
| | 01:16 | simple check-box in this case and
when it's not selected and users try to
| | 01:20 | navigate into the field, you can see in
a New record, it will just allow me to
| | 01:27 | types as normal.
| | 01:29 | However, if I turn that back on, now
what it's actually doing is typing ahead.
| | 01:41 | Now here you see that we've got a field,
we've got an option for UN and United
| | 01:45 | States. What it's doing is it's finding
all of the different values within that
| | 01:49 | field's index and presenting you
matches based on the couple of characters that
| | 01:54 | you've already typed in. Those values
are coming from the field's index, which
| | 01:57 | you can take a look at by clicking
into the field and doing either Ctrl+I or
| | 02:01 | Apple+I. What you see here is if I type
in or for example if I go in here and I
| | 02:08 | type in just the letter I, you see
what it does is it finds the matches that
| | 02:13 | have the same starting letter that I
have already typed in. It's not exactly a
| | 02:17 | dropdown list, but it's just a
matching values options list.
| | 02:21 | So I can choose anyone of these and it
will automatically add that value to the
| | 02:24 | field, commit the record and then tab
me over into the field that follows it.
| | 02:29 | You can also do this in combination
with a dropdown box. We'll talk more about
| | 02:34 | dropdown boxes when we talk about value
list. If you right-click on the Country
| | 02:38 | field in Layout mode and go to Setup,
you will see that Auto-complete can be
| | 02:43 | used in conjunction with this dropdown
list which in this case looks similar
| | 02:52 | but as you see when you have a
dropdown list applied, it will show all the
| | 02:55 | values in the field's
index from your value list.
| | 02:58 | However if you apply both the drop down
and the Auto-complete, you see you will
| | 03:07 | get both functionality applied to the
same field. So here I can choose from one
| | 03:11 | of the available options or I can
bypass that and type in I. I can get a
| | 03:17 | listing of all the different fields
that all start with the letter I or
| | 03:20 | whatever value it is that I am
typing in. for example here I could bypass
| | 03:24 | dropdown and pick B and we have result.
| | 03:28 | Since the advent of the web, a lot of
people are getting familiar with this
| | 03:31 | Auto-complete feature. And when you're
used to using Auto Complete as a field
| | 03:35 | control option, you will be able to
integrate this into your own FileMaker layouts.
| | Collapse this transcript |
| Using the Tab Control feature| 00:00 | You may have noticed a tabbed
interface style in a lot of the exercise files.
| | 00:04 | For example over here in the Guide
detail. This would be a tabbed interface.
| | 00:10 | It's a very popular method for saving
space and getting more data onto one
| | 00:14 | screen all in one layout. So you see
here as I click through all these three, I
| | 00:18 | am actually staying right
on the Guide Detail layout.
| | 00:21 | Well, I am going to show you how to
create a tabbed interface. If you will open
| | 00:24 | up the file Lucky_You_Tours_09_06 and
navigate to the Customer Detail, you see
| | 00:29 | what we have on the screen is a pretty
classic situation of a cluttered screen
| | 00:33 | and way too much information all on one screen.
| | 00:35 | Now you could talk to your users and
say can I put these onto different layouts
| | 00:39 | but a lot of people like to have a
dashboard feel and have everything right at
| | 00:42 | their fingertips all on one spot. So I
am going to show you how to use a tab
| | 00:45 | control to get all this information
into one layout and not have to scroll and
| | 00:50 | look in different areas of screen to find it.
| | 00:52 | First, what you'll do is go into Layout
mode since the tab control is a layout
| | 00:56 | object and once you're in Layout mode,
you are going to want to make room for
| | 01:02 | your tab control. So let's do this. If
you want to click down and drag select
| | 01:07 | over the series of fields so they are
all selected like you see on screen and
| | 01:11 | just to temporarily put them in our
clipboard for a moment, go to Cut and now
| | 01:16 | we've given ourselves some space right
in about this area where we can put in
| | 01:20 | one of our Tab controls.
| | 01:22 | The way you insert a tab control is
by going into your Layout toolbar and
| | 01:26 | clicking on the Tab Control tool and
you'll see that your cursor changes to a
| | 01:30 | cross-hair which will allow you to
draw the specific size of the tab control
| | 01:36 | that you want to use.
| | 01:38 | Now you can also go to Insert and you
see Tab Control but this will not allow
| | 01:46 | you to control the size of the tab
control. So we'll go back to the Drawing
| | 01:50 | tool and take this area here and
release and up pops the Tab Control Setup
| | 01:56 | dialog. This is where it allows you
to determine what number of tabs will
| | 02:01 | appear in your tab control
and you can name them as well.
| | 02:05 | So if we look on screen, we've got a
Photo, Notes, Contract Information, Trips
| | 02:13 | and Billing Info. So let's say Contact,
hit Create, and we'll say Notes, Create
| | 02:25 | Billing, Create Trips. That should be
enough tabs for right now. And if you
| | 02:33 | look on the right-hand side, you'll see
that you can pick the Default Front Tab
| | 02:37 | meaning when you navigate to this
layout, which one is going to be the one
| | 02:40 | that's showing.
| | 02:41 | So we'll say Contacts and that's where
some of the main details are going to be
| | 02:44 | located. You can also determine whether
or not you are going to justify to the
| | 02:48 | left which is the default or the
center or do right or full justification.
| | 02:52 | We'll leave it on left and the
appearance can be either rounded or square.
| | 02:56 | We'll go with the rounded option and
then the tab widths can either match the
| | 03:01 | maximum width of any of the label words.
In this case, it would be the width of
| | 03:05 | the word Contact or the minimum width
of and you can put in a certain amount of
| | 03:11 | pixels along with a fixed width and
we'll just stick with Label Width and you
| | 03:17 | can also put a margin in if you'd like
to as well, but we'll just say OK here.
| | 03:20 | Now you see that we've got all our
different tabs. Now, when you are in Layout
| | 03:24 | mode, you still have to navigate to the
different tabs. So here, we'll navigate
| | 03:30 | to Notes. Drag+Select notes and place
these values here and as long as we stay
| | 03:36 | within the parameters of the Tab Control,
I can use all of the space within the
| | 03:40 | Tab Control and if I go back into
Contact, I will go to Paste and it looks here
| | 03:47 | like I need a little bit more room. So
I'll do Undo paste and we'll say we'll
| | 03:53 | drag that size out by selecting it. So
you see it's selected and then dragging
| | 03:56 | one of the corners.
| | 03:58 | I will click inside the Contact tab,
hit Paste and now I can fit in all that
| | 04:04 | information into one tab and now the
Notes has its own tab, Contact has its own
| | 04:08 | tab and we can go into Billing and if
we scroll over here for a Billing info,
| | 04:16 | let's cut that, and Paste, and we can
work. I am using the Arrow Keys now to
| | 04:28 | move all of this around as one big
object. And then finally, we'll go to Trips
| | 04:35 | and I will Drag+Select this entire
portal and fit it -- if I hit Undo Move, you
| | 04:42 | notice that I didn't get it all the way
inside the Trips. So it just layered it
| | 04:46 | behind the tab control.
| | 04:48 | So it's important that I fit the width.
There we go. Drag+Select. Drag and then
| | 04:58 | drop and then now that you see that
it's fully contained within the tab that
| | 05:02 | all of this information is visible. You
see now that we've got this Photo here
| | 05:06 | too, why don't we go ahead and add
another tab, well how do we do that. Well,
| | 05:10 | when you're in Layout mode, you can
select the Tab Control and double-click and
| | 05:14 | up pops the Tab Control Setup again
and I can say Photo and Create, hit OK,
| | 05:21 | click over to Photo, drag the
photo and then resize the photo.
| | 05:27 | If I want to be more precise about it,
I can select the size of the Tab Control
| | 05:31 | and see that the Width is 397 and I can
make this let's say 390 and then nudge
| | 05:40 | it over using my Arrow keys to
completely fill the Tab Control.
| | 05:44 | Now, let's take a look at this in
Browse mode. So we'll go View > Browse, hit
| | 05:50 | Save and now where we had a very
cluttered screen, now we have one screen where
| | 05:55 | users can gain access to all the
related information, all by clicking on a
| | 06:00 | separate tab. This way this leaves
plenty of other screen real estate for other
| | 06:04 | information in case we want to add it.
| | 06:06 | A couple of notes when you are in
layout mode when you're dealing with the tabs
| | 06:10 | is that like any other layout object,
you can select these and you can change
| | 06:16 | the color of the text, you can change
the fill color by going into your Layout
| | 06:22 | format. Here's your fill color and you
can make this let's say a lighter color.
| | 06:28 | You can change all of them to the
same color if you'd like to or remove the
| | 06:32 | color completely or give a
different effect if you like.
| | 06:41 | So anything that you do inside of a
layout can be done inside of Tab Control as
| | 06:45 | well and if you are looking at some
of the other layouts, you see that they
| | 06:47 | have got different styles. So we save
this and go onto Browse mode. Now you see
| | 06:52 | that you can have specific colors based
on what the tab is if that's something
| | 06:55 | that you care to do.
| | 06:57 | Finally, you can add another tab if
you desire and inside this tab then add
| | 07:09 | Nested, yet another tab. So here in
this case, you could say for example here
| | 07:17 | are all the trips and then you could
put another tab inside here that says Work
| | 07:21 | Trips and Personal Trips that type of
thing. So there's no limit as to how many
| | 07:25 | you can nest, although there is
some level of control involved.
| | 07:28 | But you can have a Tab Control be the
entire layout and have those tabs go
| | 07:32 | across the top and that way, really
what you're doing here, you can use the Tab
| | 07:35 | Control which is a really cool layout
feature. It's going to allow you a great
| | 07:39 | deal of control over the screen real
estate without having to create all these
| | 07:43 | multiple different layouts.
| | Collapse this transcript |
| Setting tab order| 00:00 | A lot of application users when doing
data entry like to not have to take their
| | 00:04 | hands off the keyboard. So, for example,
one way that you can data enter into
| | 00:08 | certain fields is to click into one
field, make some changes, and then take
| | 00:15 | your mouse and click into the next one
and so on. But in most cases users like
| | 00:19 | to keep their hands on the keyboard and
just tab into one field after another.
| | 00:23 | By default, FileMaker Provides a Tab
Order that is the order in which the
| | 00:26 | fields were applied to your layout.
That also provides the ability to set the
| | 00:31 | Tab Order while in Layout mode.
Let's take a look at that.
| | 00:34 | If we go under View to Layout Mode,
and if you go under the Layouts menu,
| | 00:39 | you will see that there is an option called
Set Tab Order. Many times when you open
| | 00:44 | up the Set Tab Order window or view,
you are going to see numbers that are
| | 00:48 | already in all of these objects.
First thing you will notice is not only our
| | 00:52 | field is eligible to be in the Tab Order,
but you see that buttons with scripts
| | 00:56 | attached to them are also part of the
Tab Order. You will also notice that the
| | 01:00 | Tab Control feature can
also be part of the Tab Order.
| | 01:03 | So how do we set these? Well, there is
a couple of ways that we can do this.
| | 01:06 | First of all, if they are all blank,
you can select Clear All to give yourself
| | 01:10 | a new starting point, and then at
that point you just click into this first
| | 01:14 | field, second field, third, fourth,
maybe I'll skip these, and so on. I can
| | 01:24 | also then click into the Tab Control.
I can even allow the buttons to become
| | 01:28 | part of the Tab Order also.
| | 01:31 | Once you are done, you can hit OK and
there is a couple of ways that you can
| | 01:36 | include these. You can say show me
only the fields and Add. As you see here,
| | 01:43 | it's now automatically created a Tab
Order for all the different fields. I can
| | 01:46 | clear all and say Objects and hit Add,
and you see all layout objects, fields
| | 01:52 | and buttons have not automatically
been given their own numbering sequence.
| | 01:56 | What these are, are the order in which
the values are placed on the field.
| | 01:59 | But most likely what you will want to
do is just reset by hitting Clear and
| | 02:04 | manually create your own.
| | 02:09 | Now, one of the new features in
FileMaker 9 allows you to insert a field within
| | 02:14 | the Tab Order without having to redo
your entire tab sequence. Let's take a
| | 02:17 | look at how that works.
| | 02:19 | First when we go into Browse mode, you
will see the effect of a Tab Order by
| | 02:23 | clicking into the first field, and now
I am hitting the Tab key on my keyboard,
| | 02:28 | and you see now it follows a logical
order based on whatever you think the
| | 02:31 | users might find most useful.
| | 02:33 | But now if I go into Layout mode, and
as I mentioned earlier, FileMaker allows
| | 02:40 | me to insert fields by dragging on the
fields and dropping it. Let's say I pick
| | 02:47 | the language and I am going to fit the
language field, clicking on those fields
| | 02:55 | and using the Arrow key to resize, and
I'll move language underneath and now
| | 03:05 | I'll go into the Tab Order again.
| | 03:08 | You see that even though I want this to
be number 12, you see that it's kind of
| | 03:12 | in a strange order, but that could be
easily remedied by clicking onto the
| | 03:16 | number 13 in this case and typing 12.
When I commit this change by hitting OK,
| | 03:22 | you will see that what it actually
saved to the database is it reorders the values.
| | 03:28 | So you could go 1-13 and insert a new
field into that order and have it reorder
| | 03:33 | all those fields for you appropriately.
This is a feature that's brand-new to
| | 03:36 | FileMaker 10. You may have tried to
work with Tab Orders in other versions of
| | 03:41 | FileMaker and notice that you had to
manually go in and reset the entire order.
| | 03:44 | Not the case anymore. You can insert
that in and use a number that's already
| | 03:48 | been used and then FileMaker will
intelligently go and reset that Tab Order.
| | 03:52 | The order in which users can tab
through fields can help make data entry more
| | 03:56 | efficient. So using that Set Tab Order
gives you control over how that will
| | 04:00 | work. You will find out that the order
in which users can tab through fields
| | 04:03 | while data entering can help make the
data entry more efficient. So the Set Tab
| | 04:07 | Order functionality gives you control
over how this Tab Order will be set.
| | Collapse this transcript |
| Resizing layout objects| 00:00 | Many times when you are creating
layouts for FileMaker solutions that will be
| | 00:04 | shared by many users, your users
might have different screen resolutions to
| | 00:07 | work off of. This layout that you are
seeing on screen on the Layout Resize is
| | 00:12 | designed for users with a lower
resolution screen. However, there may be other
| | 00:17 | users that access the very same layout
that might want to make use of the open
| | 00:21 | space on the right hand side of the layout.
| | 00:24 | In that case, we can use a feature
that was introduced in FileMaker 9 that
| | 00:27 | gives us the ability for layout objects
to resize as the window is resized. Let
| | 00:31 | me show you an example of this at work.
| | 00:32 | If you go under Window to New Window
and then choose Resize, what you will see
| | 00:38 | is the exact same layout objects as
the layout on the left, now have auto
| | 00:42 | resizing applied to them. So this way,
when you fill up the layout, you will
| | 00:46 | see that they will dynamically adjust
to whatever screen resolution or window
| | 00:50 | width that the user desires.
| | 00:52 | So the way this is controlled is in
Layout mode, so if you go back to the
| | 00:56 | original Window > Resize and go into
View > Layout Mode, you will see that we
| | 01:00 | have something that's called Object
Info Palette, and if you don't see your
| | 01:04 | Object Info Palette on screen, you
can go under View and then select Object Info.
| | 01:10 | If you have used the Object Info
Palette in the past and haven't used it since
| | 01:14 | FileMaker 9, you will notice these
four anchors here in the bottom. This
| | 01:17 | object, the Tab Control, for example,
has been anchored to the top and to the
| | 01:22 | left, which is the default for any new
object that's placed on the layout. You
| | 01:26 | control how an object resizes by
anchoring it to various sides of a window, and
| | 01:30 | since a window has four different
sides, you have four different anchor
| | 01:33 | positions to choose from.
| | 01:35 | The object that I have selected on the
screen now, the Contact tab control, has
| | 01:39 | the top anchor and the left anchor
chosen. When the anchor at both the top and
| | 01:43 | the left are chosen, this is when you
don't want the object to move or resize.
| | 01:47 | Since we read from the left to the
right and the top to the bottom, this will
| | 01:50 | always keep the object that you have
selected in the upper left hand corner of
| | 01:54 | your screen, and as you grow the
window, it won't necessarily change.
| | 01:57 | Anchoring an object dictates that the
distance from the object's edge to the
| | 02:01 | window's edge will be kept constant as
the window resizes. The default behavior
| | 02:05 | for a new object is to have their top
and left anchor set, as you see here with
| | 02:08 | this object, which also reflects the
behavior of all layouts and versions of
| | 02:12 | FileMaker prior to FileMaker Pro 9.
| | 02:15 | Objects that are set with opposing
anchors, that is, either top or bottom or
| | 02:18 | left and right pairs, will resize
horizontally or vertically. In this case,
| | 02:22 | let's choose both the top and bottom,
hit Save. Go into View, into Browse Mode,
| | 02:27 | and you will see that when we resize
the window, the bottom edge will follow to
| | 02:31 | the bottom edge of the window.
| | 02:32 | Now there are two things that you will
notice here. First that it never goes
| | 02:37 | all the way to the bottom edge of the
window, and also you see that this button
| | 02:40 | object here is been overlapped by the
tab control when it resizes. The reason
| | 02:45 | for that as we will see when we go into
Layout mode is that there is this white
| | 02:49 | space between bottom edge of the tab
control object and window. So the tab
| | 02:52 | control will never overlap that space
and will always keep that space as a buffer.
| | 02:56 | So when you are designing your
layouts and selecting auto resizing options,
| | 03:00 | keep in mind that this white space
will never shrink, so it will always
| | 03:03 | maintain that white space; on the left
hand side, the top, and the bottom in
| | 03:07 | particular. On the right hand side,
it's the edge of the margin to the edge of
| | 03:11 | your object. So the white space to the
right of the margin will not necessarily count.
| | 03:16 | Let's take a look at the layout that's
called Resize Test. On this layout you
| | 03:21 | see that we have just one layout
object with margins on the bottom, left and
| | 03:26 | top. You also see the margin on the
right that's dictated by the page margin
| | 03:30 | and the right edge of this layout
object. If I select the layout object, you
| | 03:34 | see it's got the default
resize of the top and the left.
| | 03:38 | If we go under Browse mode, we will
see how this behaves as we resize the
| | 03:41 | window. You see that the object does
not move because it has the top and left
| | 03:46 | anchors selected. If we go back into
Layout mode and now if we select just the
| | 03:51 | left and the right and go under Browse
mode saving our layout, we see now that
| | 03:57 | what it does is it hugs to the right
edge and resizes vertically while still
| | 04:03 | maintaining the white space on the left.
In Layout mode, if we go and change it
| | 04:07 | to the top and the bottom instead,
and now go into Browse mode, we will see
| | 04:16 | that it resizes top to bottom
while maintaining the margins.
| | 04:21 | One thing you will notice that it
will shrink below its original size. Its
| | 04:27 | minimum size is dictated by the size
that you create on the layout. But another
| | 04:33 | interesting combination is if you
select the object and you give it a bottom
| | 04:36 | anchor but not a top one, going back
into Browse mode, we hit Save, and you
| | 04:41 | will notice now that it follows the
bottom and it never shrinks up the white
| | 04:46 | space on the top of the screen.
| | 04:48 | Finally, one more way to take a look
at resizing is if you have no resizing
| | 04:53 | applied and go into Browse mode,
you will then see that the object will
| | 04:58 | maintain the center of the screen at
all times while still honoring the margins
| | 05:03 | on the left, right, top and bottom.
| | 05:05 | There are a couple of things you
should be aware of before you apply auto
| | 05:08 | resizing. First of all, we have been
working with Form Views, but your database
| | 05:12 | may also have List Views. You should be
aware that auto resize settings have no
| | 05:16 | effect on layouts displayed as a Table
View, but on layouts displayed as a List
| | 05:21 | View, the top and bottom anchors have
no effect, because expanding the window
| | 05:24 | vertically simply displays more rows.
You can; however, adjust the horizontal
| | 05:29 | anchoring of objects in the List View
layout so that they move right or stretch.
| | 05:33 | Also, as we have talked about, there
are minimum sizes for objects. Objects can
| | 05:37 | never be reduced to less than their
original size, and that's something that
| | 05:41 | you want to take into account when you
are determining what the minimum size is
| | 05:44 | going to be on the layout. Also, when
it comes to printing, horizontal anchor
| | 05:48 | settings apply to Preview mode in
printing when the page size is wider than the
| | 05:52 | size of the layout being viewed or printed.
| | 05:54 | So you see here, when I look at it
in Browse mode, it looks little bit
| | 05:57 | different than Preview mode, but
it's still hugging the left edge of the
| | 06:01 | screen. So you can apply auto resizing
to both manipulate the way that items
| | 06:06 | look on screen as well as
the way that they are printed.
| | 06:08 | So using the Auto Resizing feature in
your FileMaker layouts will allow you to
| | 06:12 | create one layout to be displayed
by users regardless of their screen
| | 06:15 | resolution or window size.
| | Collapse this transcript |
|
|
10. Web Viewer EssentialsIntroducing the Web Viewer layout object| 00:00 | One of the coolest features in
FileMaker Pro is the ability to add something
| | 00:04 | that's called a Web Viewer object. Web
Viewer objects can be added to FileMaker
| | 00:08 | layouts that allow you to display web pages.
| | 00:11 | For example, if you open up the Web
Viewer Example file and click on Search,
| | 00:16 | you will see the layout that I have on
screen. Now this may look to you just
| | 00:20 | like a regular browser window, but
actually it's a FileMaker layout.
| | 00:24 | You see when you go into Layout mode,
you will see that these are all FileMaker
| | 00:27 | fields and they all are storing data,
one record at a time, but going back into
| | 00:34 | Browse mode, you can navigate through
the multiple records. As you go from
| | 00:39 | record to record, you notice that on
the bottom of the screen something is
| | 00:43 | changing and that's the data that's
been displayed in this area of the layout.
| | 00:47 | What you are seeing there is what's
called a Web Viewer Control. All this is is
| | 00:52 | just another type of object that you
put on a layout, similar to a container
| | 00:55 | field or ever a field, but instead
of displaying data, it's displaying a
| | 00:59 | webpage. But it stores its own data,
in this case, what's happening here is
| | 01:05 | that the data that you find inside of
the company field is what's being put
| | 01:10 | automatically into the search bar. So
watch as we go from record to record. You
| | 01:15 | see that this value here changes
inside the Google search bar. You see that
| | 01:23 | automatically change and as I commit
the record, it automatically redraws.
| | 01:30 | So simply put, you can allow Google
searching right inside your FileMaker
| | 01:34 | database, based on values that
users are entering inside of a field.
| | 01:38 | Additionally, you can add shipping
tracking. So if you have orders inside of
| | 01:42 | your FileMaker database, you can have
a field that stores the tracking number
| | 01:47 | and then when a user clicks on a button,
you can see it load FedEx Tracking.
| | 01:52 | This is one of the templates that
ships with FileMaker due to an arrangement
| | 01:55 | between FileMaker and FedEx. It allows
you the ability to track FedEx packages
| | 01:59 | live within a layout in your FileMaker database.
| | 02:03 | Another example would be the ability
to map addresses inside of a FileMaker
| | 02:07 | layout. So, for example, here you see
that I have got an address 5201, Patrick
| | 02:12 | Henry Drive, in Santa Clara, and you
see that when I put that value inside the
| | 02:16 | field that automatically draws it
inside the Google Maps. You will see, as I
| | 02:22 | update that, it updates
the information in the bar.
| | 02:26 | Not only does it draw the webpage for
you, but your users can interact with the
| | 02:30 | webpage. For example, here I can toggle
between the Map and Satellite view and
| | 02:37 | I can even send this link via email or
link to it from another webpage. As you
| | 02:42 | see when we scroll down, I can even
do directions to here and from here. So
| | 02:47 | basically, all you are doing is
linking to a webpage that already exists and
| | 02:51 | then you are handing off to the webpage
for them to provide all the additional
| | 02:54 | functionality.
| | 02:55 | FileMaker also ships with the MapQuest
searching and mapping tool. So since you
| | 03:00 | can display anything in a Web Viewer
that can be viewed in a web browser, you
| | 03:04 | can also other types of things like PDFs.
So you see here, I have a Web Viewer
| | 03:10 | that's set up in this layout that
simply points to not a URL address on a web
| | 03:19 | server somewhere, but as you see in
the Setup Tab, it just goes to a location
| | 03:24 | on my computer where there are
certain PDF documents stored.
| | 03:28 | You will have these same documents on
your machine, because what I am doing
| | 03:31 | here is pointing to documents that have
been installed as part of the FileMaker
| | 03:35 | 10 installation. So you will see
when we go into the Document View, I can
| | 03:38 | toggle between the different PDFs and
I can have them displayed on screen.
| | 03:46 | So now, not only have I added web
browsing functionality inside my FileMaker
| | 03:50 | layout, I can also add the viewing of
entire PDF documents into my FileMaker
| | 03:54 | layouts. This is great for
help systems or support systems.
| | 03:58 | Speaking of which, here is an example
of a support system, in this case, the
| | 04:01 | FileMaker Support Center integrated
right into a FileMaker database. You can
| | 04:07 | also link to the help pages that ship
with FileMaker Pro or any other help
| | 04:12 | page, possibly even the help page
or the support system to your own
| | 04:15 | organization.
| | 04:16 | So here you see in the QuickTime layout,
you can go into the Setup Tab and add
| | 04:21 | the title of a QuickTime Movie and
the path to it being hosted on the web
| | 04:24 | server, and then you can
display it inside of a Web Viewer.
| | 04:28 | Keep in mind that you can do this
same thing with the container, but in the
| | 04:30 | case of a container, you need to embed
the entire video inside of the FileMaker
| | 04:34 | file, thus, increasing the size of the
FileMaker file. In this case, all you
| | 04:38 | are doing is embedding a link and
letting FileMaker display the video. So web
| | 04:42 | viewers can also be a very great
alternative to container fields.
| | 04:46 | So a lot of the functionality that we
have discussed here is based on templates
| | 04:49 | that ship with FileMaker. Now that you
have seen some examples of what you can
| | 04:53 | do by embedding web pages into your
FileMaker layouts, let's take a look at the
| | 04:57 | steps that it will take in order to
add web viewing functionality into your
| | 05:01 | FileMaker databases.
| | Collapse this transcript |
| Adding a Web Viewer to a layout| 00:00 | FileMaker Pro allows you to add Web
page content directly into your FileMaker
| | 00:04 | layout. This is done through something
that's called the FileMaker Web Viewer
| | 00:07 | layout object. Web viewers are
layout objects that allow you to display
| | 00:11 | information from websites that are
based on data that's right here in your
| | 00:14 | databases or inside fields in your databases.
| | 00:16 | For example, if you look at the record
on screen, we could take a web viewer
| | 00:20 | and calculate a URL or a web address
for a map website that will be based on
| | 00:25 | information that's inside the address
and the city fields. Then as we browse
| | 00:29 | from record to record, the web viewer
that we will put down here in the Tab
| | 00:32 | Control area will display a map of the
location specified in the current record.
| | 00:37 | So let's take a look at how we do
this. First we will go into Layout mode
| | 00:40 | inside the tab for the Map; we will
draw a web viewer. There are two ways that
| | 00:46 | you can insert a web viewer into your
layout. First, by going into the Insert
| | 00:50 | dialog and selecting Web Viewer, but if
you want to control the size of the Web
| | 00:54 | Viewer, you can choose the Web Viewer
tool, which will then change your cursor
| | 00:58 | to a cross hair allowing you to
precisely draw the area in which you want your
| | 01:02 | Web Viewer to display. So here I have
just dragged and selected a size and now
| | 01:08 | I am going to release, which will bring
up the Web Viewer Setup dialog window.
| | 01:12 | This is in order to make it easier for
you to create web viewers and FileMaker
| | 01:16 | includes templates for several data
driven websites. Now it's not necessary for
| | 01:20 | you to use one of these templates as
you could create your own custom web
| | 01:23 | address, but if you are just starting
to get used to working with Web Viewers,
| | 01:26 | the templates are the best way to learn.
| | 01:28 | When you use one of these templates,
you then only need to specify the
| | 01:30 | parameters on the right hand side,
mapping these to fields within your
| | 01:34 | FileMaker record. If we want to use
the Google Maps which FileMaker ships due
| | 01:39 | to an agreement that they have with
Google, all I need to do is select on the
| | 01:42 | Google Maps option and you will see
there it will build a custom URL in the Web
| | 01:46 | Address field.
| | 01:48 | We click Google Maps; you see that we
have got three required fields and two
| | 01:52 | optional fields. We need to map these
to fields in our FileMaker database. So
| | 01:56 | by clicking on the arrow, I can
specify a field and then we choose City and
| | 02:04 | finally State. Now we have all this
information that Google will need to
| | 02:12 | display a map and all of it's coming
dynamically from our database record.
| | 02:17 | Also, there are some options on the
bottom left hand corner of the screen and,
| | 02:20 | by default; you can see allowing
interaction with the web viewer content is
| | 02:24 | checked. This means that users can
interact with the actual Google Maps website
| | 02:29 | by clicking into the Maps or
moving the Maps around on screen.
| | 02:31 | We can a also display the progress bar
and the status messages so that users of
| | 02:36 | the database can see when the data
is loading, so they know what they are
| | 02:39 | looking at if they see a blank screen.
| | 02:41 | So now we will hit OK and the first
thing you will notice is that there is an
| | 02:44 | address that's been displayed inside
the Web Viewer even in Layout mode. That's
| | 02:48 | the address that it's going to point to
when it draws the map. So let's go into
| | 02:51 | Browse mode for saving what we have
done and the first thing you notice when we
| | 02:55 | go into Browse mode is that the area
of the website that's been displayed has
| | 03:00 | been cropped.
| | 03:01 | So the first thing that we will want
to do is go back in the Layout mode and
| | 03:04 | provide it more size. Now this is an
important part of putting web viewers into
| | 03:07 | your layouts. You have to understand
that the size that you choose to draw the
| | 03:11 | Web Viewer in Layout mode is simply
going to be a crop size of the webpage.
| | 03:15 | It's not going to constrain the sizes
of the webpage, it's just going to take
| | 03:19 | almost like a cookie cutter, it's
going to chop out a piece of the webpage.
| | 03:22 | So it's a good idea to give yourself as
much space on screen as possible. Grab
| | 03:27 | the tab control, wind it to the end of
your screen and then also grab the Web
| | 03:32 | Viewer inside of it and
winding that out as well.
| | 03:36 | Now we can go into Browse mode and hit
Save and now we see our map been drawn
| | 03:42 | on screen. You see we can also
interact with the map, moving the map all
| | 03:47 | around, changing from satellite,
even zooming in on certain areas. The
| | 03:55 | interesting part is that when we go to
the next record, you will see it redraw
| | 04:03 | and show yet a different address on
screen in a different map. The Web Viewer
| | 04:07 | is using the operating system's web browser.
| | 04:10 | Now keep in mind that these are
specific to the OS that you are using. If you
| | 04:13 | are a Mac user, despite what your
operating system's default web viewer is,
| | 04:17 | it's going to use the Safari engine.
| | 04:19 | So if you are pointing to websites that
have certain plug-in requirements, make
| | 04:23 | sure that you install those plug-ins in
your browser in order for them to work
| | 04:27 | inside of your FileMaker layout.
| | 04:28 | In the Windows operating system, it
uses IE as it's browser engine, so you
| | 04:33 | should do the same in that case. Web
viewers are not meant to replace web
| | 04:36 | browsers and for some websites, you
may need to open up a separate browser
| | 04:39 | window. You can either do that by
creating a new window or just using a script
| | 04:44 | step which you can learn more about in
the scripting movies that's called Open
| | 04:47 | URL. But all of the Web Viewer
objects will require an Internet connection
| | 04:52 | unless of course, you are doing a file
reference instead of an HTTP reference
| | 04:56 | where you can point to documents
that are local on your machine.
| | 04:59 | But if you are going to use any of the
templates that ship with FileMaker, you
| | 05:03 | are going to need an Internet connection.
You see that the other templates that
| | 05:06 | are available to you in addition to
Google Maps are MapQuest, Google web
| | 05:11 | search, FedEx and various Wikipedia
sources. A couple of things that you should
| | 05:15 | be aware of Web Viewers display web
pages in Form View, like we are right now,
| | 05:20 | and also List View, but in Table View,
Web Viewers display only when they are
| | 05:23 | in headers or footer parts of the layout.
| | 05:25 | Also, you can now place web viewers in
a portal. If you place a web viewer in a
| | 05:29 | portal, the web viewer appears as an
object on the layout that overlaps the
| | 05:32 | portal instead. Web viewers are
included in the default Tab Order just like a
| | 05:36 | regular field would be and you can
define a Web Viewer as a button. So when a
| | 05:40 | user selects it, you can run a script step.
| | 05:43 | One of the easiest ways to enrich your
FileMaker database layouts is to display
| | 05:47 | webpage content using the
FileMaker Web Viewer layout object.
| | Collapse this transcript |
|
|
11. Finding DataUsing the basic Find options| 00:00 | One of the key requirements to any data
storage application is data retrieval.
| | 00:04 | FileMaker provides this via its Find
mode features. Now we have been covering a
| | 00:08 | lot of different views throughout this
title and those can be found under the
| | 00:13 | View menu. We have worked with Browse
mode, which allows you to enter and edit
| | 00:17 | data, and Layout mode, which allows
you to create and manipulate the layouts.
| | 00:20 | Preview mode of course allows you
to see what prints will look like.
| | 00:23 | But what we are going to work with
now is Find mode. There are a couple of
| | 00:27 | different ways to get to Find mode.
First, under the View menu just like we saw
| | 00:30 | there and also in the bottom left
hand corner you can toggle between the
| | 00:34 | different modes and also you can
use a keyboard shortcut which would be
| | 00:40 | Option+F or Ctrl+F. So let's go into
Find mode. The first thing which you
| | 00:44 | notice in Find mode is that all your
data visually disappears and your screen
| | 00:48 | is going to look suspiciously like
it would in data entry with one key difference.
| | 00:52 | You will see inside the corners of the
fields that you have a little magnifying
| | 00:56 | glass. This indicates that you are in
Find mode. This is so that users don't
| | 01:01 | get confused thinking that are in the
Data Entry mode and just continue to add
| | 01:04 | what are called Find Requests when
they are intending to create new records.
| | 01:08 | FileMaker Pro is now waiting for you to
enter some criteria and you will notice
| | 01:12 | that there is a Perform Find and a
Cancel Find button up in the Status toolbar.
| | 01:16 | For those of you familiar with the web,
this sort of behavior might initially
| | 01:19 | throw you because instead of offering
you a single search field kind of like
| | 01:22 | Google for example and then another
page or a layout in which to apply the
| | 01:26 | criteria, FileMaker simply allows you
to use the fields placed on any given
| | 01:30 | layout and then perform searches based
on those fields. So that means that any
| | 01:34 | single layout in your entire database
can be used for searching. And ultimately
| | 01:37 | one of FileMaker's core strengths is
the ability to perform searches of your
| | 01:41 | data in any layout in your database.
| | 01:43 | So now you should be in Find mode and
you see that the cursor is blinking in
| | 01:46 | the Painting Name field. I am going to
type in some criteria in this case, Two
| | 01:51 | Lov, and now I am going to hit Perform
Find. I could also hit the Enter key on
| | 01:57 | my keyboard and you see here it has
comeback with one record. You notice up in
| | 02:02 | the upper left hand corner, that even
though it's only showing one record, it
| | 02:06 | also says that there are 15 records in
the entire database. That tells me how
| | 02:10 | many total records are being stored in
this table. But the number 1 represents
| | 02:14 | something that's called the Found Set.
| | 02:16 | You also see that there is a little pie
chart that indicates the percentage of
| | 02:20 | records in my Found Set based on the
overall amount of data that's stored in
| | 02:24 | this table. So once I have created a
Found set, it doesn't mean that the other
| | 02:28 | records have disappeared. It just means
that they are not currently visible. If
| | 02:32 | I want to see all of the records that
are not part of my Found Set, I can go
| | 02:35 | under the Records menu and say Show
Omitted Only at which point now you see
| | 02:40 | that I see 14 records of the 15 that
are stored in this database. At any given
| | 02:45 | time you can reset the view by
selecting Show All and now you see all of the
| | 02:50 | records being displayed that
are stored inside the database.
| | 02:53 | Now sometimes you may have more records
than can be found on the screen and in
| | 02:57 | that case you will just have to scroll
through the List View to be able to see
| | 02:59 | all of them. Another thing that you
will notice is when I went into Find mode,
| | 03:04 | I just typed in Tw and performed a Find
and you notice that it matches criteria
| | 03:10 | for Two Pots or Two Lovers in this case.
And that's because it's doing a search
| | 03:15 | based on the field index.
| | 03:17 | If you click inside the field and do
Ctrl+I or Apple+I, you can see all the
| | 03:22 | different words that are being stored
inside of FileMaker's index. Here are the
| | 03:28 | individual words. So when I type lov,
for example, I could also get Two Lovers
| | 03:35 | by a Tree because the individual words
are what are been searched on inside FileMaker.
| | 03:40 | So for example, if I go back into Find
and I type in red and hit Perform Find,
| | 03:48 | you see that it has given me Red
Berries and if I do Show All, you see also
| | 03:55 | that I could do a search for Vas
which is Blue Vase, even though it doesn't
| | 04:02 | start with vas there is an
individual word inside that field that does.
| | 04:06 | So these are the basic ways to find
data inside your FileMaker database. Keep
| | 04:10 | in mind that in addition to
FileMaker's ability to be able to create the data
| | 04:13 | storage mechanism and provide a user
interface, it also provides very powerful
| | 04:17 | data retrieval tools.
| | Collapse this transcript |
| Reviewing new requests in Find mode| 00:00 | In many cases you may need to search
for multiple criteria in one field. In
| | 00:04 | these instances, you will need to be
familiar with adding a new Find Request.
| | 00:09 | Let's take a look at that. If you open
up ListView_11_02 in your exercise files
| | 00:13 | and go to the Painting List layout,
you see that we have got a series of
| | 00:16 | records inside of a FileMaker database
and each record represents a painting.
| | 00:21 | Let's say I happen to be a fan of
Marta Alvarado, so I want to search for all
| | 00:25 | her paintings. I will go and click in
the Find button which takes me into Find
| | 00:29 | mode and I will type in
Alvarado and hit Perform Find.
| | 00:37 | You see it comes up with four records
in the Found Set out of the total 15 that
| | 00:41 | are stored in the database. However
now, I also want to locate paintings by
| | 00:45 | Gibson. So I type in gibson and hit
Perform Find. It gives me three records of
| | 00:54 | my Found Set out of the 15 stored in
the table. However what if I want to find
| | 00:57 | both Alvarado and Gibson. Well, if I
type in gibson alvarado into the field,
| | 01:08 | what do you think might happen? Well
just take a look. I get no matching
| | 01:13 | request and the reason for that is
because it's actually searching for a field
| | 01:18 | that contains both a gibson and alvarado,
but that's not what I am intending to do.
| | 01:22 | In these cases, what I want to do
is create separate requests for these
| | 01:26 | criteria and notice that I am using the
terminology request instead of records.
| | 01:30 | Also notice that the FileMaker menu
that used to save records in Browse mode
| | 01:34 | has changed to Requests. It allows us
to add, duplicate or delete requests when
| | 01:38 | we are creating Find criteria. So this
mechanism allows me to perform both an
| | 01:43 | And Search and an Or Search. So for
example, if I type gibson into one request
| | 01:50 | and then go up on the button up here
in the Status toolbar and click on New
| | 01:54 | Request and then now type Alvarado in
the other, it allows me to find all of
| | 02:00 | the paintings created by Gibson or Alvarado.
| | 02:03 | So if I hit Perform Find, you see
that now it has given me a mix of Marta
| | 02:08 | Alvarado and Norma Gibson paintings.
Alternatively, if I create a request with
| | 02:13 | Gibson, so I will say Find and say
Gibson as the artist and if I go into the
| | 02:21 | Painting Name and just type berr,
FileMaker is going to return the one painting
| | 02:27 | that matches both of those criteria.
So in the first case, I was doing an Or
| | 02:31 | Search, Marta Alvarado or Norma Gibson.
It's because I use two different Find
| | 02:35 | requests and if I use one single
request and put two criteria into it, I am
| | 02:40 | doing what's called an And Search,
meaning give me everything that matches
| | 02:43 | Norma Gibson and in this case,
Red Berries is the painting name.
| | 02:47 | A couple of notes here, when you are in
Find mode, you can continue to add new
| | 02:51 | requests and you can add an unlimited
number of them, but keep in mind that you
| | 02:55 | probably go into run out of conditions
or records that match conditions when
| | 02:59 | you get to several different requests.
Another thing you should know is that
| | 03:02 | you keep adding new request in Find
mode when you get to ten of them, you will
| | 03:06 | see a message on screen that says,
You are in find mode and appear to be
| | 03:09 | entering new record data rather than
finding request criteria. Are you sure you
| | 03:13 | want to create new find request?
| | 03:15 | This is only here to make sure that you
intend to be in Find mode creating new
| | 03:19 | requests and that what you are not
actually doing is trying to create new
| | 03:22 | records. They don't want you to get 50
of these in before you realize that you
| | 03:25 | haven't actually added
any records to the database.
| | 03:28 | So in addition to just doing basic
finds using New Request will allow you to
| | 03:32 | create both And Or Searches when
retrieving data from your FileMaker database tables.
| | Collapse this transcript |
| Establishing search operators| 00:00 | In FileMaker Pro when you are
searching for data, you don't always have to
| | 00:04 | specify each exact criterion. For
example, if I want to find all of the
| | 00:08 | paintings in this database that were
created between the year 1872 to 1937, I
| | 00:14 | don't actually have to go and create 65
new Find Requests each with a different
| | 00:17 | year. But instead what I can do is
use what FileMaker calls its Search
| | 00:21 | Operators. If you go into Find mode,
you will notice in the Layout bar that not
| | 00:26 | only can you navigate to the
different layouts and use any one of those to
| | 00:29 | enter in your criteria, but you
also see there is an Insert Operators.
| | 00:35 | If you click on the Operators button,
you will see that you have a list of
| | 00:38 | different characters that FileMaker
interprets when added in as a search
| | 00:41 | criteria. For example, some of the
easy ones, if you enter in a exclamation
| | 00:46 | point, it will find all the duplicate
values in that field and some are the
| | 00:49 | more obvious ones like less than, less
than or equal to, greater than, greater
| | 00:53 | than equal to are commonly used with
numeric fields and also with the date
| | 00:57 | ranges. And there is also a Range option,
which if you put a ... in between the
| | 01:03 | starting value and the ending value,
FileMaker will use that as a range and
| | 01:07 | bring back all the matching criteria
that fits within the starting and ending value.
| | 01:11 | Also you can just do a double slash
and that will find any date that matches
| | 01:16 | today's date. So let's take a look at
using the Range operator in the example
| | 01:22 | that I just mentioned. So let's say we
want to find all the paintings that were
| | 01:25 | painted between the year 1872 and 1937.
All I have to do is type in 1832... and
| | 01:33 | then 1937 and now I hit Perform Find
and you see that FileMaker identified that
| | 01:40 | as a range and gave me all the
criteria that matched and fit within the start
| | 01:44 | and end dates that I added. Also if you
want to be diligent about entering data
| | 01:48 | into your database and need to
discover where all the missing entries are,
| | 01:51 | another common technique is
to try the equal sign operator.
| | 01:56 | You will notice that equal sign means
match whole word or match empty, because
| | 02:00 | really what it means is find an exact
match for any value that follow the equal
| | 02:04 | sign. So if I enter an equal sign
into the Year field and I don't follow it
| | 02:09 | with anything that means find exactly
nothing, and now when I perform find, you
| | 02:15 | see that it found the two records in
the database that actually have no value
| | 02:19 | in the year. This is an excellent
tool for cleaning up your database. And
| | 02:22 | finally you can leave your searches
open ended. For example, I can say find
| | 02:28 | greater than 1900 and then perform a
Find and you see it gives me all the years
| | 02:34 | after the year 1900.
| | 02:36 | So in addition to doing multiple
requests, you can also insert different search
| | 02:40 | operators to assist you in locating
data with minimal data entry in the search
| | 02:44 | requests themselves.
| | Collapse this transcript |
| Constraining or extending a Find request| 00:00 | Different from doing an inclusive
search via tour or more requests, like we've
| | 00:03 | talked about in previous movies, there
are also times when you may want to add
| | 00:07 | or remove from your current found set,
as oppose to searching within the entire
| | 00:11 | database of records.
| | 00:12 | In these cases, you can use the
functions that are called Constraining and
| | 00:15 | Extending Found Sets. Now I'll do a
search by entering Find mode and then
| | 00:21 | entering Dave's. I'll hit Perform
Find and I find that I get seven records.
| | 00:27 | Now I am going to go back into Find
mode and this time I am going to type
| | 00:31 | Gibson in into the Artist field, but
instead of hitting Perform Find, what I am
| | 00:37 | going to do is go under the Requests
and in this case what I am going to do is
| | 00:40 | I am going to say Extend the Found Set.
| | 00:42 | Now what this is going to do is it's
actually going to take my Found Set of
| | 00:45 | seven records, because FileMaker
remembers what my last search was, and it will
| | 00:50 | add to it. When I say Extend, it will
add to it an additional Found Set that
| | 00:54 | includes all the Gibson Art. So I can
say Extend Found Set. So now you see I
| | 00:58 | have got 10 records that are a mix
of both Dave's and Gibson's Artwork.
| | 01:02 | You can do the reverse as well, for
example, if I go back to Show All. Now I am
| | 01:06 | going to do is search by Gibson and
Perform Find, and you see that it gives me
| | 01:14 | three records.
| | 01:15 | Now I go back into Find mode and in
the Year, I'll choose an Operator for
| | 01:21 | greater than or equal to 1982, instead
of performing the Find, I'll go under
| | 01:27 | the Request and in this case I am
going to say Constrain Found Set. And what
| | 01:32 | this is going to do is it's going to
search within the previous Found Set for
| | 01:35 | any values that match the
criteria that I have just added.
| | 01:38 | So you see within that Found Set, I
find that there are two records that match
| | 01:42 | my request. Now the real power of this
is when you have thousands of different
| | 01:47 | records and you want to be able to
drill down or drill up from certain
| | 01:50 | criteria, to chase certain Found Sets,
whether you are trouble shooting or you
| | 01:53 | are trying to identify very
specific Found Sets, of data.
| | 01:57 | So working with varying groups of
records is always powerful and you can easily
| | 02:00 | view trends in your data, search for
exceptions or problems in the information
| | 02:04 | that you have entered, or imported
into your solution, or quickly access
| | 02:07 | specific records, all using either
Constrain and Extending Found Sets.
| | Collapse this transcript |
| Finding a date/time or time stamp| 00:00 | Another of the user benefits of
FileMaker searching is Date and Time Range
| | 00:04 | searching capabilities. If you open up
your Orders_11_05 files in your Exercise
| | 00:09 | files., you'll see that we have a
layout in Order:detail that contains some
| | 00:13 | fields that have Date, Time and
Timestamp values. In older versions of
| | 00:18 | FileMaker the only way to search
for ranges in these dates was to enter
| | 00:21 | beginning and end dates
using the search operators.
| | 00:25 | In recent versions of FileMaker, there
has been new improvements in Date and
| | 00:28 | Time searching capabilities. And
they're actually kind of pretty cool. Each
| | 00:31 | syntax that I'll be showing you here
applies only to fields that are set up
| | 00:35 | specifically as Date, Time or
Timestamp fields. Let me show you some of the
| | 00:39 | ways that you can search within these fields.
| | 00:41 | So first you'll notice inside the
Order Date, if you look into the Order List
| | 00:46 | you'll see several different dates as
you scroll through each record. They're
| | 00:50 | all formatted as Dates with the Month,
Day, Year and normally when you search
| | 00:56 | inside a FileMaker field you will be
searching on the exact syntax that's
| | 01:00 | contained within the field but because
this field here is a Date field, I can
| | 01:03 | use some special syntax.
| | 01:05 | So let me give you an example. For
starters, we're going to enter Find mode and
| | 01:10 | in the Date field I am going to type
in a value that isn't formatted for a
| | 01:15 | Date. As a matter of fact, if I ever
try to enter this data, formatted in this
| | 01:19 | very same way into the field during
data entry I would actually get an error
| | 01:22 | back for FileMaker. But what's
interesting here is that when we're in Find mode
| | 01:25 | it accepts this.
| | 01:26 | And now let's take a look at what
happens when you hit Perform Find. So you see
| | 01:31 | that even though we go into the Order
List, you can see, even though we only
| | 01:36 | put in 6/2009, it actually gave us
back matching records that were all the
| | 01:41 | dates in June of 2009. So what you
are doing here is you are putting in the
| | 01:46 | Month and then just skipping over the Days.
| | 01:49 | And since you skipped over the days
FileMaker interprets data saying give me
| | 01:52 | all the days that match the month and
year combination. Another way you can do
| | 01:56 | this, if you go into Find mode, is
just simply enter in a month number. So,
| | 02:03 | FileMaker will now interpret this as
all dates in the month of 12 in the
| | 02:08 | current year. So when you hit Perform,
you see that you get matching records,
| | 02:12 | not with 12 in it, but just the
month of 12 and the current year.
| | 02:15 | I'll go back to Show All. Another
example is how this works within Ranges. So
| | 02:20 | we'll hit Perform Find, Order
Date and in this case I'll type in
| | 02:25 | 4/2009...6/2009 and we'll hit Perform
Find. And you see what it has done is it
| | 02:34 | has given us all the dates that fall
within that range. So the beginning of
| | 02:37 | anything that falls under April of
2009 through everything that falls under
| | 02:41 | June of 2009.
| | 02:43 | Another way that you can search for
values by entering in data that's not in
| | 02:47 | Date form is by typing in a day
abbreviation into a Date field. FileMaker knows
| | 02:55 | for each date what day of the week
that actually represents. So now you see
| | 02:59 | that it went and searched on that part
of the day that it stores internally and
| | 03:03 | it has given us back all this
information that was on a Wednesday.
| | 03:06 | And what's interesting about this is
that there aren't actually any fields
| | 03:08 | defined in these records that have the
day of the week in there. So this is all
| | 03:12 | just FileMaker's internal information.
There are also ways that you can range
| | 03:15 | just certain aspects of the date.
Back into Find mode. We're going to use the
| | 03:19 | brackets that look like this. And I am
going to enter in 4...6. Now if you
| | 03:25 | recall the ... in between two values
means a range. This means between 4 and 6.
| | 03:30 | I am going to close that bracket and I
am going to just then do a / and 2009. So
| | 03:35 | as you can imagine, this is give me
anything that falls in the dates between
| | 03:39 | April and June of 2009. So when you
hit Perform Find. Here we have some May,
| | 03:45 | June. It looks like there were no
matching Aprils. And this bracketing can
| | 03:50 | happen on both sides. So
I can do 4 and then do...
| | 03:59 | See if we get any values that match
this criteria and there you see we've got
| | 04:03 | everything from April of 2004 through
June of 2009. The same is true for Time fields.
| | 04:09 | In that case the syntax is a little
bit shorter but if we go into Find mode,
| | 04:13 | well here's a field that's defined as a
Time field. And I am just going to type
| | 04:17 | in 3pm and see what we get. You see
here it gives me anything that's in the
| | 04:21 | 3 PM hour, from 3 o'clock to 3:59.
I can also do ranges in the Time fields.
| | 04:27 | ...6 pm and you see it gives me
anything from 3 O'clock even to 5:59 PM.
| | 04:38 | And in an even more abbreviated manner,
I can just simply type in pm into a
| | 04:42 | Time field and hit Perform Find. And
it gives me anything that was created in
| | 04:46 | the pm or in the afternoon or
evening hours. And this, just like I had
| | 04:50 | mentioned earlier, there is no am or
pm or afternoon or morning values stored
| | 04:55 | in the record; it's just what
FileMaker is interpreting internally.
| | 04:57 | And lastly, this gives a little bit of
insight as to what's actually going on
| | 05:00 | here. What FileMaker is doing is it
seeing that your data isn't formatted
| | 05:04 | properly and instead it's putting it in
a wild card character in the area that
| | 05:07 | you're not providing. So in this case
I'm going to show you an example of a wild
| | 05:11 | card character, which is an asterisk.
And I am going to say 15. So this is
| | 05:16 | going to give me all times that
are 15 minutes after any hour.
| | 05:20 | So let's see what that gives us. And
you see we have two that happen to be 3:15.
| | 05:24 | And finally the combination of the
two things that we've discussed apply in
| | 05:28 | the Timestamps as well. If we go in the
Find mode and enter into the Timestamp
| | 05:32 | field. Here I am going to say // 3 pm.
Now this means all Timestamps in the 3
| | 05:39 | o'clock hour today because // indicates
today. So we didn't have any today and
| | 05:45 | we can check different hours as well.
| | 05:47 | But the reason I wanted to show you
this is because when we come back with the
| | 05:50 | Field search you see that instead of
putting in our original values, it gives
| | 05:54 | us the wild card formatted values. So
this is something that you can logically
| | 05:58 | assume, okay 3 and then I want any
part of the 3 o'clock hour and any one of the
| | 06:02 | seconds within 3 o'clock hour.
| | 06:03 | I just put wild card characters in
there. So you can kind of see how this is
| | 06:06 | working. You know when you put in
6/2009, it's actually interpreting it as 6,
| | 06:15 | indicating any date within
the month of June in 2009.
| | 06:19 | So if you get familiar with this
searching syntax, it's not only going to help you,
| | 06:22 | but as you train your users
and possibly as you start to work with
| | 06:25 | scripts, which we will cover later in
this title, this syntax can help you more
| | 06:28 | accurately find Date, Time and
Timestamp data in your database.
| | Collapse this transcript |
| Saved Find requests| 00:00 | One of the brand new features in
FileMaker 10 is the ability to save your Find
| | 00:05 | requests. And in one of the other new
features in FileMaker 10 you see that we
| | 00:09 | have this new Layout Status toolbar
and you'll notice that on the toolbar we
| | 00:13 | have this icon for finding records or
entering Find mode. But just pushing the
| | 00:17 | button will get you into Find mode and
then you see it gets replaced with the
| | 00:20 | Perform Find or a Cancel Find icon.
| | 00:23 | If you click and hold down on the Find
you see that there is a whole contextual
| | 00:27 | menu that talks about saving and
modifying and creating new finds. This is a
| | 00:32 | pretty neat feature, in previous
versions of FileMaker. Any time you did a
| | 00:35 | search and you put criteria into the
database, it would always save the last
| | 00:39 | Find. In this is where you would
probably see, if you go in Find mode, if you
| | 00:43 | have worked with FileMaker before
there was something that was called Modify Last Find.
| | 00:48 | And it was in the Request menu when
you would perform the Find. Now that has
| | 00:52 | been replaced with the concept of
Saved Finds. And in order to demonstrate
| | 00:57 | this, let me just do a quick Find here.
If we go into Find mode, I will say
| | 01:04 | Alvarado, hit Perform Find. And now
when I click and hold down on this button
| | 01:10 | you see; now it lists recent Finds.
You see I've got Alvarado listed there.
| | 01:15 | And what's nice about that is if I say
Show All; notice at this point, I don't
| | 01:19 | have to go into Find mode. I'll
click and hold down on this button. Click
| | 01:23 | Alvarado and now it stores that Find
in my session. And what do I mean when I
| | 01:27 | say that. Well, when I am talking about
storing it in a session that means that
| | 01:30 | the recent searches will be saved
inside the database until I logout and then
| | 01:35 | log back into it.
| | 01:36 | My recent Finds, if this is a shared
file will only show up in my session
| | 01:41 | meaning between when I login and when
I logout. When I come back, I won't see
| | 01:44 | those recent Finds anymore. And the
idea there is that, if you have hundred
| | 01:48 | users working on the file at the same
time and everybody is saving their Finds.
| | 01:53 | Well, you don't want to see all the
other user's Finds in there because this
| | 01:55 | will get cluttered very quickly.
| | 01:57 | So it just saves yours and since it
can only manage yours within each session
| | 02:01 | that's why you'll see those there.
Now if you want to save this beyond your
| | 02:06 | session, you can then take one of
your recent Finds and you can say Save
| | 02:11 | Current Find. So now that you've just
performed one, which is basically Modify
| | 02:15 | Last Find, which is the criteria that
you see here. Perform it. Go into this
| | 02:22 | dropdown menu and say Save Current Find
and now you'll see the Specify Options
| | 02:26 | for Save Find.
| | 02:27 | And you can either just leave the
criteria in there or if it's kind of
| | 02:30 | complicated you can just give it some
kind of short description. Also you'll be
| | 02:35 | able to go into the specified Find
Request and if you are familiar with
| | 02:38 | scripting, you'll notice that this
layout is familiar because this is where you
| | 02:41 | can go in and edit the entire criteria.
And we'll talk more about this in the
| | 02:46 | Scripting section.
| | 02:47 | But here you can modify it further or
add more criteria to it if you want to.
| | 02:51 | And then ultimately save it with
whatever name you've given it. Once you do so,
| | 02:56 | clicking down on the Find button. And
now you see it under Saved Find. And this
| | 02:59 | will be here for you next time that
you are logged into the file. And at any
| | 03:02 | point you can go back into
the system and Edit Saved Finds.
| | 03:07 | And here I've got one, but if I had
several of them at any time I can change
| | 03:11 | the name, change the criteria, add
additional criteria, maybe even add Omit
| | 03:17 | Record, Requests anything that you
can do inside of Find mode, you can do
| | 03:23 | inside a Saved Find. So the idea here
is you are now able to work with Find
| | 03:30 | mode in the manner that you have before.
But if you are working with a search
| | 03:34 | that might be rather complex and it's
something that you normally would make
| | 03:38 | notes of, you can now just
save it inside the FileMaker file.
| | 03:41 | So Saved Finds brand new feature
inside FileMaker 10 and it should really
| | 03:45 | change the way that you're searching
for data inside your FileMaker databases.
| | Collapse this transcript |
| Finding matching records without Find mode| 00:00 | FileMaker 10 has two different ways
that you can create a Found Set without
| | 00:04 | having to go into Find mode. You can
do both of these within Browse mode. The
| | 00:10 | first of which is a feature that was
released in couple of versions ago that's
| | 00:13 | called Fast Match. And it's all
based on the Contextual menu. Now the
| | 00:17 | Contextual menu is the menu you'll
find when you click on a field and right
| | 00:21 | click. This works in various different
modes but when you are in Browse mode
| | 00:25 | you see the Contextual menu gives you
some options for changing the text that's
| | 00:29 | stored within the field or
inserting some type of stored value.
| | 00:34 | But you notice down here at these
three items that you've found matching
| | 00:37 | records. So first if we look at
what I am clicking on, I have the Marta
| | 00:40 | Alvarado record. If I right click on
that and choose Matching Records it
| | 00:45 | creates a Found set based on the
field that I was currently in and all that
| | 00:49 | while I have stayed inside a Browse mode.
I can click into this field that has
| | 00:54 | no value in it and instead of doing
Find Matching Records I can extend the
| | 00:58 | current Found Set.
| | 01:00 | So for example this will give me all
the Marta Alvarados and any field that
| | 01:05 | does not have a value in year and I
can constrain them down to just the ones
| | 01:11 | that match here 1872. So that's one of
the options that you have available to
| | 01:15 | you. I'll hit Show All Record. And
hence we discussed in the Saved Finds video.
| | 01:20 | So if you click and hold down on the
Find button you'll see that you have
| | 01:23 | another menu.
| | 01:24 | A menu related to Saved Finds and if
I go in Find mode and I say 1900...
| | 01:32 | perform Find. Now when I click down and
hold you'll see that was stored inside
| | 01:38 | the file. Now that I have created a
Find and clicking and holding and going
| | 01:43 | here and selecting that also creates a
Found Set for me in Browse mode. So the
| | 01:47 | idea here is that you might want to
train your users on these two ways they can
| | 01:50 | perform Finds in Browse mode because
these are great tools for drilling down or
| | 01:55 | drilling up in data that
you're working with on screen.
| | Collapse this transcript |
|
|
12. Sorting DataSorting with one criterion| 00:00 | In each of the exercises in this
title, we've been working with multiple
| | 00:03 | records. But you'll notice as you open
up each file that the records are in an
| | 00:08 | order that really doesn't have any kind
of relevance. It's not in alphabetical
| | 00:13 | order, not by artist, not by year. Now
what's happening is that when you first
| | 00:16 | open up a FileMaker file and look at
multiple records it's going to give you
| | 00:19 | those records in the order in which
they were added to the database. In the
| | 00:22 | cases of reporting or printing or
exporting or just even viewing the data, that
| | 00:27 | might not always be the desired order.
| | 00:29 | So in this movie I am going to show you
how to sort records in FileMaker. There
| | 00:32 | are a couple of different ways that
you can get to the Sort dialog. First if
| | 00:36 | you go under the Records menu, you'll
notice down here it says Sort Records and
| | 00:40 | it also has a quick key. On Mac it's
Apple+S, on Windows it's Ctrl+S. And also
| | 00:47 | in the new Layout toolbar you'll
notice that there is a Sort button.
| | 00:51 | Clicking any one of these will get you
to the Sort Records dialog and inside
| | 00:55 | the Sort Records dialog you'll notice
that they will always store the criteria
| | 00:59 | for the last sort. And this is
helpful sometimes when you're going back and
| | 01:02 | resorting something like you've done
moments earlier. This way you don't have
| | 01:05 | to do it again twice. But in our
case we're going to hit Clear All.
| | 01:09 | And in this Sort dialog you're going
to notice that you have two windows to
| | 01:11 | choose from. The window on the left
is all of the different fields that are
| | 01:15 | available to you that have been defined
inside this database. And on the right
| | 01:18 | it'll display the criteria in order
that you want to apply towards your Found
| | 01:22 | set. So one thing you take a note
when you click on this drop down menu, it
| | 01:26 | allows you to pick on fields from many
different tables. But what you see here
| | 01:30 | above this first separator that it
says the Current Layout versus the Current Table.
| | 01:35 | And the default is the Current Layout
and this is very helpful because most
| | 01:38 | likely if you're in a layout that
has certain fields on it, if a user is
| | 01:42 | sorting so that they can look at the
data in a certain way, they probably don't
| | 01:45 | care about fields that aren't on the
layout. So in this case you see we've only
| | 01:49 | got three fields on the layout.
Painting Name, Year and Artist.
| | 01:52 | So those are the ones that are
presented as the default. Of course we could
| | 01:55 | choose from all of the different fields
that are defined inside the table. But
| | 02:00 | we'll stick with this layout and we'll
say Painted_Year. And now we see that
| | 02:06 | listed as the top sort order in the
Sort Order window. And when you click on it
| | 02:11 | you'll notice we have these cell phone
signal looking icons just to the right
| | 02:14 | of your sort criteria,
and those match down here.
| | 02:16 | So in this case the default is
Ascending order A to Z or 1 through 10 let's say
| | 02:22 | if you're doing it alpha versus
numeric. Or you could change this while you
| | 02:26 | have your criterion selected you can
select Descending order and you see that
| | 02:29 | that changes the icon. So it depends on
which one of these that you would like
| | 02:32 | to do and then you can hit the Sort
button or your Enter key and you'll notice
| | 02:37 | now that all the values have sorted
based on the criteria that you entered in
| | 02:41 | the previous window.
| | 02:42 | One thing to note is that even though
these records did not have a value inside
| | 02:47 | Year they show up at the top of the list.
And that's the behavior that you can
| | 02:51 | expect from FileMaker. So if you're
creating reports or instructing users on
| | 02:54 | how to work with Found sets, keep in
mind that the blank records in the fields
| | 02:58 | will always show up on top. And this
something just you just want to take into
| | 03:01 | account when you're working with
sorting, but also at the same time this is a
| | 03:05 | good way to look for inconsistencies
in your data or find records that don't
| | 03:09 | have values in them.
| | 03:09 | Just hit Sort on that value and then
you'll see all the blank ones on the top.
| | 03:13 | So understanding how to work with
sorts is going to help you manipulate data
| | 03:17 | inside Found sets so that it can be
more meaningful to you and your users.
| | Collapse this transcript |
| Sorting with related fields | 00:00 | When you are looking at data inside
FileMaker, the layout which you are
| | 00:03 | looking at is based on table. So that
means that most of the data that you are
| | 00:06 | seeing on screen lives inside that table.
If you look in layout mode, you will
| | 00:12 | see that the three fields that we have
in this layout are Painting Name which
| | 00:16 | is based on the Paintings table,
Painting Year, also based on the Paintings
| | 00:20 | table and then this third field,
Artist, which is actually a related field
| | 00:25 | coming from the Artist table.
| | 00:27 | We will talk more about related fields
in the relationship section, but what I
| | 00:30 | want to demonstrate is that we have
fields from two different tables on this
| | 00:35 | layout, so when it comes to sorting we
can pick fields from the current layout,
| | 00:42 | from the current table, but
also from the related table.
| | 00:45 | Now in this case we happen to have
the combination of both of those on the
| | 00:49 | Painting List layout that we are
viewing right now. So you will see that we can
| | 00:52 | do Painted Year and sort by Painted
Year and you see everybody is listed that
| | 00:58 | way, but also what if I do sort by
Artist, what will happen here? Well, what it
| | 01:05 | does as it just treats it as a field
that's defined locally on the table. So
| | 01:09 | the rule here is any field that you
have on your layout whether it's a local
| | 01:13 | field or related field can be
used in your sort criterion.
| | Collapse this transcript |
| Sorting with multiple criteria| 00:00 | Many times when you are working with
FileMaker and you have a large set of
| | 00:04 | records, you may want to just look at
them in a certain order. This, of course,
| | 00:08 | is where sorting comes into play.
Sometimes when you are sorting, you may have
| | 00:11 | multiple different criteria that you
need to sort with. So for example, here
| | 00:15 | we've got 1500 records and if I sort
them all by last name, they will sort
| | 00:22 | alphabetically by last name.
| | 00:24 | However, in some cases if we isolate
some records here, if we go to Find and
| | 00:32 | type in this value, you will notice
that we actually have several records that
| | 00:35 | all share the same last name. So I
have sorted them by last name, but what
| | 00:39 | about if I want to sort them then
within the last name by first name as well
| | 00:43 | and you see in this case R, A, C, C, S,
J, that doesn't necessarily work. So
| | 00:48 | what you do in those cases is you
add multiple criterion into your sort.
| | 00:53 | So here we have last which will keep
last in the Sort Order window, because we
| | 00:58 | ultimately do want to sort by last,
but within the last name we then want to
| | 01:02 | sort by first. So there we just simply
add first name. Now the order in which
| | 01:08 | the Sort order fields are listed in
this window is very relevant here. For
| | 01:12 | example, it will sort by last name
first and then when it finds matches on last
| | 01:17 | name, it will then revert
to the first name search.
| | 01:20 | So as a keep adding criteria and you
can add as much criteria as you'd like,
| | 01:24 | but keep in mind that if you add ten
criteria the tenth criteria means that you
| | 01:29 | had nine matches prior to that. So
it's highly unlikely that you will end up
| | 01:33 | with the dataset like that, but in
some cases you may need it and it's
| | 01:36 | available there for you within
FileMaker, but let's take a look at how this
| | 01:39 | works, I will hit Sort and now you see
that it is sorted first by the last name
| | 01:45 | and then when it found matches on the
last name, it then sorts by the first
| | 01:49 | name as well.
| | 01:50 | So when you show all records and do
that sort again, now you can see that H, I,
| | 01:59 | I, I and then within the I it then
sorts by first name. So in the cases where
| | 02:03 | you need to sort within a sort group,
just use multiple criteria in your Sort dialog box.
| | Collapse this transcript |
| Sorting with custom values| 00:00 | Many times when you are looking at
records in List view, you want to sort them
| | 00:03 | so that you can see them in a certain
order. And as we looked at in previous
| | 00:06 | movies, you can see that you can add
single criteria or multiple criteria to
| | 00:13 | your sorts, much like I am doing here
and what you will notice in any case is
| | 00:19 | that depending on which fields you
choose, you can be either do them in
| | 00:23 | Ascending and Descending and all those
have different behaviors depending on
| | 00:26 | the field type. For example if it's a
number field, it will start at number 1
| | 00:30 | or 0 and go all the way up to
whatever the ending number is. If it's
| | 00:33 | alphabetical, it will start with A and
end with Z and if it's a date, it will
| | 00:36 | start with the earliest date and with
the later and so on and so on, same is
| | 00:39 | true for time and timestamps.
| | 00:41 | However, that might not always work
for the types of searches that you are
| | 00:44 | doing. So let's say for example, we
want to search on Type. Type is the field
| | 00:51 | that you see here in the far right hand
column and you see that these customers
| | 00:55 | can either be Silver or Bronze or
Tin even. In this case it might be some
| | 01:00 | classification that this
organization is using for all their customers.
| | 01:03 | Now as you see, they are sorted in the
order of the Bronze customer before the
| | 01:08 | Silver customers, but what if that's
not how the business rule works within
| | 01:11 | this organization. What if they'd
like to have Silver before Bronze or Tin
| | 01:15 | before Silver, everything out of
alphabetical or any other types of fields out
| | 01:19 | of chronological or numerical order?
Well FileMaker does allow you to sort by
| | 01:23 | custom values, if we take a look at
this Sort dialog, you will notice that we
| | 01:29 | have the ability to choose the field
and then when the field is selected we can
| | 01:34 | either choose to sort it in Ascending
order, Descending order or you see this
| | 01:37 | Custom order based on value list.
| | 01:40 | Now we will be covering value list
in later chapter, but if you are not
| | 01:44 | familiar with them, what a value list
is, it's something that you can define
| | 01:47 | inside your FileMaker database. That is
exactly what it sounds like, it's just
| | 01:50 | a list of values and it has various
different uses. But in this case what it
| | 01:54 | allows us to do, if we go into Manage >
Value Lists, you can see that I've got
| | 02:01 | a value with set up for Customer Type
and what this allows me to do is just
| | 02:05 | simply list the values in the
order that is meaningful to the users.
| | 02:09 | So in this case they want to see
their customers in this specific order,
| | 02:13 | meaning that Gold ones first, Silver,
Bronze and then Tin following that. So if
| | 02:18 | you look, we've now selected the Order
and you see it gives us a different icon
| | 02:22 | to the right and now I hit Sort and
I guess we will have to do something
| | 02:27 | similar here. Do what you like with
these and now you see that Gold is on top
| | 02:38 | followed by Silver, followed by Brown and so on.
| | 02:41 | You are not just constrained to using
your Ascending or Descending sort order
| | 02:47 | values when sorting records in
FileMaker, but instead you can use customer
| | 02:51 | values set up as a value list.
| | Collapse this transcript |
| Sorting with buttons| 00:00 | FileMaker Pro provides a special
interface for sorting your records and that
| | 00:04 | can be viewed by clicking on Sort icon.
But sometimes for your users, they may
| | 00:10 | not be as familiar with this Sort
dialog box as you are, so instead of
| | 00:14 | providing a great deal of training for
them so that they can view the records
| | 00:18 | in their desired format, what you
can do instead is allow them buttons on
| | 00:23 | screen, so they can sort on values
by just clicking on certain items.
| | 00:27 | The most logical way to do this is if
you are looking at a List view is to make
| | 00:30 | your column headers clickable. In the
case of Phone and Email, you see that I
| | 00:34 | have a little hand that shows up
which indicate that there is a script
| | 00:37 | attached. Let me show you how to do
that with the type, so that when users come
| | 00:42 | into this layout, they don't have to
click on Sort, pick the criteria and
| | 00:45 | execute the sort, instead they can just
click on the button and it will do the
| | 00:49 | sorting for them, so that's really easy
to do. If you are going to Layout mode,
| | 00:53 | when you are in Layout mode you can
click on anything which you see on screen
| | 00:59 | and that becomes a button in that case.
| | 01:02 | Of course you could draw a button, you
see that there is a button drawing tool
| | 01:07 | in your Layout tools and you could
draw one here and allow it to sort. But
| | 01:11 | since you already have these column
headers on screen, it's a good idea to use
| | 01:15 | those as your button, then you don't
have to clutter up your interface. So I
| | 01:17 | will select the Field label and when
that Field label is active I will go under
| | 01:21 | the Format > Button Setup menu and then
I can scroll down and what this does it
| | 01:28 | allows you to pick one action within
FileMaker and assign it to the clicking of
| | 01:31 | that button. So you will notice if
we scroll down, that we can find sort
| | 01:39 | records and if I click on Specify, it
will ask me how I want to sort these.
| | 01:44 | Now this will show the last sort that
you chose and you notice that the layout
| | 01:49 | isn't available to you anymore, because
inside this button or the script step,
| | 01:53 | it doesn't necessarily know where you
are going to be when you are executing
| | 01:55 | the Sort. So what we will do is we will
search for Customer and Type happens to
| | 02:02 | be on top, I will hit Move and we will
pick sort in a custom order and we will
| | 02:11 | hit OK. Now the other option that we
have here are whether or not we want to
| | 02:15 | perform without dialog and the whole
idea here is that we don't want them to
| | 02:18 | have to use the dialog, so we will yes,
we will perform without dialog then we hit OK.
| | 02:23 | And now when we go into Browse mode
and save our layout, now we see a little
| | 02:28 | hand cursor button pops up, but now
when the user clicks on the Column header,
| | 02:33 | it will sort based on the value that we
indicated in the button. So in addition
| | 02:38 | to having your users trained to use
the Sort dialog window, you can also make
| | 02:42 | any object that's on the layout, a
button that they can just simply click on
| | 02:46 | and then give them the desired sort order.
| | Collapse this transcript |
| Maintaining a record sort order| 00:00 | One of the new features in FileMaker
10 is the ability to maintain the sort
| | 00:05 | order of your record set. This isn't
so much a feature as it is the way that
| | 00:09 | FileMaker is handling things behind
the scenes but it actually provides a lot
| | 00:13 | more intuitive experience when working
with large sets of data and at the same
| | 00:17 | time something that your
users are going to appreciate.
| | 00:20 | Let's take a look at how we would sort
records. What I have done here is I have
| | 00:24 | attached buttons to the column headers
on each one of these columns here. So
| | 00:28 | for example, if I click on Customer
Name, you can see that it will sort by
| | 00:31 | customer names. If I click on SLP, it
will sort by the sales person that's
| | 00:39 | associated and Ordered, it will sort by date.
| | 00:42 | So if we look at the SLP, the
interesting thing here is that when you sort
| | 00:47 | something, the sort order is now saved
with the view that you are currently in,
| | 00:51 | as any one user. Now if you make a
change to a record on the database -- so for
| | 00:56 | example, now we have got a sort order
of salesperson. If I go in and choose a
| | 01:02 | different salesperson, let's say
Nicole, now when I commit this record, so
| | 01:06 | watch the 1184 record. I commit the
record and now you will notice that 1184 is
| | 01:12 | now gone and instead you will see it
listed in the other individual's record
| | 01:20 | over here with Nicole.
| | 01:21 | So we will try that again. You can see
that 1051, we will assign that to Linda
| | 01:27 | and then when we commit the record,
you notice that it automatically resorts.
| | 01:31 | So this is very handy because frankly,
the way that you did it in previous
| | 01:35 | versions of FileMaker, you would do
your found set and then you would sort it.
| | 01:38 | Any time you made any changes,
whatsoever, it would require that you resort in
| | 01:42 | order to be able to see
anything in the desired order.
| | 01:45 | Now also, I am going to open up a new
window here which will emulate what it
| | 01:53 | looks like on the network and you will
see that other users that are working in
| | 01:58 | FileMaker, when they do a different
sort than the one that I have got, it
| | 02:02 | doesn't affect my record. It's all
session based and of course, we don't want
| | 02:05 | it to affect the different records.
When a field is modified in another
| | 02:09 | machine, if you notice here, we have
got Home-to-Home Designs. We will go to
| | 02:15 | the top record here.
| | 02:17 | One interesting behavior is I will
pick this Erickson's Workshop and I will
| | 02:22 | change it to Nicole. Now just so that
you are prepared for this, notice that
| | 02:26 | when I change it, I haven't yet
committed the record but it already changed in
| | 02:30 | the other users found set. So I pick
Jeffery at the Peaceful Garden Spot and
| | 02:35 | you notice that it's gone now. Same
thing is true for this one. If we look at
| | 02:40 | House-to-Home Design Centers, it
automatically is removed from the list.
| | 02:45 | Just something that you want to it set
is an expectation but it's actually a
| | 02:48 | really cool feature. If users are
sorting by records, then when someone else
| | 02:53 | changes the values or even if they
change it themselves, it doesn't require
| | 02:56 | resorting, it just
automatically updates on screen.
| | 02:59 | So this is, kind of, a live or active
sort order. So now that FileMaker 10
| | 03:04 | maintains record sort orders, this
is going to take a lot of steps out of
| | 03:08 | having to maintain your own individual
sort order and keep resorting all your
| | 03:12 | records each time you make data changes.
| | Collapse this transcript |
|
|
13. Value ListsCreating static value lists| 00:00 | When you are working with entering
data in to a FileMaker database, you may
| | 00:04 | find that you are entering in some of
the same values all of the time in each
| | 00:07 | one of these records.
| | 00:09 | So for example, here there are only
so many seasons, so while users are
| | 00:13 | entering adventures into the database,
they are to having to type in all the
| | 00:16 | different seasons each time. One of
the ways that you can make this easier on
| | 00:20 | your users is by creating something
that's called a value list. A value list
| | 00:24 | can then be assigned to the field in
the form of a drop-down menu, for example.
| | 00:30 | So let's take a look at how you create
value lists in FileMaker. You go under
| | 00:34 | the File menu; you can see that next to
Manage we have manage Value Lists. This
| | 00:40 | is where all the lists that you
created are stored within FileMaker and then
| | 00:43 | you can go in and edit any of these,
if you need to. If you want to create a
| | 00:47 | new one, you hit the New button and
then give it some kind of logical name in
| | 00:51 | case you need to assign it to
a field in a different layout.
| | 00:55 | Let's say in this case, we will call
it Seasons and you have a few different
| | 00:58 | options but the one that we are going
to focus on right now is using custom
| | 01:01 | values. This is where you are building
a static list, which means that every
| | 01:04 | time a user invokes this list, they are
going to see the same values each time.
| | 01:08 | So in this case what we will do is we
will click in to this box and it's just a
| | 01:11 | text area. You will type each value in
and a Return to limit it list and hit
| | 01:21 | OK. Now you see that value list is
stored inside the file. Now it's available
| | 01:27 | to be assigned to the field.
| | 01:29 | Now in a later movie, we will be
talking about the Field Control Setup dialog
| | 01:33 | but just to show you how you can
assign the value list to the field, we just
| | 01:36 | quickly go into Layout mode and right-
click on the field, select Field/Control
| | 01:42 | > Setup and choose Drop-down List. Then
pick your Seasons drop-down, hit OK, go
| | 01:53 | back into Browse mode. Now what you
will see is that when your user clicks on
| | 01:57 | this field, they have some
predetermined values to choose from, which can save
| | 02:01 | them some typing; but the real benefit
here is that you can make the data that
| | 02:05 | users are entering in more uniform.
That becomes a big issue when you are doing
| | 02:09 | reporting or searching on certain data.
You want to make sure that some users
| | 02:13 | don't spell words in different ways than others.
| | 02:15 | By creating a value list, you can
provide them with options to choose from
| | 02:18 | rather than them having to figure out
what data to enter in. Static value lists
| | 02:22 | require manual entry of the items that
will appear in the value list, like we
| | 02:25 | have just done. You will want to use a
static value list, when the values, you
| | 02:29 | wish to present to users,
will change rarely or never.
| | Collapse this transcript |
| Creating a value list from a field| 00:00 | FileMaker Pro provides you a couple of
different ways to allow users drop-down
| | 00:05 | menus or even just lists in different
formats for them to choose from, when
| | 00:08 | entering data in to the system. For
example, you see on the Season field, when
| | 00:14 | a user clicks or tabs in to that
field, they are presented with various
| | 00:17 | different options for the season. This
makes data entry a little bit easier, so
| | 00:21 | that users are choosing rather than
having to enter in their own data. Then you
| | 00:25 | can provide more consistency
of data entry that way as well.
| | 00:28 | Here what we have done is we have set
up what's called a value list with some
| | 00:31 | static values in it, but sometimes you
want your value list to be more dynamic.
| | 00:36 | Dynamic value lists are created on the
fly and they can be based on data that's
| | 00:41 | already in a field. For example, in
this Adventure table, it has a field for
| | 00:45 | Country, as you see that I have
clicked in to here and this contains values
| | 00:49 | really of all the different
possible countries all over the world.
| | 00:53 | Now sometimes, you might run in to
problems, when you are trying to report on
| | 00:55 | the countries, if users have instead of
putting United States, they put USA, or
| | 00:59 | maybe they have spelled different
countries wrong. So this is a great example
| | 01:03 | of allowing them to pick from
previously entered values but still allow them to
| | 01:08 | enter in their own. That way you
can save some data entry issues.
| | 01:11 | So the way that we do that is we set
up a different type of value list. So we
| | 01:14 | go into File > Manage > Value Lists.
We are going to create a new value list
| | 01:20 | and we are going to call this one
Countries. Now we could just enter all the
| | 01:26 | different countries in the world in
to this custom value list. Probably not
| | 01:29 | realistic, but instead what we will do
is we will say Use values from a field.
| | 01:34 | This will give us a list of
previously entered values in the Country field.
| | 01:38 | Basically, what we are doing is we are
picking a field. So first we pick the
| | 01:40 | table and then we pick the field, real
simple and include all values. We hit OK
| | 01:47 | and we hit OK again. Now what it will
do is create a value list based on the
| | 01:54 | index of a field. It's important
that if you are pointing to a field to
| | 01:57 | populate your dynamic value list, you
have to make sure that it's indexed. So
| | 02:01 | inside your File > Manage > Database,
you scroll down to country. You can see
| | 02:07 | that this one is, in fact, indexed.
We also can see what the index is.
| | 02:11 | A little developer trick here. If
you will click in to the field and hit
| | 02:14 | Apple+I or Ctrl+I, you can see all of
the previously entered values. Now all
| | 02:20 | the duplicates are removed here. This
just gives us a non-duplicated indexed
| | 02:23 | list of all the different countries.
Since an index is created, we can borrow
| | 02:27 | that index and use it as a drop-down.
| | 02:29 | So we will assign that, right-click,
Field/Control > Setup, pick Drop-down List
| | 02:38 | and choose Countries. We hit OK and go
back in to Browse mode. Now you see that
| | 02:47 | users have the opportunity to pick a
previously entered value, rather than
| | 02:52 | having to figure out how to spell their own,
or to determine whether not it's US or USA.
| | 02:58 | So by formatting a field as drop-down
menu based on a dynamic value list, you
| | 03:02 | can still allow users to enter in new
values but at the same time allow them to
| | 03:07 | choose from previously entered values.
| | Collapse this transcript |
| Displaying second values and only second fields| 00:00 | When you are using a dynamic value
list in FileMaker, you have a couple of
| | 00:03 | different options for controlling the
appearance and the contents of the value
| | 00:07 | list itself. Let's take a
look at an example of this.
| | 00:10 | If you open up the Exercise File, Lucky_
You_Tours_13_03 and you navigate to the
| | 00:15 | Trip Detail layout, you will see that
we have no records in the database. What
| | 00:19 | we want to do here is create a new
record for the trip but we want to use a
| | 00:23 | value list to allow the user
to pick an Adventure or a Guide.
| | 00:27 | So in that case, let's first set up a
couple of value lists. We will go in to
| | 00:33 | Manage > Value Lists and we are
going to create a dynamic value list to
| | 00:38 | populate all of the different
adventures. So we will say values from a field,
| | 00:44 | pick adventure. Now here the key is that,
what needs to appear in the field is
| | 00:50 | actually the id of the adventure. We'll
talk more about the concept of ids and
| | 00:55 | how they relate to table relationships
in the relationship videos, but for now
| | 00:59 | understand that our goal is we want
to have the adventure id show up in the
| | 01:03 | this field and the guide id show
up in the field and we are done.
| | 01:07 | So that seems easy enough. We'll just
create a value list, go in to the value
| | 01:11 | list, select id and then hit OK. We
will call this one AdventureID. We hit OK
| | 01:20 | and we have one in there for Guide
already but let's go and attach this one to
| | 01:24 | the Adventure right here at the
Adventure Name. We will go in to Layout mode,
| | 01:30 | pick up the AdventureID field, right
-click on it, go in to Setup, pick
| | 01:36 | Drop-down Lists and choose AdventureID.
Simple enough. And we will go back in
| | 01:43 | to Browse mode, hit Save and let's
create a new record. We create a new record
| | 01:49 | and click inside this field.
| | 01:51 | However, all that shows up here are ids,
which is fine because what we want to
| | 01:55 | do ultimately is populate this field
as one of these ids, but what the main
| | 01:58 | problem is here is that when users look
at this list, they are not going to be
| | 02:02 | able to tell which id goes with which
adventure. So there's a way that we can
| | 02:06 | do this in the value list. You go in
to the Manage > Value Lists and choose
| | 02:12 | the AdventureID and we hit Edit, we
will select Specify field. Now you will
| | 02:19 | notice on the right hand side it says
Also display values from second field.
| | 02:23 | We are going to take advantage of that
opportunity and we are going to click
| | 02:26 | here and say instead of just the id,
show us also from the adventure table, the
| | 02:33 | name, the title of the description.
Let's go back and now take a look at how
| | 02:40 | this displays on screen. This is great.
So now we have the ids and we have the
| | 02:46 | names but you will notice here that
everything is in the order of the ids. So
| | 02:51 | it could be a little bit hard for
users just to scroll through this one. It
| | 02:55 | might be a little bit easy,
if they were alphabetical.
| | 02:57 | We can also control that through the
value list. So we go to Manage > Value
| | 03:01 | Lists, AdventureID and you will notice
down below here we can sort values using
| | 03:08 | the First or Second field. Let's pick
Second, hit OK and go back to the value
| | 03:15 | list, much better. Now we can look for
the values sorted by the second field,
| | 03:21 | displaying the second field but as
you see when we pick one of them, it
| | 03:25 | populates the field, as it
should, with the id only.
| | 03:29 | You will see that we have another
example of this already set up on the Guide.
| | 03:34 | When we look at that on in Browse mode,
we will see that it's doing something
| | 03:44 | similar. In this case, what it's
doing is it's only showing the name of the
| | 03:48 | Guide but it's populating the id. Well,
there is one extra step in that case.
| | 03:54 | If we go in to Value Lists and Guide,
you will see that it's set up with the id
| | 04:01 | as the primary field. This is the value
that will actually populate the field.
| | 04:06 | This is the one that the user will see
but you see here it says, Show values
| | 04:11 | only from second field. So even though
the id is never being displayed to the
| | 04:14 | user, it will still be populated.
| | 04:18 | The whole idea is to give the user the
drop-down menu with values that they can
| | 04:23 | make sense of. So when you are
creating value lists, you have the option of
| | 04:27 | displaying second fields and making a
lot easier for your users to make data
| | 04:31 | entry decisions.
| | Collapse this transcript |
| Setting up field controls| 00:00 | FileMaker Pro provides many tools in
Layout mode for configuring the behavior
| | 00:04 | of fields and the primary tool for
configuring these field options is called
| | 00:08 | the Field/Control Setup. If you go
into the Lucky_You_Tours 13_04 file and
| | 00:13 | navigate to the Trip:Detail layout,
in Layout mode you can see that we have
| | 00:19 | series of different fields on screen.
| | 00:22 | Now our objective here is that we
want to assign some previously configured
| | 00:26 | value lists to the field and as you may
have seen in some other movies in this
| | 00:30 | chapter I have been using the Field/
Control Setup dialog to do so, but we are
| | 00:35 | going little closer look at this dialog
and see what some of the different options are.
| | 00:39 | First I will choose one of the fields,
in this case the adventure_ID field and
| | 00:45 | there are a couple different ways we
can get to the Field/Control Setup dialog.
| | 00:48 | The most popular way is to right-click
on field itself when you are in Layout
| | 00:52 | mode and you can see the Field/Control
Setup dialog. However, if you are a Mac
| | 00:57 | user and you have the mouse without
the right-click, you can hold down your
| | 00:59 | Ctrl key and click and that's how
you can get to the contextual menu. But
| | 01:04 | otherwise the more traditional way is
to select the field, go under Format and
| | 01:08 | then you can see Field/Control and
navigate over to Setup. Or you can use the
| | 01:13 | quick keys for Option+Apple+F.
We'll select the Field/Control > Setup and
| | 01:19 | we get the Field/Control Setup dialog.
Now keep in mind what this is asking us
| | 01:22 | is for the options just for the
field that we have selected. This isn't
| | 01:26 | something that's layout based.
| | 01:28 | So for the adventure_ID field we have
some Style options and some other options
| | 01:34 | that I will review here in a moment.
But the first one that you will know is
| | 01:37 | that this is where we say what field
this is supposed to be. So when you first
| | 01:41 | place a field on a layout you get a
window that looks about the size of this
| | 01:45 | one here that asks you to pick the
table on the field that you want to place
| | 01:49 | and you can reassign a field
that's already on a layout.
| | 01:52 | So in this case I could switch this up
if I would like to and pick a different
| | 01:55 | field but we will just keep that as is.
Here you see under the Control Style
| | 01:59 | section, we have got some options to
display the values in certain ways and to
| | 02:04 | choose different options based on the
display selection. Here you see that this
| | 02:08 | field is already setup as
what's called a Drop-down List.
| | 02:11 | Now I am going to go through all the
different options that you see here but
| | 02:15 | you should know that the default is
an Edit Box. So a field when it's first
| | 02:19 | placed on a layout is just going to
be an Edit Box, which just simply means
| | 02:23 | it's a blank field that users will
just type right into. And then the options
| | 02:26 | that are below here are all the
different data entry value list options and the
| | 02:31 | one that selected here is the Drop-
down List. And after you choose the
| | 02:35 | Drop-down List and after you choose a
drop-down list, you will select what
| | 02:37 | value list you want to appear in
the drop-down. In this case we picked
| | 02:41 | AdventureID and then you have some
options when you choose a drop-down list of
| | 02:44 | including an arrow to show and
hide the list and then also the edit.
| | 02:48 | Let's take a quick look and see what
that looks like in Browse mode. So when I
| | 02:55 | click into this field you see that I
get this drop-down list and there is
| | 02:59 | another type of a list that we are
going to look at in a second that's called
| | 03:01 | the Pop-up menu but the Drop-down List
style allows the user to select an item
| | 03:05 | from a value list or manually enter the
value. So I can choose one these values
| | 03:11 | or I can click twice not necessarily
double-click but click twice and then just
| | 03:17 | type something in and it gives
me either one of those options.
| | 03:20 | So this is a good interface choice
when there is a large number of values to
| | 03:23 | choose from because users can then use
the arrow keys. If you click in here I
| | 03:28 | am now clicking on the arrow keys up
and down to allow them to type ahead or I
| | 03:34 | can type gal for example and than it
goes right to the Galapagos. So it gives
| | 03:39 | user some options on getting through
all the different choices off the keyboard
| | 03:43 | and then users can also click on Shift
and click multiple values too if your
| | 03:49 | business rules make sense
to allow them to do that.
| | 03:53 | You saw the option in Layout mode, if
we go back there, Field/Control > Setup, to
| | 04:01 | include the arrow to show and hide
the list. It's not a bad idea to do that
| | 04:04 | because sometimes users may not know
there is a drop-down menu there or you may
| | 04:09 | want them to be able to tab into it and
just have this as an optional drop-down
| | 04:14 | values. So in this case these are really
a suggestion. You can pick something from
| | 04:19 | the list if you would like or you
can just enter in your own value.
| | 04:22 | So you see when I click into the
field it does not drop the arrows down but
| | 04:25 | when I click on that it does. So this
is an option that really depends on the
| | 04:30 | business rule and in this case we will
leave it as an arrow. The most important
| | 04:35 | thing about the Drop-down List is that
it allows the user to either pick from
| | 04:38 | the value list or to manually enter a
value into the field, which is different
| | 04:43 | from the Pop-up menu. Let's pick the
Focus field and apply a pop-up menu. This
| | 04:48 | time I am going to right-click Field/
Control > Setup and as you see it's got in
| | 04:53 | this case the Display Option of Edit
Box which is the default and I am going to
| | 04:58 | choose Pop-up menu.
| | 04:59 | A field that presented as a pop-up
menu requires the user to make a selection
| | 05:03 | from a menu with the mouse. The menu
then takes up as much of the screen as it
| | 05:07 | needs so as you will see when we will
go there in a second it could be a very
| | 05:10 | long list and the user must pick one of
the values in the value list. There is
| | 05:14 | no option to bypass that and sometimes
if your lists are larger, it could be a
| | 05:19 | little bit clunky because it is
going to fill up the entire screen. And
| | 05:22 | although it is possible to Shift+Click
multiple items, the user can clear the
| | 05:25 | entry in the field by
pressing the Backspace key.
| | 05:27 | So even though you are making sure
that they pick something there are still
| | 05:30 | some ways that they can bypass out of it,
but why don't we take a look at what
| | 05:33 | that looks like? We will say focus, go
into Browse mode, save our changes. So
| | 05:40 | remember this is the value, the Drop-
down List, we can bypass and enter our own
| | 05:44 | value. Here is the focus; this one
requires that they pick one of the items in
| | 05:51 | the list, which has its own benefits.
Sometimes you want to present a dropdown
| | 05:56 | on screen because you want to make sure
that users are only picking the values
| | 05:59 | that you provided for them. This is a
very good way to maintain the integrity
| | 06:04 | of you data and keep all the data
that's been entered consistent especially
| | 06:07 | when it comes down to reporting
or doing Finds in your database.
| | 06:11 | So really when your making the choice
of picking a pop-up menu you are doing
| | 06:14 | that because you want the users to
only pick the values that you provided for
| | 06:18 | them. Now in somewhat of a
contradiction there, if you go back into the
| | 06:23 | Field/Control Setup dialog you will
notice that you could also put in other
| | 06:27 | option, which will allow the entry of
other values. In that case it doesn't
| | 06:32 | let them-- as you see it doesn't let
them click beyond the Drop-down List and
| | 06:38 | type something in it just says Other
and than up on screen will pop and then
| | 06:47 | this is the way that they
can bypass the dropdown.
| | 06:49 | So you really are not getting the
benefits of the Pop-up menu in this case. So
| | 06:53 | really the way that you should make
this decision is, should the user be picking
| | 06:57 | from your list no matter what? Or do
you want to give them the option to
| | 07:00 | bypass? That's how you choose
between Drop-down Lists and Pop-up menus.
| | 07:03 | Next back into Layout mode, let's
select the field called Ref on the bottom
| | 07:11 | and we will right click on that, go to
Field/Control Setup and we are going to
| | 07:15 | choose the next option which is a
Checkbox. Now you will notice that we are
| | 07:19 | choosing from existing value lists
and there were some other movies in this
| | 07:23 | chapter on creating value lists but you
should know that if you don't have one
| | 07:27 | in here already you can just click
down to the bottom and select the Manage
| | 07:30 | Value Lists option, you will be
able to add or modify your own.
| | 07:33 | But here we will pick Checkbox and
we are going to pick Referral and
| | 07:36 | checkboxes here is little bit different.
You will be able to see what this looks
| | 07:40 | like in Layout mode already. This
style presents the value list as a set of
| | 07:44 | checkboxes that the user can toggle
either on or off. The selected items are than
| | 07:48 | stored as a return delimited list in
the order in which they were selected,
| | 07:52 | which could be useful at some point for
you. But the real reason that most pick
| | 07:57 | checkboxes is because unlike these
other options where I can pick one of the
| | 08:02 | values in a Drop-down List and one of
the values in a Pop-up List here I can
| | 08:09 | pick multiple values or even
all of them for that matter.
| | 08:14 | So these options are not mutually
exclusive. So if you want to provide your
| | 08:18 | users options for entering more than
one piece of data into the field and
| | 08:22 | whether it will be stored in other
areas if you don't have a checkbox assigned
| | 08:25 | to it, it will look like a return
delimited list of these values and if you
| | 08:28 | want to do so than in those
cases than you will use a checkbox.
| | 08:32 | We go back into Layout mode and select
the Previous field, right-click on it
| | 08:38 | and go into Field/Control Setup. We
are going to choose the last item of the
| | 08:44 | four here, we are going to choose Radio
Button Set and I am going to choose Yes
| | 08:49 | and No as the value list. So if we hit
OK we can see what this looks like in
| | 08:54 | Layout mode and this is similar to
the checkboxes except these are usually
| | 08:59 | intended to be mutually exclusive options.
| | 09:01 | So unlike in the checkbox where you pick
this because you want users to be able
| | 09:04 | to choose potentially multiple options,
here you just want to choose one or the
| | 09:08 | other. So we go into Browse mode we can
see how that works. See it's either Yes
| | 09:13 | or No. As one them as selected the
other one is not selected. So the radio
| | 09:17 | buttons are intended to be mutually
exclusive and the checkboxes are meant to
| | 09:22 | provide more than one option.
| | 09:23 | And than finally we go into Layout mode
and select the Embark field and then go
| | 09:30 | to Field/Control > Setup. You see that
it has got a style assigned to it that's
| | 09:34 | called Drop-down Calendar and the Drop-
down Calendar when you view it in Browse
| | 09:38 | mode allows users to enter a date
into a field using a small drop-down
| | 09:42 | calendar. And this is something that
users are generally more familiar with
| | 09:46 | from websites, I think airline websites
use this quite a bit, and it was a very
| | 09:50 | popular feature when it was introduced
into FileMaker and what's nice is it cuts
| | 09:54 | down on errors a lot because your
people don't have to think OK what's the date
| | 09:58 | next Friday, that type of thing. So
here they can pick any date that they want
| | 10:02 | and you see it shows up automatically
in the field. Now the option that you
| | 10:06 | have to choose from there, similar to
the Drop-down List, is whether or not you
| | 10:12 | want to add the icon to
show and hide the calendar.
| | 10:15 | So in that case if you do that, just
like we did in the AdventureID with the
| | 10:19 | Drop-down List, once a user clicks or
tabs into it, it automatically shows the
| | 10:24 | calendar. With the selection on they
will have to hit on the icon itself in
| | 10:29 | order to show it. So it depends or
whether or not you want to show it each time
| | 10:32 | the user enters the field or make it
optional. And this will allow for faster
| | 10:36 | data entry by users.
| | 10:38 | So all of those options can be accessed
via the Field/Control Setup dialog and
| | 10:43 | there are really two primary benefits
for formatting fields in any one of these
| | 10:46 | options. The first is to allow for
faster data entry by users, like you see in
| | 10:50 | the case of the calendar or even some
of the drop-down menus, and then second
| | 10:53 | it leads to greater accuracy because
any time a user manually enters data
| | 10:57 | into a field, you could run the
risk of misspelling or some kind of
| | 11:00 | inconsistent entry. Providing a list
of values to choose from in any of these
| | 11:04 | options will go a long way
toward ensuring consistent data entry.
| | Collapse this transcript |
|
|
14. Printing and SavingPreviewing pages and print options| 00:00 | One of the benefits of FileMaker is
that you can print any layout that you can
| | 00:05 | view on screen. So you don't have to
print special print layouts, but there are
| | 00:09 | some ways to approach that that
can help you get better results.
| | 00:12 | If you use the tools that FileMaker
gives you to visualize what your layouts
| | 00:15 | will look like, then you can make all
your layouts look like print layouts. And
| | 00:19 | the main tool is Preview mode, I will
show you Preview mode in just a second,
| | 00:23 | but the first step that you want to
take is going into Layout mode and when in
| | 00:28 | Layout mode what I wanted to bring
your attention to is this line right here,
| | 00:32 | you see a line there and you also see a
line here. These lines are what a page
| | 00:38 | edge looks like in Layout mode and the
idea is that they are there so that you
| | 00:42 | can develop around them.
| | 00:44 | If I were to print this, it would cut
off my photo field and therefore I might
| | 00:48 | want to make the photo fields fit
inside this line. It's also important,
| | 00:52 | though, to look at where these lines
come from. These lines are coming from the
| | 00:55 | print driver that I have selected on
my computer. This size might fluctuate a
| | 01:00 | little bit. Generally, you can get an
idea where things may print and where
| | 01:03 | they won't print, because they are
all kind of based on 8.5X11 for the most
| | 01:07 | part, it serves as a good guide as a result.
| | 01:10 | In Browse mode when you want to see
what something is going to look like
| | 01:13 | printed, you see this button here
called Preview. Preview is meant to show you
| | 01:18 | what your report will like when it
prints out in the printer. This is another
| | 01:22 | good way to take a look at what will
get cut off. So we see here that we want
| | 01:25 | to go in and make the header a little
bit smaller and move the photo field over
| | 01:30 | and possibly make it a little bit smaller.
| | 01:32 | And that is the role of Preview mode.
So between Preview mode and Layout mode
| | 01:37 | using the print guides, you can use
these FileMaker tools to take all the
| | 01:42 | guesswork out of the way that your
layouts will look when they print.
| | Collapse this transcript |
| Printing from List view| 00:00 | When printing in FileMaker you really
have two different options for how you
| | 00:04 | are going to print your data. You can
either print it as one record at a time
| | 00:07 | or you can print it multiple records at a time.
| | 00:10 | The most common way to print multiple
records at one time is through a List
| | 00:13 | view. That way you get more records on
screen and it makes for more efficient
| | 00:17 | printing. There are a couple of ways
that you can maximize the amount of data
| | 00:20 | that you get in your printouts. The
first of which is in the layout itself. If
| | 00:24 | you go to the layout, you will
notice that the height of the body style
| | 00:28 | matters. A good rule of thumb is to
make sure that the size of the body part,
| | 00:33 | which is indicated here for total
height, you see it's 25 pixels, it's a good
| | 00:37 | idea to have that be just a smidge
above the height of the field. Because,
| | 00:42 | otherwise for example, if we go back in
the Browse mode here and we hit Preview
| | 00:48 | mode, if we scroll all the way to the
end, this will tell us that it will take
| | 00:50 | 5 pages to print all of the
records in my current found set.
| | 00:56 | If you go on to the Layout mode and you
see by just having the body be in this
| | 01:00 | case, just about 15 to 20 pixels
higher and we go in the browse mode after
| | 01:05 | saving, you see now we go into the
Preview mode, scroll all the way to the end,
| | 01:10 | it's eight pages long. So making some
logical reasonable decisions when it
| | 01:14 | comes to the height of the body part
and to change it, you can go in here
| | 01:19 | select the current value, hit 25 and
now you will see it will shrink that down
| | 01:24 | appropriately. Then when we go in the
Browse mode, now you see that we have got
| | 01:28 | everything fit on here in an efficient
manner. And then also you can control
| | 01:33 | what prints on screen, you don't always
have to print every record in your database.
| | 01:38 | So keep in mind that anytime you
print multiple records, it's only going to
| | 01:42 | print the amount of records in a found
set. So at any given time if you just
| | 01:45 | hit Show All and you see Show All is
grayed out here. That means at all our 115
| | 01:49 | records that are stored in this table
are currently visible. But maybe we don't
| | 01:53 | need to print all of those, so if I
right click on one of these items and let's
| | 01:58 | say just go Find Matching Records, now
I have lowered it down to just a seven.
| | 02:03 | So when printing in List view, make
sure that you've made the most efficient
| | 02:06 | layouts and that you are only printing
the records that you need to and this
| | 02:09 | can help you generate
precise and efficient outputs.
| | Collapse this transcript |
| Printing from Detail view| 00:00 | When you are printing records in
FileMaker, you really have the choice between
| | 00:04 | printing multiple records at a
time or just printing one record. And
| | 00:08 | traditionally if you are going to just
print one record, you probably want to
| | 00:10 | create a form view or a detail view.
| | 00:14 | So in these cases you are going to want
to create a layout. If you go under the
| | 00:17 | View menu, it has a View as a Form. If
you go into Layout mode, you will see
| | 00:23 | that the body is a much larger size than,
for example, if you were in the List
| | 00:28 | where the body size here is only about
43 pixels high, in the Adventure Detail
| | 00:34 | the body size is large enough to fit
all of the fields that are relevant to the
| | 00:39 | Adventure Detail, which is the
table that this layout is based off of.
| | 00:43 | And the idea though is that if you go
into Browse mode and switch your View
| | 00:49 | option from Form to List, it will
print one record of this size for every
| | 00:55 | record in your found set, which you
might not want to do. So the way that you
| | 00:58 | can get this to gray out so that your
users can't make this change is to go
| | 01:02 | into Layout mode, then go to Manage >
Layouts, select Adventure Detail and
| | 01:07 | Layout Setup.
| | 01:08 | Under the Views tab you can choose
whether or not a view can be a Form View or
| | 01:12 | a List View. So if you have a view
that's intended to show multiple records,
| | 01:16 | make that only a List View and one
that's intended to only show one record at a
| | 01:19 | time. Make that only a Form View and
then also you will need to be aware of
| | 01:25 | what this is going to look
like when you print it out.
| | 01:28 | So here you see that we have got a view
that was setup for data entry purposes,
| | 01:32 | but unfortunately it's not optimized
for printing, because it would get cut
| | 01:36 | off. So although FileMaker certainly
has strength in allowing you to print
| | 01:40 | whatever layout you can see on screen,
don't feel like you need to do that. You
| | 01:44 | can setup a print screen for just
printing one record at a time like the one
| | 01:49 | that we have here in Adventure Sales
Detail. In this case when we go into
| | 01:53 | Layout mode, we've got only the
information that we want to print on screen and
| | 01:58 | by using the print driver guides we can
make adjustment to make sure everything
| | 02:03 | fits within these parameters on screen.
| | 02:06 | So keep in mind when you are printing
one record at a time that it's okay to
| | 02:09 | create a print layout and in that case
you can have more control over some of
| | 02:14 | the items that will print as you
are outputting your one record.
| | Collapse this transcript |
| Sliding objects| 00:00 | When you are considering allowing your
users to be able to print off layouts
| | 00:04 | that you have created in FileMaker,
there's a couple of things that you might
| | 00:06 | want to take into consideration.
First off, you know that you can print any
| | 00:10 | layout that you can see on screen.
| | 00:12 | Now the issue with that, as we will
see in Layout mode, is that not every
| | 00:16 | layout is print ready. As you see here,
we've got the print margins that cut
| | 00:19 | right through my photo field and right
through about one-third of the header.
| | 00:24 | So this might not be the best view
to print. You shouldn't shy away from
| | 00:28 | creating your own layouts that's
specifically made for printing. As you can see
| | 00:32 | we have got one in here that's called
Adventure Sales Detail and this is a
| | 00:36 | layout where I have decided to
include only the fields that I want to see.
| | 00:40 | Let's say in this case I want to
create a tear sheet that I can use to print
| | 00:43 | one offs for a chosen adventure and
this will print one tear sheet per adventure.
| | 00:49 | Now I have decided I want to have the
description and press quote, photo and
| | 00:53 | price fields on this layout. And I can
see when I go back into Browse mode, I
| | 00:57 | can get an idea of what these are
going to look like printed out. So I say
| | 01:00 | Preview and I cycle through the
different records and this all look great now.
| | 01:05 | The one thing is though that
although my footer looks good and the space
| | 01:09 | between the footer and the price
looks good, what are we noticing here on
| | 01:13 | screen, what we are seeing, tons of
white space in most of these records and
| | 01:18 | the reason for that is because we had
to size the field for the description, so
| | 01:24 | they could accommodate large
descriptions like this one. So if we go into the
| | 01:28 | Layout mode and look at
this a little bit closer.
| | 01:30 | This is about the size that we
needed in order to accommodate some of the
| | 01:33 | larger descriptions and one of the
ways that you can look at what the size
| | 01:37 | might need to be is when you are in
Layout mode, if you go to Layout > Show
| | 01:42 | Sample Data, here it shows the data
from the record that we had that was active
| | 01:47 | and this is great in fields like this,
for example, where you want to make sure
| | 01:50 | you can fit four digits with two
decimal places and a dollar sign. But here if
| | 01:53 | we sized out the field just for
that record, it gives us some kind of
| | 01:58 | unattractive white space.
| | 01:59 | There is a way that you can control
this when you are in Layout mode. You go
| | 02:02 | into Layout mode and I am holding
down the Shift key so I can do multiple
| | 02:06 | selections here, but I will select
Label and the field for Price, the Photo
| | 02:11 | field, the Quote field
and the Description field.
| | 02:15 | While I have all those selected, I am
going to go to Format and set Sliding
| | 02:20 | Printing. This is an option that
allows you to either shift items to the left
| | 02:25 | or shift items up, so that the layout
object will only size itself as large as
| | 02:29 | it needs to in order to fit the data.
Now in this case the layout size that we
| | 02:35 | have put on the field, that's going to
be the maximum size so it won't slide
| | 02:41 | more and make it larger, so the idea
here is that I can make this description
| | 02:44 | field as large as I need to, to
accommodate some of the descriptions that have
| | 02:49 | a lot of data in them. But what we
wanted to do is slide up when there isn't a
| | 02:53 | lot of data in that field.
| | 02:54 | So what we will do when have all these
items selected, because we want them to
| | 02:57 | all slide up in these cases. As we
select Sliding Up, our options there are
| | 03:02 | Only directly above and All above.
And you see there are some diagrams that
| | 03:07 | indicate this. So here is the item
that would slide. Do you wanted to stop
| | 03:10 | sliding when it reaches the next piece
of text data? So this means if I had one
| | 03:14 | field to the left and one field to the
right, do I want this piece to slide to
| | 03:18 | the bottom most field on the
layout, or the one directly above it.
| | 03:22 | So in this case we've only got all
fields above it, so we'll just do All above.
| | 03:27 | You will also see there is an option
for reducing the size of the enclosed
| | 03:30 | part. I have a body part that's created
to accommodate all these fields. So one
| | 03:35 | of the decisions I can make is if I am
going to shrink up the white space, do I
| | 03:39 | want the rest of the body part to
shrink up as well? In this case we've got a
| | 03:43 | footer that we want to print out at a
specific 8.5X11 size, so we will say no
| | 03:49 | on that. But if I hit OK and go into
Preview mode, after saving, here is the
| | 03:57 | record that we originally created and
you can see that this has got the footer
| | 04:01 | printing out as one page tear sheet.
| | 04:03 | Now as we go from record to record,
you see that now everything will slide up
| | 04:07 | to make it look nice and clean just
below the description and dynamically
| | 04:13 | adjusting itself as you go from
record to record. This is called Sliding
| | 04:16 | Objects. Use this tool if you want to
control white space on outputs from your
| | 04:21 | FileMaker system so that you can
create cleaner and more professional looking
| | 04:25 | reports and printouts.
| | Collapse this transcript |
| Printing merge letters| 00:00 | One very popular request from FileMaker
users is the ability to print letters.
| | 00:05 | And much like other applications like
Word for example FileMaker supports Merge
| | 00:10 | Fields. Navigate over to the
Confirmation Letter layout. I'll show you an
| | 00:14 | example of how this technique works.
| | 00:17 | First you'll need to go into Layout
mode, let's first look at what it might
| | 00:20 | look like if we drop fields into the
layout like we do with all the other
| | 00:23 | layouts. Here we have the Field tool
and let's say I drag the first name over
| | 00:31 | to where I have placed text on the
layout. You'll notice I can line-up the text
| | 00:36 | which I have just drawn with my
Text tool by simply typing in Dear, for
| | 00:41 | example, and I will delete
that by hitting the Delete key.
| | 00:45 | In order to line the text up with the
field, it might not be too difficult, we
| | 00:49 | could probably align these, but the
problem is when we want to use information
| | 00:53 | in line with the text, like for example
here, Thank you for choosing the insert
| | 00:57 | name of package here, what if that is
a half a sentence long, we would need
| | 01:02 | this information to wrap, now if it
was all text it would wrap but if it's
| | 01:05 | fields, it would not.
| | 01:07 | So what we want to use instead of
inserting a field would be inserting a Merge
| | 01:12 | Field. I am going to go ahead and
delete this field here and I am going to
| | 01:17 | click inside the text area that I
have created. So I have got Dear and then
| | 01:21 | space and now here's how you add a
Merge Field in the FileMaker layout. Go
| | 01:26 | under the Insert menu and at the very
bottom you see Merge Field, you can also
| | 01:31 | do Ctrl+Option+M and that will insert
a field as well. And in either case it
| | 01:38 | will pop up Specify Field dialog.
| | 01:40 | This is the window that allows you to
choose which field you want to insert and
| | 01:44 | here we are going to choose the first
name field and hit OK. And now if you
| | 01:49 | look on your layout what it's done
is it's inserted in a Merge Field, but
| | 01:53 | what's interesting about this is that
it's actually just another piece of text.
| | 01:58 | However, it's different than the text
because you'll see when we go into Browse
| | 02:02 | mode and Save.
| | 02:05 | As you cycle through each record, it's
dynamically placing in the first name
| | 02:10 | value from the record that you are at
the time. But since its text, we can go
| | 02:14 | in Layout mode and we can tighten this
up a little bit. So for example I can
| | 02:20 | make a space then the colon and I can
make just one single space from Dear. And
| | 02:27 | down here we will want to include
another Merge Field, Insert > Merge Field and
| | 02:34 | let's pick booking, how about the
adventure, we'll do adventure name.
| | 02:41 | Now in this case you'll notice
something different. What I have done here is I
| | 02:45 | have inserted the Merge Field for the
adventure title and I am going to tighten
| | 02:49 | up the spacing just a tad. But what
you'll notice is because it's text and
| | 02:54 | because it's text on the layout I can
apply text formatting to it. So in this
| | 02:58 | what I have done is gone in and
made this bold and italic as well.
| | 03:04 | So the same thing I can do with any
kind of text on screen I can do with the
| | 03:08 | Merge Field. Take a look at what both
of these will look like in Browse mode.
| | 03:12 | So now that you see as I cycle
through each one of these, I get a wrapping
| | 03:16 | effect. If this was actually two
lines worth of text it would wrap around,
| | 03:21 | because it's inside a layout
as text rather than a field.
| | 03:25 | So it's a good idea when you are
creating letter layouts that you always use
| | 03:29 | Merge Fields.
| | Collapse this transcript |
| Saving as a PDF| 00:00 | FileMaker allows you to output certain
layouts that you've created, either as
| | 00:05 | hard copies through printing, but
also as a PDF or an Excel, in this movie
| | 00:10 | we're going to talk about outputting
your layouts as a PDF document. And it's
| | 00:14 | actually quite easy to do. You'll just
navigate to layout that you want to use
| | 00:18 | to create a PDF. In this case we're
going to go to Adventure Sales Detail and
| | 00:24 | when you get to that layout, go to
the File menu and select the Save/Send
| | 00:29 | Records As and in this case choose the
PDF option, where you will choose a name
| | 00:35 | for your PDF file and the location
where you want to save it, in this to the Desktop.
| | 00:41 | But if you look down below you see
that you've got some other options. The
| | 00:45 | option is which records in the current
found set do you want to print. You see
| | 00:49 | here in the upper left-hand corner that
we've got 44 records in our found set,
| | 00:53 | so you'll need to determine whether or
not you want to print one PDF per each
| | 00:57 | of the 44 records, thus 44 total pages
as one PDF document, or if you just want
| | 01:02 | to print the record that's currently
being browsed. In this case, we'll say
| | 01:06 | Current record.
| | 01:07 | The one kind of interesting option
that you have here is you can choose Blank
| | 01:10 | record. Blank record is useful if
you've got a layout that has form on it and
| | 01:15 | you don't want to have any record data
inside the form, so you could use it to
| | 01:18 | printout and distribute or give to
users to fill out by hand so that you can
| | 01:22 | use it to transcribe into your
database. But we're going to choose Current
| | 01:26 | record. And then when you hit the
Options button to the right, you'll see that
| | 01:30 | we have PDF Options and if you are
familiar with creating PDF documents you'll
| | 01:34 | see that these are the actual PDF options.
| | 01:36 | This isn't like creating a PDF in your
Mac OS print dialog, this is actually
| | 01:41 | generating a real Adobe PDF document
which gives you options for putting in the
| | 01:46 | title, subject, author, keywords and so
on, choose your compatibility options.
| | 01:51 | And you can also require a password for
a file and even the initial view in the
| | 01:56 | different page layout option. So all
that same stuff which you do when you are
| | 01:59 | creating a real PDF. After you're
saving it, you can include Automatically open
| | 02:04 | this in the application.
| | 02:06 | And also this is a neat feature; you
can create an email with this file as
| | 02:09 | attachment. So if somebody has
contacted you and said, hey, can you send me a
| | 02:12 | PDF of the Kilimanjaro trip via email?
You can save yourself a step by checking
| | 02:18 | the Create email with file as
attachment; it will automatically author new
| | 02:21 | email. You can then put in the address
and type a message, but this file will
| | 02:25 | already be attached.
| | 02:26 | So in this case let's take a look at
what the PDF looks like. We'll hit Save
| | 02:31 | and now you see it's created a PDF of
the one record that we've chosen in our
| | 02:37 | found set. So keep in mind when you are
deciding on how to output records from
| | 02:41 | FileMaker that you can print them as a
hard copy, but you can also save them as a PDF.
| | Collapse this transcript |
| Saving as an Excel file| 00:00 | FileMaker Pro provides various
different ways that you can share information
| | 00:04 | that you store in your FileMaker
database. You can export data and you can
| | 00:09 | print hard copied of data and then you
can save layouts in your database as PDF
| | 00:14 | forms. Also as we'll be discussing in
this movie you can export data out as an
| | 00:20 | Excel file. And this is a great
option for if you want to share data that's
| | 00:24 | stored in your FileMaker database with
someone who doesn't have access to the
| | 00:27 | database. However, it's not intended
to be an alternative to the data in your
| | 00:31 | database. You shouldn't create
an Excel spreadsheet and then make
| | 00:34 | modifications. Then you'll just
end up with version control problems.
| | 00:38 | But if in fact somebody contacts you,
let's say it's an accounting person and
| | 00:42 | they want some information that's
stored in FileMaker, this is an excellent
| | 00:45 | tool for being able to share the
data and it's really easy to do too.
| | 00:49 | The first thing that you'll do is
identify a layout in your FileMaker database
| | 00:54 | that has all the fields on it that you
want to export. And if you don't have a
| | 00:58 | layout in your FileMaker database
that has all those fields you can just
| | 01:01 | quickly create one on the fly, or you
can create one that has more than enough
| | 01:05 | fields, by the time you get into
Excel you can delete all those columns out
| | 01:08 | that you don't need.
| | 01:10 | This is very simple to do. You'll just
go to the layout, go under the File menu
| | 01:15 | and so Save/Send Records As and then
choose the Excel option. You pick a
| | 01:20 | location for the file that you'll be
saving and you'll notice that something
| | 01:24 | new here in FileMaker 10. You can
either save it as an .xls, which is an Excel
| | 01:30 | 95-2000 Workbook, or now in FileMaker
10 you can save it in the new Excel file
| | 01:36 | format, which is the .xlsx. And then
you choose whether or not you want all the
| | 01:42 | records that you are viewing in your
found set, in this case it's all the
| | 01:45 | records in the database, to total 115
records, or you can just say the Current record.
| | 01:50 | We'll keep it as records being browsed
and you'll notice that you have a few
| | 01:53 | options, you can name the worksheet,
title it, give it a subject and an author
| | 01:58 | and you can choose whether or not the
file will automatically open up in Excel
| | 02:02 | after you've saved it. And also this is
a handy little feature; you can create
| | 02:07 | an email with this file as an
attachment. So if someone calls you up on the
| | 02:10 | phone and says, can you send me all the
customer information for such and such
| | 02:13 | and such and such? You can do a found
set, find the right location, do File >
| | 02:18 | Save As Excel and then check on the
Create email with file as attachment and
| | 02:23 | FileMaker will produce the Excel file
and then attach it to an email and open
| | 02:26 | it up in your default email
application. But let's take a look at what the
| | 02:30 | Excel Spreadsheet looks like.
| | 02:31 | And you see what FileMaker does, it
will give you the bold headings and these
| | 02:36 | are the field names inside your
FileMaker database and it puts all of the data.
| | 02:41 | If you recall we had five columns in
our FileMaker layout and so you see here
| | 02:46 | we've got start, end, first name,
last name of the guide and these are even
| | 02:49 | related fields that are showing up here.
| | 02:51 | So a really great tool for FileMaker,
for sharing information on the fly is the
| | 02:56 | Save As Excel feature, which allows
you to save out in formats that can be
| | 03:01 | share by those that may
not have access to FileMaker.
| | Collapse this transcript |
|
|
15. Reports Creating subsummary reports| 00:00 | One of the most powerful and useful
capabilities of FileMaker Pro is its
| | 00:04 | capacity to group and summarize data in
a report format. This allows you to do
| | 00:08 | things like aggregate, organize, or
otherwise just manipulate data that users
| | 00:13 | have already entered in to your system
into reports and outputs that give you
| | 00:16 | visibility into data that you won't normally have.
| | 00:19 | And the most powerful type of report in
FileMaker is something that's called a
| | 00:23 | Sub-summary report. At its essence, a
Sub-Summary report is a way to present a
| | 00:28 | list of data that's grouped by a
certain variable. Let me give you an example
| | 00:32 | of that based on a List View.
| | 00:34 | If you look at this list view, this
is a order_list layout and what we are
| | 00:39 | looking at here is a bunch of
information that's been entered in by the users
| | 00:43 | of this database system and it's just
one order from a customer to the tune of
| | 00:47 | about 151 different orders.
| | 00:50 | Now this is great, this information
looks just like it does when the user is
| | 00:52 | entered it into the system. But with
one simple change we can turn a list view
| | 00:57 | into a report. Now this isn't going to
be Sub-Summary report but I am going to
| | 01:00 | show you sort of the evolution of a
Sub-Summary report starting from a list view.
| | 01:04 | You go into a Layout mode, you notice
that we have a Footer here and I can
| | 01:09 | insert one type of field that can turn
this list view into a report by simply
| | 01:13 | giving the information that no user
had entered into the database anywhere.
| | 01:17 | A field that showing this information
that's been aggregated rather than input
| | 01:21 | into the database.
| | 01:22 | You grab your Field tool and drag
down to the Footer and choose the
| | 01:27 | TotalSummary field and we'll open this
up a little bit and this is a currency
| | 01:33 | so we will go to Format > Number and
we are going to Format as decimal,
| | 01:37 | Currency and we'll hit OK and
let's look this in Browse mode now.
| | 01:42 | Now you see that one simple addition
has allowed us to take what was normally a
| | 01:45 | list view and see that now it's
actually sort of a light sales report. You see
| | 01:49 | that it gives us total of all the
different orders that we see here and this
| | 01:53 | total is based on the Found Set. And we
could see that this value is Found Set
| | 01:58 | specific because if we go into Find
mode and click into the Customer and search
| | 02:04 | for Erickson's Water shop
we see that value changes.
| | 02:07 | So what this is called is the
summary field and it gives us a value that
| | 02:10 | aggregates our accounts across a Found
Set of records. Now, this is part of the
| | 02:16 | logic behind building a Sub-Summary report.
| | 02:19 | What we'll have to take a look at are
the layout parts that make it happened.
| | 02:22 | If you go into Layout mode again,
you'll see that what we have here is a Header
| | 02:26 | part, a Body part and a Footer part.
We've talked about these in previous
| | 02:30 | movies and I am going to
introduce you to some new parts.
| | 02:33 | If you go into Layouts > Part Setup
you'll see that we are going to add a
| | 02:38 | couple here. So first if you hit the
Create button, you'll see that you got
| | 02:41 | several different options here. I like
to discuss briefly what these options are.
| | 02:45 | In general, the summary layouts parts,
which you see here in between the header
| | 02:49 | and the footer, these summary parts
have a certain behavior. What they will do is
| | 02:53 | help you group data based on the
certain break field that you introduce.
| | 02:57 | I'll talk to you a little bit more
about those as we get to it.
| | 03:00 | So first let me introduce you to the Sub
-Summary part. This is the backbone of
| | 03:04 | any grouped report. So if we select
Sub-Summary when sorted by, what this
| | 03:10 | language is indicating is it wants to
know how we want to group our reports. So
| | 03:14 | you see that we've got a list view and
our objective here would be instead of
| | 03:18 | just having one large list view,
instead what we'll have is a list of orders
| | 03:22 | with grouped by customer. And that way
each customer can have its own subtotal
| | 03:27 | and at the end we can have a total that
covers all of the different customers.
| | 03:30 | So what it's asking us here is what
you want to group by? So Sub-Summary when
| | 03:34 | sorted by asks us to select the name of
the field. Then you see here we've got
| | 03:39 | a field name that is related and in
this example you go to order_Customer.
| | 03:45 | That's where we will find the
CustomerName field, which is the field that we
| | 03:48 | have on the layout. If you ever need
to know what your break field is just go
| | 03:51 | onto your layout, double-click on it and
you can see what field you need to use.
| | 03:54 | Now, when we hit OK, it's going to ask
us a question, do you want to print this
| | 03:58 | grouping part above or below the fields
or the groups? In this example, we are
| | 04:04 | going to say Print Above, because it's
going to summarize the customer name and
| | 04:09 | have that part above the body,
which lists all the details.
| | 04:12 | So we say Print Above and you see
in the Part Setup that we now have a
| | 04:16 | Sub-Summary part. So I'll hit Done.
Let's take a quick glance of what this
| | 04:20 | looks like. Right now it looks exactly
like the layout that we had before and
| | 04:24 | that's important to note because there
is a couple of triggers that turn this
| | 04:28 | into a Grouped Report.
| | 04:29 | What you want to do next though is go
in and put a field value somewhere in
| | 04:34 | your Sub-Summary part. Here is the Sub-
Summary part. If you click on it, you
| | 04:37 | see it right there and it's pointing
to your break field. So what you want to
| | 04:41 | do is take your break field, select it
and then move it up into the Sub-Summary
| | 04:46 | part and it's also not a bad idea to
group all the detail information in the
| | 04:52 | same location here.
| | 04:54 | So now let's go back into Browse mode
and hit Save. And you see now that all
| | 04:59 | that really changes that the customer
name is no longer on there. Now the way
| | 05:02 | that we invoke the grouping is by
sorting by the break fields. It is a little
| | 05:09 | unorthodox but that is the trigger or
the on switch to our Grouped Report.
| | 05:13 | So if we go into Sort and we select the
order_Customer, select CustomerName and
| | 05:21 | now we sort this information. Now
suddenly on screen what we see is a grouped
| | 05:26 | report. We went from a
list view to a Grouped Report.
| | 05:29 | You see we have a break every time a
new customer's grouping starts and so what
| | 05:34 | you have inside of a Sub-Summary report
are little mini Found Sets. So you have
| | 05:38 | your entire found set of a 151 total
orders, but what it does at each group is
| | 05:43 | create a Found Set for
each one of the customers.
| | 05:47 | Now we talked earlier about the role
of the summary field and what it does is
| | 05:51 | it aggregates across a Found Set. So
you see here at the bottom of the report,
| | 05:55 | it's giving us information on all 151 orders.
| | 05:58 | If we go into Layout mode and first
do a little formatting on that with
| | 06:03 | thousands separator and move it over to
the edge. By taking this summary field
| | 06:11 | that already exits and copying it and
pasting it to the layout parts, also as
| | 06:18 | you saw you could see that the
grouping started because the CustomerName is
| | 06:22 | offset. But another good idea is if
you select the Sub-Summary part, you can
| | 06:26 | change the Fill color for the Sub-
Summary part to give it a little bit more of
| | 06:30 | a break. And if we select this field
and we'll make it transparent and now we
| | 06:36 | are going to save our layout and go
onto Browse mode and our sort order is maintained.
| | 06:40 | So now you see in this highlighted
area that this one summary field that we
| | 06:45 | created gives us the total summary
when it's in the footer but at each one of
| | 06:49 | these breakpoints it gives us this
summary for each one of the customer groups
| | 06:54 | and with a little bit of formatting
you can have yourself an easy to view
| | 06:59 | grouped report.
| | 07:00 | Another approach is to separate the
total from the breakpoint and you could
| | 07:06 | just add another Sub-Summary that is
also sorted by CustomerName and this time
| | 07:13 | we are going to say Print Below the
body part and we hit Done. We'll take this
| | 07:18 | value and we'll put it immediately down
below and maybe give it some text color
| | 07:25 | and now we'll take a look at our report.
Now you see that you have a separate
| | 07:30 | part that's totaling the summary value
at the end of each one of these details.
| | 07:35 | So in just a few minutes, you can
take any list view, add a couple summary
| | 07:39 | parts to it and end up having yourself
a grouped report which will allow you to
| | 07:44 | aggregate, organize, synthesize or
even manipulate data that other users have
| | 07:49 | already entered into your database.
| | Collapse this transcript |
| Creating subsummary reports with no body part| 00:00 | Once you become proficient in creating
basic sub-summary reports you can then
| | 00:04 | progress onto some of the more
advanced sub-summary reports. In this movie, I
| | 00:08 | am going to show you an example of
creating a sub-summary report that has no
| | 00:12 | body part in it.
| | 00:13 | Imagine you've got a report that is a
sub-summary report but instead of having
| | 00:17 | the 151 orders that you have in the
sample file, perhaps you have 151,000, then
| | 00:20 | it's not very realistic to create a
report for all of your customers when every
| | 00:26 | one of the order details is listed here.
| | 00:28 | So in this case what we want to do is
create a report that just simply lists
| | 00:31 | the customer and then their total. I am
going to show you how to do that. We'll
| | 00:36 | start in Layout mode. This one is
a lot simpler than you may think.
| | 00:41 | First of all, since we don't need any
of the order detail we can get rid off
| | 00:44 | the body part. So what you do is go
into the Layout menu to Part Setup and
| | 00:50 | you'll select the Body part and hit
Delete. Now, let's take a look at our
| | 00:54 | report in Browse mode.
| | 00:57 | So we are almost there, we've got just
one row and you see that both summary
| | 01:01 | parts are showing up for
each one of the customers.
| | 01:04 | The interesting point here is that
you can have a sub-summary that groups
| | 01:07 | information, but not actually display
the information. So in the background the
| | 01:11 | data is still there, it's still been
aggregated and grouped and displayed, but
| | 01:15 | you don't have to actually show it.
| | 01:17 | So let's remove one more of these parts.
But first let's move the TotalSummary
| | 01:23 | into the same line and go under
Layout to Part Setup and select the second
| | 01:29 | sub-summary part and hit Delete and
now let's take a look at this report in
| | 01:33 | Browse mode. So now you see what you
have is the Customer Name and their Total.
| | 01:38 | In order of each sub-summary row to
group the sub-summary totals, this needs to
| | 01:44 | be sorted by the break field. So matter
of fact, if we go onto the Records menu
| | 01:48 | and hit Unsort you see that it
completely clears our report out because what
| | 01:52 | it's done now is reverted back into
the normal Browse mode but we've deleted
| | 01:56 | the body part so there is no data to display.
| | 01:58 | So if we go back into Sort and sort by
the break field, which is the related
| | 02:03 | CustomerName field, we hit Sort and
now we see them all listed. Now this is
| | 02:08 | helpful because what we were
looking for is a report that chose all the
| | 02:13 | customers. Now let's say your boss
comes back to you and says, this is great,
| | 02:16 | this is exactly what I want, but can I
rank these in the order of best customer
| | 02:21 | down to the lowest revenue producing customer?
| | 02:24 | At first you might think, okay, that
might be a problem because in order for
| | 02:28 | sub-summary reports to work, you have
to sort by the break field. FileMaker
| | 02:34 | provides an interesting little way to
make this work. If you select the sort
| | 02:39 | value, because no matter what that has
to be the first sort order, you can put
| | 02:43 | secondary sort values in there, but
definitely on top you need to have the
| | 02:48 | break field.
| | 02:49 | But if you go down here to this option
that's called Reorder based on a summary
| | 02:54 | field, if you check out that option and
then find the summary value and in our
| | 02:58 | example we used a field
that's called TotalSummary.
| | 03:01 | So now the language is kind of
interesting because it's not saying sort based
| | 03:06 | on this, it's just saying reorder it,
because of course it knows already that
| | 03:09 | in order for this to work, we will, if
it's sorted by another value. Let's take
| | 03:12 | a look at what that will look like.
| | 03:14 | So now you see it's sorted, it's done
it in reverse order which we can fix
| | 03:17 | pretty easily, but it gives us the
groupings with our break fields intact, but
| | 03:24 | it does not have to show all the body
detail and we didn't have to change the
| | 03:27 | sort order. We can simply reverse
this by selecting this and choosing
| | 03:31 | Descending and with a couple quick
tweaks in Layout mode we can go into Browse mode.
| | 03:39 | And now we have a report that's not
organized alphabetically by the break
| | 03:42 | field, but instead by the highest
revenue-producing customer down to the lowest
| | 03:47 | revenue-producing customer. And what
you can do to add more value to this
| | 03:52 | report is continue to add more summary fields.
| | 03:56 | For example, if I select TotalSummary,
hit Copy and then Paste and double-click
| | 04:02 | on this field and there is another
field that's already defined in your
| | 04:05 | database called OrderCount and it
simply counts the number of orders.
| | 04:09 | So what you can do here, resize it just
a tad and go into Browse mode and take
| | 04:14 | a look and with a simple tweak to this
field, Format > Number and we'll just
| | 04:23 | say General Format. Now we can
clearly see how many orders were for each customer.
| | 04:31 | So we just turned a list view into a
sub-summary and then use the sub-summary
| | 04:35 | part to give us an order breakdown for
the customers. So the amount of orders
| | 04:40 | that a customer had placed does not
exist in the database anywhere. This data
| | 04:44 | is generated on the fly and so as the
total customer order revenue, both of
| | 04:50 | those items are generated on
the fly using sub-summary parts.
| | 04:53 | This variation of the Sub-summary
report will allow you to generate and display
| | 04:57 | aggregate information fields to any user.
| | Collapse this transcript |
| Building dynamic reports| 00:00 | FileMaker 10 is the first version
of the FileMaker that allows dynamic
| | 00:04 | reporting in List View and Table View.
Dynamic reporting is really just a
| | 00:08 | concept that's a combination of sub-
summary reporting, restoring the Sort Order
| | 00:13 | and Saved Finds all of which we've
covered in movies earlier in this title.
| | 00:17 | Let's take a closer look at how this
dynamic reporting was created and the
| | 00:21 | different elements involved. First if
you go to the layout called Customer:tier
| | 00:27 | and go into Layout mode, you'll see
that this layout is made up of three parts.
| | 00:32 | If we go to Part Setup, we see we
have a Header, a Sub-summary and a Body.
| | 00:38 | The Sub-summary is a sub-summary part
when sorted by the field called tier. So
| | 00:46 | each one of these is a customer and
each customer falls into a certain tier and
| | 00:51 | when we look at this in Browse mode
the extra feature in this sub-summary
| | 00:55 | report is that it can be updated
live by the user. And this is because
| | 01:00 | FileMaker no longer requires that a
Sub-summary report be viewed in Preview
| | 01:04 | mode but instead in Browse mode
where users can interact with the data.
| | 01:07 | First, we need to sort it by the Break
field. So we'll go into Sort and we'll
| | 01:12 | sort it by the Break field, which is
Tier. Within the Tier we are going to sort
| | 01:16 | them by CustomerName. So we can put in
two sort values and this will trigger
| | 01:20 | the report to group the data as you
see on screen and so, so far we have
| | 01:24 | employed the Sub-summary reporting
and now I am going to show you how the
| | 01:29 | Restore Sort Order works.
| | 01:30 | So a user can interact with this
information, you see you have got the summary
| | 01:33 | of the total number of customers in
each Tier. Now watch as I interact with the
| | 01:37 | Tier by changing this to Tier 4 and
committing the record, you see that the
| | 01:42 | count automatically updates and the
value automatically goes down into the next
| | 01:46 | Tier. And you'll see this same thing
happen here, Zen Garden we just added and
| | 01:51 | you can do this really to your heart's content.
| | 01:54 | So the idea here is that now you have
an interactive grouped report in List
| | 02:00 | View and you don't have to go in the
Preview mode with this. The other thing
| | 02:04 | that's new with dynamic reporting is
that you can also view these in table
| | 02:08 | View. Previously in table View you
could not do group reporting, but now you
| | 02:13 | have the ability to do so.
| | 02:14 | So in order to get to table View, you
can either go to View and pick View as a
| | 02:18 | table, or click on the icon here that
will bring us into table View. Now in
| | 02:23 | table View you see that it will group
all of these again based on the Sort
| | 02:28 | Value and restore that Sort Value
regardless of whether or not you are in List
| | 02:33 | View or in table View.
| | 02:34 | Now note that the user didn't have to
leave Browse mode to go back in and do
| | 02:39 | another found set. FileMaker 10's
new dynamic reporting capabilities will
| | 02:44 | change the way you develop reports,
as you are no longer restricted by the
| | 02:47 | Read-Only Preview mode which did not
allow users to interact with their data.
| | Collapse this transcript |
|
|
16. Importing/ExportingImporting data| 00:00 | FileMaker Pro allows you to exchange
information with other applications by
| | 00:04 | either exporting data to other file
formats or by importing data directly into
| | 00:08 | FileMaker Pro. Importing with
FileMaker Pro is a streamline process that's
| | 00:13 | activated through the File
menu and the Import option.
| | 00:18 | The Import Data function brings data
from another data source, usually a file
| | 00:21 | into an existing FileMaker Profile.
So what we have got here is an empty
| | 00:26 | FileMaker Profile and we are going to
import data from another source into this file.
| | 00:31 | We do that, we go under File > Import
Records. I am going to choose the CSV
| | 00:35 | file but I can also choose this Excel
document with the .XLS file format, or in
| | 00:41 | FileMaker 10, I can now choose a .
XLSX file format because that's now
| | 00:46 | supported. And I hit Open and now
what you see is the Import Field Mapping dialog.
| | 00:52 | Let's take a moment to review the
Import Field Mapping dialog. The first thing
| | 00:56 | you should know is that this window is
split into two sides. On the left hand
| | 00:59 | side, you have your Source, which in
this case is the CSV file we chose and on
| | 01:03 | the right hand side, we have the Target.
Now the Target is important to know
| | 01:06 | because a FileMaker file can have many
different tables and so you want to make
| | 01:12 | sure that you are choosing the correct
table. In this case, we just have the
| | 01:15 | one adventure table so it's an easy choice.
| | 01:17 | You should also be aware that you can
create a new table based on the data that
| | 01:21 | you are importing into your file by
choosing the New table option and this will
| | 01:26 | not only import the data, but go and
create a new table in your Manage Database
| | 01:30 | as well as to final the fields, one for
each column of the information that you
| | 01:34 | are pulling in.
| | 01:35 | In this case, we are just going to
import the data into the current table and
| | 01:38 | what you will notice is that we are
seeing the data that's coming over from the
| | 01:42 | Source field. So it gives us some
visibility so that we can match these up, so
| | 01:46 | the first task before you proceed is
going to be to match up all the different
| | 01:50 | fields and we can see that the focus
would be Hiking, description, Argentina,
| | 01:53 | country and here we might have one
that needs to be changed. Here we see
| | 02:00 | season, we click down on season and we
move it up to where we see spring and
| | 02:06 | now everything seems to be --
we will change maximum elevation.
| | 02:10 | So you go through this process
depending on your import source. If it happens
| | 02:13 | to be another FileMaker file, you can
just choose matching names and it will
| | 02:17 | automatically sync all these up. Or
if you have done any import from this
| | 02:20 | Source before, you can just choose last
order and it will sync all this mapping
| | 02:24 | up for you. So generally, you really
only have to do this one time and then
| | 02:28 | FileMaker will store that for you.
| | 02:29 | And in this case, we are going to add
the records. We will talk about some of
| | 02:33 | the other options here in a moment. Now
that I have got everything mapped up, I
| | 02:37 | hit the Import button and the option
that comes up on screen says Perform
| | 02:41 | auto-enter options while importing.
| | 02:43 | What this does is if you have got any
fields that are setup in your source
| | 02:47 | table, in this case the adventure table,
that have auto-entry options on them
| | 02:51 | like, for example, creation date,
modification date, serial numbers, any kind
| | 02:55 | of lookup values. If you check this box,
it will execute the auto-enter when it
| | 03:01 | creates the new record that it's importing in.
| | 03:03 | So easily put, it will add today's date
to the creation date for a record that
| | 03:08 | you are importing in from another source.
So here we will say Import and after
| | 03:13 | you do an import, you get a summary on
screen. In this case, it indicates to us
| | 03:18 | that the total records added/updated
were 44 and the total record skipped due
| | 03:23 | to the errors were zero. So it will
tell you if it skips any records due to the errors.
| | 03:28 | If in fact, you do run into any of
those, what it means is that you had field
| | 03:33 | validation setup inside the table
and whatever the data was that you are
| | 03:37 | importing into that field violated the
field validation rule and therefore you
| | 03:41 | would have to go in and switch that
from Evaluate always to Evaluate only
| | 03:45 | during data entry and we did a movie
earlier in the title, on how to address that issue.
| | 03:50 | So once your data is imported, you can
then now work with it as if it is in a
| | 03:55 | FileMaker file. There is a couple of
other things that we can look at in the
| | 03:58 | Import dialog. If we go back to File >
Import Records and then File again and
| | 04:04 | we will choose, in this case, the
Adventures FileMaker file and hit Open, this
| | 04:11 | is where you will notice that the
matching name option is now available to us
| | 04:13 | which takes all the mapping out of it.
| | 04:15 | Just select mapping names and you
see everything adjusts and syncs up
| | 04:18 | appropriately. So the Source is the
adventure table and of course, we want to
| | 04:22 | pick the Target, which is going to be
the adventure table in our file as well.
| | 04:26 | But now you look down at the Import
Action and you see that we have three
| | 04:29 | options to choose from.
| | 04:31 | The default option is called Add new
records from a source file. When you add
| | 04:35 | records, the import process is going to
create a new record in the target file
| | 04:38 | for each importable record in the
source file. It's not importable like I
| | 04:42 | mentioned if it violates one
of the data validation rules.
| | 04:46 | When you add records from most source
file formats, the import process will add
| | 04:50 | all the records from the source file
into your FileMaker database. If in this
| | 04:54 | case, we have got a FileMaker Profile,
so we can add only the records in the
| | 04:58 | Found Set of this file that we are
connected to. So if you have source file
| | 05:02 | opened, you want to make sure and go
in and do a Show all, or intentionally,
| | 05:06 | you can create a subset of data through
doing a search and just import in that Found Set.
| | 05:11 | You will notice there is an Update
Existing Records in Found Set option; you
| | 05:15 | can also choose the Import Action of
updating existing records in a Found Set.
| | 05:18 | With this option, you are going to
replace the data in your file with the data
| | 05:21 | from the source file. So, for each
field that you import into, the data from
| | 05:26 | the first importable record in the
source file overwrites the first record in
| | 05:30 | the target file.
| | 05:31 | So more simply put, if you have 50
records in your import source and a 100
| | 05:36 | records in your target the first 50
records in your target are going to be
| | 05:40 | replaced by the records from the
import source. This really is not a very
| | 05:44 | common Import Action, but in case
this is something that you need to do. It
| | 05:47 | simply replace, it really should be
called replace existing records in Found Set.
| | 05:52 | But a very popular option is the update
matching records in found set. You can
| | 05:56 | update matching records and fields in
your target file with data from another.
| | 06:00 | So for example, you might have a copy
of your database on your desktop computer
| | 06:03 | and another copy in your laptop and then,
you update a bunch of information on
| | 06:06 | your laptop.
| | 06:08 | When you come back to the office you
want to sync that data up. All you need to
| | 06:11 | do is choose the Import Action and
then, you can go into the Import Field
| | 06:16 | Mapping dialog and you have to tell it
what is the matching field, so that way
| | 06:20 | it knows how to identify which
record before it does the updates.
| | 06:24 | So here we have an ID and you will
notice that when I have got this Import
| | 06:27 | Action option chosen, I click on the
arrow in between the two fields and you
| | 06:31 | see down here by the Field Mapping key,
I have selected the match records and
| | 06:36 | so the rest of the records that I
want to update actually let's say that I
| | 06:40 | don't even have more than just the few
records that I have updated out in the field.
| | 06:44 | I can uncheck all the arrows and just
choose the ones that I want to update
| | 06:49 | from the field and also the other
option is to add the remaining data in your
| | 06:53 | records. So if I have added new records
out in the field, not only will it sync
| | 06:57 | the ones that existed, but it will add
all the new ones that I created. And I
| | 07:00 | will keep in mind that Match Fields
must uniquely identify each entity in your database.
| | 07:05 | So for example, in a database of people,
you could use one match field such as
| | 07:09 | like an employee number or maybe a
combination of match fields, first name,
| | 07:14 | last name and so on, because as you
see here, you can pick multiple match
| | 07:17 | field. You can combine them together
and say first, middle and last name match,
| | 07:22 | then I have got the right record to update.
| | 07:24 | Then when you are done, you can hit
the Import button and as we talked about
| | 07:28 | before, you can choose to update the
options or not and you see that 44 records
| | 07:33 | are imported I had 44 in here already,
so no new records were added and the
| | 07:39 | records from the source file
would have updated them in this case.
| | 07:43 | So importing and exporting from
FileMaker are done through Import Records menu
| | 07:47 | commands and this allows you to
exchange information with other applications.
| | 07:52 | The importing and exporting feature
serves as a valuable timesaving function,
| | 07:56 | especially when you are
working with large sets of data.
| | Collapse this transcript |
| Exporting data| 00:00 | FileMaker Pro will allow you to
exchange information with other applications by
| | 00:04 | exporting data out of FileMaker into a
file format that's compatible with the
| | 00:08 | other application.
| | 00:10 | So in this example, we are going to
take a look at exporting and if you look at
| | 00:14 | the file that we have, I have got 115
records and what I want to do here is
| | 00:19 | export these out into a file format
that can be read by another application and
| | 00:22 | this is a pretty easy process.
| | 00:24 | First, you navigate to the layout
that's based on the table that you want to
| | 00:27 | export and if you want to export all
the data, then hit Show All, otherwise, if
| | 00:32 | you only want to export some of the data,
then first create a Found Set before
| | 00:36 | you export, because the export is
only going to export whatever you have in
| | 00:39 | your Found Set.
| | 00:40 | Then you go to the File menu and choose
Export Records and choose the location
| | 00:44 | where you want to save. In this case,
we will save at the Desktop. And now you
| | 00:49 | have to choose what file type. This
is going to be based on what type of
| | 00:52 | application you want to
use to read this information.
| | 00:55 | As covered in a previous movie in this
title, you can also save records as a
| | 00:59 | spreadsheet for use in Microsoft Excel,
but you see here that those are also
| | 01:03 | included as export formats.
| | 01:05 | You can choose Tab-Separated Text or
Comma-Separated Text, which is a .txt file
| | 01:10 | or .csv file. Both of those are file
formats that can be imported into nearly
| | 01:14 | any database solution or any
solution that stores data at all.
| | 01:19 | You can export as a Merge file which
can then be used in Word, for example, to
| | 01:22 | create mail-merge, or an HTML table
that could just be opened up in a Browser
| | 01:27 | or hosted on a webpage, or you could
export it out as another FileMaker Pro
| | 01:31 | file which allows you to archive data
for storage and retrieve it later, or as
| | 01:36 | raw XML to be imported into another
app. And then here you see the original
| | 01:40 | .xls Excel file format or an Excel
Workbook that is in the new supported .xlsx
| | 01:48 | file format. But you could accomplish
the same task by doing a Save As Excel if
| | 01:53 | you would like.
| | 01:55 | You probably notice if you have worked
with FileMaker in previous versions that
| | 01:58 | there are some file formats that are no
longer supported for export. They were
| | 02:02 | things like DBF or Basic, or
some kind of outdated file formats.
| | 02:06 | We are going to choose Comma-
Separated Text and name this file Test and hit
| | 02:12 | Save. And then we are presented with
the Specify Field Order for Export dialog.
| | 02:16 | On the left-hand side we see a list
of all the tables inside this database.
| | 02:22 | Here you would choose the table that
you want to export. In this case, we will
| | 02:26 | choose trip. And if you want to move
all of the different fields at once, you
| | 02:30 | can just hit the Move All button. You
see them show up in the Field Export
| | 02:33 | window. You can also hit Clear, but if
you want to choose them one-by-one, you
| | 02:37 | can select them and hit Move or double-
click on them until finally you have all
| | 02:41 | the fields that you want to export.
| | 02:43 | Now once they are in the Field export
order window, you can change the order in
| | 02:47 | which they will appear in the exported
file by clicking on one of these on the
| | 02:51 | left-hand side and moving it up or to
your desired position. If you make a
| | 02:55 | mistake, you can select one of these
and hit Clear and double-click on another
| | 02:59 | one if you would like to.
| | 03:00 | If there is some specific data in the
database and you want to preserve that
| | 03:05 | formatting, there is an option here for
Apply current layout's data formatting
| | 03:09 | to exported data. Those are unique
situations but you should know that that's possible.
| | 03:13 | Once you have selected all the fields,
you hit Export and FileMaker will
| | 03:17 | generate an exported file. You can
export as many times as you would like in
| | 03:21 | whatever way that you choose without
any risk of changing or deleting the data
| | 03:24 | in the original file, unlike
importing where each time you import you are
| | 03:28 | adding more records to the database.
| | 03:30 | The importing and exporting
features can serve as valuable timesaving
| | 03:33 | functions, especially when you are
working with large sets of data or have
| | 03:37 | users without access to FileMaker Pro.
| | Collapse this transcript |
| Integrating a Bento database| 00:01 | Bento is a Mac OS X Leopard and later,
personal database application and if you
| | 00:06 | have started your database in Bento
and you now want to migrate to the
| | 00:09 | FileMaker, then you should watch the
movie earlier in this title on creating
| | 00:13 | database from scratch, where you will
see that you can create a database using
| | 00:18 | an existing Bento Source.
| | 00:19 | But if all you want to do is
import the data from your Bento database
| | 00:22 | application, then you can use Bento
as an import source. Say you have got a
| | 00:26 | database file and you want to import
Bento data into it, you'll go into under
| | 00:30 | the File menu, to Import Records, to
the Bento Data Source option, select that
| | 00:36 | option and up on screen, you will
see the Select Bento Source window.
| | 00:41 | You will notice on the left hand side,
you have got a list of Libraries and on
| | 00:43 | the right hand side, Collections.
You will need to first select a Library
| | 00:47 | before you can see the Collections.
Here I can import in data from the Projects
| | 00:51 | Library, choosing the Entire Library
collection and hit Continue. But before I
| | 00:56 | do so I want to point out what I
think is the most interesting part about
| | 00:59 | selecting a Bento Source.
| | 01:01 | If you are an OS X user, you have an
Address Book application and an iCal
| | 01:05 | application that stores both event
records and task records. But since Bento
| | 01:09 | uses Address Book and iCal libraries,
what you can really do here with this
| | 01:14 | activity is import in your Address
Book records from Address Book into
| | 01:20 | FileMaker Pro using the
Bento Source as the conduit.
| | 01:23 | So here I could select Address Book,
select Entire Library and hit Continue and
| | 01:28 | then I would have to link up the
fields appropriately, so in the case of
| | 01:32 | Address Book, I would want to have a
table that's based on contact, but also I
| | 01:37 | could import in Bento Data Source,
Projects, Entire Library and Continue. Then
| | 01:44 | it works just like a regular import from here.
| | 01:46 | So if you've started a database in
Bento and want to import that data into
| | 01:49 | FileMaker or if you want to bring in
Address Book or iCal data into your
| | 01:54 | FileMaker database, then you can use
the File > Import and then select the
| | 01:58 | Bento Data Source as your option.
| | Collapse this transcript |
|
|
17. Calculation EssentialsDefining calculations| 00:00 | So far in this title, we have been
talking about the three core areas of any
| | 00:04 | successful database application and
they are building a proper architecture
| | 00:08 | which we've discussed when we built the
tables and the fields and then allowing
| | 00:11 | users to input data effectively which
was done through developing layouts and
| | 00:15 | then we have also touched on output
in the form of printing and exporting.
| | 00:19 | Now, output isn't just specific to
reporting or being able to print out or
| | 00:22 | export data. Output also means that
you are putting certain data into the
| | 00:25 | system and then it's aggregating that
data and that's what called calculations
| | 00:30 | and the results of the
calculations are also considered output.
| | 00:34 | A calculation allows you to derive
information from values or data. If you are
| | 00:37 | defining a calculation in FileMaker,
you are using either fields or data that
| | 00:41 | you are feeding into the calculation
formula that will then produce the desired
| | 00:45 | result. Calculations are also known as
formulas, mathematicians even call them
| | 00:49 | expressions. But in FileMaker, you
call them your calculation formula.
| | 00:53 | Calculations will always return a
result, so that means you have to feed some
| | 00:56 | information into a calculation and
then it will return some other value for
| | 01:00 | you; and the information you are
feeding into the formula can either be static
| | 01:04 | text or in most cases, it's going to
be in the form of parameters that you
| | 01:07 | designate as fields.
| | 01:09 | You are probably already familiar with
what a calculation syntax might be. For
| | 01:12 | example, if we just created a
calculation that's set in the text values 2+2.
| | 01:17 | That calculation will
always return the number 4.
| | 01:19 | Now, if we put a calculation field
together that had the word Amount plus the
| | 01:24 | word Tax. That would return the sum of
two fields in a database that were also
| | 01:28 | named Amount and Tax, if of course,
those two fields had the same name.
| | 01:32 | As you flip from record to record, the
value in the Amount field will change
| | 01:36 | and the value in the Text field is
going to change and so therefore, the value
| | 01:40 | returned from your calculation will also change.
| | 01:42 | There are many different uses for
calculations. For example, the most obvious
| | 01:46 | is that fields can hold and display
the results of a calculation. But you
| | 01:49 | remember when we setup our fields, we
can also validate based on a calculation
| | 01:53 | and then, we will also did auto-entries
that were based on calculations, where
| | 01:57 | we are assigning initial values to a
field based on a calculation formula.
| | 02:00 | You will also see when we get into the
movies on scripting and security that we
| | 02:04 | can use calculations to help us run
scripts in a dynamic way and to setup
| | 02:08 | specific types of security as well.
| | 02:10 | So to really learn how to use
calculations, we are going to want to understand
| | 02:13 | the Calculation dialog and
the calculation formulas.
| | Collapse this transcript |
| Exploring the Calculation dialog window| 00:00 | The first step in understanding
calculations in FileMaker is getting familiar
| | 00:04 | with the Calculation dialog window.
The Calculation dialog appears in a wide
| | 00:08 | variety of places within FileMaker Pro
and is really one of the primary areas
| | 00:12 | where actual programming comes into play.
| | 00:14 | So in this video, I am going to show
you the mechanics of the dialog so that
| | 00:17 | later you will have the understanding
needed to write some initial formulas.
| | 00:19 | The main place that you will see the
Calculation dialog is under the Manage > Scripts.
| | 00:24 | If you go to Manage > Database and
select the Fields tab, you can create a
| | 00:28 | sample of calculation to invoke the
dialog. The way to do that is just to
| | 00:32 | create a Test Field Name and select
the Type of Calculation. When you create
| | 00:38 | the Field, you will notice that the
Specify Calculation dialog will appear on screen.
| | 00:42 | So let's take a quick tour so that
you know what all the elements are on
| | 00:45 | screen. This dialog allows you to view
fields from your database, which you see
| | 00:49 | in the left hand window. You can
choose Fields from the Current table or from
| | 00:54 | any of the related tables. You can
also mix those fields together in your formula.
| | 00:59 | You can choose from a wide variety of
Operators as well. That's what these
| | 01:02 | items are in the middle. This allows
you to concatenate two different fields
| | 01:06 | together. So for example, if you wanted
to put the first and last name together
| | 01:10 | to create a full name calculation field,
you would just put this in between the two.
| | 01:16 | This button here will wrap any text
values in quotations. So if you are putting
| | 01:20 | a word in your calculation formula and
it's not a word that represents a field,
| | 01:25 | you need to wrap it in quotes.
This button here represents the Return
| | 01:29 | Character, which is popular in text functions.
| | 01:32 | On the right hand side, you will see
the mathematical operators. The top button
| | 01:36 | is used for division, the asterisk
represents a multiplier and then of course
| | 01:42 | you have subtract and addition buttons as well.
| | 01:45 | You'll also see Operators that
include statements like equals, meaning does
| | 01:50 | this field equal that field, or not
equals, greater than, less than, less than
| | 01:55 | or equal to and so on.
| | 01:56 | On the right hand side are the list of
functions. We will be talking about the
| | 01:59 | functions in detail in the upcoming
movies, but this is where you can find each
| | 02:03 | one. You will notice as you select and
double-click on one of the functions; it
| | 02:07 | appears down in your
calculation formula area of the dialog.
| | 02:11 | This is where you are going to author
all of your formulas and the other pieces
| | 02:14 | that you'll need to be familiar with
on the bottom of the Calculation dialog
| | 02:18 | are the result options. So here, you
will say the calculation will result as
| | 02:22 | either a Number, Text, Date, Time,
Timestamp, Container. Those are all the
| | 02:27 | different types of fields.
| | 02:29 | So just like a field needs to have a
certain Field Type, the result of your
| | 02:32 | calculation will need to as well. So
the same logic applies when you are
| | 02:35 | selecting Field Types.
| | 02:37 | If you need the result of your
calculation to be used in another formula, then
| | 02:40 | you'll want to make sure it's a number.
But it's just going to be a text value,
| | 02:43 | choose Text and so on.
| | 02:46 | So given the wide range of uses for
calculation formulas within FileMaker Pro,
| | 02:50 | establishing a solid familiarity with
the Calculation dialog as well as the
| | 02:54 | Function parameters themselves is
essential in becoming a professional
| | 02:58 | FileMaker developer.
| | Collapse this transcript |
| Using number functions| 00:00 | In this movie, I am going to
introduce you to the most useful and common
| | 00:03 | functions that FileMaker Pro offers
for manipulating numeric data. You will
| | 00:07 | also gain some additional experience
using functions in calculations fields as well.
| | 00:11 | The Number functions are used to
manipulate and perform functions with numeric
| | 00:15 | data and as a class; they are
relatively easy to learn because most of them
| | 00:18 | only have one or two parameters. So
this is a good starting point for learning
| | 00:21 | calculation functions and they
all just produce a numeric result.
| | 00:25 | So what I am going to do is show you
in the Calculation dialog, some of the
| | 00:30 | different numeric functions and we
are going to look at how they give some
| | 00:33 | results and the field value that we
are going to use in each one of these
| | 00:36 | examples is the Number field that
we see that has a value of 123.4567.
| | 00:39 | So if you open up Manage > Database,
click on the field that's called Calc and
| | 00:46 | hit Options. You see currently we
don't have any formulas written, so we are
| | 00:50 | going to create a couple of different
examples here. First, you will notice in
| | 00:53 | the right hand window that all of
your functions are listed by name, but
| | 00:57 | clicking on the dropdown menu will allow you
to isolate just certain classes of functions.
| | 01:01 | So I am going to select Number
functions and you see that we have got several
| | 01:06 | of these, most of which, you will
probably never run into because they are
| | 01:10 | pretty sophisticated for crunching
numbers but some of them that are pretty
| | 01:13 | popular are, for example, the Round function.
| | 01:18 | Round is going to round a number or the
value that's placed here into whatever
| | 01:25 | precision you give it. Now just as a
review for Calc functions, you see I have
| | 01:29 | just double-clicked on a function and
the format of a function is the name of
| | 01:33 | the function which is what tells you
what it's going to do and then each
| | 01:37 | function has different parameters and
inside these parameters I could type in
| | 01:43 | the number 3.11111 if I wanted to.
| | 01:47 | And then it says, give me the
precision and in this case, I just need to give
| | 01:50 | it a number and I am wrapping this one
in text because that's a parameter that
| | 01:54 | it's asking for and then in this one,
it's a value. So a lot of these, you see,
| | 01:58 | wherever it says number, that's where
you either have to place that number
| | 02:01 | value, wrapped in quotes, if
it's just a number or a field value.
| | 02:05 | But let's take a look at what this
will return. So I see I have 123456
| | 02:09 | different places and it rounds those to
just 3. Now the idea isn't that you are
| | 02:15 | going to create a calculation that
already has number in it. But instead you
| | 02:19 | are going to make it dynamic, so as users
go from record to record, this value will change.
| | 02:23 | So in that case, I am going to double-
click on a field that we have already
| | 02:25 | defined that's a number field and
place that inside the calculation as a
| | 02:30 | parameter. And now you can see that
the value that's in the record 123.4567
| | 02:36 | gets rounded to three places 457.
| | 02:38 | You will notice that's different than
other number functions. If we go back to
| | 02:44 | the Number functions and I can
Truncate and in the case of Truncate, I could
| | 02:51 | put the Number field in here and give
it a precision of two and let's look and
| | 03:00 | see what that will do and you see
instead it doesn't round it, in that case,
| | 03:03 | it just truncates.
| | 03:04 | So there is a couple of different
examples but let me show you some of the
| | 03:07 | others. Some that you can see are
Floor, Floor will return the next nearest
| | 03:14 | integer below the number itself. So in
this case, we would get 123.4567. That's
| | 03:20 | going to give us a value of 123. If I
go in here and just select this field,
| | 03:27 | you see 123 and there is a couple of
other ones in here with different sort of
| | 03:31 | flavors of number functions.
| | 03:35 | Ceiling is opposite of Floor meaning
it will give the next highest integer.
| | 03:38 | This we wrap, Int and we select the
Number field and then put inside that-- we
| | 03:43 | will just keep the integer of this
number which in this case is going to have
| | 03:46 | the same result as Floor which is just 123.
| | 03:49 | And a lot of these other ones are
pretty advanced and you might not find
| | 03:52 | yourself using them too often but
Truncate, Random, Integer, Ceiling and Floor,
| | 03:56 | are probably the most
common of the Number functions.
| | 04:00 | So in this movie, we focused on the
core Number functions that are used most
| | 04:04 | frequently or that are most useful.
So it's best to be come adapt to using
| | 04:08 | these functions without needing to
refer to a reference as a source. So
| | 04:11 | practice and apply these
functions as often as you can.
| | Collapse this transcript |
| Using date and time functions| 00:00 | In this movie, I am going to show you
some of the functions that allow you to
| | 00:03 | manipulate Date, Time and Time-stamp
data. The date, time and time-stamp
| | 00:07 | functions are among the easiest to
learn because the syntax is really simple.
| | 00:10 | These functions just fall into one of
two categories. One is going to be those
| | 00:14 | that extract a bit of information from
a date or time and then there is those
| | 00:17 | that construct a Date, Time, or
Timestamp from bits of information that you are
| | 00:21 | going to provide inside your calculation.
| | 00:23 | Let's take a look at these, you go
under File > Manage > Database and if you
| | 00:29 | choose the Calc function and hit Options,
it will bring up Specify Calculation
| | 00:33 | window and you can isolate all the Date
functions first. You will see here that
| | 00:39 | they are pretty self-explanatory.
| | 00:41 | If you choose Day for example and we
put in a Date field, because remember, a
| | 00:47 | calculation function is going to
have the name of the function and then
| | 00:49 | everything inside the parameters you
need to provide it either fields or values
| | 00:54 | in order for it to
process the function properly.
| | 00:56 | So here we've got a field in our field
list that is set up with the format of
| | 01:01 | Date and its called Date. We'll double
-click on that and now we have day of date.
| | 01:06 | Now a day will return the day portion
of the date which is either going to be a
| | 01:09 | number between 1 and 31. So in this case,
to return to number 7, we hit OK and
| | 01:16 | you see in fact it did return to number
7 and there are some similar functions
| | 01:21 | to the Date function.
| | 01:22 | For example, DayName returns the day
name, for example, Sunday of the specified
| | 01:29 | date. The DayOfWeek is going to return
a number between 1 and 7 that represents
| | 01:33 | the day of the week of the specified date.
Sunday is 1, Monday is 2, so on and so on.
| | 01:39 | In Month, if we put the Date field in
the parameter, month is going to give us
| | 01:46 | a numerical value between 1 and 12
that represents the month of the specified
| | 01:50 | date. You may not want the numerical
value of the day of the week or the month.
| | 01:56 | And so in those cases you can use
MonthName, which when used with the Date
| | 02:02 | field will give you the name of
the month. In this case, it's June.
| | 02:10 | And you will see that we have got some
other functions that are pretty easy to
| | 02:13 | interpret. WeekOfYear gives you a
numerical week; the Year will extract the
| | 02:17 | year from a date.
| | 02:19 | The Time functions are just as easy to
read and there is very few of them. You
| | 02:23 | will see here that they will extract
from a Time field either the hour, minutes
| | 02:30 | or seconds, these are the ones that
extract bits of information from a Time
| | 02:33 | field and here's the Time function
that will construct it. So if you have a
| | 02:38 | field that you want to use that will
provide the hours, you can just pick a
| | 02:42 | field for hours, field for minutes,
field for seconds and then the result in
| | 02:45 | that case, will be a Time and then
that way you will have constructed a real
| | 02:51 | time field that can be evaluated as time.
| | 02:54 | It will return a time built from a
specified hour, minute and second
| | 02:57 | parameters, as an integer, meaning
the number of seconds since 12 midnight.
| | 03:02 | And Timestamp is similar to Time. It's
only got one and this one just simply
| | 03:06 | constructs the Timestamp, so you can
take a Date field and a Time field and
| | 03:16 | results a Timestamp and you will see
that we have been able to create a valid
| | 03:21 | Timestamp field out of two separate
fields that were not Timestamp formatted.
| | 03:26 | So this lesson will just focus on a
core number of the Date, Time and Timestamp
| | 03:31 | functions and you see in the case of
Time and Timestamp functions that there is
| | 03:35 | really only a few of them to learn. But
in the case of the Date, these are the
| | 03:38 | ones that are the most useful, so
it's best to become adept at using these
| | 03:41 | functions without ever having to need
to refer to them as a source. So this way
| | 03:44 | you can write them free hand.
| | 03:45 | So practice and apply the Date, Time
and Timestamp functions as often as you can.
| | Collapse this transcript |
| Using text functions| 00:00 | The largest groups of functions in
FileMaker Pro pertain to investigating and
| | 00:04 | manipulating text strings. Unlike some
groups of functions in which only a few
| | 00:08 | are used on a regular basis and I
would say about nearly half of the text
| | 00:12 | functions are of primary application
and importance. So in this movie, I am
| | 00:16 | going to introduce you to the syntax
of some of the core Text functions.
| | 00:19 | If we open up the Manage Database
window and open up the Calc dialog, we can
| | 00:28 | isolate the Text functions, which are
the first on the list, and we see there's
| | 00:33 | quite a few Text functions. I am going
to introduce you to the ones that are
| | 00:38 | used the most often though.
| | 00:39 | The easiest ones to understand would be
the Length function and this one is used
| | 00:46 | to determine the overall character
length including spaces of the string of
| | 00:50 | text inside the function itself. The
Length function returns the number of
| | 00:54 | characters in the string that we
designate in the text. So here if I were to
| | 01:00 | just type in "How Long is that string?"
it's going to return the number 24 and
| | 01:11 | keep in mind that it's going to be
counting the question mark as a character,
| | 01:16 | so it just doesn't necessarily be
counting text but any character, so it's
| | 01:19 | really the length of all the characters.
| | 01:21 | But 99% of the time you are going to be
putting a field in here. So we will see
| | 01:25 | how this looks when we go into our
value here. You see we have got 1, 2, 3, 4,
| | 01:32 | 5, 6, 7, 8, 9, 10, 11, 12, 13. It's
important to note that these two spaces in
| | 01:39 | between John and Q and Q and Public
were also counted. So length is a very
| | 01:45 | popular one.
| | 01:47 | And another one that I want to show you
is WordCount. So in WordCount, instead
| | 01:52 | of counting characters what we are
doing is counting the total number of words,
| | 01:58 | which can also be useful for you. So
you see here we have 1, 2, 3 and it's
| | 02:02 | important to note that a single
character is considered a word. Basically,
| | 02:05 | anything that follows a
space is considered a word.
| | 02:12 | Another popular one is PatternCount.
PatternCount allows us to detect the
| | 02:19 | number of occurrences of a search
string in the specified text. So we will say
| | 02:25 | Text field and let's say the search
string is-- and here this parameter
| | 02:31 | I need to wrap in quotes. So I will say
give me J and let's see what this gives us.
| | 02:39 | It's going to return a number, number 1.
| | 02:42 | Now something interesting about
PatternCount is note if I make it a lower case
| | 02:50 | j that it also gives us number 1.
Now some of these functions are case
| | 02:56 | sensitive; in the case of PatternCount
it's not. So you want to take that into
| | 02:59 | account because sometimes you may
just be trying to isolate specific case
| | 03:04 | sensitive patterns and then you
would use other functions in that case.
| | 03:07 | Another one that you might find
useful is in the case of Trim. This one is
| | 03:12 | pretty helpful. You can use this as an
Auto-Enter function but Trim will trim
| | 03:19 | all of the leading and trailing
spaces from the text and then returns it as
| | 03:24 | trimmed as a result. So here let's say
if for some reason, users keep typing in
| | 03:29 | spaces and you will notice that the
calculation will trim all these spaces,
| | 03:33 | no matter how many that you put in there.
| | 03:35 | So this is a good way to help clean
up all your data. You can use this in a
| | 03:38 | Calc Replace or in an Auto-Enter
calculation for data entry. Moving on, there
| | 03:47 | is a series of functions that will
extract the numbers of characters from a
| | 03:52 | word or words from a sentence and they
come in groups. You will see them listed
| | 03:56 | here: Left, Middle and Right.
| | 04:00 | So there is Left which just counts
characters, LeftValues which counts the
| | 04:04 | number of values from an array or a
list, and LeftWords counts the number of
| | 04:09 | words from a sentence. So if we just
do numberOfCharacters from the Left, so
| | 04:14 | here we are saying Text,
numberOfCharacters, 6. That's going to give us JOHN Q,
| | 04:25 | which is 6 characters.
| | 04:27 | Now the same can be true for Left and
one thing you can do is just click into
| | 04:34 | the field and scroll right down. You
can do LeftWords inside Text and I want
| | 04:42 | numberOfWords and I got JOHN Q again,
which again, the single letter of Q is
| | 04:50 | seen as a word because of
the spaces before and after it.
| | 04:54 | Now these will come into play many
times when you are nesting different
| | 04:59 | calculations together, which is a
little bit more of intermediate but it's a
| | 05:01 | really good idea to wrap your head
around these because at some point you might
| | 05:04 | find yourself parsing out data or
working with cleaning up text and these are
| | 05:08 | great tools.
| | 05:09 | But notice also there is Right, which
is Text, numberOfCharacters. If I say
| | 05:13 | Right, number 3, it will give me LIC
and John Q Public, RightValues gives me
| | 05:18 | the last three words in a return-
delimited list and RightWords will give me
| | 05:24 | the last three words if I put
three in there in the sentence.
| | 05:28 | Finally, a handy one is also
Substitute. So here you can specify a search
| | 05:36 | string wrapped in quotations. In this
case, I will say Q and here we will use
| | 05:41 | the Substitute function to replace the
Q with a PR. So you see it has detected
| | 05:47 | a Q and everywhere it has
detected a Q, it replaces it with the PR.
| | 05:56 | And similar to the Substitute, the
last one that I want to introduce to you
| | 05:59 | that's very helpful is the Filter.
| | 06:04 | What the Filter function does is return a
version of the text that you put in the
| | 06:07 | textToFilter area in which any characters
other than those specified by the filter
| | 06:11 | text will have been removed.
| | 06:14 | So here we will say filterText, 'aeiou'
and result in Text and we will see what
| | 06:29 | that gives us. So what that has done is
it has taken out everything that I told
| | 06:33 | it to filter out, it's taken out and
it leaves that in place of the original
| | 06:37 | value. So you see we have an o, u
and i and it shows them in that order.
| | 06:44 | So it will be good to get familiar with
these functions because they are going
| | 06:46 | to be used in quite a few areas
within FileMaker Pro and this lesson has
| | 06:50 | focused on really the core Text
functions, the ones that are used most
| | 06:54 | frequently, but it's best to become
adept at using these functions without
| | 06:57 | needing to refer to the reference as a
source. So the more that you can write
| | 07:00 | these free flow, the better, so do
your best to apply these in functions as
| | 07:04 | often as you can.
| | Collapse this transcript |
| Using Get functions| 00:00 | Get functions are a rare breed of
function because they pull environmental
| | 00:04 | information about either the session
that you are in, the application or
| | 00:08 | information from your operating system
and they could be really useful if you
| | 00:11 | need to extract this type of
information, your calculation or scripts.
| | 00:14 | So we will take a look. They are
really easy to understand when you see them
| | 00:17 | too. Go into Manage > Database, select
Calc and go View > Get Functions and you
| | 00:27 | will see that there is nothing for
you to enter inside these functions.
| | 00:31 | So for example, Get (AccountName), I
don't have to enter anything in here. I
| | 00:36 | just tell it what the result is going
to be and we will see that the Account
| | 00:40 | Name, this is the account that I have
used to login to this file. Essentially,
| | 00:44 | you are saying go and get this
information and place it into either the field
| | 00:49 | or within the formula.
| | 00:51 | So I can say Get (LayoutNumber), Get
(LayoutName), (tableName), (PageNumber)
| | 00:58 | over printed item, PortalRow, even
PrinterName, you can extract those. There is
| | 01:04 | a helpful group here that allows you
to extract information on this Users'
| | 01:08 | Screen Info. So you can present
different layouts to them if you first evaluate
| | 01:13 | what their screen depth is,
height, width and that type of thing.
| | 01:18 | You can find out the SortState of your
Found Set of records, if you extract the
| | 01:23 | Get (SortState) value. Then information
on the user's computer. You see that I
| | 01:28 | am pulling this from the operating
system and it tells me that I have got
| | 01:34 | operating system 10.5.5.
| | 01:38 | Developers frequently implement these
when they are doing bug reporting. You
| | 01:42 | can take a Timestamp of the users'
entire environment when they run into
| | 01:47 | issues. But these can be used all
throughout different calculation functions
| | 01:50 | and scripts and you see here
there is an entire set for windows.
| | 01:53 | There is a movie that we will be
talking about later in the Title where we talk
| | 01:56 | about scripting or manually opening
up new windows. But when it comes to
| | 02:00 | scripting, you can capture a lot of
information about the users' current window
| | 02:04 | and then create a new one based on that info.
| | 02:09 | Some of the new ones in FileMaker 10
involve Triggers. We will be talking about
| | 02:15 | Triggers in the later movie and you
will be able to see the role of these functions.
| | 02:18 | So Get functions don't have any
parameters for you to memorize but instead they
| | 02:24 | stand on their own. As a result they
are also pretty easy to understand. So if
| | 02:29 | you ever need to pull information
about your FileMaker version, any of the
| | 02:33 | components of FileMaker, the window
environment, the layout you are on, or
| | 02:37 | anything from the operating system
including information like Get(CurrentDate)
| | 02:43 | and Get(CurrentTime). These are great
ones because if you have ever worked with
| | 02:48 | FileMaker in the past, there used to
be a function that's called the Today
| | 02:51 | function that you could use when you
are putting date calculations together and
| | 02:56 | the Today function is no longer supported.
It's been replaced with the Get (CurrentDate).
| | 03:00 | Get (CurrentTime) can be used for
creating timestamps for new records and
| | 03:04 | different types of things like that.
Most of these should be easy for you to
| | 03:08 | make sense of just based on their name.
| | 03:10 | In this movie, we have been focusing
on the core Get functions. It's best to
| | 03:14 | become adept at using these functions
without needing to refer back to the
| | 03:17 | reference source. But when it comes to
get functions, it's best to take a look
| | 03:20 | at the list that's available to you.
So as you encounter the need, you will
| | 03:24 | know whether or not you have a
Get function that can support it.
| | Collapse this transcript |
| Using logical functions| 00:00 | In this movie I would like to focus
on some functions that are known as
| | 00:03 | logical functions. The Logical
Function group contains some of the most
| | 00:07 | interesting and powerful functions
available in FileMaker Pro and unlike the
| | 00:11 | other categories of functions that we
have been reviewing in which several
| | 00:14 | functions are often very similar in
syntax and behavior, the Logical Functions
| | 00:18 | are a collection of unique and
sometimes complex functions. They really break
| | 00:22 | up into two categories and I
will show you examples of both.
| | 00:25 | The first of those categories
within the Logical Functions are used for
| | 00:29 | performing conditional operations.
Let's take a look at a couple of those, if
| | 00:34 | you open up the dialog and select Calc
and hit Options and choose Logical, you
| | 00:44 | will see all the Logical Functions
listed here. The two that I am going to
| | 00:49 | focus on here are the If
function and the Case function.
| | 00:53 | The If is the most basic type of logic
function there is, in that it just says
| | 00:58 | if this test pass as a True, show this
result but as a False show this result.
| | 01:05 | So for example if we did a plain
English version of this, if we said if it's
| | 01:10 | raining --that would be our test--
bring in umbrella as a True or do not bring
| | 01:16 | in Umbrella as False.
| | 01:18 | I'll show you an example on another
file of an If function, I would like show
| | 01:22 | you an example of the If function in
another one of our Example Files. So what
| | 01:27 | I would like to do in this example
is create a field that conditionally
| | 01:30 | determines what the commission is
going to be. So let's say we have one
| | 01:35 | commission price for a sales person,
if they sell one of these adventures.
| | 01:41 | If we go into the database and we will
come up with a field we will just call
| | 01:46 | it Comm and we will create a
Calculation. Then now in this case what we would
| | 01:53 | like to do is we are going to use our
logical function for If, the business
| | 01:59 | rule that we will say in our case here
is that, if the sale is over a $1000,
| | 02:06 | the sales person gets 5%,
otherwise they don't get anything.
| | 02:10 | So we go into the If function and we
say If and this is where we create our
| | 02:14 | test, we will say Price > 1000 and
for this to work price, we need to be
| | 02:24 | defined as a number which it is and if
it is greater than 1000 then we will say
| | 02:33 | Price * 0.5 otherwise if it's not
greater, then we would just say 0. We result
| | 02:45 | that a number, we hit OK and we go into
Layout mode and place this field on our layout.
| | 02:55 | So here is the Commission field. We go
back into Browse mode and take a look
| | 03:08 | and we see that the price is $1,852.
That's greater than a $1,000, so it's
| | 03:12 | $92.60 and we will see if one of this
prices is 0, we see that that becomes 0.
| | 03:21 | So you will see that the calculation
evaluates based on each record. So as you
| | 03:25 | go from record to record it
dynamically provides you with a different result.
| | 03:29 | Let's go back into the calculation,
I would like to introduce you to the
| | 03:32 | seconds of the most important logic
functions and this one is similar to the If
| | 03:37 | function. This one is called the Case
function. So if we take the same story
| | 03:43 | where we said if the price of the
adventure is over a $1,000 then the
| | 03:47 | salesperson could get 5%. Let's say
that there is whole series of different
| | 03:52 | tests. Now we have got under 500, 500-
1199 so on and so on. So in this case we
| | 03:58 | have got multiple tests and anytime you
have multiple tests you want to have a
| | 04:04 | Case statement.
| | 04:06 | So if you look in the top of your
logical function list, you see that what its
| | 04:10 | saying is that you can provide one test
and then a result of that test, another
| | 04:15 | test and a result of that test and so on.
So instead of saying if this is true,
| | 04:19 | do this, otherwise do this, you are
just saying, if this is true, do this, if
| | 04:23 | this is true, do this, so on and so on.
| | 04:26 | It's a lot easier to write these. Let's
take a look. So here we will say if the
| | 04:34 | Price < 500 and then you will put a
semicolon delimiter in here, semicolon and
| | 04:42 | then we will say Price multiplied by
and the Commission Rate there is 5 so we
| | 04:49 | will say 0.05. So this is our first test.
This is our first result if it's true
| | 04:58 | and if it's false, instead of providing
the false what we do is we just say go
| | 05:01 | on to the next test.
| | 05:03 | So the next test will be, I am coping
and pasting this. If the Price < 1199,
| | 05:15 | multiply the price by 0.75. Now what
it's doing and you will notice there is a
| | 05:20 | cascading effect that's happening here.
What I am saying is if it's not less
| | 05:24 | than 500, then go the next one. So if
it's between 1199 and 500, it will be
| | 05:29 | this rate. So you see that it keeps
going until it finds a true statement. So
| | 05:34 | we will do one more of these, let's say
< 2000, Price * 10 and actually we will
| | 05:46 | do one more finally, Price > 2000, we
will give them a lopping 12% and the
| | 06:00 | result is a number now.
| | 06:01 | The one thing you can do at the end,
because like I mentioned before it's going
| | 06:04 | to keep evaluating each one of these
tests until it finds a true one, but if
| | 06:09 | you don't have all the possible
trues then you can put a default value in
| | 06:13 | there. In this case we will just say 0,
if it's greater than 2000, actually we
| | 06:21 | will say if it's greater than 2000
we will do 0.12% and that results in a
| | 06:24 | number. We say OK and now we see as we
go from record to record, you see this
| | 06:32 | one is over 1199 and this one is over
2000 so it gets a different percentage,
| | 06:38 | 12% and so on and so forth.
| | 06:41 | So that's the difference between the
two most common and important logical
| | 06:46 | functions that perform conditional
operations and that's the If and then the Case.
| | 06:52 | There is another set of the logical
functions that performs tasks that return a
| | 06:55 | Boolean result and I will show you those,
Database Calc Options back to Logical
| | 07:06 | and you will notice some of these and
probably won't use too much, but here is
| | 07:09 | a perfect example. The function here
is called IsEmpty and I will put the
| | 07:14 | parameter of the Text Field in it.
| | 07:15 | Now you see we are not instructing it
what to do, if in fact, it is empty. So
| | 07:20 | what it does by default is it will
return a number 1 if it's true, if the value
| | 07:24 | is, in fact, empty, or a 0 if it's false,
if in fact, it is not empty. We will
| | 07:30 | see that this field has a value in it so
it gives us a 0, which indicates false.
| | 07:34 | One of the other things that you can do
in your Calc function is use this as a
| | 07:41 | test in your If. So like we talked
about before If and then you can say IsEmpty
| | 07:46 | (Text), then tell it do something at
that point. So let's say If IsEmpty
| | 07:51 | (Text), we'll say Empty, otherwise False.
| | 07:57 | Now there is a couple of things just
speaking of calculations in general that
| | 08:01 | you see me doing here, you see that
I am using the white space when I am
| | 08:04 | authoring my calculation, white space
is ignored when FileMaker is evaluating
| | 08:08 | the Calculation function. So it's a
good idea to help you visualize and work
| | 08:12 | with your calculations in this window
by just adding some additional white space.
| | 08:15 | Also don't forget that when you
have a text value we need to wrap it in
| | 08:19 | quotations and then the last thing you
notice that I was freehand typing these
| | 08:23 | functions. So you should remember
that you don't always have to choose the
| | 08:27 | function, it's a great way to get
familiar with them, but you don't have to do
| | 08:30 | that. So at some point it would be good
to be able to do these freehand so that
| | 08:35 | you can do more programming on the fly.
We have to pick the result, which would
| | 08:40 | be Text in this case, and we hit OK
and we see that this gives us a False.
| | 08:45 | So there are a lot of logical functions
to learn and they are really powerful.
| | 08:49 | You will find yourself using them
inside Scripts, Calculations, Validations,
| | 08:54 | Auto Entered Calculations, all sorts of
different things. So this is a good one
| | 08:57 | to get familiar with, but I wanted to
touch on the more core functions in the
| | 09:01 | Logical Function set and one that are
used the most frequently and definitely
| | 09:05 | the If and the Case and the
IsEmpty are the most popular.
| | 09:10 | So it's best to become as adept as you
can using the Logical Functions about
| | 09:13 | having to refer to the reference as
a source. So do your best to try to
| | 09:16 | integrate these and apply these
functions as often as you can throughout your
| | 09:19 | FileMaker solution.
| | Collapse this transcript |
|
|
18. Script EssentialsUnderstanding scripts and script steps| 00:00 | One of the most powerful features in
FileMaker Pro is the ability for users to
| | 00:04 | create scripts. A script is a sequence
of stored instructions that will allow
| | 00:08 | the developers to automate repetitive
tasks or control how the users interact
| | 00:12 | with the system. Really almost anything
that you could do manually through the
| | 00:15 | keyboard or the mouse or through menu
commands can be scripted and really this
| | 00:20 | is all best learned
through practical application.
| | 00:22 | For example, if you know there are
some things that you do everyday on a
| | 00:25 | regular basis you might want to
automate them through a script. Some examples
| | 00:30 | you might already be familiar with
are things like navigating from
| | 00:33 | layout-to-layout, or assisting users in
data entry, importing and exporting of
| | 00:38 | data and even creating reports that
will tie in a specific Found Set to a
| | 00:42 | specific layout in your database.
| | 00:45 | In essence, a script is a sequence of
instructions for accomplishing a task.
| | 00:49 | If you're new to scripts you might
find it helpful to think of scripts as you
| | 00:52 | would for a recipe for cooking something.
| | 00:54 | When cooking a recipe provides
instructions such as chopping, simmering, or
| | 00:58 | separating into two round pans and so on.
These actions in the case of a recipe
| | 01:04 | need to be performed in a certain order.
They must operate on a prescribed set
| | 01:07 | of ingredients as well. Some recipes
and scripts are simple and others are more
| | 01:13 | complex and take a little longer to complete.
| | 01:15 | So think of your job as a scripter is
writing a recipe that the computer will
| | 01:19 | follow. The first thing you want to do
when you're scripting is determine what
| | 01:23 | the end goal is going to be. For
example, some end goals may be printing a
| | 01:27 | sub-summary report or navigating to
another layout. And what you will find out
| | 01:31 | as you fine-tune your skills at
scripting is there could be many different ways
| | 01:35 | to accomplish that task but experience
will help you become familiar with the
| | 01:38 | most clear and efficient ways to do so.
| | 01:40 | So there's really no wrong way to write
a script as long as it reaches your end goal.
| | 01:44 | But as you get more and more
experienced you will learn how to do these
| | 01:48 | things in fewer-and-fewer steps
and make your scripts more efficient.
| | 01:51 | Learning how to write these scripts is
all about learning how to combine sets
| | 01:55 | of script steps together to achieve
this desired end goal. It's difficult to
| | 01:59 | learn the script steps
individually because many really don't have an
| | 02:01 | interesting or practical purpose unless
they are combined together with others
| | 02:05 | to achieve a result. But combining
these together will then create a script or
| | 02:08 | your recipe. So really the best way to
understand the possibility of scripts is
| | 02:13 | to become familiar with the script
steps. The movies in this chapter will
| | 02:16 | examine the script steps and also
putting them together into entire scripts.
| | Collapse this transcript |
| Assigning script steps to buttons| 00:00 | If you are just starting to get
familiar with scripting in FileMaker, one of
| | 00:03 | the easiest ways to do that is to
assign just a single script step to one of
| | 00:08 | the buttons that you have on screen.
Let me show you what I mean in Layout
| | 00:12 | mode. Any object that's on screen can
become a button. Whether it's a group set
| | 00:18 | of icons, a graphic image, an area of
text, or a field, anything that you click
| | 00:25 | on a Layout mode is considered a button.
| | 00:28 | Now if you have one of these items
selected -- so for example, if I go to Log
| | 00:33 | Out and I go under the Format menu, you
will see that there is an option that's
| | 00:38 | called Button Setup. This allows you
to assign an action to the clicking of
| | 00:42 | that button, when in
Browse mode or in Find mode.
| | 00:46 | This is also a great way to show all
the different script steps that are
| | 00:49 | available. In the Button Setup dialog,
you will see that in the window to the
| | 00:53 | left that every supported script step
in FileMaker is listed for you to choose
| | 00:57 | from. Now in the case of using the
Button Setup window, you can just choose one
| | 01:01 | of these script steps and it will execute
that action each time a user presses the button.
| | 01:06 | You will also note as you look
through some of these, that they represent
| | 01:10 | pretty much any action in FileMaker.
Whether it be, something like navigating
| | 01:15 | to a layout or certain record, or
going to a field, also cut, copy and paste
| | 01:21 | actions and inserting certain values,
creating new records, deleting records,
| | 01:27 | performing finds and all of the
supported constrain, extend and modifies,
| | 01:33 | showing all records in a found set,
opening up new Windows, opening files,
| | 01:37 | adding and modifying accounts,
checking spelling and then there is a whole
| | 01:41 | group of miscellaneous ones that
do some pretty interesting things.
| | 01:44 | Your best bet is to either open up
this dialog or the Script Maker dialog and
| | 01:48 | get familiar with each one of these
script steps. If you want to know more
| | 01:51 | information about every script step,
you can find some very good documentation
| | 01:54 | in the FileMaker help window, but in
our example here, we have got a Log Out
| | 01:59 | button. So I am going to assign the
Exit Application script step to this
| | 02:03 | button. You see then that it gives us
a couple of options and in many cases
| | 02:07 | some of these script steps have options
that you need to configure, but in the
| | 02:10 | case of Exit Application,
it's pretty self-explanatory.
| | 02:12 | You see that you can choose between
the Button Styles. The reason for that is
| | 02:16 | because this button was added to the
layout using the Button tool. Some of the
| | 02:20 | other buttons, like fields and text
areas, won't have these available to you
| | 02:23 | but all of them will have the ability
to change the hand cursor over button and
| | 02:27 | I will show you what that
looks like in Browse mode.
| | 02:30 | So if we save, users can then tell when
they roll over an item that's a button
| | 02:37 | because the cursor turns to a hand
with a finger pointing out, like it's
| | 02:41 | clicking on the button. You see that
each one of these has a script assigned to
| | 02:45 | them and in addition to the script we
have provided some help to the user by
| | 02:50 | going under Format, to Set Tooltip
and put in what the script will do.
| | 02:55 | So if you want to get familiar with
scripts and script steps, the best way to
| | 02:58 | do that is to start assigning the
actions to buttons on your layouts.
| | Collapse this transcript |
| Using the ScriptMaker dialog window| 00:00 | When you're starting to learn how
to create scripts for your FileMaker
| | 00:03 | database, you are going to need to
become familiar with the Script Maker dialog window.
| | 00:07 | All of the scripts created for a given
database file are listed in the Manage
| | 00:11 | Scripts window. You can find the
Manage Scripts window under the Script menu
| | 00:16 | and you can also get to it under File
> Manage > Scripts. Either way it will
| | 00:21 | take you to the Manage Script window.
| | 00:22 | The first thing you notice on a new
file is that new files don't have any
| | 00:26 | scripts created. It is your job as a
developer to add the scripts necessary to
| | 00:30 | automate repetitive tasks and to
provide controls for users to manipulate the
| | 00:33 | system. But when you first open up
your file, you won't see any in there.
| | 00:37 | Once you do have scripts in your
database, you will be able to see them listed
| | 00:41 | in this window. So for example, if
we hit the New button in the bottom
| | 00:44 | left-hand corner, it will automatically
create a new Edit Script window for us.
| | 00:49 | Closing that window will now show
the script in the Script List window.
| | 00:53 | If you have more than one script in
your Script window, you can maneuver them
| | 01:00 | into specific orders by using the
Double Arrows to the left of the script name
| | 01:05 | in the Script List Window.
| | 01:07 | The check box at the beginning of the
row indicates whether a given script
| | 01:11 | should be listed in this Scripts menu.
So for example, if we uncheck New Script
| | 01:17 | and go under our Scripts menu, we now
see that New Script2 is the only one that
| | 01:22 | is listed. If I go in and I check both
of them, now you see them both listed.
| | 01:27 | When a script shows up in the Script
window, users can execute the script by
| | 01:32 | clicking on this Scripts menu and then
choosing the Script that they want to
| | 01:35 | run. Also, you see that up to the
first nine scripts, we'll have a
| | 01:38 | corresponding quick key. On Mac, this
is the Apple and then the number one, two
| | 01:44 | or all the way up to nine. And
on Windows, that is a Ctrl key.
| | 01:50 | As you see by default each new script
is called New Script. It will be your
| | 01:54 | responsibility to name the script and
it's a good idea to name it something
| | 01:58 | that makes sense to you when
you try to retrieve it later.
| | 02:01 | If you don't rename the script, you
will see that it will just be called New
| | 02:04 | Script in your Script list. So make
sure to give your scripts a name that makes
| | 02:07 | sense. Inside the Edit Script window on
the left-hand side, you will see all of
| | 02:12 | the available script steps listed.
| | 02:14 | To make it easier to find Script steps,
you can view them by Category. As you
| | 02:18 | see here Control, Navigation, Editing,
Fields, Records, Found Sets windows,
| | 02:24 | Files, Account, Spelling, Open menus
and Miscellaneous or if you just know the
| | 02:29 | scripts step that you are looking for,
you can select all by name and look for
| | 02:33 | it alphabetically.
| | 02:34 | You can also click in to the list and
hit a key on your keyboard and it will
| | 02:40 | navigate you down to the appropriate
script groups alphabetically. You can also
| | 02:45 | look at each one of these by group. So
if you just want to see the scripts that
| | 02:49 | deal with records, click on Records
and then you can find the script step you
| | 02:52 | are looking for there.
| | 02:56 | Back on your Manage Scripts window,
you will notice that in addition to
| | 02:59 | creating new scripts, if you click
down on the Arrow next to the New button,
| | 03:04 | you can also create a New Folder.
These folders can help you organize your
| | 03:11 | scripts for easier retrieval.
| | 03:13 | Once you have created your New Script
folder, you can take existing scripts and
| | 03:17 | move them into the Folder. So you can
move a script below an expanded folder
| | 03:24 | and then you see this four-pronged
arrow. You just click down and move the
| | 03:28 | script to the left to indent.
| | 03:31 | That now indicates that the script is
part of the Script folder. So closing the
| | 03:35 | folder will hide the script, expanding
the folder will reveal it. This can be
| | 03:40 | handy once you are storing the
large number of scripts in your file.
| | 03:43 | Another easy way to find a script when
you have a lot of them to choose from is
| | 03:47 | to use your filter. All you have to do
here is type in a keyword and you will
| | 03:52 | see that it will isolate the
scripts that have some part of your filter
| | 03:55 | criteria in the name of the script.
| | 03:58 | Other buttons that you see on the
bottom of the screen, once you select a
| | 04:01 | script, you can either edit the name or
the script steps. Also, you can delete
| | 04:09 | any scripts and you see there are
some other buttons here for duplicating
| | 04:13 | scripts. If you find that you have a
script that is going to be very similar to
| | 04:16 | an original one instead of starting
from scratch, just select the script that
| | 04:20 | you want to duplicate and hit the
Duplicate icon and then, you can start by
| | 04:24 | editing from the duplicate version.
| | 04:27 | Also, it's a very good idea to print
backups of your scripts or hard copies
| | 04:31 | either while you're working on them,
trying to troubleshoot them, or just a
| | 04:35 | good idea for a Backup or
for Archiving all your work.
| | 04:38 | Another helpful function of Script
Maker is the ability to Import scripts in
| | 04:42 | from other files. This is helpful if
you convert it from previous versions or
| | 04:46 | if you have other files that have
similar functionality and you just want to
| | 04:49 | borrow a script from them.
| | 04:51 | Then finally, when you've selected
a script, you can run that script by
| | 04:55 | clicking on the Perform Script icon.
Just another way to trigger one of the
| | 04:58 | scripts that you've got selected in your list.
| | 05:01 | So once you've gotten familiar with
the Manage Scripts dialog, it's time to
| | 05:04 | move onto understanding how the Edit
Script window works. In upcoming movies in
| | 05:09 | this chapter, we will take a look
at building some Sample Scripts.
| | Collapse this transcript |
| Creating multi-line scripts| 00:00 | Earlier in this title we looked at
assigning a single script step to a button
| | 00:04 | on a layout. However, most scripts
will have multiple lines of steps because
| | 00:08 | scripts become much more extensible
with the combination of steps instead of
| | 00:11 | just one step alone.
| | 00:13 | So let me show you an example of
creating a script instead of just assigning
| | 00:16 | the script step to a button. You see
here on this layout we have got a Print
| | 00:20 | button and when you press the Print
button, it prints the layout that you are
| | 00:24 | currently on. However, this layout is
not print ready and therefore shouldn't
| | 00:29 | be the one that prints. Instead, we
have another layout, which is called the
| | 00:31 | Adventure Sales Detail which is
print ready. So instead we would like to
| | 00:36 | navigate the user over to that layout,
have it print that layout and than move
| | 00:40 | them back to where they started. That
takes multiple actions instead of just
| | 00:44 | the print action.
| | 00:46 | If you look inside Layout mode you
see that we have button and what we have
| | 00:50 | assigned to that button is the Print
action. Instead, let's create a new script
| | 00:55 | that does the various different steps
like moving the user from this layout to
| | 00:59 | the print layout, printing and then
taking them back to where they started.
| | 01:02 | We start creating our new scripts
under the Script Maker window selecting
| | 01:06 | Manage > Scripts and then the New
button. This will pop up an Edit Script
| | 01:12 | window at which time we want to name it
something and we will name it something
| | 01:17 | that make sense when we are trying to
retrieve the script later, PrintAdventure
| | 01:24 | and now we browse through the
different script steps and determine what's the
| | 01:28 | first one we want to start with.
| | 01:30 | Now remember we want to figure out
what our end goal is. Our end goal is to
| | 01:33 | start at the layout where the user
initiates the script, take them to a print
| | 01:37 | ready layout, print that layout and
then take them back to where they started
| | 01:41 | So step number one there is to
navigate the user to the Print Ready layout.
| | 01:45 | There is a script step under the
Navigation section that's called Go to Layout.
| | 01:50 | If we double click on it we see that
it moves it over into our script area.
| | 01:54 | Now we just need to configure the
Script Step Options. In this case, we need to
| | 01:58 | tell it what layout to navigate to.
That's where we pick Adventure Sales
| | 02:02 | Detail. Next we want to be able to
print this item so if we scroll down to the
| | 02:08 | print and if you are having trouble
finding any script step, you can always
| | 02:11 | just go, all by name, click inside and
hit P and you see it will take you down
| | 02:16 | alphabetically to all the different
script steps that start with P. Here we see
| | 02:21 | the Print step. We can double click on that.
| | 02:24 | We will note our Script Step Options,
Perform without dialog and Specify print
| | 02:29 | options. If we select Perform without
dialog this means that the user won't be
| | 02:33 | prompted with the Print dialog window,
thus not been able to choose which
| | 02:37 | printer they want and some of the
other options that are specified in that
| | 02:41 | dialog window. In this case
we will keep it unchecked.
| | 02:44 | Now that the user is gone to that
layout and printed, we would like to navigate
| | 02:48 | them back to the layout where they
started. If you choose the Go to Layout
| | 02:53 | script step and double click on it. Of
course, what you could have also done as
| | 02:59 | you see if Clear this one, I could have
selected the original and hit Duplicate
| | 03:04 | and then moved it down thus saving me
an extra step and you see at the very top
| | 03:09 | of the list is the original layout.
This is a handy tool inside you scripts
| | 03:13 | that allows you to take your user
back to where they initiated the script.
| | 03:17 | So in this case we will do that and we
will add one more just for fun. If you
| | 03:21 | look down under your Miscellaneous
category, double click on Show Custom
| | 03:25 | Dialog, in order to configure the
custom dialog and its contents you just hit
| | 03:30 | the Specify button and you give it a
title. As you see here on the top this is
| | 03:37 | the title of the window, Your Adventure
Has Been Printed will appear in the top
| | 03:46 | Title bar and for the user you can say
user, Your Adventure has been printed.
| | 03:58 | Any of the ability to name the button
that show up on screen, you see on this
| | 04:01 | one we have got OK and Cancel which
is pretty standard for any system or
| | 04:06 | application level dialogs but here we
can just allow maybe one that says OK or
| | 04:13 | Thanks or something along those lines.
And you can also have a little bit of
| | 04:17 | fun with your Message or the Title; you
can make it dynamic using what you now
| | 04:21 | about calculation fields.
| | 04:22 | If you hit the Specify button instead
of just saying, Your adventure has been
| | 04:26 | printed, you can say some text and a
little bit of space and you can use
| | 04:36 | ampersand, which will concatenate your
text with the field value. In this case,
| | 04:41 | we are going to use a function, if you
recall the Get functions, we will use
| | 04:45 | Get AccountName. So what this will do
is say Hey, whatever the AccountName is,
| | 04:52 | your adventure has been printed.
| | 04:56 | So let's hit OK and OK again and now
we have got multiple lines in our script
| | 05:02 | and really you could add any combination.
Sometimes scripts can be pages long,
| | 05:06 | sometimes just a few rows long, but
in this case now we can close out our
| | 05:11 | script. You noticed by the way that a
script is unsaved when it has an asterisk
| | 05:14 | at the end of the name.
| | 05:16 | So we can use the Apple+S as in Save or
the Ctrl+S to save it and we can close
| | 05:23 | the window now if would like or we
can keep it open and just toggle over to
| | 05:26 | file, just in case we need to come back
to it and make some modifications. Now
| | 05:31 | we have got our button and we go to
Format button on the layout and you see
| | 05:36 | it's just got the one step currently assigned.
| | 05:38 | If we scroll up to the top of the
screen, one of the script steps is Perform
| | 05:43 | Script and this is very handy, for when
you want to do more than one script at
| | 05:47 | a time, you just go create a script
with multiple actions in it and then you
| | 05:50 | assign just this one step to the button.
So you have to click on Perform Script
| | 05:54 | and then hit Specify and select the
script that you want to run and hit OK, hit
| | 06:00 | OK again to close the dialog and then
you want to save this change in your layout.
| | 06:04 | Now you will notice that when the user
hits the Print button it will toggle the
| | 06:08 | Print dialog window at which time we
can say Print Preview. This would be what
| | 06:15 | the print document looks like. In this
case, we are printing it in preview and
| | 06:19 | then it says, Hey Admin, which is the
account name that I am used to login,
| | 06:23 | Your adventure has been printed and I
say thanks and it takes me back to my
| | 06:26 | original layout.
| | 06:28 | So scripts can be useful either as a
single step or as multi-line scripts and
| | 06:32 | you will find that most of the scripts
that you create will be a combination of
| | 06:35 | different steps making
them that much more useful.
| | Collapse this transcript |
| Building a subsummary script using If statements| 00:00 | A good example of a multi-lined script
is the script that gets generated when
| | 00:04 | you create a sub-summary report. If
you go into Layout mode and use the New
| | 00:09 | Layout Assistant, you will notice if
you pick the List/Report option and choose
| | 00:16 | Grouped Data and I will cycle through
here with some example fields. You will
| | 00:21 | notice that the very last step of the
report is where you can either create a
| | 00:28 | script or not create a script. I have
decided that I would create one of these
| | 00:31 | scripts to show you something
interesting about FileMaker 10.
| | 00:35 | You can access the script inside the
Exercise File under Manage > Scripts and
| | 00:39 | it's called Customer Report and if you
go into Edit mode, you see that this is
| | 00:43 | a great example of a multi-lined
script because there is a bunch of different
| | 00:47 | things that you have to do to create a
sub-summary report. You first have to
| | 00:50 | get into Browse mode, navigate over to
a layout that has the sub-summary part
| | 00:55 | established and then sort by the Break field.
| | 00:57 | So we start off with the first script
step. Enter Browse mode, which takes us
| | 01:01 | to a mode that's compatible with the sub
-summary report. Takes us to the layout
| | 01:07 | called Customer Report that has the sub-
summary parts on it. And then we go to
| | 01:12 | Sort Records and we can specify the
Sort order in the same way that we specify
| | 01:18 | the Sort order when we are creating a
live sort. We just get the Sort Records
| | 01:21 | dialog window when we choose the field,
the Order in which it sorting and then
| | 01:26 | we can restore that in the script.
| | 01:28 | But the behavior for a sub-summary
report is different in versions before
| | 01:32 | FileMaker 10. So it's not a bad idea to
put in a condition just in case one of
| | 01:38 | your users accesses this report but
they are not using FileMaker 10. You see
| | 01:43 | here that I have put in the comment.
Go to Preview mode for earlier versions,
| | 01:47 | which do not support summary reports in
Browse mode. And it will use something
| | 01:51 | that's called an If statement. If you
recall in the Calculation section we
| | 01:56 | talked about the If function because
it can introduce conditions into our
| | 01:59 | calculation functions.
| | 02:01 | Here, it's introducing a condition
into our script. So the condition can be
| | 02:06 | specified by clicking on the Specify
button and we will get the familiar
| | 02:09 | specified calculation window on screen.
If you also recall from our discussions
| | 02:14 | in calculations, we know that there
are several Get functions. One of the Get
| | 02:18 | functions will determine what the
application version or the version of
| | 02:22 | FileMaker is that you are using. In
this case, if it's anything less than
| | 02:25 | version 10, we then want to navigate
users to Preview mode and then to Browse
| | 02:31 | mode because if you don't do those two
steps in any version prior to 10 you are
| | 02:36 | not going to be able to get
your sub-summary report to draw.
| | 02:38 | So this is an example of a multi-lined
script that has a condition in it and
| | 02:42 | which you should know is that any If
statement. If you start an If statement in
| | 02:46 | your script, you are going to need to
end that If statement as well. Because
| | 02:50 | FileMaker is going to need to know
when you are done asking the question or
| | 02:53 | imposing the condition on the steps
within your script. So just like in a
| | 02:58 | calculation, we are saying do this
test and if it's true do this and if it's
| | 03:02 | false do that.
| | 03:04 | Here is the test, if the application
version is less than 10, so if it's true
| | 03:09 | it's going to do everything that's
indented below it. But if it's false, it's
| | 03:12 | just going to continue on and go to the
next step after the End If. So in this
| | 03:16 | case, we are doing two things at one
time. We are running a report that will
| | 03:20 | generate the sub-summary report for
us and it's also checking our version
| | 03:24 | control using an If condition statement.
| | 03:26 | So now we will save our script and we
see it listed here in our Script List. If
| | 03:31 | we go into Browse mode we can now run
the script, as you see it takes us over
| | 03:37 | to our Customer Report layout. And
it sorts everything appropriately and
| | 03:42 | displays everything in a grouped format
just like we intended it to. So you can
| | 03:46 | create a sub-summary report by hand or
using the Layout Assistant, but either
| | 03:50 | way you should take into account the
possibility that people might be running
| | 03:53 | this report in a version less than FileMaker 10.
| | Collapse this transcript |
| Setting print options| 00:00 | One of the supported script steps is
the ability to print documents through
| | 00:04 | your Script Maker. If you look at one
of the scripts that we have created in an
| | 00:08 | earlier movie under your Manage >
Scripts, if you choose PrintAdventure, you
| | 00:12 | will see that we have decided that we
wanted to print a layout. So we added the
| | 00:17 | Print Script step.
| | 00:19 | In this movie, I am going to take a
minute to show you the couple of the Script
| | 00:21 | Step Options for the Print step. You
will see here that at first you can
| | 00:25 | perform it without dialog and sometimes
that's a good idea. If you just wanted
| | 00:29 | to print to the user's default printer
then you can select the Perform without
| | 00:33 | dialog and they won't be bothered by
having to hit OK when the Print dialog pops up.
| | 00:39 | But I would like to concentrate on the
Specify print options here in this case.
| | 00:44 | Here you can see the user is allowed to
select to print driver and selecting a
| | 00:48 | print driver will affect the dotted
lines on your layout. What I am talking
| | 00:52 | about in the dotted lines is you go
back to the file and go into Layout mode.
| | 00:59 | You see these dotted lines here really
your print edge. These are affected by
| | 01:03 | the print driver that's selected at the
time that you viewing the layout. Back
| | 01:07 | in the script you will notice that you
can choose the Printer and there is also
| | 01:14 | some additional details. You can save
inside of the script step whether or not
| | 01:18 | you are printing all pages, From 1
to 1 whichever you want to do there.
| | 01:22 | And you will notice that there is an
option for FileMaker Pro in this dialog.
| | 01:26 | Keep in mind that this dialog is for
the HP Printer that I am set up to right
| | 01:30 | now on this computer. But every print
driver has a different view. So don't be
| | 01:34 | alarmed if you look at this and it
doesn't match the print driver that you have
| | 01:36 | on your machine. Somewhere in your
print driver is going to be a drop down
| | 01:40 | where you can choose the FileMaker
Pro option and from there you have some
| | 01:45 | additional selections you can make. The
first of which being you want to print
| | 01:49 | the records being browsed,
which is just the active record.
| | 01:52 | And in this case, this would make
sense because we just want to print the
| | 01:55 | adventure that we are on. Records being
browsed means print all the records in
| | 02:00 | your found set. So if you happened to
have a Show All before you press this
| | 02:04 | button, it's going to print one page
for every single record in the database.
| | 02:07 | So that means that it probably makes
more sense in this script to select
| | 02:11 | current record. Which just means it's
going to just print the active record.
| | 02:15 | Another interesting option that you
see here is the ability to print a blank
| | 02:19 | record. Sometimes you might have a
Formed layout that you created in FileMaker
| | 02:23 | with fields in it for data entry.
Sometimes it's not a bad idea to be able to
| | 02:27 | print out a blank copy of that. Fax it
over to somebody for them to hand fill
| | 02:31 | out and then they can send it
back it to you for transcribing.
| | 02:33 | Here's various different reasons
that printing the blank record might be
| | 02:36 | helpful or during development if you
are planning on marking up a layout you
| | 02:40 | might want to print the blank record so
that you can use that as the basis for
| | 02:43 | your mark ups. There is also some
different behavior for the Print Setup in
| | 02:47 | FileMaker 10. Some users of FileMaker
Pro on windows had discovered that when a
| | 02:51 | FileMaker Pro solution was
developed on windows, the information that
| | 02:55 | identifies the selected printer for
print related script steps like this one
| | 02:59 | was saved with the script step.
| | 03:01 | Then when running the script the
selected printer would be targeted even if it
| | 03:05 | were not the default printer in that
particular user system. So apparently,
| | 03:08 | this didn't work for some printers
whose names were longer than 30 characters.
| | 03:12 | So it's kind of a gotcha. And so now as
you see some of these print drivers are
| | 03:18 | quite long, so FileMaker has fixed that
and remedied it in the current version
| | 03:23 | of FileMaker Pro. Now there is no
equivalent behavior for this on Mac however.
| | 03:27 | There are no significant UI changes.
It's just the way that it works that has
| | 03:31 | been affected by this. No dialogs are
been added or removed and no visuals
| | 03:35 | rearrangements were necessary. When a
user executes a print script step that
| | 03:39 | has been saved with Perform without
dialog option unchecked, the system print
| | 03:44 | related dialogs will be presented. And
that's the way that it acted before. Yet
| | 03:48 | no in FileMaker 10, FileMaker is going
to restore the printers selection in the
| | 03:53 | dialog to the selected
printer saved with this script step.
| | 03:56 | So when the user sees the dialog pop
up it will have the targeted printer
| | 04:00 | already selected. It's still gives them
an opportunity to toggle that but this
| | 04:03 | gives them an opportunity to sort of
pseudo save in the print driver into their
| | 04:07 | script step. However, if the selected
printer saved with the script step cannot
| | 04:12 | be found at runtime or if no selected
printer is saved with the script step
| | 04:16 | then the user's default printer will
be used instead. So this is a way that
| | 04:19 | FileMaker has remedied some of the
issues that they have had with this printer
| | 04:22 | script step in previous versions. So it
seems like all is fixed in FileMaker 10.
| | Collapse this transcript |
| Adding Find criteria to a script| 00:00 | Finding records is one of the most
common tasks users perform in FileMaker Pro
| | 00:03 | systems. As a result, finding records
is also a common action that scripts are
| | 00:07 | called to perform. Scripts can be
set up to perform any search a user can
| | 00:11 | perform manually and even some
that cannot be performed manually.
| | 00:15 | Because you can control a scripting
search more tidily than you can a manual
| | 00:18 | search, scripting searches are often
more efficient and reliable and this can
| | 00:22 | help with the system performance.
There are several script steps that may be
| | 00:26 | involved in finding
records including the following.
| | 00:29 | Go on to Script Maker and double-click
on Customer Report. You will see on the
| | 00:35 | left-hand side if you click the
Category and then Found Sets, here are several
| | 00:41 | script steps that may be involved in
finding records. We have got Perform Find,
| | 00:45 | Constrain and Extend Found Sets, Modify
Last Find and then Showing All Records,
| | 00:50 | which is really an unfind so to speak,
Omitting Records, Show Omitting, Omit
| | 00:56 | Multiple and then the Sorting and
Unsorting of records. Those all work with
| | 00:59 | Found Sets.
| | 01:00 | But the one that we are going to
concentrate on now is the Perform Find script
| | 01:03 | step. So in our Customer Report, let's
say what we would like to do is instead
| | 01:09 | of just running the report, instead we
want to isolate just the records in the
| | 01:13 | database that have a gold or a silver
customer type and then just add those to
| | 01:17 | the report and we would like to save
this into the execution of the report.
| | 01:21 | So if we go back into Customer Report,
before we get to the point where we
| | 01:28 | print, which is right about it Go to
Layout, we are going insert a Perform
| | 01:33 | Find. So I double-click on Perform
Find and I am going to move it up to under
| | 01:37 | Browse mode and now you see the
Specify button will allow me to insert the requests.
| | 01:44 | This is a little bit different than
entering search requests in Find mode on
| | 01:47 | screen, but we will end up with the
same result. So I need to create a new
| | 01:51 | request, so I hit New and of course, we
want to search for the Type. So here I
| | 01:59 | pick the field. This is like clicking
into a field when you are in Find mode.
| | 02:04 | So I am going to click into Type and
then this is the criteria that I would
| | 02:07 | type into the field. All the operators
are supported here, but in this case, we
| | 02:11 | won't use them. But just see now
because you can wrap your head around the fact
| | 02:14 | that this really is just picking the
field to click into and then what you are
| | 02:18 | going to type into that field.
| | 02:20 | So in this case I will say Gold and
now I am going to say Add. So up here we
| | 02:24 | have Customer Type, Gold. So now I am
done with this request, I can hit OK. So
| | 02:30 | I see I have one request and this is
like when you go into Find mode and you
| | 02:33 | type in -- now I am going to type in
Gold into the Type field but I also want
| | 02:37 | to find Silver. So what would I do in
that case, I would create a new request
| | 02:42 | and so I am going to have a request
for Gold and a request for Silver which
| | 02:45 | will return back a Found
Set that has both types.
| | 02:47 | So I will hit New again, choose Type
and then type Silver and hit Add and then
| | 02:56 | hit OK. So now, you see that I have
both requests saved and I can keep adding
| | 03:00 | more and more request if I want to.
You should also note that when I am
| | 03:03 | creating a request, I can either make
it a Find request or an Omit request.
| | 03:08 | So if I wanted to find all of the
customers in one state, but omit all the ones
| | 03:12 | that were Silver. Then on this Find
request, I would have it say Omit, but in
| | 03:18 | this case, we are just going to leave it as is.
| | 03:21 | So now we say OK and now it's going to
perform that find automatically. It's
| | 03:25 | just going to go ahead and execute
the Find without the user having to
| | 03:28 | interact. So let's save our script
because we see we have an asterisk next to
| | 03:32 | it. So I will do Ctrl+S or Apple+S
and I will go back to the report and now
| | 03:39 | let's run the script, Customer Report.
| | 03:43 | You see we only have 520 records out of
the total 1522 and you see that all of
| | 03:50 | them have a Gold or a Silver type. Now
you might also want to allow the user to
| | 04:01 | enter in a value to search. So let me
show you how you can do that as well.
| | 04:06 | So instead of storing the criteria
into the Find, maybe you want the user to
| | 04:09 | tell you what types they want to see in
the report. So in that case, we take a
| | 04:13 | little different approach. If you go
into all by name, what you will want to do
| | 04:20 | is emulate entering Find mode. So if
double-click on Enter Find Mode, we go
| | 04:25 | here and you see by
default it allows you to pause.
| | 04:29 | So this is a lot like if you go into
Find mode and you see that we are paused
| | 04:35 | waiting for the user to enter a value
in here. This is the manual operation
| | 04:39 | that we are trying to emulate with the script.
| | 04:42 | So back in the Script window, we say
Enter Find Mode and now we are waiting for
| | 04:47 | the user. That's what the pause is, is
it waiting for the user to enter in a
| | 04:51 | value and then when the user hits
Continue, it will perform find. But here we
| | 04:55 | have to remove the restore of the Find
request to allow the user to enter in
| | 05:00 | the Find request.
| | 05:01 | So let's save our script and we will
go back to where we started Customer
| | 05:06 | Detail and we will go back into
Browse mode and now let's run the script.
| | 05:12 | Customer Report, takes me into Find
mode and now we want to direct the user to
| | 05:18 | go to the Type field.
| | 05:19 | So let's go cancel this find, go back
into our script and this is a pretty
| | 05:25 | popular way to do it. You just make a
change, test it out, go back and modify
| | 05:29 | it. So here there is a script in here
that says Go to Field. So we will Enter
| | 05:36 | Find Mode and go to the Type field
and why don't we go so far as to show a
| | 05:42 | message. If you recall in a previous
movie, we did the Show Custom Dialog. We
| | 05:49 | will say Please enter the type for your
customer report. So now you see that we
| | 06:00 | need to save our script, so we can test
it. So I will hit Ctrl+S and we will go
| | 06:05 | back and then now let's run the script.
| | 06:08 | So now you see that the script has been
paused as we instructed it to, allowing
| | 06:13 | the user to click into the Type field
and choose any type that they would like.
| | 06:17 | When the user is done, they can press
the Continue button or they can just hit
| | 06:20 | the Enter key on their keyboard and up
pops the report showing the type that
| | 06:25 | they selected.
| | 06:27 | So since finding records is one of the
most common tasks that users perform in
| | 06:30 | FileMaker. It's a good idea to get
familiar with the different Find Script
| | 06:34 | options when you are authoring scripts,
since creating scripts is really just
| | 06:39 | emulating the work that users do by hand.
| | Collapse this transcript |
| Using Set Field and Set Field by Name| 00:00 | The Set Field script step is easily
one of the most important and useful steps
| | 00:04 | allowing you to set the contents of a
field to the result that's generated by a
| | 00:08 | calculation formula. It is the
calculation formula portion of the Set field
| | 00:13 | script step that makes it so versatile.
This is the primary tool that you will
| | 00:17 | use to modify field data from within a script.
| | 00:20 | Let's take a look at a script that
contains a Set Field script step so that you
| | 00:23 | can see how it's used. You go into
Manage > Scripts and you will notice that I
| | 00:28 | have a Set Debit. So what's happening
in this script is that the user has to
| | 00:33 | enter a total into either the Debit
field or the Credit field on this order
| | 00:36 | line item based on the type
of transaction that it is.
| | 00:40 | So the transaction type is based on
the script parameter from the button from
| | 00:43 | where it was selected. So this script
could be executed from various different
| | 00:47 | layouts, it all depends on the script parameter.
| | 00:49 | So here we say if the ScriptParameter
= Debit, then set the OrderLine Debit
| | 00:56 | field. So you see the target field,
which is Debit in the table OrderLine. So
| | 01:02 | the first part of this in the brackets
is the field where you want to put the
| | 01:06 | value and the second part is the value
you want to put in the field. So you see
| | 01:11 | here in this Specify Calculation dialog,
we just put one field. But you can put
| | 01:15 | an entire calculation in there with
all sorts of conditions and make it as
| | 01:18 | sophisticated as you like.
| | 01:20 | But in this case we just wanted to put
the value that's in a field and then we
| | 01:24 | use the Set Field script step one
more time, so if it does not equal debit,
| | 01:29 | then we want them to go to a
different field and you see in this case, the
| | 01:32 | field is Credit and put in the same value.
| | 01:36 | So when creating a new record in a
script, you will want to use Set field
| | 01:39 | because it will accomplish two tasks
for you. First, it allow you to navigate
| | 01:43 | to a field and then secondly, it allow
you to put some value into that field
| | 01:47 | and since you are using the
Calculation dialog for that field, it could be a
| | 01:51 | text value, the value from
another field or the result of an entire
| | 01:55 | calculation. It gives you a lot
of versatility in your scripts.
| | 01:58 | There is a couple of things that you
will need to know though. First, when a
| | 02:02 | script navigates to a record and then a
Set Field step is activated. That means
| | 02:07 | that it's going to a target field
and its acting as if a user has clicked
| | 02:11 | inside the field and begun editing.
This does what's called locking a record.
| | 02:16 | But even though it locks the record,
when it moves on to another record it
| | 02:20 | hasn't yet committed the value in
that field. So if you are doing something
| | 02:23 | like creating a child record and you
want to use a Set Field to populate the
| | 02:28 | foreign key value or something along
those lines, it's important that you
| | 02:31 | commit the value.
Committing means saving the value.
| | 02:35 | The Set Field script will navigate you
to a field and then put the value that
| | 02:39 | you have told it to put into the field
except it won't save it to the database.
| | 02:43 | So in order to make sure that it's
saved, I would recommend that you use the
| | 02:47 | Commit Records/Requests Script Step.
| | 02:50 | So as you are learning the Set Field, I
strongly recommend that you also couple
| | 02:55 | it with the Commit Record/Request
with the Perform dialog and the Skip data
| | 03:00 | entry validation option selected. So
you can open and lock a record but make
| | 03:05 | sure that you are saving the record
when you are done setting the value. So
| | 03:08 | it's a good idea to try to get
comfortable with Set Field because you will find
| | 03:11 | as you create more and more elaborate
scripts that you are going to be using at
| | 03:14 | all the time.
| | 03:15 | Now FileMaker 10 has a new Set Field
and this is actually a pretty big deal
| | 03:19 | because nothing is changed on the Set
Field script steps in quite some time.
| | 03:24 | But as you see in our Set Debit script,
we have to have a condition in here
| | 03:28 | because the Set Field can
only choose one target field.
| | 03:32 | So when choosing a Set Field, you
have to hard code in the Target Field but
| | 03:36 | there is a new script step now that
does the same thing but does it in a more
| | 03:39 | dynamic fashion. If you go under Manage
> Scripts to Set Debit by Name, you see
| | 03:46 | we have one, two, three, four, five,
six, seven script steps that can now be
| | 03:51 | accomplished in a set of two. It's
this new Set Field by name script step.
| | 03:56 | So using a ScriptParameter, which
means that when you assign the button to a
| | 04:00 | layout, you can assign a parameter
to it. In this case, we can assign a
| | 04:04 | parameter that either says Debit or we
could have it say Credit depending on
| | 04:08 | where it's been executed.
| | 04:10 | So this way we don't have to put an if
statement or a condition in here at all.
| | 04:14 | We just say go to the field that's
identified in the ScriptParameter. So here
| | 04:18 | you are going to use the exact same
name in your ScriptParameter as the field
| | 04:22 | name and populate that
field with the OrderLine total.
| | 04:26 | Of course, as we just talked about, we
want to make sure that each time we have
| | 04:30 | the Set Field; we are going to want to
follow it by a Commit Record/Request. So
| | 04:33 | now you can see that the six step
script can now be replaced by just a single
| | 04:38 | line script with a commit record
following it. So the more comfortable that you
| | 04:42 | get with the Set Field script step,
the more elaborate your scripts will be.
| | Collapse this transcript |
| Using script parameters| 00:00 | In this chapter, we've been discussing
creating scripts. Now creating scripts
| | 00:04 | is one thing but executing those
scripts or allowing those scripts to run is
| | 00:08 | something entirely different. Now, of
course, FileMaker 10 has all sorts of new
| | 00:11 | ways that you can trigger
the execution of the script.
| | 00:14 | One thing that you might notice, when
you're assigning a script to either a
| | 00:17 | button or a trigger, is that there
is something that's called a Script
| | 00:20 | Parameter. We'll take a look at that
dialog in just a second but let me show
| | 00:24 | you an example of why this might be useful.
| | 00:26 | So if you look in this Exercise File,
you see that we've got 27 buttons up on
| | 00:32 | screen. Each one of the buttons has a
script action attached to it, so that
| | 00:36 | when I press a button, what it does is
it executes a Perform Find and puts in
| | 00:41 | the criteria of whatever the letter
is that I'm pressing, becomes the search
| | 00:45 | criteria. So I press the letter I and
you see it searched for all the last
| | 00:49 | names that begin with I. If I do T, it
comes back and says it can't find any.
| | 00:54 | So no records are found. W gives me all
the W's, B gives me all the B's and so on.
| | 01:00 | So if you have 27 different buttons
that all do a different action, for
| | 01:05 | example, clicking on this button will
find all the W's but clicking on this one
| | 01:10 | finds all the I's, how many different
scripts do we think that would require
| | 01:13 | that we need to author? On older
versions of FileMaker, this would have
| | 01:17 | required 27 total scripts. In current
versions of FileMaker, we have exactly
| | 01:23 | one script to find in this file. The
reason for that is because we're using
| | 01:27 | something called a Script Parameter.
| | 01:29 | If you look inside this script, you
see that we enter Find mode. Then while
| | 01:34 | we're in Find mode, we set a field
called LastName with something called a
| | 01:38 | ScriptParameter. Now you'll notice in
the Calculation dialog that we're using a
| | 01:43 | Get function called Get (ScriptParameter)
but where does that parameter come from?
| | 01:50 | We'll go into Layout mode and click
on one of these buttons and we'll say
| | 01:53 | Format > Button Setup. You'll see
that we're saying Perform Script, but
| | 01:57 | anywhere that you're picking a script,
you'll notice this window down below
| | 02:01 | that says Optional script parameter.
And here what I've done is I've put the
| | 02:05 | letter G. So what happens is based on
these instructions, when the user hits
| | 02:11 | the button, not only is the script
going to run but it's also going to set a
| | 02:15 | ScripParameter into FileMaker's memory.
| | 02:18 | Then inside the script, we then
extract that out through this Get
| | 02:25 | (ScriptParameter). So basically where
it says Get (ScriptParameter), it's just
| | 02:29 | going to put in whatever value we
assigned as the parameter on the button. So I
| | 02:32 | can run the same script and if I run it
on the letter G, then it's going to set
| | 02:37 | the last name with the letter G; if I
run it on M, it will set it to M and so on.
| | 02:42 | The idea of the ScriptParameter was to
make script writing more efficient, so
| | 02:46 | that you didn't have to create so many
scripts. You could make it dynamic so
| | 02:49 | that you could create one script and
run it for many locations throughout the
| | 02:53 | system. You notice you can do that
in the Script > Button Setup dialog.
| | 03:00 | Then also, if you go into your Script
Maker and Perform Script, you have that
| | 03:07 | Optional parameter there as well.
Later in this movie, we'll be talking about
| | 03:13 | script triggers but just as a note
while we are on the topic, you can set a
| | 03:17 | script parameter there as well.
| | 03:19 | So the script parameter is just a
piece of information, whether it's text,
| | 03:23 | a field, or an entire algorithm because
you can use the Calculation dialog to set
| | 03:28 | the parameter. That value can then
get packaged up at the pressing of the
| | 03:33 | button of the script or at the
initiation of the script and then un-packaged
| | 03:36 | within the script and then used
within the script steps dynamically.
| | 03:39 | So remember when you're triggering a
script that you've authored in FileMaker
| | 03:43 | as either a trigger, a button, or a sub-
script, you have the option to specify
| | 03:47 | a script trigger. This will allow you
to get the same functionality at your
| | 03:50 | FileMaker solution but yet author fewer scripts.
| | Collapse this transcript |
| Building Send Mail script steps| 00:00 | One of the more popular end user
features in FileMaker is the ability to either
| | 00:05 | manually send an email or from within
a script in a FileMaker record. This is
| | 00:09 | called the Send Mail functionality.
The easiest way to do it is manually. Any
| | 00:14 | user, whether it's programmed into the
file or not, can go to a record that has
| | 00:18 | an E-Mail address on it and go under
the File menu and choose Send Mail.
| | 00:23 | You'll see the Send Mail dialog box pop
-up. Then what the user can do is map
| | 00:28 | some of the fields on the record to
the dialogs. In this case, you see To. We
| | 00:34 | want to specify a field name,
probably a good idea to send it to an email
| | 00:38 | address. You can put a copy on there,
if you would like to. You can put a
| | 00:43 | Subject in here, you can just say "Test
" or "This is cool", if you like. Or you
| | 00:47 | can go in and specify a field name
that you've set up for that. Or create a
| | 00:51 | calculation that can pull in all
sorts of dynamic information, using your
| | 00:55 | function. So let's say Get functions
for the account name or the information
| | 00:59 | that you're deriving from the record.
The sky is the limit as far as which you
| | 01:03 | want to put in here.
| | 01:04 | You can even attach your file, just
by choosing a file on your Desktop
| | 01:07 | somewhere. I don't know. It will attach
to your email. Then when you hit OK, it
| | 01:11 | will send a Send Mail command to your
operating system default email client.
| | 01:16 | Most clients are compatible with this
functionality but it's definitely, we're
| | 01:20 | testing before you deploy it onto your network.
| | 01:23 | So users can do this. You'll notice
that there is a supported script step in
| | 01:27 | the script maker too. If you hit Edit,
you can perform this without dialog.
| | 01:32 | Performing without dialog is the way
that you can toggle between having the
| | 01:36 | email go directly to your Outbox, as
you've addressed it, or it goes into your
| | 01:41 | drafts. So depending on what you
want to do, you can play around with the
| | 01:45 | Perform without dialog checkbox.
| | 01:47 | You see you get the same window in the
Send Mail. One thing that I wanted to
| | 01:53 | point out is that you see you have an
option to send one email, meaning the
| | 01:57 | data in the current record, or
multiple emails, one for each record in the
| | 02:01 | found set. This is a really neat, new
feature because what it allows you to do
| | 02:06 | is author an email one record at a time,
meaning you're not going to send out
| | 02:10 | some email blast that will get caught
in a spam screener, for all 1522 contacts
| | 02:16 | at once; but instead it will go one at
a time and send out emails from whatever
| | 02:21 | address that you have set up in your
email client to whomever is addressed in
| | 02:26 | the email field on each individual record.
| | 02:29 | This is a great feature for
communicating with your customers or if you decide
| | 02:33 | to use this as a script step. If you
create a new order, you can have it
| | 02:37 | automatically send a confirmation to
your users, whatever it is that you would
| | 02:40 | like to do. So the more robust the
calculation that you build inside the body
| | 02:44 | and the subject, the more
effective this email could be.
| | 02:48 | There is something new in FileMaker 10
that makes this even more interesting.
| | 02:53 | Admittedly, in previous versions of
FileMaker sending a large group of emails
| | 02:59 | out through email client could pose a
problem. There are so many variables
| | 03:03 | involved that have nothing to do with
FileMaker that sometimes this combination
| | 03:06 | doesn't work very smoothly.
| | 03:08 | For example, you could have
incompatible email clients, you could run into
| | 03:12 | something that's called a Port 25
conflict, which means depending on your ISP,
| | 03:17 | if you try to send out a certain number
of emails, sometimes it's as low as 50,
| | 03:21 | sometimes it's a couple of hundred;
but if you send out too many emails in
| | 03:24 | short enough period of time, you get
flagged as a spammer and then they'll shut
| | 03:28 | up your ability to send outgoing
emails. That's not a good thing.
| | 03:32 | So what FileMaker added in both the
manual version under the File menu and in
| | 03:37 | the script step, was the ability to
toggle between either an email client or an
| | 03:42 | SMTP server. This is a huge improvement
over just using the client. As a matter
| | 03:46 | of fact, I would go so far as to say
that you should just setup the SMTP
| | 03:50 | options any time you're
using the Send Mail script step.
| | 03:53 | SMTP options are just the options that
you setup, when you put a new account
| | 03:57 | into your mail client. If you're not
sure what these are, contact your IT
| | 04:01 | department or whoever supports your
mail accounts and ask them for this
| | 04:04 | information. What it allows you to do
is set up the Name, Address and Reply-To
| | 04:09 | Address for the account that you
want the all the emails to be from.
| | 04:13 | Then of course, you need some
outgoing SMTP information, whether it's the
| | 04:17 | server address, the port that's being
used and then your authentication method
| | 04:21 | with the user name and password; all
that information needs to be saved in the
| | 04:24 | script, so that your emails can go out.
All you need to do is configure the
| | 04:29 | SMTP options and then just hit Send
Mail. What it does is it sends an email,
| | 04:34 | just like your mail client does, but
you don't have to have the mail server on
| | 04:38 | your machine, you don't even have to
have an email client on your machine. You
| | 04:40 | can just put all the information in here,
store it and then distribute the file
| | 04:45 | either on the network or to other users.
They'll be able to send from the same
| | 04:49 | account that you've set up. It's a
really amazing, a versatile option that's available.
| | 04:54 | You don't only have to put in one
account but you can put in conditional
| | 04:58 | accounts. All these Specify buttons in
the script step allow you to put in If
| | 05:02 | statements or conditions that say if
this email is pertaining to this, then
| | 05:07 | make it come from this address. So for
example, if you say if the email is a
| | 05:12 | confirmation, then have it come from
one address; or if it's an inquiry, have
| | 05:16 | it come from another address; if it's a
sales thing, so on and so on and so on.
| | 05:20 | So really the sky is the limit and
this is really one of the real sleeper
| | 05:23 | functions inside FileMaker 10. So
remember that you can train your users to go
| | 05:29 | under the File menu to execute the
Send Mail or you can build it in, in any
| | 05:33 | robust fashion that you like as a
script step into your existing scripts. So
| | 05:38 | have some fun with this one because
this is really one of the really neat
| | 05:40 | improvements in FileMaker 10.
| | Collapse this transcript |
| Executing server-activated scripts| 00:00 | I just wanted to take a quick moment
to mention that scripts can be executed
| | 00:04 | from the web and from the server.
Those on the server side can be automated.
| | 00:09 | Now we're not talking about web
publishing or any server configuration in this
| | 00:13 | title, but none of those technologies
have changed at all since FileMaker 9. So
| | 00:17 | if you're interested in great detail on
either the subject of web publishing or
| | 00:22 | server configuration, please take a
look at the FileMaker 9 beyond the basics
| | 00:26 | titles and you'll get all
the detail you need there.
| | 00:28 | With that in mind, I wanted to point
out one thing, when you go into manage
| | 00:31 | scripts. If you look at your scripts
in the bottom-left hand corner, you'll
| | 00:37 | notice something that's new to
FileMaker 10. That is the Compatibility option.
| | 00:44 | So you see that you have three
different options there, the Client
| | 00:46 | compatibility, Server compatibility and
Web Publishing. So all script steps are
| | 00:52 | not compatible in all technologies. So
you can't run every one of these scripts
| | 00:56 | from the web and you can't run every
one of these scripts from the server.
| | 00:58 | Now when I talk about executing scripts
from the web, I'm talking about having
| | 01:02 | a browser-based version of your
database with buttons on it. That when users
| | 01:07 | click on them, it can communicate back
to the database on the server and then
| | 01:11 | run a script. Now for the server
execution, what I'm talking about there is
| | 01:15 | that you can set up a schedule on your
server to run a script in the middle of
| | 01:19 | the night, for example.
| | 01:21 | So let's say everyday you import a
bunch of data in from another system or you
| | 01:25 | want to send a bunch of confirmation
emails out in the middle of the night.
| | 01:28 | Well, you can create a script that does
that and then you can tell your server
| | 01:32 | to run that script in the middle of the
night. It does not require that anybody
| | 01:36 | logs into the database, it does it
all on its own. All the information is
| | 01:39 | contained right inside the server and
the script, so no one even has to bother
| | 01:43 | with it. Plus, it will keep a log that
all those scripts have run, so that you
| | 01:47 | can double-check everything
during your server management.
| | 01:51 | The thing that you have to pay
attention to when you're authoring scripts is
| | 01:54 | the compatibility issue. It's easy to
find client compatible scripts because
| | 01:59 | every script step is compatible on the
client. The client means FileMaker Pro.
| | 02:03 | So any script that you author will have
compatibility, if it's run in FileMaker Pro.
| | 02:07 | However, if you run it on server,
you'll notice that some of the scripts on the
| | 02:12 | left hand side are grayed out. Like
you see the Pause/Resume Script, Install
| | 02:16 | OnTimer, a lot of the Insert script
steps and any Window management. This all
| | 02:22 | makes sense because you're actually not
logged into a copy of the file, you are
| | 02:26 | just sending instructions through the
guts of the server. So therefore, you
| | 02:30 | can't open any files or change
anything within the application itself and
| | 02:34 | that's why you see most of this is grayed out.
| | 02:36 | The same is true with Web Publishing.
There is a few like the one you saw just
| | 02:39 | get highlighted. Open URL is supported
in Web Publishing but not on the Server.
| | 02:44 | Then from a server standpoint, if you
look at importing and exporting records
| | 02:53 | -- if you note Import Records, when we
go into Server, that's supported on the
| | 02:57 | Server but not on the Web. Mostly,
those are the same in each case, but one
| | 03:02 | thing that's also new in Server 10 is
that importing and exporting used to not
| | 03:06 | be supported, when a script was run
from a server in FileMaker 9. Now in
| | 03:11 | FileMaker 10, they are supported.
| | 03:12 | So just a couple of notes here about
the fact that you can run scripts from the
| | 03:15 | web and you can also schedule to run
them from the server. That when you're
| | 03:19 | authoring scripts, you should take
into account the compatibility because if
| | 03:23 | your script runs in to one of these
steps and it's been run from the Server,
| | 03:26 | let's say. You try to run one of these
grayed out ones, it's just going to skip
| | 03:30 | it and that might have different
behavior than your users might expect.
| | Collapse this transcript |
|
|
19. Script TriggersUnderstanding script triggers| 00:00 | Probably the most exciting new
feature in FileMaker 10 is the support for
| | 00:06 | something that's called script
trigger. Script trigger has easily been the
| | 00:10 | most requested item for FileMaker users,
probably for the last decade or so.
| | 00:16 | So finally, FileMaker 10 is incorporating
the use of this thing called script triggers.
| | 00:21 | Now what is a script trigger? Well,
creating a script is really just half the
| | 00:24 | battle because in order for this
script to run, it needs to be triggered or
| | 00:28 | executed from some action that's on
screen. So since triggering a script is
| | 00:32 | necessary for them to run, it's a good
idea to get familiar with the different
| | 00:35 | ways that you can do so.
| | 00:37 | First let's start with the ways that
you can trigger a script in versions of
| | 00:41 | FileMaker prior to 10, so that I can
differentiate the difference between the
| | 00:44 | new script triggers. Originally,
FileMaker allowed you to trigger scripts in
| | 00:48 | the following ways.
| | 00:50 | In Layout mode, you could attach a
script or a script step to a button or an
| | 00:56 | object down your layout. As you see here,
I have attached the Exit Application
| | 01:01 | script step to the Log Out button. Also,
you'll notice under your Scripts menu
| | 01:06 | is a list of scripts. When you create a
script, you can choose to check the box
| | 01:11 | next to the script name to make it
available to your users via the Script menu.
| | 01:16 | If you select one of these scripts, it
will automatically run the script for you.
| | 01:20 | So these two, the buttons and the
Script menu have been triggers in the
| | 01:23 | past. You can also assign scripts
to run on Open/Close, which we will be
| | 01:28 | talking about in the file
based script trigger movie.
| | 01:31 | Then for more advanced users, if you
create custom menus, you can have a script
| | 01:36 | trigger on a menu command. Then also,
you should be aware that you can trigger
| | 01:40 | a script on the server. You can do that
without a user having to log in to the
| | 01:44 | database. This was something
that was new in FileMaker 9 Server.
| | 01:48 | In FileMaker 10, there have been new
triggers introduced. They are broken up
| | 01:52 | into two categories, as far as the
new triggers are concerned. One is the
| | 01:56 | object-based script triggers and
then there is the layout-based script
| | 01:59 | triggers. We'll take a look at
each in the upcoming movies.
| | 02:02 | The object-based triggers allow you to
execute a script, when users clicks into
| | 02:06 | a field, or when they click out of a
field, when they modify a field value,
| | 02:10 | or when they click out of a modified field
value, which is a save, or if they press
| | 02:15 | one or more specified keys on the keyboard.
| | 02:18 | The layout-based script triggers,
when you load a record, commit a record,
| | 02:23 | revert to the previous record, a lot of
this navigation that you see up on top,
| | 02:28 | or also if you press one or more keys
not associated with an object,a nd when you
| | 02:33 | go to navigate to the layout, you can
run a script,a nd when you enter a new mode,
| | 02:39 | like Preview mode, let's
say, or if you exit a mode.
| | 02:44 | So this really is something to be
excited about. So we are going to take a look
| | 02:47 | at example of these in the upcoming movies.
| | Collapse this transcript |
| Using object-based triggers| 00:00 | The first set of triggers that we
are going to take a look at are the
| | 00:03 | object-based triggers. These are
triggers that deal with layout objects, most
| | 00:07 | specifically fields. For example, if
you click into a field or click out of a
| | 00:11 | field or modify or save a field
value then you can execute a script.
| | 00:16 | So all these will be based off of
Layout mode, if we go into Layout mode in our
| | 00:20 | Exercise file. We are going to want
to choose a field to apply our script
| | 00:24 | trigger. In this case, we will choose
the Description field. Once you have a
| | 00:28 | field selected you can go under
Format to Set Script Triggers. You can also
| | 00:34 | access this through the contextual menu
by right-clicking on the field. And if
| | 00:38 | you are a Mac user you can hold down
your Ctrl key and click on the field.
| | 00:43 | So then you will get the Set Script
Trigger dialog box. In our example, what we
| | 00:48 | want to do is run a script that checks
the spelling of a field, ones the user
| | 00:52 | makes a change in this field and then leaves.
| | 00:54 | So in this case, we want to do
ObjectSave, not just ObjectModify because they
| | 00:58 | have just been making the change but
after they have made a change and then
| | 01:01 | committed the record. So we will check
the box next to OnObjectSave and now it
| | 01:07 | pops up our Specify Script window.
This is where we pick the script that we
| | 01:11 | want to run when that action occurs.
| | 01:13 | Here we have got a script setup already
to run a CheckSpelling script step on a
| | 01:18 | field and we hit OK and we are going to
run this one just in Browse mode, as in
| | 01:23 | our case there is no saving inside
Find mode. So we hit OK and now the first
| | 01:28 | thing you notice on the layout is
that there is a small red asterisk in the
| | 01:31 | lower right-hand corner of the field
on the layout. This indicates that a
| | 01:34 | Script Trigger has been attached.
| | 01:36 | Now you have to be careful before you
go add script triggers on a layout to
| | 01:39 | make sure that none of the other fields
have triggers already assigned. And if
| | 01:43 | they do, go study the script assigned
to those fields and make sure that you
| | 01:46 | are not creating a conflicting event.
| | 01:49 | Let's take a look at how the Script
Trigger works. If I go into this layout and
| | 01:55 | change something on the field and now
click outside of it, you see that it's
| | 01:59 | invoked the Check Spelling dialog,
which was one of the steps inside the
| | 02:03 | script. By simply making a change and
leaving the field therefore committing
| | 02:07 | the value inside the field I
am able to invoke a script.
| | 02:10 | Let's look at another example using the
same field. Let's say in this case, you
| | 02:14 | will notice that we have an Audit Log,
imagine that your users want to have a
| | 02:18 | record created every time
somebody makes a change in this field.
| | 02:21 | The record will then be created in
a child file that will contain the
| | 02:25 | information on who made the change,
when the change was made and then the
| | 02:29 | original value and the new value.
That's all done in a script that we have
| | 02:33 | created here called
GrabExistingDescription and then CreateLogEntry. These are
| | 02:41 | all scripts that you can study where we
have identified an object and then grab
| | 02:44 | the values and set them to variables so
that we can use those variables when we
| | 02:47 | create the log file.
| | 02:49 | So we have two scripts already set up,
but we don't want the user have to go
| | 02:52 | run those scripts every time they
make the change, we want this to happen
| | 02:55 | behind the scenes. So let's go into
Layout mode and we are going to select the
| | 03:00 | field go under Format to Set Script Triggers.
| | 03:06 | Let's remove the one that we have added
earlier and in this case I am going to
| | 03:10 | select OnObjectModify. Now, this is
when I just make a change inside the field,
| | 03:15 | so in the logic of our story that we
are trying to achieve here, if the user
| | 03:19 | makes a change and only if they make a
change inside the field we want to set
| | 03:23 | the existing description of that field
to a variable. And those are the steps
| | 03:27 | that are contained within the
GrabExistingDescription script. So I hit OK but
| | 03:32 | we are not done yet, we want another
script to trigger on a different action.
| | 03:36 | So in this case, we have grabbed the
existing description if a user has made a
| | 03:41 | change. Now I am going to select the
OnObjectSave and I am going to select the
| | 03:46 | new script and that's CreateLogEntry.
This is the script that we looked at
| | 03:50 | earlier that creates a new record in
the Audit Log table and then takes the
| | 03:55 | information that we stored in the
variables which is the existing description
| | 03:58 | and then the new change that they have made
and places those values in to the new record.
| | 04:03 | All that's happening through the
script but now we can make it transparent to
| | 04:05 | the user. So we hit OK and you see we
still have the icon on there indicating
| | 04:11 | that there is at least one script
triggers assigned to this field.
| | 04:14 | We go into Browse mode and save our
changes and now we see there is no records
| | 04:18 | in the Audit Log and in this case I
will make a change to the values in the
| | 04:24 | field and I will click outside of
the field to the users it appears that
| | 04:28 | nothing has happened at all, but
what's actually occurred is that as you see
| | 04:32 | when we roll over we have assigned the
original value to the field and then you
| | 04:37 | can see what the new value of
the field was inside the record.
| | 04:40 | So all this happen without the user
knowing it, without the user having to
| | 04:43 | press any new buttons or execute any
kind of scripts visually at all and in the
| | 04:48 | case of an Audit Log this ones quite
useful because you don't necessarily want
| | 04:52 | the users to know that you
are tracking the changes.
| | 04:55 | So object-based triggers are extremely
useful. They can be used one at a time,
| | 04:59 | assign to fields, or layout objects
or several different triggers can be
| | 05:03 | assigned based on the different
actions for the same layout object. Now let's
| | 05:07 | take a look at the layout-based triggers.
| | Collapse this transcript |
| Using layout-based triggers| 00:00 | One of the groups of the new script
triggers that are introduced in FileMaker
| | 00:03 | 10, are called layout-based triggers.
These are triggers that you can assign to
| | 00:08 | any given layout that will run an
event or a script on the load of a record,
| | 00:13 | the commit of a record, the loading of
the layout, or entering a new mode, or
| | 00:17 | existing a new mode. Unlike their
counterpart, object-based triggers, these are
| | 00:21 | setup on the Layout Setup dialog.
| | 00:23 | Let me show you an example of this
here in our Exercise File. Let's say we've
| | 00:27 | got a file where we've created a layout,
you see the Customer by Tier layout on
| | 00:31 | screen here. This happens to be a
sub-summary report. As we know from
| | 00:36 | sub-summary reports, in order for them
to work properly on screen they need to
| | 00:40 | be sorted by the break filed.
| | 00:42 | So there is a script that will run
the report and each time that we run the
| | 00:47 | report, it turns our List view into a
group report. So let's say what we would
| | 00:53 | like to do is make sure that every
time a user navigates to the screen, that
| | 00:57 | the report is run. So that they don't
have to do those steps themselves. So
| | 01:01 | this would be the perfect opportunity
for us to use a layout-based trigger.
| | 01:05 | We'll go back into Layout mode and
we'll access the Layout Setup dialog by
| | 01:09 | clicking on the pencil next to the
layout list. You'll see that a new tab has
| | 01:13 | been added to the Layout Setup dialog
in FileMaker 10 and that's the Script
| | 01:17 | Triggers. You see here you've got
the OnRecordLoad, OnRecordCommit,
| | 01:20 | OnRecordRevert, but also
OnLayoutKeystroke, OnLayoutLoad, OnModeEnter and
| | 01:24 | OnModeExist.
| | 01:27 | In our example, we are going to attach
a script to the loading of a layout. So
| | 01:32 | that way anytime a user goes to this
layout, the script will be run and they'll
| | 01:36 | see their group report on screen. So
I'll choose RunReport and assign that to
| | 01:42 | this layout. We'll have that happen
only in Browse mode and let's say Preview
| | 01:47 | mode as well. Now we hit OK, go in
to Browse mode, make our changes.
| | 01:55 | So let's go to a different layout and
we'll navigate back to Customer by Tier.
| | 02:02 | Now you see that the RunReport
script has been executed, when we run our
| | 02:05 | layout. You can see what that looks
like, not run. We look at the script for
| | 02:13 | RunReport. First, it's performing a
Find and isolating only two Tiers of
| | 02:18 | customers. Then it's sorting by our
break fields, so the groupings will occur
| | 02:23 | on the layout. If you run that manually,
it would have the two tiers grouped;
| | 02:30 | but so that the users don't have to
run that manually, we are going to have
| | 02:33 | that run every time they navigate back
to this layout. No matter what happens
| | 02:38 | on the layout, each time they navigate
there, it will run a script for them.
| | 02:44 | You see that can be just as handy to
use script triggers on the layout levels
| | 02:48 | as they are in the object level. So
since these are brand new in FileMaker 10,
| | 02:52 | it's probably a good idea for you just
to get familiar with the triggers, so
| | 02:56 | that when you writing your scripts, you
can then think about when and where you
| | 03:00 | might want to have those execute.
| | Collapse this transcript |
| Using file-based triggers| 00:00 | The last set of script triggers that
we will be looking at aren't part of the
| | 00:03 | new script triggers that were added in
FileMaker 10, but instead these script
| | 00:07 | triggers have existed in
FileMaker for many versions.
| | 00:09 | You are probably already familiar with
them. They could be found under the File
| | 00:13 | Options dialog and you see here the
Perform Script on the opening of a file and
| | 00:18 | the Perform Script on the closing of
the file, more specifically these are now
| | 00:22 | referred to as on first window open,
which means that upon the opening of the
| | 00:26 | very first window in your
file, a script will be run.
| | 00:29 | Conversely, you can also assign a
script to when the last window closes and
| | 00:33 | this is now referred to as the on last
window close. So for example, let's say
| | 00:38 | you have a script that locates any
records that were created today and if no
| | 00:44 | records were created today,
it shows user a message.
| | 00:47 | So if we go into the File > File
Options dialog and assign this Find New
| | 00:52 | Records script to the on open, we will
hit OK and now I will close the file, go
| | 00:58 | into my exercise and open the file
again and you will see that it automatically
| | 01:03 | ran the script for me. There were no
new records added today, so it gave me
| | 01:07 | this message.
| | 01:08 | You can also assign a script to the
closing of a file. The only thing you have
| | 01:12 | to keep in mind here is that your user
could have multiple windows open and it
| | 01:15 | doesn't execute until the last
window on the file is closed.
| | 01:18 | Although you may already be familiar
with these file based triggers, if you are
| | 01:22 | not they can be very useful and work
just like the layout or the object triggers.
| | Collapse this transcript |
|
|
20. RelationshipsDiagramming relationships (with ER diagrams)| 00:01 | In previous chapters I have mentioned
things like relationships and related
| | 00:04 | fields. And when I am talking about
relationships, I am actually talking about
| | 00:08 | how different tables are related to
each other and how those relationships
| | 00:12 | really define the data that's in those tables.
| | 00:14 | An important note is that whenever
you sit down at a computer and open up a
| | 00:17 | FileMaker Pro to start a new database,
what you are actually doing there is
| | 00:21 | constructing something and much like a
home construction project, your database
| | 00:26 | project will proceed more smoothly if
you first begin with some kind of a plan.
| | 00:29 | So the first thing that you want to do,
even before you open FileMaker, is to
| | 00:33 | come up with the plan on what type of
data you are going to be managing in your
| | 00:36 | system. If it's a very complex
system, then it's going to have a lot of
| | 00:39 | parameters to it and then you will have
a very complex plan. But if it's really
| | 00:43 | simple project, you still want to take
a couple of minutes ahead of time and
| | 00:46 | determine what type of data you
will be storing in the system.
| | 00:49 | So first take a few minutes, look at
your data and then literally sketch out
| | 00:54 | what type of information you plan to
manage in your database. For example, here
| | 00:57 | we have a basic database system where
we have a Customer Database table and we
| | 01:01 | have got Orders and then we have got
Products. It's really a Standard Invoicing
| | 01:04 | System where the customers are ordering
products and creating order forms as a result.
| | 01:08 | So in an example like this one, we can
see what types of data we are going to
| | 01:11 | be storing. And it's important for us
to pick discrete and unique buckets of
| | 01:15 | information, because that's going to
ultimately tell us what tables we need to
| | 01:18 | define in our system and say OK, well,
I have got Orders and that's going to be
| | 01:22 | discrete unique bucket of data. I have
got Customers. I also have Products and
| | 01:26 | possibly maybe some other tables as well.
| | 01:29 | Now I have my list, which will
ultimately become the tables that need to be
| | 01:33 | defined in the system. The other thing
that's important, after you determine
| | 01:36 | what all your tables are going to be,
is determine how they are going to be
| | 01:38 | related to each other. So you see here
in this sketch that I have, that's all
| | 01:41 | cleaned up. We have determined that we
need a Customer table, we need an Order
| | 01:45 | table and we need a Product table and
then we've got this other table there
| | 01:48 | that's a Line Items table, which
represents any Product that shows up on an
| | 01:51 | Order. And then the questions you
ask yourself specifically are, can one
| | 01:55 | Customer have many Orders? And if the
answer is yes, then you want to create a
| | 01:59 | relationship between those two.
| | 02:00 | If there is no relationship between
the tables at all, then you don't have to
| | 02:03 | note that accordingly. But here in
this example, we have determined that one
| | 02:07 | Customer could have one or many Orders,
so that's what called a one-to-many
| | 02:12 | relationship.
| | 02:13 | But we are not done yet, we still
have to say do Orders have a relationship
| | 02:17 | with Products and yes, they do and
then we continue. Does a Product have a
| | 02:21 | relationship with Orders? Yes and one
Order can have many Products and one
| | 02:25 | Product can have many Orders.
| | 02:26 | So in this case, we know that we will
create a separate table, a Line Items
| | 02:29 | table, much like any invoice line
item file, we will cover that in upcoming
| | 02:33 | movies. So after a little bit of
what's called the Data Modeling, we have
| | 02:36 | determined what tables we need to build
in FileMaker and determine which tables
| | 02:40 | have which relationships with each other.
| | 02:41 | So now we can move out of our
architecture stage and into FileMaker and define
| | 02:46 | those tables accordingly. In order
to create relationships and physically
| | 02:49 | define the relationships within
FileMaker Pro, we are going to use something
| | 02:52 | that's called the FileMaker Relationship Graph.
| | 02:54 | In the upcoming movies in this chapter,
we are going to use the Relationship
| | 02:57 | Graph to establish and then maintain
the table relationships in our FileMaker Solution.
| | Collapse this transcript |
| Setting Primary and foreign keys| 00:00 | Once you have completed your data
modeling exercise which will help you
| | 00:04 | determine what tables you are going to
need in your FileMaker database as well
| | 00:07 | as what relationships you will need
between those tables. Then and only then
| | 00:11 | can you move on to starting to define
these elements inside your FileMaker file.
| | 00:15 | So you will see inside of our
exercise file, I have done a couple of those
| | 00:19 | tasks already. So assuming that we
have created our diagram and we know what
| | 00:23 | tables we need, we can then go into a
FileMaker file, create a File go into
| | 00:27 | Manage > Database, at which time we
will put in all the tables. So I have gone
| | 00:31 | ahead and done that for
you in the exercise file.
| | 00:33 | So as you see from our Modeling Exercise,
we needed a Customer table, an Order
| | 00:37 | table, a Product table and then we have
got this thing called an OrderLine item
| | 00:40 | table which I will discuss in later movies.
| | 00:42 | But it's important to note that you
need to really make these decisions before
| | 00:46 | you move into FileMaker. If you have a
small project, it might not seem like
| | 00:50 | you need to sketch things out ahead of
time, but I cannot emphasize enough how
| | 00:52 | important it is to make decisions on
tables and relationships before you start
| | 00:56 | working with these because the
pitfall could be that you haven't taken
| | 00:59 | something into consideration and then
you end up pulling a lot of wires out
| | 01:02 | under the hood and that can be a lot
more detrimental later down the line than
| | 01:06 | when you are just sketching
it out on a piece of paper.
| | 01:08 | So first you create the tables as you
see we have here. Now what we need to do
| | 01:12 | in order for the relationships to be
created in FileMaker is we need to have
| | 01:15 | something that will hook these two
tables together and you will notice that in
| | 01:19 | the Manage > Database window we've
got Relationships tab. And on the
| | 01:23 | Relationships tab, you see that we've
got these boxes that appear. That looks
| | 01:27 | similar to the entity relationship
diagram that we created in the Data Modeling
| | 01:31 | exercise. But these blocks represent
tables in FileMaker Pro. Now these blocks
| | 01:36 | are known as table occurrences and
it's important not to think of them as the
| | 01:39 | table themselves because a single
table may actually be represented multiple
| | 01:44 | times in the graph and I will discuss
some of those scenarios in later movies.
| | 01:48 | But when you add a table to a file,
FileMaker Pro will automatically add a
| | 01:52 | corresponding table occurrence to the
Relationship Graph. So what you see here
| | 01:55 | is I have added four tables to
FileMaker and it's gone ahead and created these
| | 01:59 | table occurrences for me. And then
after the fact, you can add any table
| | 02:02 | occurrences that you want,
directly in the Relationships tab.
| | 02:06 | So back into tables, we need to
concentrate now on what's going to hook these
| | 02:10 | tables together. If you recall, we
have determined that we have relationships
| | 02:13 | between Customer and Order and
between Order and OrderLine and Product and
| | 02:17 | OrderLine. So we need to have something
in there that's going to help identity those.
| | 02:21 | So if we look into the table by double-
clicking, we know that the customer is
| | 02:24 | going to have a one to many
relationship with orders. So another way that this
| | 02:29 | is discussed in computer language is
that there is a relationship between the
| | 02:33 | two tables and it's called a parent-
child relationship. Similar to real life
| | 02:37 | parent-child, the parent could spawn
many different records that are related to
| | 02:42 | it in the child table. So one
customer could be one record in the customer
| | 02:46 | table and the many orders could be
many different records in the order table.
| | 02:50 | So we need to be able to link those two
together. But first we need to uniquely
| | 02:53 | identify the customer. So in order to
build the relationship, each table is
| | 02:57 | going to need an appropriate key field.
The key field is the term for a field
| | 03:01 | that uniquely identifies each record.
| | 03:03 | The customer table will need what's
called a primary key. There are two types
| | 03:07 | of keys that we will discuss, the
first of which is the primary key and the
| | 03:11 | primary key will
uniquely identify each customer.
| | 03:14 | So if you think of it this way, if we
are going to have a relationship, you
| | 03:17 | have a parent, you have a child, then
you need to be able to identify which
| | 03:20 | child goes with which parent. And so in
this case, we are going to have a field
| | 03:23 | that is going to be called
CustomerID and this is really a language that
| | 03:29 | various FileMaker developers will use
putting an ID in there. And if we create
| | 03:33 | that field, what we are going to
want to do is make sure that it's
| | 03:36 | automatically populated with the
unique value every time a new record is
| | 03:40 | created, because if we have two records
that have the same ID in the field, we
| | 03:44 | are not going to be able to determine
which child records are related to them.
| | 03:48 | So if one customer has many orders
and on that order record you put in
| | 03:51 | CustomerID 123, there better only be
one customer with 123. Otherwise FileMaker
| | 03:56 | is going to be confused as to
who the parent is supposed to be.
| | 03:59 | If you remember earlier in this title,
we discussed the way that you can have
| | 04:02 | FileMaker automatically allot unique
ids to each record and that was in the
| | 04:07 | File Options. So each time you
create a primary key and in this case,
| | 04:12 | CustomerID, you will also go into the
Options dialog and you will select Auto-
| | 04:17 | Enter, Serial.
| | 04:18 | Now don't worry about the values
because you can just start at one and
| | 04:21 | increment by one. All that's necessary
is that within this customer table, each
| | 04:25 | one of these records has its own unique
ID. So we will set that up and now what
| | 04:29 | we have got is the CustomerID primary
key field. Now each one of the tables
| | 04:34 | that act as a parent is
going to need one of these.
| | 04:36 | So once you have created a unique
identifier in each one of the tables that
| | 04:40 | will act as a parent in these
relationships, you can view these over in the
| | 04:43 | Relationship Graph. So if you recall,
we have one customer, we will have many
| | 04:47 | orders and so we see that the customer
has a customer ID that's created. And
| | 04:52 | one order will have many products and
so you see we have an order ID that's set up.
| | 04:57 | One product will have many orders, so
we have a product ID set up and so on. So
| | 05:01 | we are not telling yet, we have to
now complete to the relationship on the
| | 05:04 | child side. So if we go into these
tables. Earlier I mentioned that one
| | 05:09 | customer could have many orders. So if
the customer has a unique ID of 123, the
| | 05:13 | net value needs to exist somewhere in
each of its related child records and
| | 05:18 | that is what's called a Foreign Key value.
| | 05:21 | So we need to first determine which
of the tables are acting as children or
| | 05:25 | child tables in our relationships and
inside those we need to now define a
| | 05:29 | field that will contain their parent's
ID value. So the way, I would like to
| | 05:34 | think of this is in the real world a
parent has a last name and when they have
| | 05:37 | a child, that child inherits their last
name and that's how you can tell who is related.
| | 05:41 | So CustomerID number 123 has a child
record or several child records. They are
| | 05:46 | all going to need to share the same ID
or it vacates the last name. Just the
| | 05:49 | way I like to think about that.
| | 05:50 | So let's take a look at the
relationship between customer and order. So if
| | 05:54 | records inside the order table will be
related to a record inside the customer
| | 05:58 | table, we need to have a field that
will contain that unique ID. And you will
| | 06:02 | have to define those fields in each
one of the child tables. So what many
| | 06:06 | developers like to do is create a field
that has the same name as the field in
| | 06:11 | a parent table, but we add an FK at
the end of it meaning Foreign Key.
| | 06:16 | So I will create that field and now we
don't do the auto-interruption in this
| | 06:20 | case and it's important to explain why.
It's because we want the value in this
| | 06:24 | field to be populated with the
CustomerID, not its own unique ID. So in the
| | 06:28 | case of the order table, it's
managing its own unique ids in the order ID.
| | 06:32 | There are several methods, which we
will discuss in upcoming movies, that can
| | 06:36 | help you put that value into the
field and we will do a couple of them
| | 06:39 | manually. But the idea is that we
keep this empty until it has a parent
| | 06:43 | relationship and then we'll
populate the field accordingly.
| | 06:45 | So there is another table in here
called the OrderLine item. And so we have got
| | 06:50 | one customer who has many orders,
so we see we have CustomerID uniquely
| | 06:54 | identifying it and then we will have
the OrderID uniquely identifying order
| | 07:00 | because it will be a parent. But
order also acts as a child, so we have
| | 07:03 | CustomerID that will be related to
customer ID. That's how those two will be
| | 07:07 | physically linked together within FileMaker.
| | 07:09 | But we have got an order and a product
relationship and ultimately we want to
| | 07:13 | resolve all relationships to one-to-
many relationships. In this case, it would
| | 07:16 | be one order gets many products, one
product could be on many orders. That's
| | 07:21 | what's called the many-to-many.
| | 07:22 | So what's customary in that case is to
create, what's called the Joint table
| | 07:25 | and that's what the OrderLine item
table is. That way one order can have many
| | 07:30 | line items and one product can have
many line items and we don't have a
| | 07:33 | many-to-many there anymore.
| | 07:34 | It's a somewhat intermediate concept
when talking about relationships, but this
| | 07:37 | is a prime example of how that
will work. So if we concentrate on the
| | 07:40 | one-to-many relationships between
Order and OrderLine and the one-to-many
| | 07:44 | between Product and OrderLine, we have
to think about which one of these tables
| | 07:48 | in each relationship is the
parent and which is the child.
| | 07:50 | Well, this one is kind of easy. Order
is the one and OrderLine is the many, so
| | 07:55 | Order becomes the parent. Product is
the one, OrderLine is the many, so product
| | 07:59 | is the parent and in both
cases OrderLine is the child.
| | 08:03 | So we remember every table that acts as
a child needs to have a field, its own
| | 08:07 | independent field that can be
populated with the parent ID.
| | 08:10 | So in that case, since it's acting as
a child in two different relationships,
| | 08:14 | we need to go into the OrderLine
file and define Orderidfk. Remember that
| | 08:21 | stands for Foreign Key and we'll do
another one for ProductIDfk and create that
| | 08:28 | relationship as well.
| | 08:29 | Now in the Relationship Graph we can
see ProductID has a corresponding foreign
| | 08:34 | key field, the primary key OrderID also
has a corresponding foreign key field.
| | 08:39 | Now our next step is to create these
links between all of the tables, now that
| | 08:43 | we have the hooks otherwise
known as Keys already in place.
| | Collapse this transcript |
| Creating relationships with the FileMaker relationships graph and table occurrences| 00:00 | At this point in the process we are
assuming that you have already gone through
| | 00:03 | your Data Modeling Exercise to
determine the tables that you need and the
| | 00:06 | relationships between those tables.
| | 00:07 | You can also see that we have already
created our tables and that within each
| | 00:13 | table you'll see that they have gotten
their unique primary key. In some cases
| | 00:17 | where appropriate, table will also
have a foreign key defined. Those are
| | 00:21 | critical, because at this stage
what we want to do is link these table
| | 00:25 | occurrences together. The table
occurrences are these boxes that you see on the
| | 00:29 | Relationship Graph.
| | 00:30 | This is really the easy part too,
because to physically create these inside
| | 00:34 | FileMaker doesn't really take that much
effort, but first I want to give you a
| | 00:37 | brief idea of some of the tools that
are available to you in the Relationship
| | 00:39 | Graph. You see down on the bottom,
you have the ability to create new table
| | 00:43 | occurrences and edit existing
relationships. Also you have the ability to range
| | 00:47 | your graph much like you do in your
Layout tools, you can select certain items,
| | 00:51 | by drag selecting you can see them
highlighted. Then you can use some of the
| | 00:54 | Arrange tools to organize them better.
| | 00:56 | As you get more and more table
occurrences on your graph, you might want to use
| | 01:00 | the Color tool, where you can pick from
the Standard FileMaker Color Palette to
| | 01:04 | give them a different look and feel, so
you can identify them better. Right now
| | 01:08 | as you see, much like in Layout mode,
the Pointer tool is the Default. If you
| | 01:12 | want to create some notes, you can use
this handy Alpha tool, which will create
| | 01:16 | a sticky like icon on your Relationship
Graph where you can just make notes for
| | 01:20 | either you, or the other people that
are working with the database. Then also
| | 01:23 | you can print. When you are done with
this, it's a good idea, just like you do
| | 01:26 | with scripts or anything else, to
print this out, so that you have a copy of this.
| | 01:30 | So using the Pointer tool, we are
going to create a relationship between
| | 01:34 | Customer and Order. What you do first
is you go in to the Parent table and in
| | 01:38 | this relationship between these two
tables, Customer is the parent and you will
| | 01:42 | click and hold down your mouse on the
ID. You see that your cursor now has a
| | 01:46 | little dumbbell looking icon to it. As
you move out of the table, you'll notice
| | 01:51 | that it's pulling a line
with an equal sign in between.
| | 01:55 | What you do is you then go over in to
the table that will serve as the child
| | 01:58 | and you find the foreign key value
that matches the primary key in the parent
| | 02:03 | table. In that case this is the
CustomerIDfk. Once I have got it highlighted, I
| | 02:08 | just release. Then you see what
happens is that FileMaker will isolate the
| | 02:13 | primary key and the
foreign key in the relationship.
| | 02:15 | You will notice that it even does a one-
to-many link. Really that isn't truly a
| | 02:20 | one-to-many, since these are just table
occurrences, not the actual tables, but
| | 02:23 | it does its best guess and it's
really based on the fact that it knows that
| | 02:26 | this isn't an auto-enter serial and
that this is just a value that doesn't have
| | 02:29 | an auto-enter serial. So this will
remain unique, whereas this one won't, which
| | 02:32 | is what we want. So it doesn't one-to-many.
| | 02:34 | There is a couple of other that we need
to create. So here we have Order, which
| | 02:38 | is the child table on this relationship,
but it has another relationship where
| | 02:42 | it is the parent. So we select the
foreign key value again, click down and then
| | 02:47 | drag it in to the child table, which is
OrderLine in this case. Then select the
| | 02:52 | proper foreign key value, which is
OrderIDfk. So you can see where those naming
| | 02:56 | conventions can make this a little bit
easier on you. Then release and now you
| | 02:59 | see the same thing has happened here.
OrderID to OrderIDfk. So we know what
| | 03:03 | makes up that relationship.
| | 03:05 | Then finally, we have the Product
parent and the OrderLine child relationship
| | 03:09 | to setup. So we go in to ProductID
and click-and-drag down in to the
| | 03:13 | ProductIDfk. You see that we have now
got all of our relationships setup in
| | 03:19 | FileMaker. What's nice about this is
that now Customer has a relationship with
| | 03:24 | Order, which means that an Order
record can now pull in data from its parent.
| | 03:30 | So that any record inside Order, it's
going to have a value and CustomerID. So
| | 03:34 | that means it only has one related
parent, which means that you can borrow from
| | 03:38 | the parent; which probably sounds
familiar to a lot of us, when we were in
| | 03:42 | college, but I like to use the
analogy of borrowing from your relatives. So
| | 03:47 | there is only going to be one record in
this CustomerID that this Order record
| | 03:50 | is related to and therefore, it
can borrow any one of these fields.
| | 03:54 | So in your Order table, you no
longer need to define fields for Address,
| | 03:58 | Company, Country, First name and all
that type of thing for your customer,
| | 04:01 | because now you can borrow from them,
because of the relationship. We'll
| | 04:04 | explore that more when we talk
about working with Related Fields.
| | Collapse this transcript |
| Using related fields| 00:00 | Once you have established your
relationships inside your FileMaker file, then
| | 00:04 | you have the benefit of being able
to start working with some of the
| | 00:06 | relationship-based functions in
FileMaker Pro. The first one of these functions
| | 00:10 | that we are going to look at is the
concept of using Related Fields. So once
| | 00:14 | you have a relationship in place, it's
possible to use a relationship to look
| | 00:18 | at data from one table from
the perspective of another.
| | 00:21 | So go in to the Order_Detail layout in
the Exercise File and you will notice
| | 00:25 | that each one of the records in this
table represents one Order. So we have got
| | 00:30 | some information that lives on the
Order record, like the Customer Number that
| | 00:34 | was populated when the Order was
created. Then the Order Number, which was
| | 00:38 | populated automatically from FileMaker,
because it's a unique ID. This also
| | 00:42 | happens to be the primary key field.
And an Order Date, which was created by
| | 00:46 | the user who entered the Order.
| | 00:48 | It would make a lot of sense, because
this is an Order that we would want to
| | 00:50 | have a series of customer related
fields. Now our options are that we could
| | 00:55 | certainly go into the Order table
and define a bunch of fields here, like
| | 00:59 | Customer Name, Customer Address, City,
State, Zip, so on. So we could do that,
| | 01:04 | but this process would not only be
inefficient, because we would go in and
| | 01:07 | create fields that already exist in our
solutions somewhere, but also it could
| | 01:10 | create the risk of redundant data.
Meaning if I had a customer address field in
| | 01:15 | the Order table and a customer address
field in the Customer table, if I put a
| | 01:19 | new address in the Order, it's not
going to be updating the Customer. So that
| | 01:23 | would be a burden on the user to
have to go and update it in two places.
| | 01:27 | That is one of the primary reasons
why you would work with a relational
| | 01:30 | database system like FileMaker. So
how do we get around that? Well, here is
| | 01:34 | one of the great benefits of having
tables related to each other and of course,
| | 01:37 | we know that Customer is related to
Order. Since Order is the child in this
| | 01:42 | table, it can pull data from any one
of the fields in the parent record.
| | 01:47 | I like to refer to this
as borrowing from its parent.
| | 01:50 | So if you go back in to the layout and
go to Layout mode, let me show you how
| | 01:54 | easy it is to do this. So let's say
what we want to put on here is the company
| | 01:59 | shipping information. So what we will
do is create a new field. I can go in to
| | 02:04 | the Field tool, click and drag down
and then release that here. You'll notice
| | 02:09 | when you specify a field or leave a
field on the layout, so far we have only
| | 02:12 | been working with the current table and
it gives us a list of all of the fields
| | 02:17 | that are defined in the table that
this relationship is based on. This is an
| | 02:20 | Order_Detail layout, so we based it on
the Order table. But what you might not
| | 02:24 | have noticed is if you click on that
field, you see that there is a list of
| | 02:27 | related tables.
| | 02:28 | Now not only is this table related to
the child tables, but it's also related
| | 02:33 | to other tables that it doesn't have a
direct relationship with, but since the
| | 02:37 | relationship daisy-chains through all
the tables, they are technically related to
| | 02:41 | each other. We'll talk about
that more in upcoming movies.
| | 02:44 | For right now what we want to do is
choose from the Customer table and you see
| | 02:48 | because there is a relationship, we
have all the Customer fields available to us.
| | 02:51 | In this case, I will pick the
Company field and give that a little bit of
| | 02:55 | size and I will Copy-drag this by
holding down my Option key on Mac, which if I
| | 03:02 | held down my Ctrl key on Windows, I
would get the same effect, and I will put
| | 03:07 | in some other fields here. While I am
doing this, I would like to explain that
| | 03:11 | these fields now don't have to be
populated because they already contain
| | 03:15 | values. They contain the value that
exists in the parent record. So you might
| | 03:20 | think to yourself, well, how do
we know which one that's going be?
| | 03:23 | Well, this is determined by the value
that's inside the CustomerID foreign key
| | 03:28 | field. So when I place these fields on
the layout, FileMaker knows exactly what
| | 03:32 | parent table to go look into and it
will also know exactly what record to
| | 03:36 | isolate. Since there is only one
parent to any one related child, there is no
| | 03:41 | confusion. So there is only going to
be one value that could possibly match.
| | 03:44 | Then that's the value that
will show in these fields.
| | 03:46 | So if go in to Browse mode and save
our changes to our layout, we see as we
| | 03:51 | cycle through these different records,
now based on the CustomerID it's able to
| | 03:55 | reach up into the parent and display
these values. You see what I have done is
| | 03:59 | in field behavior, made these so that
you can't edit them. The idea here is
| | 04:03 | that these are actually values that
exist in another table. So it's up to you
| | 04:07 | whether or not you want to be able to
allow users to update those values here.
| | 04:11 | So if when they are processing an
order, they find out that the address is
| | 04:14 | changed, or the zip code is changed.
Updating it here will in fact update it
| | 04:18 | back in the parent, because really
what you are doing is you are looking at
| | 04:21 | this data as it exists in the parent record.
| | 04:23 | So this is a pretty handy way to
borrow data from the parent record. There is
| | 04:28 | also some other things that you can do
with using the Calculation Engine. We go
| | 04:31 | back up in to File > Manage > Database,
let's say in the Order table we want to
| | 04:36 | define a field. Now this is a little
bit different than borrowing a field. What
| | 04:39 | we are going to do is define a field
in this table that's called OrderTotal
| | 04:43 | and we are going to make it a calculation.
If you remember from the calculation
| | 04:47 | movies, there are various different
functions that are available to us.
| | 04:50 | I would like to introduce you to a
function that falls under the Aggregate
| | 04:54 | functions. This one is called Sum.
Sum is a pretty easy one. If you put fields
| | 04:59 | in a delimited string here, what the
sum calculation will do is add up the
| | 05:03 | numeric values that are found in each
one of those fields. But a very popular
| | 05:07 | trick that FileMaker developers use is
that if you put one single related field
| | 05:11 | instead of having several fields in
there, what it will do is total up the
| | 05:15 | value in all the related records.
| | 05:18 | If you remember, Order is the parent
in a relationship also. Order happens to
| | 05:22 | be the parent in the Order to
OrderLine relationship. So we discussed adding
| | 05:27 | parent fields on to the Order layout,
but now we are going to use the child
| | 05:31 | fields looking downstream in to that
relationship. We are going to total up the
| | 05:35 | UnitPrice of all the individual
line elements on an Order. Since in the
| | 05:39 | OrderLine table there could be
potentially either one or many different records
| | 05:43 | that all have the OrderID in them,
we know that we can identify the children.
| | 05:48 | We know that potentially there could be many.
| | 05:50 | So using the Sum calculation and
simply double-clicking on one related field,
| | 05:54 | in this case I have chosen
ExtendedPrice and using the calculation result as a
| | 05:58 | number, what we are able to do now is
total up the ExtendedPrice for every
| | 06:03 | related line item for this order.
We have defined the field in the Order table.
| | 06:07 | Let's go and take a look at how
that's going to work. So you see that
| | 06:10 | automatically this field has been added
to the layout. And if it didn't in your
| | 06:14 | version, that's just a setting that
you can toggle in Preferences, so don't worry.
| | 06:17 | If you go back in to Layout mode and
either take the field that was created on
| | 06:21 | your layout or drag one using the
Field tool and we will put this one over
| | 06:24 | towards Order Total label. Another
thing you could do too by the way is do
| | 06:29 | Insert > Merge Field and pick the
field we just created. Really it doesn't
| | 06:35 | matter, it just depends on your
preference and whether or not you want to
| | 06:38 | format these accordingly, but
just showing you how that could work.
| | 06:41 | So we go in to Order Total and now we
go into Browse mode and we'll look after
| | 06:45 | we save. We see that the total amount
for each order, as we cycle through these
| | 06:50 | orders, it changes dynamically,
because each one of these orders has
| | 06:53 | corresponding OrderLine item records
that also have their ID in there. So this
| | 06:58 | is the total of all OrderLine item
records with number 1 in the foreign
| | 07:02 | key field for Order, this is the total
for all the ones with number 2 and so on.
| | 07:07 | Quickly I will show you there is a
couple other ways that we can create fields
| | 07:13 | that aggregate related data. I will
create an OrderMax and introduce you to
| | 07:20 | Max. Same concept here. If we go into
the related value and say ExtendedPrice,
| | 07:25 | you can say OK there and then
even a minimum. I will create that
| | 07:29 | field, go back into the Aggregates and
say Minimum. Again go down to the child,
| | 07:35 | ExtendedPrice and I will do one
more for Average. Create that,
| | 07:42 | go into the Aggregates and select
Average and go back down into the OrderLine.
| | 07:47 | So it's just more examples of the same
concept, but if we look at this, what
| | 07:50 | this one is going to do is total all
the related OrderLine ExtendedPrices,
| | 07:54 | which we saw in the previous example.
| | 07:56 | This one is going to give us the
maximum line items, the minimum line item and
| | 08:00 | then an average cost of all the
different line items that are related. If we
| | 08:03 | hit OK, we see in Layout mode that we
have got those three records. I will put
| | 08:10 | those on here, we can get rid of those
labels since we already have labels, and
| | 08:14 | do a little bit of formatting. Actually
the next step would be to select those
| | 08:21 | and you can go under Format, to
Number and make these Currency. Okay and so
| | 08:28 | we'll go back into Browse
mode and check this out.
| | 08:31 | Now that you see for each one of these
orders, it's calculating the values of
| | 08:37 | what the total of the order would be,
the Minimum Line Item Value, the Maximum
| | 08:41 | Line Item Value and Average Values
for each one of the line items on the
| | 08:45 | record. In this case you see we have
just obviously got one record on here, so
| | 08:50 | it just shows the same
value for each one of them.
| | 08:52 | So having a relationship between two
tables, means that you can share data both
| | 08:57 | upstream from the parent, because
there will be just one record and also
| | 09:01 | downstream to the many
related records in the child table.
| | Collapse this transcript |
| Using Go to Related Records script steps| 00:00 | After you have established table
relationships inside your FileMaker file you
| | 00:04 | can start benefiting from some of the
relationship-based functionality. We have
| | 00:07 | already discussed in a previous movie
the ability to use related fields on your
| | 00:11 | layout, which are basically borrowing
the field values from the parents, and as
| | 00:16 | you see here on this layout we have
talked about how you can use related field
| | 00:20 | references from the child table
inside calculations in the parent to show
| | 00:25 | aggregate values.
| | 00:26 | Now I am going to show you a script
step that will allow us to navigate from
| | 00:29 | the parent to the related child record
that's a very simple one. If we go into
| | 00:33 | Script Maker and we hit New we are
going to create a script that we will call
| | 00:38 | GTRR and the reason I call it GTRR is
because it's referencing a script step
| | 00:44 | called Go to Related Records. In the
FileMaker world it's commonly referred to
| | 00:48 | as GTRR.
| | 00:49 | So you can double-click on it or move
it into your script area and this will
| | 00:53 | allow us to navigate from the parent
to the child and isolate the related
| | 00:57 | record. This could be a handy
navigation tool for your users so that you can
| | 01:01 | drill down into related values. What
we are going to do in this example is
| | 01:05 | place a button for this script on the
order record so that a user can click on
| | 01:09 | the button and it will pop a new
window that will display all the related
| | 01:13 | OrderLine items and all of this can
be done in one simple script step.
| | 01:17 | So the script step that we have is Go
to Related Records and we hit Specify and
| | 01:21 | what we are going to do here is we need
to select the relationship name that we
| | 01:25 | want to use in this example. So we are
in the Order record in the example that
| | 01:30 | I have mentioned and we want to pull
in the related OrderLine records and so
| | 01:34 | that relationship that's between
Order and OrderLine is called OrderLine.
| | 01:39 | You could probably see some benefit
here to using some naming conventions in
| | 01:42 | your relationship names but in this
example the relationship that we are
| | 01:46 | looking for is OrderLine and now the
next thing that it allows us to do is pick a
| | 01:49 | layout. Since we are going to navigate
to a new layout we need to choose the
| | 01:53 | layout that we are going to use and in
this case we are going to navigate to
| | 01:58 | the OrderLine list because that's
just a list view that was setup in the
| | 02:01 | OrderLine table and since we are going
to look at potentially many records at a
| | 02:05 | time it makes sense to
look at them in a list view.
| | 02:07 | There are some other options that are
available to us here. This one is pretty
| | 02:10 | handy. It allows you to open up a new
window. If you remember FileMaker allows
| | 02:14 | you to create new windows. So this is
a good use for it because that way the
| | 02:18 | user can just close the window and get
back to the parent record. So we will
| | 02:22 | hit Show Window and we will name this
Order Items let's say and we will give it
| | 02:27 | some values for Height and Width and
we will offset it a little bit from the
| | 02:35 | original window so that we can see
it's a new window popping up on top.
| | 02:38 | Than the last decision we have to make
is Show only related records. Without
| | 02:42 | the Show only related records option
shows in, it will navigate us using the
| | 02:46 | relationship to the child table but it
will show all the records in the child
| | 02:50 | table. But what we want here is to
show only the related records and we will
| | 02:54 | get to this option in a second. So I
hit OK and on my keyboard I hit Ctrl+S or
| | 02:59 | Apple+S to save the script and
I can navigate back to the file.
| | 03:04 | So here I am on the OrderDetail and
what I would like to do is I am going to
| | 03:07 | assign this script to this Show Items
button. So we will go into Layout mode
| | 03:12 | and we will select Show Items and I
will go down to Format button and say
| | 03:17 | Perform Script and I am going to choose
the GTRR script that we just created.
| | 03:22 | I will hit OK and OK again. Now when we
go into Browse mode, if you remember what
| | 03:27 | we are looking at here we are looking
at an Order layout and these fields are
| | 03:31 | being pulled in from its parent, the
Customer record, and these fields are been
| | 03:36 | aggregated from data that's in the
child table. And so let's assume that the
| | 03:41 | user might want to look at the child
records that make up these aggregated values.
| | 03:46 | So now we have assigned a script to
the Show Items and by clicking on it up
| | 03:51 | pops a new window and what this new
window represents is all of the items that
| | 03:57 | are on order number one and we can tell
that visually because order number one
| | 04:01 | has a unique primary key of the number
one and we look here at the foreign key
| | 04:06 | value that's populated in the child
records in the OrderLine table we see that
| | 04:10 | they also have a number one and as we
cycle through these different records
| | 04:14 | we'll notice that it works dynamically.
| | 04:16 | So here we have order number five,
related records five and since we used a new
| | 04:21 | window we can just close the window and
the user is back to where they started
| | 04:25 | and order number ten and order number
ten and so on. So this can be used in
| | 04:30 | another interesting way, if we look
in the Manage > Database, Relationships.
| | 04:34 | What we have done there is we have said
here I am in the Relationship Graph and
| | 04:38 | this is an important thing to note,
anytime you are on a layout in FileMaker or
| | 04:41 | really anytime you are in a
FileMaker database you are somewhere on the
| | 04:45 | Relationship Graph.
This is what's called context.
| | 04:48 | So in case of a layout that's
displaying an order record that means we are here
| | 04:52 | in the Relationship Graph. So when we
say to use a relationship, that's what
| | 04:56 | this item was between Order and
OrderLine item, and you can review the
| | 05:00 | relationships by double-clicking on the
line and you see we have a relationship
| | 05:03 | between Order and OrderLine which is
the OrderID matching to the Order foreign
| | 05:07 | key field and that relationship's
called OrderLine. So now we said from here
| | 05:12 | navigate me over to this one but use
the relationship so it will only show the
| | 05:17 | values where OrderID matches OrderIDfk.
| | 05:20 | So in this next one we are going to
extend this a little bit. We will discard
| | 05:23 | the changes that we have made. We go
back into Script Maker and I am going to
| | 05:28 | modify this script a little bit.
We'll go into that same script and we'll
| | 05:33 | double-click on the Go to Related
Records. So what I am going to choose here is
| | 05:37 | instead of the Match current record
only, I am going to Match all records in
| | 05:41 | current found set. And I will save
this and Apple+S or Ctrl+S on my keyboard
| | 05:47 | and navigate back over into orders and
you will note that we have 75 records in
| | 05:51 | the found set right now.
| | 05:53 | So what we I have changed in the Go
to Related Records is it's not going to
| | 05:56 | give me just the records that are
related to the active record that I am on or
| | 05:59 | order number 75 but instead what's
it's going do is give me all the related
| | 06:03 | records to all the 79
orders that are in the database.
| | 06:07 | So you see here that means that all
143 of these are related. So what's
| | 06:12 | interesting about this is that we can
create a found set. We will go into Find
| | 06:16 | mode and click into this field and hit
Ippolite. Now you see we have only got
| | 06:21 | 24 records. So I am going to show
those line items and you see what this
| | 06:26 | represents, these are the OrderLine
items that are related to all 24 orders in
| | 06:31 | the Order table.
| | 06:32 | So the idea there is that you can
either choose to see the child records from
| | 06:37 | the record that you are on or you can
toggle to the child records in your found
| | 06:41 | set and that's what that
option allows you to do.
| | 06:44 | Let's go over to Customer_Detail where
I am going to show you one more use of
| | 06:48 | Go to Related Records. We will navigate
over to the Go to Related Record script
| | 06:51 | and we will make one more change. In
this case we are going to change the
| | 06:54 | relationship. Instead of using the
OrderLine relationship let's switch to the
| | 06:58 | Product relationship and we will choose
the Product_Detail and we will keep the
| | 07:02 | Show in new window options and we will
say Match all records. And now Ctrl+S or
| | 07:07 | Apple+S, navigate back to Orders and
now in the Customer_Detail let's go into
| | 07:12 | Layout mode and let's assign the Show
Orders button to the Go to Related Records
| | 07:19 | script that we created and we will
going into Browse mode and save that. Now
| | 07:25 | before I show you the results of it I
want to point out something else inside
| | 07:28 | your Relationship Graph.
| | 07:30 | So we have been talking about doing
the parent to the child relationships, so
| | 07:34 | we have done the Order to OrderLine,
let me see all of the OrderLine items but
| | 07:38 | something interesting about FileMaker
is its ability to cascade through all
| | 07:42 | these relationships. And if you recall
I mentioned earlier that anytime you are
| | 07:46 | in FileMaker you are somewhere around
the Relationship Graph. So now that we
| | 07:49 | have navigated over to the Customer_
Detail, we are here in context of the
| | 07:53 | FileMaker Relationship Graph.
| | 07:55 | So Customer I could pull up all the
related orders by selecting the order
| | 07:59 | relationship or I could also use the
OrderLine relationship that says give me
| | 08:03 | all the OrderLine items that have
appeared on an order for this customer. So it
| | 08:08 | cascades all the way through, so
imagine this table has every order line item
| | 08:12 | record in it and as you pull it through
this relationship it only isolates just
| | 08:15 | the orders that were per this customer.
| | 08:18 | So I could do a Go to Related Records
and pull up all the OrdeLine items for
| | 08:21 | just this record. But what I have done
here is I have selected the relationship
| | 08:25 | for Product. So what it is going to
do is it's going to show me all of the
| | 08:29 | products that appeared in an OrderLine item
that appeared on an order for this customer.
| | 08:35 | So this could be an interesting way
for us to find out well, let's just see in
| | 08:38 | general over all the span of all the
orders what products has this user ordered
| | 08:43 | and that list will not have any
duplicates in it because it's not the OrderLine
| | 08:46 | item it's just the Order table and
inside the Order table there is only one
| | 08:50 | occurrence of any one product.
So let's check out how that works.
| | 08:54 | So let's say we are in this first
record number one and if we double check our
| | 09:00 | script we can see just as a reminder
that we have got -- we are looking at the
| | 09:05 | Product relationship and in this case
we are going to go Match current record
| | 09:08 | only just to take a look at it. So we
will hit Save again, navigate back to
| | 09:12 | Orders. And now with that script
assigned to this button let's hit Show Orders
| | 09:16 | and this is kind of interesting.
What it has done is it's pulled up the
| | 09:19 | product detail and is created a found
set. Now this might not be as poignant
| | 09:23 | because this user has apparently
ordered one of every one of the products in
| | 09:26 | the Product database but what this is
telling us is here are all the products
| | 09:30 | that, over all the orders for this customer,
| | 09:32 | these are the products that they have
ordered and you see as we go through
| | 09:35 | different records everybody is ordered
every record. Well we' ll go to the last
| | 09:39 | one and see and yes, okay. So in this
case everyone of the order contains at
| | 09:44 | least one of the products. But what you
can also do is modify this to say Match
| | 09:50 | all records in found set and hit Save,
navigate back and now this will tell us
| | 09:55 | of these three records, basically the
Ippolite family household. Let's navigate over
| | 10:00 | to the Product table and see which
related records they have ordered. And as we
| | 10:04 | indicated earlier each one of the
individuals has ordered one of every
| | 10:07 | product and so of course you see that
it has isolated one of every product but
| | 10:11 | this tell us in this found set which
products were ordered by this found set.
| | 10:16 | So there are a bunch of interesting
things you can do navigating users to other
| | 10:19 | layouts once you have established
relationships between your tables.
| | Collapse this transcript |
| Understanding multi-predicate relationships| 00:00 | So far in this chapter we have been
concentrating on relationships that create
| | 00:04 | matches based on the quality of two
fields. As a review, we look under File >
| | 00:09 | Manage > Database, in the Relationships
tab you can see the relationships that
| | 00:13 | we have set up. For example we have
got one relationship between Customer and
| | 00:16 | Order, where Customer is the Parent
and Order is the Child. You will see that
| | 00:20 | the relationship is based on the value
in the CustomerID field being equal to
| | 00:26 | the value in the CustomerIDfk field and
this indicates the equality between the
| | 00:32 | two match fields. Now FileMaker Pro
supports relationship criteria other than
| | 00:36 | simple equality. As you see here there
are several different operators that you
| | 00:40 | can use beside just the equal sign.
There is not equal to, less than or equal to,
| | 00:44 | greater than, greater than or equal to,
and then what's called a Cartesian X,
| | 00:47 | which means that every record in
the one table equals record in the other.
| | 00:51 | In addition to that you can also
have more than one match field in a
| | 00:56 | relationship. So you can have what
are called Multiple Predicates in your
| | 00:59 | relationship. So we are going to
explore the concept of both, having a match
| | 01:03 | field that doesn't necessarily have to
equal another match field and then also
| | 01:07 | having multiple predicates. But first
before we do that as a additional review,
| | 01:11 | we'll go back into the Customer_
Detail record and we will find CustomerID
| | 01:16 | number one and if you recall in a
previous exercise we set up a Go To Related
| | 01:22 | Records script that when we press the
Orders, it will pop up a new window and
| | 01:26 | shows all the Orders for that Customer.
So we that Jane Smith has a total of
| | 01:31 | five orders that she has ordered in all
times. So you see when the dates are of
| | 01:35 | these orders. Let's say what we would
like to do is that when the user clicks
| | 01:38 | on the Show Orders button, it pops up a
new window that only shows orders from
| | 01:42 | the current year, instead of all the
orders from all time. So what we do there
| | 01:46 | is go back into our Manage > Database
and we look at the Relationships tab and
| | 01:52 | instead of changing this
relationship because we want to maintain this
| | 01:56 | relationship because we are going to
use it elsewhere in the system, we are
| | 01:58 | going to create a new relationship.
So this is the first example we see of
| | 02:02 | creating a new table occurrence
because remember as we discussed each one of
| | 02:06 | these boxes represents a table
occurrence. We will go down into the bottom left
| | 02:10 | hand corner and click on the button
and up on screen will pop the Specify
| | 02:15 | Table. We are going to choose Order
again and you will notice that it gives us
| | 02:18 | the name Order 2 and that's because of
the table occurrence with the name Order
| | 02:22 | already exists on our Relationship
Graph and FileMaker must maintain unique
| | 02:26 | relationship names on the table graph.
So, we'll say Order_ThisYear for example
| | 02:34 | and hit OK and now we see that another
table occurrence has showed up on the
| | 02:38 | graph. And if we want to identify
this in a certain way we can give it a
| | 02:42 | different color if we would like to
and this indicates that it is a table
| | 02:45 | occurrence that's not based on the
base table. Just a technique that a lot of
| | 02:48 | FileMaker developers use. Another
thing to notice that now we have one table
| | 02:52 | occurrence based on Order and now we
have two table occurrences based on the
| | 02:56 | Order table. So what we want to do is
create a relationship between Customer
| | 03:00 | and Order where we only show the
customer's related records from the current
| | 03:04 | year. So the first step of that is to
accomplish the Only show the customers
| | 03:09 | related orders part and in that case we
will mimic the relationship that we set
| | 03:13 | up between Customer and Order. Right
now these relationships look exactly the
| | 03:17 | same but that's because we have got a
couple of fields that we want to add to
| | 03:20 | our tables in order to facilitate
this relationship. So let's go back into
| | 03:24 | tables. And now if we think about
this we want to identify not only related
| | 03:28 | records, which is what we have already
got setup in our relationship, but we
| | 03:31 | want to identify records where the
OrderDate is greater than the first date of
| | 03:36 | the current year. So if we look in
Order we have a field that's called
| | 03:40 | OrderDate already set up, so that part
of the relationship is set. But if we go
| | 03:43 | into Customer, do we have a field
that's setup here that indicates what the
| | 03:47 | first day of the current year might be?
Well we don't. So what we are going to
| | 03:50 | do is setup a field using some of the
things that we |
|
|