IntroductionWelcome| 00:04 | Hi, I'm Cris Ippolite, and welcome to
FileMaker Pro 11 Essential Training.
| | 00:08 | FileMaker Pro is a leading desktop
database software, popular for its ease of
| | 00:12 | use, that's used by everyone from
Fortune 500 companies to individuals who just
| | 00:16 | want to get a little bit more organized.
| | 00:18 | I'll guide you through building a
database the right way with FileMaker Pro 11.
| | 00:22 | I'll teach you the basics behind how a
database works, and we'll take you step
| | 00:26 | by step through the true essential
elements of creating a database from scratch,
| | 00:30 | beginning with creating tables and
relationships, how to manage the various
| | 00:34 | types of fields, how to work with
layouts to display data, and as well as how to
| | 00:39 | format your layouts in a
number of different ways.
| | 00:43 | I'll show you how to build
interesting and attractive reports, including
| | 00:46 | subsummary reports, to help
you share your data with impact.
| | 00:49 | Most importantly, we will create
a FileMaker database together from
| | 00:53 | scratch, taking care to study each step in the
order that you would do so in a real project.
| | 00:58 | I'll be providing guidance and
examples based on 18 years of
| | 01:01 | FileMaker experience.
| | 01:02 | And now, without further delay, it's
time for us to dive into FileMaker Pro
| | 01:06 | 11 Essential Training.
| | Collapse this transcript |
| Understanding the FileMaker family| 00:00 | Before we get started with our exercises,
I'd like to take a moment to introduce
| | 00:04 | you to the five different products
in the FileMaker 11 product family.
| | 00:07 | First, we've got Bento, a personal
database for Mac that's sold by FileMaker.
| | 00:13 | We won't be covering Bento in this
course, but you can find movies on Bento in
| | 00:17 | the lynda.com Online Training Library.
| | 00:20 | Next, there is FileMaker Pro 11.
| | 00:22 | This is the product that we're
going to be using throughout this title.
| | 00:25 | It's the standard user version of
FileMaker Pro that allows you to create your
| | 00:29 | own databases, modify your databases
and basically do everything that we're
| | 00:32 | going to be doing throughout this title.
| | 00:34 | FileMaker Pro 11 Advanced has all the
functionality of FileMaker Pro 11, but it
| | 00:39 | also has some additional tools that
developers find useful, like Script Debuggers,
| | 00:43 | with the ability to create things
called Custom menus, it allows you to create
| | 00:47 | Runtime Versions of your FileMaker Pro
applications, and that type of thing.
| | 00:50 | It costs a little bit more, but if
you want this extra functionality, or if
| | 00:53 | you're going to be maintaining a lot of
databases using FileMaker, it really is
| | 00:57 | a good product, and you should have it.
| | 00:58 | Then there are two
different FileMaker Server products.
| | 01:02 | FileMaker Server 11 is an application
that gets installed on a dedicated server
| | 01:07 | machine, or up to three different machines,
and it's used to be able to share all
| | 01:10 | the different files that you create in
FileMaker Pro to many different users at
| | 01:14 | the same time, or to share
them in a multiuser environment;
| | 01:17 | for example, you can have your
FileMaker Pro databases shared up to 250
| | 01:22 | consecutive users who are all using
FileMaker Pro or FileMaker Pro Advanced, and
| | 01:26 | you can also have the ability to
publish your databases to the Web using
| | 01:30 | technologies called XSLT or PHP, you
may have heard of them, or to publish your
| | 01:35 | raw data as XML to be shared by other
applications. All of that's built right
| | 01:40 | into FileMaker Server 11.
| | 01:42 | Now, if you'd like to be able to your
databases for more than 250 consecutive
| | 01:46 | users, or publish your databases using
a technology that's called Instant Web
| | 01:50 | Publishing, or if you want
FileMaker to host any kind of ODBC or JDBC
| | 01:54 | connectivity, then you'll need to purchase
something called FileMaker 11 Server Advanced.
| | 01:59 | It's an upgrade to FileMaker Server 11.
| | 02:01 | So you can see that we've got product
here for the FileMaker end-user, the
| | 02:04 | FileMaker developer and then also
different options for deploying your
| | 02:07 | application, whether its just on a
network or deploying out to the Web.
| | 02:10 | But the product that we're going to be
using moving forward is FileMaker Pro 11.
| | Collapse this transcript |
| Using the FileMaker Quick Start screen| 00:00 | One of the new features in FileMaker Pro
11 is a redesign to the Quick Start dialog.
| | 00:04 | So here you see onscreen that I've
opened up FileMaker Pro, and I'm seeing the
| | 00:08 | FileMaker Quick Start screen.
| | 00:10 | One of the things you'll notice on the
right-hand side of the screen is that
| | 00:13 | FileMaker has given you links
to additional training resources.
| | 00:16 | You can visit the FileMaker Resource
Center, or learn more about FileMaker Pro,
| | 00:21 | or access some of the FileMaker Pro
Tutorials, or view the FileMaker Forum,
| | 00:25 | which allows you to collaborate with other
FileMaker users through an online bulletin board.
| | 00:29 | But on the left-hand side, you'll see where
there's all the functionality of the screen.
| | 00:33 | First, you'll notice that you can
click on the link here to create a
| | 00:35 | brand-new database, and that's what
we're going to be doing throughout the
| | 00:38 | rest of this title.
| | 00:39 | Here you can convert a file
into a new FileMaker database;
| | 00:42 | for example, those types of files
might be an Excel file, tab delimited file,
| | 00:47 | those types of things, or you can use
one of FileMaker's Starter Solutions as a
| | 00:51 | pre-designed template to
get you going very quickly.
| | 00:54 | We'll talk about all these different
things in movies later on this title.
| | 00:57 | In the middle of the screen, you'll
see something that's rather helpful.
| | 01:00 | If you find yourself using the same
databases over and over again, you can
| | 01:04 | consider these your favorites.
| | 01:05 | And like many other applications,
FileMaker allows you to manage your favorites,
| | 01:09 | or pick which databases might be your
favorite databases, and then displays them
| | 01:13 | here in the Quick Start screen.
| | 01:15 | And the way to Add Favorites is by
simply clicking on the Manage Favorites link.
| | 01:18 | This will pop-up in the Manage
Favorites window where you can see any existing
| | 01:23 | favorites, and if you have them, you
can click on them and remove them from the
| | 01:26 | list if you know longer use the database.
| | 01:28 | Or if you want to add a new database,
you can just hit the plus sign in the
| | 01:32 | bottom left-hand corner, where you'll
then navigate to a database and choose
| | 01:37 | that one as one of your new favorites.
| | 01:41 | Now you'll see the file in your Manage
Favorites window, and when you close the
| | 01:44 | window, you'll see it under your Favorite Files.
| | 01:47 | You'll also see that any recently
opened files will appear under the Recent
| | 01:50 | Files section, and you can reset those
by closing this window and going under
| | 01:57 | the File menu, and under Open
Recent, simply hit Clear Recent Files.
| | 02:02 | This is very similar to many other
applications where you see that you've got recent files.
| | 02:06 | Now, if you want to invoke the Quick
Start screen again, you can go under the
| | 02:09 | Help Screen and hit Quick Start Screen.
| | 02:12 | You might not need these resources, and
you might want to skip the Quick Start
| | 02:16 | Screen, so if you want to do that,
the way you would do this is uncheck the
| | 02:19 | box in the bottom left-hand corner that says
Show this screen when FileMaker Pro opens.
| | 02:24 | And then when you close it, now FileMaker
will no longer show the Quick Start screen.
| | 02:28 | And this is the setting that we're going
to use in our copy of FileMaker Pro for
| | 02:31 | the rest of the title.
| | 02:32 | The new Quick Start Screen in
FileMaker Pro 11 will equally address both new
| | 02:36 | and experienced users.
| | 02:38 | New users who aren't sure how to get
started will be able to see all their
| | 02:41 | alternatives and have
access to Help and Tutorials.
| | 02:44 | Experienced users, on the other hand,
will have quick access to Recent and
| | 02:48 | Favorite Files and the ability to
customize their display in the window.
| | Collapse this transcript |
| Using the exercise files| 00:00 | If you are a premium member of the
lynda.com Online Training Library, or if
| | 00:04 | you're watching this tutorial on a DVD,
you will have access to the Exercise
| | 00:08 | Files used throughout this title,
and in this title we'll be creating an
| | 00:12 | invoicing file from scratch.
| | 00:14 | In the first part of the title, you'll be
building the file along with each movie
| | 00:17 | in the order that a database should be built.
| | 00:19 | In later movies, we'll use that same
file to add more specific features and data
| | 00:23 | to our Exercise Files.
| | 00:25 | If you want to just jump to a
specific movie, you can find this specific
| | 00:28 | exercise file that corresponds with it.
| | 00:30 | The way that the exercise files are
laid out is that they all come in one
| | 00:33 | folder, as you see here, and each
folder is broken into different chapters;
| | 00:38 | for example, if you're watching the
movie in chapter 1, movie number 4, you can
| | 00:45 | just click on the subfolder, and
then double-click on the exercise file.
| | 00:49 | Each of the movies has its own
dedicated FileMaker file, so you can start from
| | 00:52 | any point in the title.
| | 00:54 | If you're a monthly subscriber or an
annual subscriber to lynda.com, you don't
| | 00:58 | have access to the exercise files, but
you can follow along from scratch on your
| | 01:01 | own files, and this lesson works quite
well if you're creating your own files.
| | 01:05 | So let's go ahead and get started.
| | Collapse this transcript |
|
|
1. Getting StartedWhat is a database?| 00:00 | Before we start working with a
database it's important to understand a little
| | 00:03 | bit about what a database actually is.
| | 00:05 | By definition, a database is a
collection of "like" information with
| | 00:09 | underlining attributes.
| | 00:11 | Now you've probably already seen
databases in forms of things like Address Book
| | 00:14 | applications on your computer.
| | 00:15 | In these cases, you have bunch of
different individuals that are being stored
| | 00:18 | inside of your database.
| | 00:20 | You're storing information on a bunch
of different individuals and the "like"
| | 00:23 | information that you have, or different
attributes about them like their phone
| | 00:26 | number, address, or IM and that type of thing.
| | 00:29 | You're probably already familiar with
databases from your Web experiences, as well;
| | 00:32 | for example, lynda.com is
just a huge database system.
| | 00:36 | It's a database of different titles
with information about those titles, and
| | 00:40 | links to the videos that
you can watch for training.
| | 00:42 | And having this database of these
products allows the user to search the
| | 00:46 | databases and give them back results
that make more sense to the user experience
| | 00:49 | that they're looking for.
| | 00:50 | The role of the database is twofold.
| | 00:52 | First, the database will physically
store the data that's contained within it.
| | 00:56 | So it acts as a place where you can
put different pieces of data and then
| | 00:59 | retrieve that date if necessary, but
in addition to storing the data, it also
| | 01:04 | contains, or describes the
information that's been stored within it.
| | 01:08 | A good example of this is in a spreadsheet.
| | 01:10 | So here, in this case, a spreadsheet is
the database, and more specifically this
| | 01:14 | spreadsheet is going to be storing
information about individuals, or let's say
| | 01:17 | customers more specifically in this case,
but it also describes the information.
| | 01:22 | For example, you see here that
we've got different rows inside of the
| | 01:26 | spreadsheet. Each row represents a
different individual and in FileMaker, those
| | 01:31 | rows are referred to as records, and
that's terminology that I'm going to use
| | 01:35 | from here on out in this title.
| | 01:36 | But in addition to the rows, or the
different iterations of a person stored
| | 01:39 | inside of this spreadsheet database,
you also know that we have columns, and
| | 01:42 | these columns are attributes about the
different customers that we're storing
| | 01:46 | in our spreadsheet.
| | 01:47 | In FileMaker we call these attributes fields.
| | 01:49 | So, for example, we would go into our
FileMaker database and define things like
| | 01:53 | a First name field or a Last name field,
Title, Status, Start date, that type of thing.
| | 01:59 | So here not only are we storing
information about customers, but we're also
| | 02:02 | describing the information that's been
stored, so here clearly we're saying,
| | 02:05 | what is this information I'm looking at
here? This is the Title or the Title of
| | 02:09 | each of the individuals that
are stored inside the database.
| | 02:12 | So the important thing to remember
here is that in FileMaker our rows will
| | 02:15 | become records and our
columns will become fields.
| | 02:19 | Hopefully a little background on
databases that you're already familiar with
| | 02:21 | will help you understand the concepts
that we're going to discuss later in
| | 02:24 | the title.
| | Collapse this transcript |
| Flat vs. relational databases| 00:00 | So what makes an application like
FileMaker different than just a spreadsheet?
| | 00:04 | There's actually many different ways
that you can store data inside of your
| | 00:07 | computer, for example, like in a Word
Processing document or in an Excel Spreadsheet.
| | 00:11 | These are examples of what are
called, in database circles, a Flat File.
| | 00:15 | That's where it's just one single
table, so in this case here, the table of
| | 00:19 | Customers or contact information, and
it's independent from any other tables
| | 00:24 | that might have related data.
| | 00:25 | So you could have Customers, and you
could have orders, but they're stored
| | 00:28 | independently of each other, so there's
no actual relationship between that data.
| | 00:32 | But in a true relational database,
like FileMaker Pro, for example, it's
| | 00:37 | designed to make it even easier for
you to enter data and also retrieve data,
| | 00:41 | but in a true relational database
like FileMaker Pro, it's set up to have
| | 00:46 | various different tables that
are all linked or related together.
| | 00:49 | The reason that you would want to have
many different tables related in your
| | 00:52 | database is so, for example, if you
have customer information, and you've got
| | 00:56 | order information, you won't want to
have to rewrite the customer's name and
| | 00:59 | address and phone number and everything
every time that you create a new order,
| | 01:02 | but you might have to do if your
Customer information and your order information
| | 01:06 | were independent of each other, or not linked.
| | 01:08 | Also, imagine if, instead of just
having 4 records here, we had 4 million.
| | 01:13 | It wouldn't be very easy for us to
manipulate, extract or work with data, or even
| | 01:16 | turn it into reports if it's just in a
spreadsheet form, but in FileMaker Pro
| | 01:20 | you're able to store your information,
but also create different layouts that
| | 01:24 | are related to other tables inside your
database, that allow you to link all your
| | 01:27 | information together,
| | 01:29 | like be able to create an order
layout that has information from both the
| | 01:32 | Customer and an order all on one form.
And this is something that you could
| | 01:36 | print out of as a hard copy if you need to.
| | 01:38 | Another one of the important goals of
a relational database is to eliminate
| | 01:42 | redundant data entry.
| | 01:43 | If you have a spreadsheet of orders,
every row that you enter will represent an
| | 01:47 | order, but you also want to have
customer information like their mailing address
| | 01:50 | and shipping address that kind of thing.
| | 01:51 | So each time you create a new order
row, you'd have to reenter in all the
| | 01:55 | customer name, customer phone
number, customer address info.
| | 01:59 | When you have a related database
like in FileMaker Pro, I can just say,
| | 02:02 | hey, this order is linked to this customer
record that I've already created in my database.
| | 02:07 | That way you don't run the risk of
possibly entering the data in wrong the
| | 02:10 | second time around, or if the
customer information is updated, it'll then
| | 02:14 | propagate automatically throughout your system.
| | 02:16 | We're going to see various different
examples of this as we go throughout this
| | 02:19 | title, but it's important to know that
the advantage of having a database like
| | 02:23 | FileMaker Pro is because your data
is going to be related, thus called a
| | 02:27 | relational database.
| | Collapse this transcript |
| How FileMaker works| 00:00 | We've talked about why you want to use a
relational database to manage your data
| | 00:04 | over a flat file, for example, but I'd
like to show you a couple of reasons why
| | 00:08 | FileMaker is such a great application
for developing those relational databases.
| | 00:12 | First off, you can see here onscreen
that we can store information within our
| | 00:17 | application much like we do in a
spreadsheet or other applications.
| | 00:21 | We can create new records if we'd
like to by simply hitting the New record
| | 00:25 | button, or delete those records if we'd
like, and we can even search for records
| | 00:30 | by simply typing in some criteria
onscreen and hitting Perform Find, and this is
| | 00:35 | that retrieval aspect of
the database, which is so key.
| | 00:39 | So you could have, instead of just having one
record like we have here, you could have
| | 00:41 | millions and millions of records, and
within just a matter of a second you can
| | 00:46 | retrieve whatever information it is that
you're looking for inside the database.
| | 00:49 | What's nice about FileMaker
though, is that it's a relational database.
| | 00:52 | So, for example, you'll see if we
click over to this button here that says
| | 00:55 | Invoices, we're in a completely different table.
| | 00:59 | The database itself can have many
different tables. In this case, we've got a
| | 01:03 | table that stores customer information,
a table that stores Product information,
| | 01:07 | another one that stores Invoice
information, and in a true relational database,
| | 01:11 | all these tables can be linked together.
| | 01:14 | So, for example, you see if I create a
new record here inside my Invoices table,
| | 01:19 | I can choose one of my customers from
my Customer table and by simply choosing
| | 01:24 | that customer, you see that I've filled
in all of the customer information that
| | 01:28 | we see stored over in the
Customer Detail section.
| | 01:31 | So what's key about this is that all
these different tables can fit into one
| | 01:35 | FileMaker file, so you don't
have to manage different files
| | 01:38 | like, for example, when you have to
create a new spreadsheet every quarter or
| | 01:40 | something like that. All of the
files and all of the data can be tagged
| | 01:44 | appropriately and stored in one
easy-to-share FileMaker database.
| | 01:47 | In addition, FileMaker has all
sorts of FileMaker-specific kind of cool
| | 01:51 | functionality here as well;
| | 01:53 | for example, you'll see if I click
on this Website tab, it's going to
| | 01:57 | automatically load a Website
right inside my FileMaker layout.
| | 02:00 | So although FileMaker isn't intended
to be a Web browser, it can certainly
| | 02:04 | link your data over two things like Google
Maps and stuff like that like you see here.
| | 02:09 | And also you're not just limited to storing
a text or number data inside of FileMaker;
| | 02:13 | you see that we've got different
fields or attributes: First Name, Last Name,
| | 02:17 | President that kind of thing.
| | 02:18 | We've got a special type of a field
called the Container Field that we'll talk
| | 02:21 | about later in this title,
that allows us to store Media.
| | 02:24 | So, for example, we can insert in a
movie into a FileMaker record, and not only
| | 02:35 | can we Insert in the movie,
but we can also play movies.
| | 02:37 | We can do the same thing with sound
files or image files, so you can play music
| | 02:42 | or have pictures of contacts inside
your database, all that kind of stuff.
| | 02:45 | But the strength of FileMaker is that it
provides the ability to create a database
| | 02:50 | very easily, probably one of the
easiest database creation environments out
| | 02:53 | there, and also works the
same on both Windows and Mac.
| | 02:57 | So if you have two users on your same
network, one that uses a Mac and one
| | 03:01 | that uses Windows, they can both share
the same FileMaker database at the same
| | 03:05 | time, thus making live changes to it while
the other person is in the database as well.
| | 03:10 | And with the advanced Security
model that comes with FileMaker, you can
| | 03:13 | determine what your users can do and
see when they're inside of your database.
| | 03:16 | Then up to 250 different users can share
the database simultaneously, all having
| | 03:21 | their own session and all being logged
into a server, and you can even publish
| | 03:25 | your databases to the Web.
| | 03:26 | You see you've got support here
for FileMaker PHP or something called
| | 03:30 | Instant Web Publishing, which allows
you to share your FileMaker databases
| | 03:33 | through the browsers.
| | 03:34 | You can also share your database with
other applications that are what are
| | 03:37 | called ODBC or JDBC compliant;
| | 03:41 | this allows you to integrate your
FileMaker databases with things like your
| | 03:44 | accounting software, for example.
| | 03:46 | In addition, not only can you store
your information and share it with other
| | 03:49 | FileMaker users, but FileMaker allows
you to do things like export records, and
| | 03:54 | you can export them in various
different file formats that you can share your
| | 03:58 | data with other non-FileMaker Pro users.
| | 04:01 | You can also save your records as
Excel spreadsheets or as PDF files, so any
| | 04:07 | user that has Excel or that has in a
PDF reader on their computer can also
| | 04:10 | access your data, all sorts of
different things that you can do with the
| | 04:13 | FileMaker database.
| | 04:14 | We're going to cover a lot of these in
this title, but for those of you that
| | 04:18 | have never worked with FileMaker before,
and you're thinking okay, what is this?
| | 04:21 | You get that it's a database, but
you've really got here with FileMaker is the
| | 04:25 | ability to create a fully functional
and powerful database application using
| | 04:29 | FileMaker Pro, without having to know
anything about databases, or computer
| | 04:33 | science or anything like that.
| | 04:34 | By the time you're done with this
title, I assure you that you'll be able to
| | 04:37 | create FileMaker Pro databases, deploy
them, share them with people, understand
| | 04:42 | their limitations, build reports and
do all sorts of different functions that
| | 04:45 | you never have been able to do before.
| | Collapse this transcript |
| Understanding the essential preferences| 00:00 | The first time that you launch
FileMaker, it's probably a good idea to get
| | 00:03 | familiar with some of the different
preferences that are available to you.
| | 00:06 | If you are a Mac user, you can find the
Preferences dialog under the FileMaker
| | 00:10 | Pro menu, here. Or if you're on a
Windows machine, you can find it at the
| | 00:15 | bottom of your Edit menu.
| | 00:16 | Either way, it'll open up the
Preferences dialog, and you see here in the
| | 00:20 | Preferences dialog that we have five
different tabs to choose from, and I'm just
| | 00:23 | going to go through a couple of these
settings to show you some of the ones that
| | 00:25 | you'll probably be using more often,
and we'll skip over some of the ones that
| | 00:29 | you may not use that often at all.
| | 00:31 | So first you'll open up to the General
tab, and you'll see in the General tab we
| | 00:34 | have a couple of default
settings already chosen for us.
| | 00:37 | The first of which, that I'm going to
point out to you, is how many different
| | 00:40 | recently opened files the your use.
| | 00:42 | If you work with a lot of different
files, you probably want to use the recently
| | 00:45 | opened file option, which allows you to
not have to open up a file, find it on
| | 00:49 | your computer or even find it on your
network if it's hosted on the server, and
| | 00:53 | here it allows you to choose how
many different files you want to see.
| | 00:56 | The most useful option though is here
under User Name, where you see you've got
| | 00:59 | two options to either choose
the system name or another name.
| | 01:03 | The User Name is the name that
FileMaker Pro uses to identify what copy of
| | 01:06 | FileMaker Pro you're
using to access this database.
| | 01:10 | So, for example, here, when we
installed FileMaker Pro on this machine, it
| | 01:13 | grabbed the name of the user account that we
were logged in as when we did the installation;
| | 01:18 | in that case, it's my name. But if
you want to identify your computer, for
| | 01:21 | example, as like a shipping computer, or
the finance computer, or station number
| | 01:25 | 1 one or that type of thing, you can
choose the Other option and type in the
| | 01:29 | name of the machine.
| | 01:31 | That way you can find out not only
who is accessing your database, but what
| | 01:34 | machine they're using to access the database.
| | 01:37 | The other thing you can use the User
Name for is that whatever name shows
| | 01:40 | up here, if it's the System name or
the Other name, that's going to be the
| | 01:44 | name that, by default, gets put into
your User Name field, when you're
| | 01:47 | logging into your database.
| | 01:48 | So if we use the same User Name all
the time, it's not a bad idea to go into
| | 01:52 | here, click Other and type in that
User Name so that it saves you one field
| | 01:56 | worth of entry when logging into your database.
| | 01:59 | Moving on to the Layout section, I want
to show you this option right here.
| | 02:03 | By default, the Add newly defined fields
to the current layout option is chosen.
| | 02:08 | What that means is that if you're
creating your database from scratch, and
| | 02:10 | you're defining fields, which we'll
talk about later in the title, these fields
| | 02:14 | will appear on whatever layout
you're on, as you create them.
| | 02:17 | But later on down the road when
you're getting into more of the maintenance
| | 02:20 | mode on your database, and you're not
creating a lot of fields, you probably
| | 02:23 | want to turn this off.
| | 02:24 | So my advice is to keep the default
on when you first start creating your
| | 02:28 | database and then later turn it off,
so you don't have fields appearing on
| | 02:31 | layouts that you spent a lot of time
trying to finesse and make look perfect.
| | 02:36 | In Memory it's safe for you to keep
everything as their defaults, and Plug-Ins
| | 02:40 | are something where if you buy
something called a plug-in from a third-party
| | 02:44 | vendor, which allows you to
extend the functionality FileMaker,
| | 02:47 | this is where you'll be able to turn
them on or off ,or even configure them.
| | 02:50 | That's information that you'll
get from the plug-in manufacturers.
| | 02:54 | And under Fonts, the most useful setting
here is the ability to specify the default font.
| | 02:58 | You can leave it here as
the default Helvetica option.
| | 03:03 | So just like with many other
software applications, Preferences are
| | 03:06 | something that you probably want to
check out the first couple times you
| | 03:08 | open the application, and then you
can just really leave them set as you
| | 03:11 | start to work with the database.
| | Collapse this transcript |
| Touring the interface| 00:00 | Before we dive into building our database,
I am going to first take a moment and
| | 00:04 | give you a brief tour of
the FileMaker Pro interface.
| | 00:07 | In addition, I'd like to introduce you to
these things that are called FileMaker modes.
| | 00:11 | FileMaker has four modes, and in each
of the four modes there are different
| | 00:15 | interfaces that you're going to be working with.
| | 00:17 | When you first open up FileMaker
Pro, you're automatically put into
| | 00:20 | what's called Browse mode.
| | 00:22 | You can see that here underneath the
View menu, and we've got Browse selected.
| | 00:27 | Browse is the mode that's going to
allow you to view your data and edit data,
| | 00:32 | meaning that you can click into
different fields, add new records, or edit
| | 00:35 | existing record, or just
browse them in a read-only fashion.
| | 00:38 | In Browse mode, there are a couple of
components of your interfaces that you're
| | 00:41 | going to want to be familiar with.
| | 00:42 | Most of the interface that changes
from mode to mode can be found in what's
| | 00:45 | called the Status toolbar, which is this
gray area across the top of the screen.
| | 00:49 | You'll see on the far left side of
this Status toolbar, you've got a couple
| | 00:54 | of tools that allow you to navigate through
the multiple records inside your database.
| | 00:58 | Here we've got 1 record in our database,
but if we had more records, you see
| | 01:01 | that we can navigate
between them using this book icon:
| | 01:04 | Left goes to the previous record,
right goes to the next record and so on.
| | 01:08 | We can even scrub through the entire set
of records using the slider bar or just
| | 01:13 | click into the field, and type the
exact record number that we want to find by
| | 01:16 | entering in the number of the record.
| | 01:18 | We'll talk about this pie chart area
and the difference between Found records
| | 01:23 | and the amount of records in your
database when we talk about working with Found
| | 01:26 | sets later in the title.
| | 01:27 | But also on the Status toolbar, you'll
see that you've got some default buttons.
| | 01:31 | When you first purchase FileMaker Pro
and open up your first FileMaker database,
| | 01:35 | you're going to see these buttons here onscreen.
| | 01:37 | Show All is a button that will
allow us to remove a Found set.
| | 01:41 | Again, we'll talk more about
that when we talk about Finds.
| | 01:44 | But we've got the ability to create a
new record by simply hitting the New
| | 01:47 | Record button, or to delete an existing
Record, and all these options can also
| | 01:52 | be found under the Records menu.
| | 01:55 | Additionally, we can enter a different
mode, Find mode, which we'll look at in
| | 01:59 | a second, or sort the records that we have
in Browse mode by clicking on the Sort button.
| | 02:04 | You'll also see that you've got the
Quick Find fields, which we'll talk about
| | 02:07 | more when we get to the Quick Find movie.
| | 02:10 | If you don't want to have any of these
things in your Status toolbar, or if you
| | 02:13 | want to change the things that you have
in you Status toolbar, you can go to the
| | 02:16 | View menu and choose Customize Status toolbar.
| | 02:21 | This pops up onscreen all the different
things that you can add to the Status toolbar.
| | 02:25 | Here you see all the different buttons
that you currently have in your toolbar,
| | 02:29 | but you also see that your
toolbar has become active.
| | 02:31 | So, for example, I could grab one of
these buttons and drag it off to the side
| | 02:35 | and release it, and if you're on Mac,
you see that Mac effect of the proof
| | 02:39 | effect, and on Windows,
it just simply disappears.
| | 02:42 | You can click on an icon, drag it from
this area and drop it onto your toolbar
| | 02:46 | to add more functionality.
| | 02:48 | You can add as many of these as you
would like, and in addition, you can choose
| | 02:51 | separators, as you see here, or spaces,
as you see here, to be able to space out
| | 02:58 | the buttons and give it a
little more aesthetic look.
| | 03:00 | In addition, you can choose to show
either Icons Only or Text Only to give
| | 03:05 | yourself a little bit more room.
| | 03:10 | So as you get more familiar with some of
these features, you might want to place
| | 03:12 | them in the Status area of your file.
| | 03:14 | This is where you can
actually customize each one of them.
| | 03:16 | Keep in mind though that every user
will have their own Status toolbar.
| | 03:21 | So as a developer, if you set your
Status toolbar in your database and then plan
| | 03:25 | to distribute this database, your user
is going to see the buttons that they've
| | 03:28 | set up in their Status toolbar
on their copy of FileMaker Pro.
| | 03:31 | So you don't want to necessarily
rely on having those buttons there in a
| | 03:35 | distributed FileMaker database.
| | 03:37 | You can also either hide or unhide
the Status toolbar, if you'd like, by
| | 03:42 | going down to this area.
| | 03:43 | And in the very bottom left-hand corner
of your screen, you'll notice this icon
| | 03:47 | that, when we click on it, it
will hide the Status toolbar completely.
| | 03:51 | So it's optional; you don't
necessarily have to have this as part of
| | 03:54 | your FileMaker database.
| | 03:55 | But of course your users could just
click on it and reveal it in their own copy
| | 03:59 | of FileMaker if they would like to.
| | 04:00 | There are some things in the scripts
that allow you to hide and lock that when
| | 04:04 | you open up a database,
| | 04:06 | if that's something that you desire to do.
You'll notice that the second tier of
| | 04:09 | the Status toolbar in Browse mode
is what's called the Layout bar.
| | 04:13 | That's this long gray area here
just below the Status toolbar.
| | 04:17 | On the far left, it allows you to
choose from the different layouts that you've
| | 04:20 | got inside your FileMaker database, or a
way that your users can navigate around
| | 04:25 | the database itself, and
also the different Views.
| | 04:29 | In Browse mode, you can view your records
either as a Form View, a List View or a Table View.
| | 04:36 | Here we are looking at Form View,
which is customarily used to look at
| | 04:40 | one record at a time.
| | 04:41 | So for things like detail views or
views that have more information onscreen,
| | 04:45 | you might want to just have it be a
Form View that your users are looking at;
| | 04:49 | however, if you want to fit multiple
records onscreen at a time, like in the
| | 04:53 | Record List, you'll see that
that's what's called a List View.
| | 04:58 | This has a smaller size of a record
and therefore allows us to not only view
| | 05:01 | multiple records onscreen at a time, but
print multiple records onscreen at a time, as well.
| | 05:06 | In FileMaker Pro, if you're still used
to working with data in a spreadsheet,
| | 05:10 | you can click the Table View option,
which will turn your FileMaker Pro layout
| | 05:14 | into a spreadsheet-looking view, which
allows you to sort by different column
| | 05:19 | headers and move
different fields around onscreen.
| | 05:26 | Back into the Record Detail and in
Form View, you see that we've got other
| | 05:30 | options here, as well.
| | 05:31 | Clicking on these two double As will show and
hide what's called the Formatting Bar.
| | 05:36 | So you see you've got even a third bar.
| | 05:39 | Just like in other applications, a
text Formatting Bar allows you to choose
| | 05:43 | different fonts, sizes, and some of the
different formats that you can apply, as
| | 05:47 | well as some of the alignment.
| | 05:49 | You can toggle between showing and hiding
that by either clicking the Aa button or not.
| | 05:55 | Finally, you have two buttons that
allow you to switch to different modes.
| | 05:58 | The next mode that we are going to
look at is what's called Layout mode.
| | 06:01 | You could navigate to Layout mode by
going under the View menu and choosing Layout,
| | 06:05 | but you can just hit this button here in
your Layout toolbar called Edit layout.
| | 06:09 | This takes you into a mode that looks
just like your Browse mode, but this
| | 06:13 | is the mode where you are going
to create your layouts and make
| | 06:15 | modifications to the layouts.
| | 06:17 | You'll notice here in the top of the screen
that your Status toolbar has changed, as well.
| | 06:22 | In this case, instead of navigating
from record to record throughout your
| | 06:25 | database, you're
navigating from layout to layout.
| | 06:28 | So you see all the different layouts
that are configured inside your file.
| | 06:33 | You'll notice here in the Status
toolbar, in Layout mode, that you've got all
| | 06:36 | these different layout tools.
| | 06:38 | We'll be working with those in the
various layout chapters later in this title.
| | 06:41 | But also in Layout mode, you see you've
got some similar things like being able
| | 06:44 | to navigate to the different layouts
and invoking your Formatting toolbar,
| | 06:48 | a lot of the same things that
you saw inside the Browse mode.
| | 06:51 | The next mode that I want to introduce
you to, under the View menu, is Find mode.
| | 06:57 | Find mode allows you to enter in
different search criteria, allowing you to
| | 07:01 | create something called a Found set,
which are different subsets of data that
| | 07:05 | have been stored inside your database.
| | 07:07 | Your Found set will match whatever criteria
your users are entering into these fields.
| | 07:11 | We'll be working a lot with Found sets and
search criteria in chapters involving Finds.
| | 07:16 | So as a result of changing into Find
mode, you see that our Status toolbar
| | 07:19 | buttons have changed again.
| | 07:21 | In this case we are navigating through
something called a Request, of which you
| | 07:24 | can have many inside of each Find.
| | 07:27 | You see then that the buttons change
from New Record to New Request, and also
| | 07:32 | the ability to Perform a Find or Cancel a Find.
| | 07:34 | The last mode to review is Preview mode.
| | 07:36 | This view is meant solely for seeing
what your layouts are going to look like
| | 07:39 | when they're either printed as
a hard copy or saved as a PDF.
| | 07:43 | This way you can kind of line up your
margins and even use this as a way to
| | 07:47 | design your layouts, if they are going to
be something that users are going to print.
| | 07:50 | From this view, you see that you have an
option to Save as Excel or Save as a PDF.
| | 07:55 | But you can also print directly from
Preview mode or access the Page Setup
| | 07:59 | dialog, allowing you to choose
different print drivers or paper settings.
| | 08:03 | So now that we're familiar with what everything
is called onscreen and where we can find them,
| | 08:07 | it's time to start using some
of these tools to create our own
| | 08:10 | FileMaker database.
| | Collapse this transcript |
|
|
2. Database Creation EssentialsCreating databases from templates| 00:00 | Once you've become familiar with the
FileMaker application and how to set it up,
| | 00:03 | there are a couple of different ways
that you can start creating databases - of
| | 00:06 | course by scratch, which we'll do
for almost the remainder of this title -
| | 00:10 | but there is also a couple of different ways.
| | 00:11 | The first one I am going to show you
in this video is by using what's called
| | 00:14 | a Starter Solution.
| | 00:16 | A Starter Solution is a FileMaker
database that's already been created for you.
| | 00:19 | FileMaker ships with several of these
different Starter Solutions for you to choose from.
| | 00:23 | They are meant to be fully functional
FileMaker solutions that you can create
| | 00:27 | and save and modify, and then start
adding data to and then sharing them with
| | 00:30 | all the different users.
| | 00:31 | Let me show you what I am talking about here.
| | 00:33 | So if you open up FileMaker Pro and
you go under the File menu, you'll notice
| | 00:37 | that there is an option that's
called New From Starter Solution.
| | 00:40 | You can choose that option,
| | 00:42 | or if when you opened up FileMaker you
go to the Quick Start Screen, you can
| | 00:46 | choose the Use a Starter Solution
option here, and this will bring up what's
| | 00:49 | called the Starter Solution viewer window.
| | 00:52 | Inside the viewer window, you see lists of
various different types of Starter Solutions.
| | 00:57 | You see that they are grouped
into different categories here:
| | 01:00 | Finance, People, Activities, Collections,
or just General, and you get a little
| | 01:05 | icon onscreen that's
supposed to represent the database.
| | 01:07 | But that's not exactly what
the database will look like.
| | 01:09 | So, for example, if we chose Invoices
and then hit the Choose button, you will
| | 01:14 | then choose what you want to name the
file and choose a location to save it.
| | 01:17 | Then FileMaker Pro creates a database
for you, as you can see on our desktop,
| | 01:21 | and then opens up that database file.
| | 01:23 | Each one of the Starter Solution
databases has different settings and user
| | 01:27 | preferences, and FileMaker takes you
to a layout that they've created for you
| | 01:31 | that gives you descriptions of each.
| | 01:32 | Once you get familiar with how the
database works, you can start adding data
| | 01:36 | right away if you'd like, or you can
start adding your own fields and modifying
| | 01:41 | the database as you see fit.
| | 01:42 | The most important idea here is that
you can make any modifications that you'd
| | 01:46 | like, and they'll never expire.
| | 01:47 | For example, if you are using the 30-
day trial version of FileMaker Pro, keep
| | 01:51 | in mind that you can continue to make
modifications to one of these Starter Solutions:
| | 01:54 | adding data, changing fields, creating
your own layouts and reports, and they
| | 01:58 | won't expire when the trial
version of FileMaker expires.
| | 02:01 | These databases are just like any other
database that you create for yourself,
| | 02:04 | except it takes a lot of
the work out of it for you.
| | 02:06 | You'll notice, of course inside, of the
Starter Solution viewer window, that you've
| | 02:11 | got tons of different databases to choose from.
| | 02:13 | Starter Solutions are a great way to
get familiar with FileMaker without having
| | 02:16 | to do any of the programming.
| | 02:18 | So if you're brand-new to FileMaker,
I encourage you to go take a look at a
| | 02:20 | couple of these different Starter
Solutions, to see maybe if there's one that
| | 02:23 | fits you or if there's one that can
give you some ideas on what to do with the
| | 02:27 | database you create from scratch.
| | Collapse this transcript |
| Creating new databases in the spreadsheet-like format| 00:00 | Certainly, the easiest way to create
a fully functional database right out
| | 00:03 | of the box is by using a Starter Solution
like we've talked about in the previous movie.
| | 00:07 | But if you want to create a FileMaker
database that already contains data, you
| | 00:10 | can convert different file types into
FileMaker databases and then do your
| | 00:15 | modifications and create
your database from there.
| | 00:17 | I am going to show you a couple of
these different principles in this movie.
| | 00:19 | The first concept will be creating a
database from an existing file, in our
| | 00:24 | case a spreadsheet.
| | 00:25 | Then once we are in FileMaker Pro, we
are going to use the spreadsheet-type view,
| | 00:30 | or the Quick Table view to create
some fields inside of our database.
| | 00:34 | So first, when you open up FileMaker Pro,
you'll notice under the File menu that
| | 00:38 | we've got an option called Open.
| | 00:39 | What you may not be aware of it is
that if you select File > Open and point to
| | 00:44 | a file that isn't a FileMaker database,
you'll notice that we can choose from
| | 00:49 | other FileMaker Pro files, a couple of
different formats of Text files like
| | 00:53 | Tab-Separated, Comma-Separated, Merge
files and the different types of Excel
| | 00:58 | Workbook ones, which we'll
actually be choosing here.
| | 01:01 | But also you see that you can pull in
something called an XML Data Source, which
| | 01:05 | means you can connect to a remote server
that's going to provide data for you in
| | 01:09 | XML and create a database that way, or
in the same manner you can do that from
| | 01:12 | what's called an ODBC Data Source.
| | 01:14 | Now if you happened to be a Mac user,
you'll see that you have an option here
| | 01:16 | for turning a Bento
Database into a FileMaker database.
| | 01:21 | Here, in our case, we are going to use
Excel Workbooks, and we are to choose
| | 01:24 | Itinerary from our exercise files and hit Open.
| | 01:27 | In the case of creating a FileMaker
database out of the spreadsheet, you are
| | 01:30 | going to see a First Row Option window appear.
| | 01:33 | In this case, you are going to be
asked whether or not you want first record
| | 01:37 | inside of your spreadsheet to be
represented as Field names in your FileMaker
| | 01:41 | database, because if you remember
columns become fields in FileMaker Pro, or if
| | 01:46 | they are just going to be the first row data.
| | 01:47 | So in this particular example we are
going to choose Field names and hit OK.
| | 01:51 | Now, we are going to choose a
location to save our new file.
| | 01:55 | Now, you see that not only we've
created a new FileMaker database, but we've
| | 01:58 | created a FileMaker database with
three fields defined for us already.
| | 02:01 | You see we've got an Adventure id
field, Day field and then a Description.
| | 02:05 | But not only has it created a new
database for us, with 653 records, but it's
| | 02:11 | also taken us into the database in the Table
view, or the new FileMaker 11 Quick Table View.
| | 02:16 | The reason it's new inside FileMaker
is because there are some functionality
| | 02:19 | that you can do inside of this Table
view that you couldn't do in previous versions.
| | 02:23 | You'll also notice that in addition to
this view, we've also got another layout
| | 02:26 | that you see here in our Layout
dropdown that's by default called Layout #1,
| | 02:30 | which shows all of our data, one
record at a time, in what's called Form view.
| | 02:35 | If you recall, Form View shows one
record at a time; List and Table View show
| | 02:39 | many records onscreen at a time.
| | 02:40 | So, this allows you to navigate
through record to record, focusing on just one
| | 02:45 | record at a time, instead of course by going
to Layout #2, which is your Quick Table View.
| | 02:50 | From this layout, you are going to be
able to add fields as column headers or
| | 02:54 | select the field type without having
to go into your Manage Database dialog.
| | 02:58 | So FileMaker Pro allows you to make
all the changes under the File menu, under
| | 03:01 | Manage > Database, where you can see you
can work with tables and fields and all
| | 03:05 | sorts of other settings we'll
be working on in future movies.
| | 03:08 | But if we stay here inside of the
FileMaker Quick Table View, you'll see that
| | 03:12 | we can add new Fields.
| | 03:14 | You notice this button here
on the top part of your layout.
| | 03:17 | If you click the button, you'll notice
that it automatically creates a field for you.
| | 03:21 | Here, we can just type in the name of
our new field and click outside that area.
| | 03:24 | Now, in addition to the three fields
that we were created when we imported
| | 03:27 | to the spreadsheet,
| | 03:28 | we've now created a new
field that's called Type.
| | 03:30 | So, in this case we can enter in a new
value for each one of the records that
| | 03:33 | you store in your database.
| | 03:35 | You'll notice, also, that if you go to
File > Manage > Database that the Type
| | 03:40 | field has also been added
to the database for you.
| | 03:43 | Hitting OK and going back into the Table View,
| | 03:45 | you'll see that we can also make
changes to the different fields by clicking on
| | 03:49 | this arrow that appears when
we hover over the Column header.
| | 03:52 | If you click on the arrow, you see that
we can make changes to the Field Type;
| | 03:55 | for example, a field can be a Text,
Number, Date, Time, Timestamp, Container or
| | 04:00 | even a Calculation or Summary field.
| | 04:02 | We can toggle between those different
types by simply clicking on this arrow.
| | 04:06 | In addition to field type, you'll
also notice that there's a Field Options.
| | 04:09 | When you click the Field Options, up
pops the Options for Field window, which
| | 04:14 | allows you to make many different changes.
| | 04:16 | We'll focus on these when we
get into the chapter on Fields.
| | 04:18 | Keep in mind, though, that though that
before you can add any fields in Quick
| | 04:21 | Table View or change any of the
settings, you must first have full access
| | 04:25 | privileges to the files.
| | 04:26 | That means you have to log in with an
account that's assigned to something
| | 04:29 | called the full access privilege
set in order to be able to make any of
| | 04:32 | these modifications.
| | 04:33 | Notice though that you can also Hide
different Fields or Delete Fields completely.
| | 04:38 | Hiding means you are just removing it
from this layout but not from the database.
| | 04:41 | Delete means you are removing it from the
database and from the layout at the same time.
| | 04:46 | Reset Table View will change
everything back to the default before you'd made
| | 04:50 | changes to the width,
| | 04:51 | let's say, of a Table View.
| | 04:52 | Of course, you can hover over the edge
of a column and click down and drag and
| | 04:57 | release to allow you to
resize some of these fields.
| | 05:01 | If you hold down a field until it
turns dark gray and drag it to a
| | 05:04 | different location,
| | 05:05 | you'll see that you can reorder the
fields that are inside your Quick View - some
| | 05:09 | things that you couldn't normally do
inside of a spreadsheet, for example.
| | 05:11 | So, if you are used to working with
spreadsheets, or if you have a spreadsheet
| | 05:15 | that you've been using all this time,
you can open it up in FileMaker Pro, which
| | 05:19 | will of course convert it into
a FileMaker database for you.
| | 05:22 | Then you can use the Quick Table View,
which should be familiar to you if you're
| | 05:25 | used to working with spreadsheets,
which allows you to add new fields to your
| | 05:29 | database and start to create your
first FileMaker database from just your
| | 05:33 | experience using a spreadsheet.
| | Collapse this transcript |
| Importing tables| 00:00 | You see here what we've got is a
FileMaker database that we've created by
| | 00:04 | opening up a spreadsheet inside
the FileMaker Pro application.
| | 00:08 | What that has done for us is not only
brought in 653 Records that were once rows
| | 00:13 | inside of a spreadsheet, and
represents them here in our database.
| | 00:16 | But it's also done something that you'll see,
if you go under File > Manage > Database,
| | 00:22 | it's created these things called
Fields, which are represented in our
| | 00:25 | Spreadsheet view as a column, but it's
created these fields for us in the database.
| | 00:30 | But one thing we haven't
talked about yet is a Table.
| | 00:33 | When we created this FileMaker
database from our spreadsheet, it created a
| | 00:37 | default Table for us.
| | 00:39 | A Table is something that we're going to
be talking about in the upcoming movie.
| | 00:42 | But in short, a Table is the part of the
database that stores different types of data.
| | 00:47 | You can have many different Tables
inside of your FileMaker database.
| | 00:50 | In this chapter, we're focusing on
easy and quick ways to go from 0 to 60 to
| | 00:54 | create your database.
| | 00:56 | So here I'm going to show you, in
this database we can also add additional
| | 00:59 | tables to it, as well.
| | 01:00 | So here already we've got an Itinerary table.
| | 01:03 | Let's say that we want to add
adventure information to this database,
| | 01:07 | not only the adventure data, but the
adventure fields and all those stored
| | 01:11 | within an adventure table.
| | 01:13 | The easiest way to do that is to go
under the File menu, to Import Records, and
| | 01:18 | choose File and navigate over to
your 02_03 Exercise Files folder.
| | 01:24 | Here we can choose Adventures.
| | 01:26 | You see that Adventures is a text
file, which is indicated by the .txt at
| | 01:31 | the end of the file.
| | 01:32 | Hitting the Open will bring up
something called the Import Field Mapping.
| | 01:36 | What we're doing here is we're
actually importing in information from another
| | 01:40 | source into our FileMaker Pro database.
| | 01:43 | But what's interesting here, if you
choose this option called New Table,
| | 01:46 | after we choose New Table, we now see
all of the different Source Fields listed
| | 01:51 | in the middle of the
Import Field Mapping window.
| | 01:53 | These are the different columns of
information inside of the text field Source
| | 01:57 | that we're trying to import in.
| | 01:58 | But since we've chosen New Table,
we're not only going to import in the new
| | 02:01 | records, but we're also going to
import in a new Adventures table for those
| | 02:05 | records to be stored.
| | 02:06 | You see that we don't have field
names yet, but if we choose this option,
| | 02:09 | Don't import first record, you'll see
that now what it's done is identified
| | 02:13 | that the first record in the Import
Source, in this case the Adventures text
| | 02:18 | file, has names or column headers,
which will then become the field names
| | 02:22 | inside of our database.
| | 02:23 | So later in the title, we're going to talk
about importing data into FileMaker Pro.
| | 02:28 | But we're using the File, and then Import
Mapping window here just to create a new table.
| | 02:34 | So in this case, we're
going to hit the Import button.
| | 02:36 | You see we've got some information that
we've got records added and no errors.
| | 02:40 | We see we've got a new Layout
automatically added to our database.
| | 02:43 | This one is called Adventures.
| | 02:44 | You see that in addition to the
first two that were created when we first
| | 02:47 | created the database from a spreadsheet.
| | 02:49 | Not only do we have the New Table
created in FileMaker and a new Layout created,
| | 02:54 | but we've got 10 Records.
| | 02:56 | We've got 10 Records and
all these various fields.
| | 02:58 | You'll see that if you go into the
File > Manage and Database option, you'll
| | 03:02 | notice that under the Tables
tab, we now have two tables:
| | 03:05 | the original Itinerary table,
and now we have Adventures.
| | 03:08 | You'll see under the Fields, we've got all
the fields defined from within Adventures.
| | 03:13 | So without knowing anything about how
to create Tables or how to define Fields
| | 03:18 | or add records to a database, we've
been able to create a database from a
| | 03:21 | spreadsheet, and then add new
tables to that from different sources.
| | 03:24 | So we've, in this case, taken a
spreadsheet and a text document from separate
| | 03:28 | sources, and combined them
together into one FileMaker Pro database.
| | 03:32 | Adding Tables from various different
data sources is a fast and easy way to get
| | 03:36 | these Tables, Fields and Data
into your new FileMaker database.
| | Collapse this transcript |
|
|
3. Creating TablesDetermining which tables you will need| 00:00 | There are a couple of different
methods that you could use to create a
| | 00:02 | FileMaker Pro Database,
| | 00:04 | first of which would be to use one of
the templates or starter solutions that we
| | 00:08 | discussed in the previous
movie, that are prebuilt for you.
| | 00:10 | In that way, you can just go ahead and
make some modifications, add some data,
| | 00:14 | and you're ready to roll.
| | 00:15 | But another option, which is
actually a lot more popular, is to create a
| | 00:18 | database from scratch, or to build all
of the components from the ground up.
| | 00:23 | In order to build the database from
scratch, you need to first make some
| | 00:26 | decisions about what type of
information, or data, is going to be stored
| | 00:29 | within these databases.
| | 00:30 | So the first thing that you're going
to have to determine is what types of
| | 00:34 | tables you're going to have in your database.
| | 00:36 | So let's back up for a second. What's a Table?
| | 00:39 | A Table is a container within
your database that stores data.
| | 00:42 | If you remember, a database is like
a big bucket of information that can
| | 00:46 | store all sorts of data.
| | 00:48 | That's one of its key role is to store the data.
| | 00:51 | But you can have different
types of data within one database.
| | 00:55 | So in that case, if you have multiple
different types of data, each one of them
| | 00:59 | needs to have its own little
mini bucket within the database.
| | 01:02 | These smaller storage areas are called Tables.
| | 01:05 | A database can have multiple tables,
each representing a different Entity.
| | 01:10 | Now an Entity, it's kind of a database term.
| | 01:13 | It's useful here when we
we're discussing Tables.
| | 01:15 | An Entity describes a single person,
place, or thing, or basically anything for
| | 01:20 | which we can store data, anything that
we can describe, and anything that we
| | 01:25 | can store data for.
| | 01:26 | So, for example, people or
customers would be an Entity.
| | 01:30 | That's certainly something that we
could store inside of a database.
| | 01:33 | Now it's important that we remember that a
database can consist of one or more tables.
| | 01:38 | The database that we're going to be
creating in this title, we're going to have
| | 01:41 | many different tables.
| | 01:43 | So a database can have many
different tables, and a table can have
| | 01:47 | many different records.
| | 01:48 | A table can consist of records.
| | 01:50 | Each record is made up of a number of fields.
| | 01:52 | But focusing just on the tables, they
are going to represent the groups of
| | 01:56 | information that we're going to
store within the database system.
| | 01:58 | For example, let's say you're going
to create a database that tracks the
| | 02:01 | enrollment of students in classes.
| | 02:04 | You can then create separate tables
that contain details about teachers, and
| | 02:08 | classes, or even classrooms.
| | 02:10 | They're all different types of data, but
they're unique and discrete from each other.
| | 02:14 | So they would deserve their own little mini
storage area, or table within the database.
| | 02:19 | When you have multiple tables in the
database, those tables were going to have
| | 02:22 | relations to each other.
| | 02:23 | We'll talk about those in an upcoming
chapter, but in that case, this is what we
| | 02:27 | call a relational database.
| | 02:29 | But a FileMaker Pro database, like
any other database, is presented to the
| | 02:33 | database developer as a collection of
these tables that we've been discussing.
| | 02:37 | But how do we determine
which tables we're going to need?
| | 02:40 | A very important note here is that when
you sit down at a computer and you open
| | 02:44 | up FileMaker Pro to start a new
database, what you're actually doing there is
| | 02:48 | constructing something.
| | 02:49 | Much like any other construction
project that you embark on, like let's say a
| | 02:52 | home construction project,
| | 02:54 | your database will proceed more smoothly
if you first begin with some type of a plan.
| | 02:59 | The very first part of any plan,
when you're developing a database, is to
| | 03:03 | determine what types of information you're
going to be storing inside of that database.
| | 03:07 | So the first thing that you really
want to do, even before you open up
| | 03:10 | FileMaker Pro, is to come up with a
plan and what type of data you're going to
| | 03:14 | be managing your system,
| | 03:15 | and therefore, what tables you're going to need.
| | 03:17 | So, for example, if it's a very
complex system, then it's going to have a lot
| | 03:20 | more parameters to it.
| | 03:21 | You're going to have a very complex plan.
| | 03:24 | But even if it's a very simple
project, you still want to take a couple
| | 03:27 | of minutes ahead of time, and determine
what kind of data you're going to be storing.
| | 03:30 | A lot of people think that they don't
have a very complex solution that they're
| | 03:34 | trying to build in a database, and
they can skip the planning stage, but it's
| | 03:37 | just as important as as it would
be with something very complex.
| | 03:40 | So, first take a few
minutes and look at the data.
| | 03:42 | Literally sketch out what type of
information you plan to manage in your database.
| | 03:46 | For example, for this movie, and for the
entire rest of the title, we're going to
| | 03:49 | have a basic database system where we
need Customers, Invoices, and Products.
| | 03:53 | It's really a standard invoicing system,
where Customers are ordering Products
| | 03:57 | and creating invoice forms as a result.
| | 03:59 | So in example like this one, we can see
that we've got different types of data.
| | 04:03 | So I've mentioned a couple of them already.
| | 04:05 | First of all, as we're
sitting down and sketching this,
| | 04:07 | we realize that we're going to have to
have customers stored inside of this database,
| | 04:10 | so we jot that down.
| | 04:12 | We know that we're going to have Orders,
or Invoices we'll call them in this case,
| | 04:15 | so we jot down Invoices.
| | 04:17 | And then finally we notice that we're
going to have to have Products, because
| | 04:19 | the Customers have got to be ordering something,
| | 04:21 | so it seems to us that we can jot
down Products as well in our list.
| | 04:25 | So in an example like this one, we can see
what types of data we're going to be storing.
| | 04:29 | It's important for us to pick
discrete and unique buckets of information,
| | 04:32 | because after all, that's ultimately
going to tell us what tables we need to
| | 04:36 | define in our system.
| | 04:37 | So here we see we've determined that
we're going to have different groups of
| | 04:40 | information in our one database:
Customers, Invoices and Products.
| | 04:45 | What we've really done is created a
list that tells us what tables we need to
| | 04:48 | store inside of our database.
| | 04:51 | Later, we'll look at how these
tables are going to relate to each other,
| | 04:53 | but for now, we're going to use this
table list we created to start working
| | 04:56 | with our new database.
| | 04:58 | So by doing this exercise, we've
determine that we need a Customer table, and we
| | 05:01 | need an Invoice table and a Products
table, because these are the discrete
| | 05:06 | buckets of data that make up the
database that we're trying to build.
| | Collapse this transcript |
| Creating tables in the Managing Tables window| 00:00 | In the previous movie, we determined
that we needed a Customer table and
| | 00:04 | an Invoice table and a Product
table in order to be able to create our
| | 00:07 | new FileMaker database.
| | 00:09 | In this movie, we're going to talk about how
to physically add those tables to your database.
| | 00:13 | Adding a table is going to be the very
first step in creating a FileMaker Pro
| | 00:17 | database, so this is really going to
be the first step in us creating the
| | 00:22 | database that we're going to be
using for the rest of the title.
| | 00:24 | Creating a FileMaker database from
scratch will always start in one location,
| | 00:28 | and that is under the File menu,
where you'll see File > New Database.
| | 00:34 | When you choose New Database, you'll be
asked what you want to name the file and
| | 00:37 | where you want to name it.
| | 00:39 | You'll see that all
FileMaker databases end with .fp7.
| | 00:42 | That's a file format suffix for
FileMaker Pro, and in this case, we'll just call
| | 00:47 | it Untitled, and we're going to
choose to save it to our Desktop.
| | 00:51 | Once we've made those
decisions, we can hit Save.
| | 00:54 | And now you'll notice that its
created a FileMaker Pro file for us, and its
| | 00:58 | taken us to the Quick Table View
layout that we discussed in previous movies.
| | 01:01 | So you'll see here, we've got a
layout already created for us, and if we go
| | 01:06 | back under the File menu and choose Manage and
Database, you'll see that we've got three tabs.
| | 01:13 | We're going to focus on the tab for Tables.
| | 01:15 | And here you'll see that it has
already created one table for us.
| | 01:18 | And what you'll notice here is that
it has taken the name of the file, so
| | 01:23 | whatever name that you choose when
you're naming the file becomes the name
| | 01:26 | of your first table.
| | 01:27 | Traditionally, the name of your file
won't necessarily be the name of any of the
| | 01:31 | tables inside of it, but FileMaker Pro
takes that name because it does have to
| | 01:34 | name your title something.
| | 01:36 | So really the first thing that
you're going to want to do is change the
| | 01:38 | default table to a name that
represents one of the tables that you want to
| | 01:42 | define in your file.
| | 01:43 | So let's pick Customers.
| | 01:44 | And you'll see what we do is we just
type the word "Customers" in the table name,
| | 01:49 | and while we have the table chosen,
we're going to hit the Change button, which
| | 01:54 | is now going to change the
table from Untitled to Customers.
| | 01:58 | So now we've got one of our three tables
already defined inside of our database.
| | 02:03 | And if we want to create a new one from
scratch, we just simply type into the field.
| | 02:08 | In this case, we want to add our
second table, which is Invoice.
| | 02:11 | But this time we're going to hit the
Create button, so that it simply creates
| | 02:14 | the table for us, as we
see in the Table list above.
| | 02:18 | For the third table, we're actually
going to bring in a table that exists in
| | 02:21 | another database we've been working on.
| | 02:23 | So let's say in this case that we had
a Products table that was in FileMaker,
| | 02:27 | but we wanted to integrate it into
our new invoicing solution database, so
| | 02:31 | instead of creating the new table from scratch,
we're going to import one into the system.
| | 02:35 | So first we'll hit OK.
| | 02:36 | Then we go File > Import
and choose the File option.
| | 02:47 | Now, our Source database has
several different tables in it.
| | 02:49 | We're going to choose the
one that's called Products.
| | 02:51 | You can see all of the different
product fields here, and we're going to choose
| | 02:56 | the New Table option, which of course
is going to create a new table and define
| | 03:01 | all these fields for us.
| | 03:02 | So simply hit Import, and now we see
we've got records and fields chosen, but
| | 03:08 | most importantly, when we go back into
Manage and Database and look under the
| | 03:11 | Fields list, now we have all three
tables that we've determined in the previous
| | 03:15 | movie were required for our database.
You see all three of those tables now
| | 03:19 | defined within our new FileMaker Pro database.
| | 03:22 | And here I just wanted to demonstrate that
we've got some information about our tables.
| | 03:27 | We've got Customer, the name, and then
some details on how many fields and records.
| | 03:31 | We don't have any fields defined in
these first two, but we'll see that by
| | 03:34 | importing in a table from another source,
we're able to bring in, not only the
| | 03:38 | fields, but also records from that other source.
| | 03:42 | Once we've created the tables, we can
then move on to create the fields, but
| | 03:45 | also when we have multiple tables, we
can evaluate what types of relationships
| | 03:48 | they might have between them.
| | 03:50 | So now that we've got our database
created, or the shell of the database created,
| | 03:54 | we can start adding things like
relationships and the different things that
| | 03:57 | we'll cover in the upcoming movies.
| | Collapse this transcript |
|
|
4. Creating RelationshipsUnderstanding relationship types| 00:00 | A quick note before we get started,
since the topics that we're going to be
| | 00:03 | talking about in this chapter are
going to be relationships, specifically
| | 00:06 | relationships between tables:
| | 00:09 | You're going to need to have
multiple tables in your solution.
| | 00:12 | In the example solution that we're
creating, we do have multiple tables, and
| | 00:15 | that's what we'll be using
throughout the rest of this title.
| | 00:17 | But also if you've determined in your
own real-world database that you only
| | 00:21 | have one table, well then you're
not going to be able to have new
| | 00:24 | relationships between tables.
| | 00:25 | So feel free to go ahead and forward
on to the discussion on fields so you can
| | 00:29 | talk about assigning attributes to your table.
| | 00:32 | But at some point you will want to
come back to relationships, because this
| | 00:34 | really is a core concept behind, not only
FileMaker databases, but databases in general.
| | 00:40 | With that said, in the previous
chapters I have mentioned things like
| | 00:43 | relationships before.
| | 00:45 | And when I'm talking about
relationships, I'm specifically talking about how
| | 00:48 | different tables are related to each
other, and how the relationships between
| | 00:52 | those tables really define the
data that's stored inside the tables.
| | 00:56 | So the process of determining the
relationships between tables in a database is
| | 01:00 | known as data modeling, and the
goal of data modeling is to translate a
| | 01:04 | real-world problem into a structure
that can then be captured in some kind of
| | 01:08 | database, and in our case, a
FileMaker relational database system.
| | 01:12 | A relational database system can be
thought of as a collection of discrete
| | 01:15 | data groups or tables, which have
some connections between them, and these
| | 01:19 | connections will be referred to more
commonly when we use the terms relationships.
| | 01:24 | So in order to decide on the data model
for your database system, it's important
| | 01:27 | to first determine what are the possible
kinds of connections that we could have
| | 01:32 | between our databases, and then we can
choose from those types of connections, or
| | 01:36 | relationships, to determine
which ones we actually have.
| | 01:39 | So in this movie we're going to
quickly review the different types of
| | 01:42 | relationships and give an explanation of each.
| | 01:45 | To keep things simple, we're only your
focus on two types of relationships that
| | 01:49 | account for most of the situations
that you are going to encounter in your
| | 01:51 | database, but there are three, technically.
| | 01:54 | The first one that we're really
going to skip over is called a
| | 01:57 | one-to-one relationship.
| | 01:59 | It's very rare, and it usually means
that you've created a table for something
| | 02:02 | that should actually be field.
| | 02:03 | A lot of times you'll see one-to-ones
when you have, let's say you thought
| | 02:06 | you needed a table for phone numbers, but
then you also have the table for customers.
| | 02:10 | If a customer only has one phone
number, then you don't need to have two
| | 02:13 | tables. What you've got there is you
should just have an attribute or a field
| | 02:17 | defined inside customers.
| | 02:18 | So if you go through this process and
find out you've got one-to-one, you should
| | 02:22 | really take a look at it, and what you
actually might have is just a field;
| | 02:25 | they should be combined
together into the same table.
| | 02:28 | But the two relationships that you
will want to be familiar with are the one
| | 02:32 | that's called a one-to-many
relationship, which could also be interpreted as
| | 02:36 | a many-to-one, more commonly called one-to-
many, and then also a many-to-many relationship.
| | 02:41 | And when you're done data modeling,
the way that you'll know you're done is
| | 02:45 | because you've evaluated all of the
possible relationships between your tables,
| | 02:48 | and you've determined that all you
have left are one-to-many relationships.
| | 02:52 | So that's the first notable learning
point here is that you must resolve all
| | 02:56 | your relationships to one-to-many relationships.
| | 02:59 | And we'll talk about how identifying many-
to-many relationships will factor in there.
| | 03:03 | So another other way to interpret these types
of relationships is if we look at the tables.
| | 03:07 | Tables have records in them.
| | 03:08 | So in the case of a one-to-one, like we
mentioned before, that means that any one
| | 03:12 | record in table A, for example, could
only have one other related record in
| | 03:18 | table B. So one customer can
only have one phone number.
| | 03:22 | If it's true that a customer can have
multiple phone numbers, then we don't have
| | 03:25 | a one-to-one anymore.
| | 03:26 | We actually have a one-to-many.
| | 03:28 | So in the case of a one-to-many
relationship between two tables, again, we look
| | 03:32 | at the records, and that means that
one record could have one or many related
| | 03:36 | records in another table.
| | 03:37 | So if we look at that again, in our
case we've got a Customers table, and we've
| | 03:42 | also got an Invoices table.
| | 03:44 | So we've determined that any one
customer could have one or many different
| | 03:49 | invoices in the invoice table, or be
zero for that matter, but ultimately
| | 03:53 | they could have many.
| | 03:55 | So if we go to our customer table and
we have a record in there that's customer
| | 03:58 | XYZ, and we know that the customer XYZ
has ordered five different times each
| | 04:02 | reflected by an invoice, represented
by a record in the invoice table, that
| | 04:07 | means that we've got a one-to-many
relationship between the Customer and Invoices table.
| | 04:11 | Now in the case of many-to-many,
that's just simply means that we've got a
| | 04:14 | one-to-many going in one direction,
and a one-to-many going in the
| | 04:17 | opposite direction.
| | 04:18 | In the case of the many-to-many that
just tells us we've got two one-to-many
| | 04:20 | relationships kind of
butting heads with each other.
| | 04:22 | But before we get further in to that, the
most important type of relationship is
| | 04:27 | known as a one-to-many relationship.
| | 04:29 | As I mentioned earlier, this is going
to be the only relationship you want left
| | 04:32 | when you're done with
your data modeling process.
| | 04:34 | Now I'm going to use some terminology
throughout this title that I want to make
| | 04:37 | you familiar with now.
| | 04:38 | And it's common to refer to the table
that access the one in a one-to-many,
| | 04:44 | so let's say we have, the one
in this case is the customer,
| | 04:46 | so that's commonly referred to as the
parent in the relationship, and in this
| | 04:51 | case invoices is on the many side;
| | 04:53 | that's referred to as the child.
| | 04:56 | So we've got customers are related to
invoices in a one-to-many fashion, and
| | 05:00 | customers are the parent
and invoices are the child.
| | 05:03 | I'm going to use that terminology a lot.
| | 05:04 | Whenever I talk about child table or
child record, I'm talking about the many side.
| | 05:09 | Whenever I talk about parent table or
parent record, I'm talking about the one side.
| | 05:11 | So we should know in our system
one customer can have many invoices;
| | 05:16 | therefore, the parent is the customer.
| | 05:18 | Remember, your goal is to resolve
all relationships in your system to a
| | 05:23 | one-to-many relationship.
| | 05:25 | We're going to go through
several examples of that.
| | 05:27 | However, there is this other type
of relationship, which is called a
| | 05:30 | many-to-many relationship.
| | 05:33 | Ultimately, a many-to-many relationship
could be something like a product in an invoice.
| | 05:38 | So, for example, in our solution
we've got customers and invoices.
| | 05:42 | We know the relationship between those two.
| | 05:43 | One customer can have many invoices.
| | 05:45 | But what about the relations
between a product and an invoice?
| | 05:48 | One product could appear on many invoices,
| | 05:51 | so it looks like we've got a one-to-many,
| | 05:53 | but one invoice can also have many products.
| | 05:55 | So we've got a many-to-many, in that case.
| | 05:57 | And generally we're going to need to do
some extra work in order to resolve these.
| | 06:01 | Many-to-many relationships are
common and powerful type of database
| | 06:05 | relationship, but unlike one-to-many
relationships, which can be constructed
| | 06:08 | simply by adding appropriate key
attributes to related tables, a many-to-many
| | 06:13 | relationship is going to require a lot
of extra work in our data model, and
| | 06:16 | the reason we will eliminate these
many-to-manys, as we'll talk about in
| | 06:19 | upcoming movies, is because it makes
it impossible for us to store our data
| | 06:24 | properly, to enter our data properly
or to even create reports based on the
| | 06:28 | proper amount of data.
| | 06:30 | Data modeling in FileMaker, or any
other database platform, allows you to
| | 06:34 | determine the relationships between
your tables, and you'll eventually set
| | 06:37 | those tables up inside the database
file, and you're also eventually going to
| | 06:40 | set up the relationships.
| | 06:41 | But first you need to know
what their relationships are.
| | 06:43 | So as we've talked about in this video,
you can have a one-to-one relationship,
| | 06:47 | or more commonly you'll have one-to-
many relationships or many-to-many
| | 06:50 | relationships, and once you understand
those relationship types you can then go
| | 06:54 | ahead and diagram the relationships.
| | Collapse this transcript |
| Diagramming relationships (with ER diagrams)| 00:00 | So far in this chapter we've
learned about basic relationship types.
| | 00:04 | We've reviewed those as the one-to-many
and many-to-many being the most common
| | 00:08 | and then sort of an obscure
kind of rare one called one-to-one.
| | 00:12 | In this movi,e we're going to expand on
those concepts, and we're going to learn
| | 00:15 | a general method for
diagramming database systems.
| | 00:18 | This method we're going to
learn is called Creating an Entity
| | 00:21 | Relationship Diagram, and I know
that sounds like a lot of Computer
| | 00:24 | Science and kind of a mouthful,
| | 00:26 | but it's a common term if you're in
database circles, or if you're going to be
| | 00:29 | working with FileMaker Pro it's
going to be something that you're going to
| | 00:31 | run into quite a bit.
| | 00:33 | The good news is it's often
referred to just simply as an ERD.
| | 00:37 | So an entity relationship diagram,
entities of course being tables. If you
| | 00:41 | really break this down, it's a diagram
that just shows what the relationships are
| | 00:45 | between your tables.
| | 00:47 | It's a simple process, and generally most
useful for relational database systems.
| | 00:50 | Of course, FileMaker's relational
databases system, but any other database
| | 00:54 | system requires data modeling and
entity relationship diagrams as well.
| | 00:59 | So the ERD modeling really
breaks down into three phases.
| | 01:03 | First you're going to develop your list
of tables, which we've done, because we
| | 01:06 | want to evaluate what types of
information we're going to be storing in our
| | 01:09 | database and how they break
up into individual groups.
| | 01:12 | So we've already determined what our list is.
| | 01:15 | Then you determine in diagram the
relationships between those tables, which
| | 01:20 | we're going to do here.
| | 01:21 | And then you do sort of a rinse and
repeat process by reviewing your diagram and
| | 01:26 | you repeat steps in one only if you
encounter either a many-to-many or a
| | 01:29 | one-to-one relationship.
| | 01:31 | And ultimately your goal is to resolve
all of your relationships to one-to-many.
| | 01:35 | Now in this process, I advice you to
use a piece of paper and a pencil, because
| | 01:40 | whatever your first diagram is is
almost never what the last diagram is, and
| | 01:44 | it's an important part of the process
to kind of go through this a couple of
| | 01:46 | times before you've got your
final set of relationships.
| | 01:49 | In the database that we're going to
be creating in this title, we've got a
| | 01:53 | pretty standard invoicing solution.
| | 01:55 | So if we start at step number one,
and we determine what our list of tables
| | 01:59 | might be, you'll remember that in
the database that we're going to be
| | 02:02 | creating in this title,
| | 02:04 | we've determined that we've got
three different tables already.
| | 02:06 | We've got one table that's going to
store customers, one that's going to store
| | 02:09 | invoices and one that's going to store products.
| | 02:11 | Those are all three discretely different
types of data, so we know that they all
| | 02:15 | need their own table.
| | 02:17 | So in the example, like the one we've
got here, we can see what types of data
| | 02:20 | we're going to be storing, pretty simple stuff.
| | 02:22 | And what's important is that we've picked
these unique and discrete bucks of data.
| | 02:27 | So after we've determined what tables
we need, so now that we've got our list,
| | 02:31 | we want to move on to determine how
these things are related to each other, and
| | 02:35 | when you're doing this, it's another
good idea to sketch this out on a piece of
| | 02:38 | paper with a pencil, for example.
And really what you're going to do is ask
| | 02:41 | yourself a series of questions.
| | 02:42 | For example, consider the case of a
system that tracks both customers and
| | 02:47 | invoices, and asking some questions
about the business rules that govern the
| | 02:51 | customers and invoices within your
organizations, or within the users that you
| | 02:55 | have, you might find out the following:
| | 02:57 | For example, consider the case of a
system that tracks both customers and
| | 03:01 | invoices, and asking some questions
about the business rules governing customers
| | 03:05 | and invoices at this particular
organization, you find out the following:
| | 03:10 | Each customer may potentially have many
invoices in the system, and each invoice
| | 03:14 | is associated with one, and only one customer.
| | 03:17 | So data modelers like yourself would
call the relationship between customers
| | 03:21 | and invoices a one-to-many relationship,
meaning one customer can have many invoices.
| | 03:27 | So if you ask in reverse about the
relationship between invoices and customers,
| | 03:33 | the answer could also be reversed, and
you could call it many-to-one, meaning
| | 03:36 | there could be many
invoices to just one customer.
| | 03:39 | So the questions that we're talking about
here are, can one customer have many invoices?
| | 03:44 | So if the answer is yes, then you want to
create a relationship between those two tables.
| | 03:49 | Or if we determine by asking this
question that there is no relationship between
| | 03:53 | these tables, then we
don't have to do anything here.
| | 03:55 | We just note that accordingly.
| | 03:57 | But in this example, we have in fact
determined that one customer could have many invoices.
| | 04:01 | We still have to evaluate the
relationship between invoices and products.
| | 04:07 | So let's ask the same questions.
| | 04:10 | Does a product have a
relationship with invoices,
| | 04:12 | so, for example, can one
product appear in many invoices? Yes.
| | 04:16 | So we've got a one-to-many go
in from products to invoices.
| | 04:19 | It appears that way.
| | 04:21 | But can an invoice have more
than one product appearing on it?
| | 04:24 | Well, that answer is yes as well.
| | 04:25 | So what we've got is a many-to-many
relationship, and the key to resolving a
| | 04:31 | many-to-many - because if you recall, we
can't have many-to-many relationships.
| | 04:34 | There were various different reasons.
| | 04:36 | There were things that we can't do
as far as storing the data properly.
| | 04:39 | There are ways that that
we can't find data properly.
| | 04:41 | We can't report on it properly.
| | 04:43 | And this is a good place to catch it,
rather than after you spent hours and hours
| | 04:47 | and hours developing a many-to-many
relationship into your system, only to find
| | 04:52 | out later that you can't do a bunch of things.
| | 04:53 | Now is the great place to do it,
because you're just doing it on a piece of
| | 04:56 | paper with pencil marks at this point.
| | 04:58 | So the key to resolving that many-to-
many, when you find one, is to think of it as
| | 05:02 | two one-to-many relationships, and then
you're going to add an additional table
| | 05:07 | between these two tables
that you're trying to relate.
| | 05:11 | So, for example, so the key to
resolving many-to-many relationships is to think
| | 05:16 | of it as two one-to-many relationships,
and then what you're going to do is add
| | 05:20 | another table to be the child or
the many part in these relationships.
| | 05:26 | So of course, here we've got invoices and
products directly related to each other.
| | 05:30 | Well, it's many-to-many, so how about
if we add a third table? And let's call
| | 05:34 | this invoice line items.
| | 05:37 | Now we get rid of the relationship
between invoices and products, and we can
| | 05:41 | say, can one invoice have
many different line items on it?
| | 05:44 | Well sure, that can be the case.
| | 05:47 | And can a product be represented by
many different invoice line items?
| | 05:50 | Yes, that's the case as well.
| | 05:52 | So now we don't have to worry about a
direct relationship between invoices and
| | 05:54 | products, because now we've got two one-
to-many relationships, one coming off of
| | 05:59 | invoices - invoices being the parent,
line items being the child - and another one
| | 06:03 | coming off of products - product being
the parent and line items being the child.
| | 06:07 | So why do we need a third table?
| | 06:09 | Well, if I needed to just create a
report of all the products ordered during a
| | 06:12 | certain time period, like let's say the
first quarter of any given year, which
| | 06:16 | table would I search in?
| | 06:18 | Would I search in products?
| | 06:20 | I wouldn't actually, because
there's only one record per product.
| | 06:24 | It doesn't give me all the
various products that were ordered.
| | 06:27 | So would I search in invoices?
| | 06:28 | Well no, I've only got one record per
invoice, and it tells me very different
| | 06:31 | items that appeared on that, but I can't
necessarily isolate individual products
| | 06:35 | on any given invoice.
| | 06:37 | So what about if one product can
be ordered at many different times?
| | 06:40 | Where do we store that many different times?
| | 06:42 | Do I create a field inside products for that?
| | 06:45 | Do I create a field inside invoices?
| | 06:46 | No, we don't do that.
| | 06:48 | You can only store one piece of
information in any given field in a database.
| | 06:52 | So this would require many different
pieces of data in one field if didn't
| | 06:55 | have a third table.
| | 06:56 | So what we do here is we create a third table
| | 06:59 | that can be the child to both products
and invoices, and then we can have the
| | 07:03 | many-to-many relationship
between them, like we've discussed.
| | 07:05 | So you see here in this sketch
that I have this all cleaned up.
| | 07:09 | We know that we need a fourth
database in our entire database system.
| | 07:12 | We've got customers, invoices,
products, and now invoice line items.
| | 07:17 | And also you see this is how we've
drawn them all up inside the database.
| | 07:22 | So now we know that we need a fourth
table in our database and we call this
| | 07:24 | table anything we like, really.
| | 07:26 | So let's call this one Invoice line item as
we see here, and let's add it to our database.
| | 07:35 | So back in our database, if we go to
File > Manage > Database, we see that we've
| | 07:39 | got three of the tables defined already.
| | 07:42 | So let's go ahead and add the fourth
one that we've determined we've needed
| | 07:45 | through the data modeling
process, and then just hit create.
| | 07:51 | So now we've got all four tables
defined inside of our database.
| | 07:57 | If you've got a really tiny project, it
might not seem likely you need to sketch
| | 08:01 | things out ahead of time, but I cannot
emphasize enough how important it is to
| | 08:04 | make these decisions on tables and
relationships before you start working.
| | 08:09 | Because the pitfall here could have
been that we defined a bunch of fields and
| | 08:12 | layouts and did a whole bunch of stuff
before we even figured out we needed an
| | 08:15 | invoice line item table,
and now what's our overhead?
| | 08:17 | We don't have to undo anything.
| | 08:18 | We just simply add a table to the database.
| | 08:21 | So after a little bit of what's
called data modeling, we've determined what
| | 08:24 | tables we need to build in FileMaker,
and we've determined which tables have
| | 08:28 | relationships with each other and
what types of relationships they have.
| | 08:32 | So now we can move out of what we call
the architecture stage and into FileMaker
| | 08:36 | to define these table relationships accordingly.
| | 08:39 | In the upcoming movies in this chapter,
we're going to use the Relationship
| | 08:42 | graph in FileMaker to establish and
then maintain the table relationships in
| | 08:47 | our FileMaker solution.
| | Collapse this transcript |
| Determining which key fields you need| 00:00 | Once you've completed your data
modeling exercise, you will have determined what
| | 00:03 | tables you are going to need in your
FileMaker database, as well as what
| | 00:06 | relationships you are going
to need between these tables.
| | 00:10 | Since we've already gone into our
FileMaker database, and we've defined the
| | 00:13 | tables that we need - we've talked
about four tables that we need to define -
| | 00:16 | we need to now create
relationships between them.
| | 00:19 | Now what we need in order to create
relationships is something that could hook
| | 00:23 | these two tables together.
| | 00:25 | So each table has got to have a little
hook in there that allows it to connect
| | 00:29 | itself to another table that it's related to.
| | 00:32 | In relational databases, you're going
to connect two related tables together
| | 00:36 | using special fields that are called Keys.
| | 00:38 | A key field is just like any other
field you are defining in your database, but
| | 00:42 | key fields come in two different types:
| | 00:44 | There is a Primary Key and a Foreign Key;
| | 00:47 | two more pieces of vocabulary
for you to wrap your head around.
| | 00:51 | The Primary Key is a field
that gets defined in the Parent.
| | 00:54 | Remember that there is always a Parent
in a relationship and always a Child.
| | 00:58 | Because it's going to be one to many, the
Parent is the one; the Child is the many.
| | 01:03 | So in our case, we need to define a
Primary Key field in every Parent table and
| | 01:07 | define a Foreign Key field in every Child.
| | 01:09 | Now let's talk about what these mean a little
bit more before we go ahead and define these.
| | 01:14 | First, a Primary Key field:
| | 01:17 | A Primary Key field is defined in each
Parent table, and its main role is to
| | 01:21 | ensure the uniqueness of
each record in this table.
| | 01:25 | So they must contain a unique
serialized value inside of every record.
| | 01:29 | So these records must never be
duplicated within a single table, and each Parent
| | 01:33 | must have one Primary Key defined.
| | 01:37 | The plain English version of this
is just it's a simple way for you to
| | 01:40 | uniquely identify every record in your
database, and that way there will be no
| | 01:43 | confusion. Here is record number one
versus record number two, and since there will only
| | 01:48 | ever be one record number one,
| | 01:50 | you can never confuse it with
any other records in your database.
| | 01:53 | The next type of key field
is called a Foreign Key field.
| | 01:58 | This is going to be used to link a
related Child record, or a record in a Child
| | 02:02 | table, back to its Parent
record in the Parent table.
| | 02:06 | So in the case, for example, of having
a customer having multiple invoices, we
| | 02:11 | can have a Primary Key field that's defined,
| | 02:13 | that's called the Customer ID. And every
customer is given their own ID, but then
| | 02:18 | in every invoice that's related to that customer,
| | 02:20 | we need to put the Customer ID into a
field that's called a Foreign Key field.
| | 02:25 | This is how we will actually link, or
know those two are related to each other.
| | 02:29 | I'd like to use the example of the last
name. How do you know that you are the
| | 02:34 | child of your parent? Because you share
one thing in common, or something that
| | 02:37 | links you two together.
| | 02:38 | So on paper if you see two people's
names, you can make an estimate as to
| | 02:42 | whether or not they might be related
if they have something in common.
| | 02:46 | In that case we would be they have the
same last name, and in a database that
| | 02:49 | thing that you have in common is the
same value showing up in a Primary Key
| | 02:53 | field in a Foreign Key field
on each side of a relationship.
| | 02:57 | Now each Child table is going to
have a Foreign Key field defined in it;
| | 03:01 | however, these values do not need to be
unique, because since any one customer
| | 03:06 | could have let's say five different
invoices in the Invoice table, that means
| | 03:10 | that there's going to be five invoice
records that all have the same Customer ID
| | 03:13 | in the Foreign Key field.
| | 03:14 | So they won't be unique.
| | 03:15 | And each type of key field is just a
field that gets defined in every table.
| | 03:20 | So let's take a look at the tables
that we've got and determine what types
| | 03:24 | of keys we would need.
| | 03:25 | So if you use the simple fact that every
Child table needs to have a Foreign Key
| | 03:31 | field, which one of these
tables is going to be a Child table?
| | 03:35 | Well, let's look at our relationships.
| | 03:39 | You'll see that the lines that we are
using have a single hash on the Parent
| | 03:41 | side or on the one side and a
double hash on the many side.
| | 03:45 | So if we look at Customers and Invoices,
we see there is a relationship between them.
| | 03:49 | Which one of them is the
Parent? It's the Customer.
| | 03:52 | So we know that a Parent needs to have
a Primary Key field, so we're going to
| | 03:56 | have a Primary Key field defined inside
of Parent, and then Invoices are acting
| | 04:03 | as the Child in the Customer
relationship, so that's going to get a Foreign Key
| | 04:08 | because every Child gets a Foreign Key.
| | 04:11 | But also their table acts as a Parent
in the relationship between Invoices
| | 04:15 | and Invoice line items.
| | 04:16 | So in that case, Invoices plays two roles:
| | 04:18 | Child in the Customer
relationship, but Parent in the Invoice line
| | 04:22 | items relationship.
| | 04:23 | Now Products only plays one role.
| | 04:26 | It's a Parent in the Parent
Invoice line item relationship;
| | 04:29 | therefore, it serves as a Parent.
| | 04:31 | It's going to get a Primary Key.
| | 04:33 | The Invoice line items table that we
created to resolve the many-to-many
| | 04:37 | relationship plays Child in both the
Products and Invoices relationship, which
| | 04:41 | is common in those tables that you
create to resolve a many-to-many.
| | 04:46 | So in that case, this means that the
customer is going to have a Primary Key,
| | 04:50 | Invoice will have a
Foreign Key and a Primary Key,
| | 04:54 | Products are going to have a Primary
Key and Invoice line items will have two
| | 04:57 | Foreign Keys, because we remember each Parent
gets a Primary; each Child gets a Foreign Key.
| | 05:02 | Determining which keys you need in your
database tables is an important part of
| | 05:06 | setting up relationships with a new database.
| | 05:08 | Once you've determined which tables
perform which roles, that'll help you to
| | 05:12 | determine which tables need to have a
Primary Key defined and which need to have
| | 05:16 | a Foreign Key defined.
| | Collapse this transcript |
| Defining primary and foreign keys| 00:00 | Once we've gone through the process of
determining which key fields we're going
| | 00:04 | to need in our database in order to
create our relationships, the next step is
| | 00:08 | going to be to go in and define those
fields inside of the FileMaker databases.
| | 00:12 | So if we open up our Exercise File/04_
04, we see that under File and Manage >
| | 00:19 | Database, we've got our
four different tables created.
| | 00:23 | So let's start first with defining all
the primary keys in the tables that are
| | 00:27 | going to act as Parents, and if we
look back at our list, we determine that
| | 00:32 | the tables that are going to have
primary keys are going to be Customers,
| | 00:36 | Invoices, and Products.
| | 00:38 | So let's start with Customers.
| | 00:40 | First, in your Manage Database window,
you'll notice that under the Tables tab,
| | 00:44 | if you select a Table and double-click
on it, it's going to navigate you over to
| | 00:48 | the Fields tab. And normally there will
be a list of all the fields, but since
| | 00:52 | we haven't defined any yet, we
see that we've got a blank list.
| | 00:56 | Our cursor is down in the Field Name,
and like we would define any field inside
| | 01:00 | of a FileMaker database, we are going to
first start and define our Primary Key field.
| | 01:04 | What we need to do is decide on a name
that we're going to give our field, and
| | 01:09 | for key fields it's usually a good
idea to follow some kind of naming
| | 01:12 | convention so that later you can easily go
into your field list and quickly find a key field.
| | 01:19 | And there are various different types
of naming conventions to use, and none of
| | 01:22 | them are right or wrong.
The convention that I like to use though is to add a
| | 01:26 | prefix to the name of the field that indicates
whether it's a key and what type of key it is.
| | 01:32 | So in the case of primary keys ,I'd
like to use pk, but I also like to have my
| | 01:37 | key fields appear at the top of my field list.
| | 01:39 | When we have a bunch of different
fields here, they are going to be organized
| | 01:43 | sometimes alphabetically, sometimes
by creation order, as you see here, but
| | 01:47 | traditionally when organized alphabetically,
I want my key fields to show up on top.
| | 01:52 | So one way I can do that is to add underscores;
| | 01:56 | here is a single underscore that I can
add to the prefix of my Field Name, which
| | 02:00 | will always make it show up on top and
in alpha sort. But since it's a Primary
| | 02:04 | Key, I wanted to show up even above any
other type of key, like a Foreign Key, so
| | 02:08 | I am going to give it two underscores.
| | 02:10 | So basically here the naming convention
in file name for a Primary Key is __pk,
| | 02:15 | and pk stands for Primary Key.
| | 02:17 | Finally, I'd like to end the key field with
the name of the table, with the word ID after it.
| | 02:23 | So in this case CustomerID, and we'll
keep it as text, and I'll hit Create.
| | 02:30 | In the Comment field, I am going to say
primary key, and I am going to hit Change
| | 02:35 | and we see that that gets stored with the field.
| | 02:37 | Comments don't have any
change on functionality whatsoever.
| | 02:40 | It doesn't make it a Primary Key.
| | 02:41 | That's just a note to me as I'm flipping
through fields in the future to help me
| | 02:45 | identify which one of these
serves as the Primary Key.
| | 02:48 | We can leave this field as text, even
though it's going to count up numbers for
| | 02:51 | us, so it really won't matter either
way, but one important thing that we are
| | 02:55 | going to want to do is make sure that
this field is unique and also make sure
| | 02:59 | that it gets an unique number every
time a new record is created, because
| | 03:02 | remember the requirement for a Primary
Key is that they are to be unique and not
| | 03:07 | empty, and ideally, they
shouldn't be modifiable.
| | 03:11 | So in order to do that, we are going
to hit the Options button to set these
| | 03:14 | different properties
inside of our Primary Key field.
| | 03:17 | We'll talk about these options later
in the Fields chapter, but specifically
| | 03:20 | for the use of a Primary Key, we're going to go
under the Auto-Enter tab and hit Serial number.
| | 03:26 | And in general what's happening here
is on the creation of a new record, a
| | 03:30 | value will be placed inside of the
FileMaker field, and the FileMaker
| | 03:34 | application will ensure that it never
gives the same number to more than one
| | 03:38 | record inside any given table,
| | 03:40 | therefore verifying the
uniqueness of this field.
| | 03:44 | So we are going to choose Serial
number, and we are going to leave next
| | 03:48 | value and increment by 1.
| | 03:50 | So now when we create the first
record in our Customer table, it will
| | 03:53 | automatically put a 1 in there, and the
second record a 2, third record, 3 and so on.
| | 03:58 | Thus this will ensure that these
records are not empty and that they have a
| | 04:03 | unique value, all in one setting.
| | 04:05 | Now we also don't want any users
changing these because then a user could go in
| | 04:08 | and change it to a value and thus
either delete the value, which would make it
| | 04:12 | empty, or enter in a duplicate value,
which would of course make it non-unique.
| | 04:15 | So we are going to click this button
down on the bottom here called Prohibit
| | 04:18 | modification of value during data entry.
| | 04:20 | Now our Primary Key value cannot be changed
by a user, and it'll be unique and not empty.
| | 04:26 | So let's hit OK, and now we see
all this information show up inside of
| | 04:30 | our Primary Key field:
| | 04:32 | Invoices and Products.
| | 04:39 | So we can switch to different tables
through this dropdown and go to Invoice,
| | 04:42 | and let's just file the same convention.
We'll do this one a little bit quicker.
| | 04:49 | So we see __pkID, call it primary key
for invoices, hit Create, hit Options,
| | 04:59 | Serial number, Prohibit.
| | 05:01 | Now I did those steps a little bit quickly
because we reviewed them in detail prior.
| | 05:06 | We'll hit OK.
| | 05:07 | So now we have two out
of our three primary keys.
| | 05:10 | But if you look in your products, since
we imported this in already, you'll see
| | 05:15 | that we already have an _
pkProductID with these values already set.
| | 05:20 | So really now we're done defining the
primary keys inside of our database.
| | 05:25 | So since every relationship needs to
have a Primary Key on the Parent side, and
| | 05:29 | then it has to have a Foreign Key on the
Child's side, that means that we have to
| | 05:32 | define some foreign keys in
to our tables here as well.
| | 05:35 | So on our List we see that there are
only two tables that are acting as a Child
| | 05:39 | in the relationship:
| | 05:40 | Invoice and Invoice line item.
| | 05:43 | So we see that Invoice needs one
Foreign Key, and Invoice line items needs two.
| | 05:48 | So back in our Database, we'll go to
Invoice, and we're going to define a
| | 05:55 | Foreign Key, this time underscore, and
we're going to use fk, but which one do we need?
| | 06:00 | Well, if we look back at our
relationship, Invoice acts as the Child in the
| | 06:07 | Customer and Invoice relationship.
| | 06:09 | So that means it needs to have a
Foreign Key that matches the Customer.
| | 06:13 | So what we do to make this easier for
us to follow is we will use the customer
| | 06:18 | name inside the definition of the Foreign Key.
| | 06:21 | So we are going to call it fkCustomerID.
| | 06:26 | We'll just leave that as
text as well and hit Create.
| | 06:29 | As you'll see now because we used a
single and double underscore, if we sort by
| | 06:32 | the Field Name, we see that our
Primary Key shows up on top and then our
| | 06:36 | Foreign Key on the bottom.
| | 06:37 | We don't have to have set any
settings because if you remember the rule for
| | 06:40 | a Foreign Key is it doesn't have to be
unique, and it can contain duplicate values.
| | 06:44 | So we don't have any field options
here, but we can enter fk for Customer.
| | 06:51 | And again, comments don't
affect any of the functionality.
| | 06:55 | It's just there for us to be able to
see if we click on Options or Comments, we
| | 06:58 | can see what the role of
these different fields are.
| | 07:01 | Now we go into Invoice line items,
and we know that we need two different
| | 07:06 | foreign keys. Invoice line item acts as
a Child in the Invoices to Invoice line
| | 07:10 | item relationship and the
Products to Invoice line item.
| | 07:13 | So if we need two different keys and we
need to name them after the Parent,
| | 07:17 | that means that we need a Invoice ID
Foreign Key and a Product ID Foreign Key.
| | 07:22 | So let's define those.
| | 07:26 | Create a new one.
| | 07:27 | We'll say fk for Product Invoice ID.
| | 07:43 | Now we have all our key fields set up, and
we can hit the OK button to close the window.
| | 07:48 | Now our next step is to create links
between these tables now that we have the
| | 07:52 | hooks, otherwise known as keys,
already in place inside of our tables.
| | Collapse this transcript |
| Creating relationships using the relationships graph and table occurrences| 00:01 | At this point in the process of creating
our FileMaker database, we have already
| | 00:05 | gone through the data modeling
exercise to determine the tables, and we've
| | 00:08 | determined what the relationships are
going to be. And if you go under the File
| | 00:12 | > Manage > Database option, it will
show us here that we've got all of those
| | 00:16 | tables already defined inside of our database.
| | 00:19 | And by clicking on one of the tables,
you see that we've gone through each one
| | 00:23 | and determined which Primary and
Foreign Keys we will require and defined those
| | 00:28 | appropriately within the table.
| | 00:29 | Now if you look at the last tab on
the Manage Database window, called
| | 00:33 | Relationships, you will get your
first glimpse that what's called the
| | 00:37 | Relationship graph, and inside the
Relationship graph this is where we can
| | 00:41 | establish relationships between
tables and also manage those in the future.
| | 00:46 | You'll see that we have four
different blocks or squares in the
| | 00:48 | Relationship graph.
| | 00:50 | Each one of these blocks is known as
a Table Occurrence, and every time you
| | 00:54 | define a table in FileMaker Pro, it
automatically puts one of these blocks on
| | 00:59 | the Relationship graph for you.
| | 01:01 | It's important though not to think of
them as a table, because as we'll learn
| | 01:05 | later in the title, a single table
could be represented on the relationship
| | 01:10 | graph by multiple blocks, but we are not
going to worry about that kind of stuff right now.
| | 01:13 | For now we are going to focus on
there being one table occurrence per table
| | 01:17 | defined in our database.
| | 01:18 | And our goal is here is to create
relationships, and this is really the easy
| | 01:24 | part, too, as far as the task inside the
database, because to physically create
| | 01:28 | these inside a FileMaker, it
doesn't really take that much effort.
| | 01:30 | First, I want to give you a brief
idea some of the tools that are available
| | 01:34 | to us in this window.
| | 01:35 | You see down here in the bottom left-hand side
we've got a cluster of tables and relationships.
| | 01:40 | These will allow us to create new
table occurrences, as we'll get to in the
| | 01:44 | future, or define relationships
between them, or even write notes about the
| | 01:50 | existing table occurrences if need be.
| | 01:52 | You'll also see that we can move
these things around by clicking on them.
| | 01:56 | You see the highlighted one is in
yellow, and if we want to line them up a
| | 01:59 | little bit better, we can drag-select them
by holding down the Shift key and releasing.
| | 02:04 | You see we've all three highlighted.
And we can use our Arrange tool to do
| | 02:08 | either distribute horizontally or vertically
to kind of line them up a little bit better.
| | 02:15 | Also, you can select them, again,
holding down your mouse, dragging and then
| | 02:21 | releasing, and you can choose to make
them different colors by clicking on
| | 02:25 | your color palette.
| | 02:26 | So, for example, we can make these
all the same color, indicating that these
| | 02:31 | where our initial base tables that
we're using when we set up our database.
| | 02:35 | You'll see we have a remaining set of
tools here also. The Pointer tool allows
| | 02:40 | us to select and move different table's
occurrences around, and if we click on
| | 02:45 | the text, I can click in here and make myself a
note, and you'll see it will show up in here.
| | 02:54 | It won't be a table occurrence, but
just a note about table occurrences in case
| | 02:58 | I want to give myself a note, or share a
little note with other developers, and
| | 03:02 | you can just hit Delete to get rid of it.
| | 03:04 | And then these are zooms, so if you have
a lot of table occurrences you can zoom
| | 03:07 | in or zoom out, or you could just
type in the scale that you want to use.
| | 03:10 | And since you can print your table
occurrence, which is always a good idea,
| | 03:14 | this allows you to determine how many pages
you're going to print when you hit this button.
| | 03:18 | So just like when you're in Layout
mode, you'll see that the Pointer tool is the
| | 03:21 | default, so therefore our cursor is an arrow.
| | 03:24 | So in order to create relationships
between the different tables, all we have to
| | 03:27 | do is just select the Pointer icon.
And so let's first create a relationship
| | 03:32 | between Customers and Invoices.
| | 03:34 | What we'll do is we'll go into the
parent, select the Primary Key field, and
| | 03:39 | you'll see when we click down on the
Primary Key field, you will see we get
| | 03:42 | these little dumbbells underneath our cursor.
| | 03:45 | By dragging them outside the table
occurrence, now you see we have a line that
| | 03:49 | now needs to be connected to the
Foreign Key field in the Child table.
| | 03:55 | So what's the Child table to Customers?
| | 03:57 | One customer can have many invoices, right.
| | 04:01 | So what we need to do is pick one of
the fields in the Invoice that acts as the
| | 04:05 | Foreign Key fields, and then
connect the two tables together.
| | 04:08 | So that's why we use these naming
convention, because we can easily see
| | 04:12 | pkCustomerID is Primary Key of the
Customer ID, to fkCustomerID, which is the
| | 04:17 | Foreign Key. We'll just release, and
now we see that that relationship has been
| | 04:20 | defined, and we'll do the same thing
over here, if we move the Invoice line item
| | 04:26 | table. And I am going to pick the
Primary Key, and I need to connect it with the
| | 04:32 | Foreign Key, or fkInvoiceID.
| | 04:34 | Again, the naming conventions are
helping us here. And we'll choose the Primary
| | 04:37 | Key in Products and link that to
ProductID. And we can move these things around
| | 04:46 | a little bit, and you can even collapse
the table just so it shows the Primary
| | 04:51 | Keys to give you a little bit more
room, by hitting that little button in the
| | 04:53 | upper right-hand corner.
| | 04:57 | So now that we've got the base
architecture set up in our FileMaker database,
| | 05:00 | you can continue on to develop
the rest of your functionality.
| | 05:03 | It's important to get your architecture
in place first before you proceed, and
| | 05:06 | when I say architecture, I mean you
have to determine what kind of tables you
| | 05:09 | are going to have, how they are going
to be related, so therefore the key field
| | 05:13 | you are going to have to use, and then
you go and set up your relationships.
| | 05:17 | So once you go through that process,
you can then move on to start defining
| | 05:21 | other things inside of your database.
| | 05:23 | Later, in the Using Relationships
chapter, we're going to show you various
| | 05:26 | different ways that you can use the
relationships that we've set up here.
| | 05:29 | A FileMaker database contain a database
file with one single table in it or be
| | 05:34 | composed of multiple tables inside one
file that are linked internally using
| | 05:39 | FileMaker relationships.
| | 05:40 | These relationships are managed
here inside of the Relationships tab.
| | Collapse this transcript |
|
|
5. Working with FieldsDeciding what fields you will need| 00:00 | Like many other databases, a
FileMaker Pro database is presented to the
| | 00:04 | developer as a collection of tables, as
a collection of tables each containing
| | 00:08 | a number of fields.
| | 00:09 | If you have ever worked with any
other database environments, you may be
| | 00:11 | accustomed to terms like columns
instead of fields. Either term is meaningful
| | 00:15 | and acceptable here, but the FileMaker Pro
interface and documentation use the term field;
| | 00:19 | therefore, in this video,
we'll follow that convention.
| | 00:22 | A FileMaker Pro file, as we see here
onscreen, can hold in almost limitless number
| | 00:29 | of tables, each with an effectively
limitless number of fields defined.
| | 00:34 | In this chapter, we're going to focus on
fields and field types available within
| | 00:38 | FileMaker Pro, and then
how you create those fields.
| | 00:40 | A field in FileMaker Pro may be
viewed as a slot that can hold information
| | 00:45 | specific to a single database record;
| | 00:47 | for example, you see here in Products,
this slot would contain information on
| | 00:52 | the category for this
particular product, number 47.
| | 00:55 | The value that's stored in a field
could be thought of as an attribute of
| | 00:58 | the entity that's represented by the
table, or in this case an attribute of
| | 01:02 | the Products Table.
| | 01:03 | For example, a database table in which
a record represents a customer, like we
| | 01:09 | have here, you might want fields for
things like First Name, Last Name and maybe
| | 01:14 | even a field to store a photo or
something like that. And just like with
| | 01:17 | anything else that we've discussed,
you're going to want to spend some time
| | 01:20 | looking at the data that you want to
store in making preliminary lists of the
| | 01:23 | possible attributes.
| | 01:25 | You can see that that's kind of a mantra here.
| | 01:27 | First, you have to stop and sketch
things out before you start defining them
| | 01:30 | inside your database.
| | 01:31 | It's an important process, as
with anything that you construct.
| | 01:34 | Every database is different, and it's
your specific user's needs that will
| | 01:38 | dictate what fields you need in your database.
| | 01:40 | So, for example, if we open up the
File > Manage > Database and choose the
| | 01:46 | Products Table, you'll see that it
already has fields defined from when we
| | 01:50 | imported this table from
another FileMaker database.
| | 01:53 | So here we don't have to define any
fields, but we can use this as an example
| | 01:55 | of some of the types of attributes that we
can design towards an entity of products.
| | 01:59 | So you see, for example, we've got
Category, which is the category of the
| | 02:04 | products, the Cost, Keywords,
Location, some Notes, a Picture.
| | 02:09 | We'll get into all these different
field types that you see here in the
| | 02:12 | middle in upcoming movies.
| | 02:14 | But for now, we're going to concentrate
on what an attribute is, and how it can
| | 02:17 | describe the entity that's in the table.
| | 02:19 | So a brief review of these fields shows
that we've got a lot of different fields
| | 02:23 | that describe a product.
| | 02:25 | Also, each field is going to represent
a value that will be different for each
| | 02:29 | product stored in a Products Table, not
necessarily different in every record,
| | 02:32 | but if every single record in the
entire database has the same value, it wouldn't
| | 02:36 | necessarily be a standard field.
| | 02:38 | So we're looking for attributes that
might change from record to record.
| | 02:42 | Therefore, we want to make sure that
we have a place to store each value
| | 02:45 | independent from all the other values,
so one for every product that's going to
| | 02:48 | be stored in the database.
| | 02:50 | Also, you should be aware that
that fields don't always require a value,
| | 02:54 | although we'll be talking about that
in a later movie how we can make it so
| | 02:56 | that users must enter values in the
fields, but they don't necessarily need to
| | 03:00 | have a value in them.
| | 03:01 | Like, for example, every product doesn't
have to have a cost, but maybe there is
| | 03:04 | something that you need to have in every record.
| | 03:06 | But just because you define a field,
doesn't mean it must require a value.
| | 03:10 | So when you're doing your evaluation
of what kind of fields you might need in
| | 03:12 | your table, keep in mind that even if
there's only a few records in the database
| | 03:16 | that would need a value that describes
it, or a field defined, you're still going
| | 03:20 | to want to create that field.
| | 03:22 | By looking at Products as an example,
let's try to determine what fields we
| | 03:25 | might want in our Customers Table.
| | 03:28 | You see right now we don't have any
fields defined in the Customers table.
| | 03:32 | And remember, we need to determine
which attributes of a customer may change
| | 03:35 | from customer to customer, yet at the
same time we want to make sure that we are
| | 03:39 | only including fields that are
going to be meaningful to our users.
| | 03:42 | So it's important that you bring your
users of the database into this whole
| | 03:45 | discussion to make sure that their
needs are reflected in the final product.
| | 03:49 | So let's say that after having
appropriate discussions with all of our users
| | 03:53 | and stakeholders, we determine the following
fields will be needed in our Customer table.
| | 03:57 | We've got things like Customer name,
Street address, City, State, Zip and notice
| | 04:01 | that we were breaking up our fields
into the smallest pieces of data possible.
| | 04:05 | Instead of having one big address
field, we're breaking it up into Street
| | 04:08 | address, City, State, and Zip.
| | 04:09 | We'll see as we go on through this
title how that's going to important.
| | 04:12 | We've got different types of
things, Tax rates, Company Web sites.
| | 04:15 | For example, a Company Web site, not
every customer may have one, but you still
| | 04:19 | want to define a field for
those that do actually have one.
| | 04:22 | And then we have discussions with our
users and determine that these are going
| | 04:25 | to be all the attributes that
describe a single invoice within our system.
| | 04:28 | So you see a lot of these have to do
with the number values in an invoice,
| | 04:32 | but these specifically define in Invoice.
| | 04:34 | You'll see we've got things like the
Date or totals and Shipping costs and Terms,
| | 04:39 | and all that type of thing.
| | 04:40 | To review, what we've actually done
here is come up with a list of attributes
| | 04:44 | that are specific, either
to a customer or an invoice.
| | 04:47 | Notice, for example, that a Company
name doesn't describe an invoice, but
| | 04:52 | an Invoice date does.
| | 04:54 | So in each case, we've asked what
information describes the entity reflected by
| | 04:57 | our tables, and then what
information is specific only to that table.
| | 05:01 | That's the important part.
| | 05:02 | What information only describes an invoice?
What information only describes a customer?
| | 05:07 | We'll talk later in the title about how
it's important that you can share this
| | 05:10 | information between tables via the
relationships that you have set up, but when
| | 05:13 | you're defining a list of fields,
you've to make sure that the fields are only
| | 05:16 | specific to that table.
| | 05:18 | FileMaker databases allow developers to
create a field to store information that
| | 05:22 | describes values that are stored in tables.
| | 05:25 | When you make decisions on what
fields you need, make sure that you're
| | 05:28 | getting your users input and then
break down the data into the smallest parts
| | 05:32 | before proceeding.
| | Collapse this transcript |
| Understanding field types| 00:00 | Before you can define fields in your
FileMaker database, you must first take
| | 00:04 | the time to decide which fields you
need in your database and then what table
| | 00:08 | they are going to belong to. And we've gone
through that exercise in the previous movie.
| | 00:12 | Then you need to make a decision on
what field type each field is going to be.
| | 00:17 | If you go to File > Manage > Database,
you'll notice that each field in a
| | 00:21 | FileMaker Pro database must
have a specific Field Type.
| | 00:25 | You see that all these
product fields have a type defined.
| | 00:30 | Each field in a FileMaker Pro
database must have a specific data type.
| | 00:33 | Choosing an appropriate data type for a
field will allow FileMaker to decide how
| | 00:37 | best to store the data in the field,
and then also how to retrieve it, and then
| | 00:40 | handle it internally, as well.
| | 00:42 | Though FileMaker does have some
flexibility as to what type of data can be
| | 00:45 | stored in these fields,
| | 00:47 | iy is essential to choose appropriate
field types when defining these fields
| | 00:50 | inside of your database.
| | 00:52 | For example, Field Type will
determine the behavior of sorting records.
| | 00:55 | So, for example, if you've Part Number,
if you choose to make a part number
| | 00:58 | numeric, then it will sort them numerically:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, for example.
| | 01:04 | But if you choose to make Part Number
Text, when you sort them in the database,
| | 01:08 | they will go 1, 10, 11 and so on and so on.
| | 01:13 | So they will have different behavior
depending on their part type that you've chosen.
| | 01:15 | An overview of the field types can be
found by clicking on the Type dropdown
| | 01:21 | in the bottom right-hand corner.
| | 01:23 | These of course are the options that
you have available to you, not only when
| | 01:25 | you're creating a new field, but if
you choose an existing field that you can
| | 01:28 | change the Type by selecting a new
type and hitting the Change button.
| | 01:32 | But here we'll just look at the dropdown.
| | 01:34 | Let's take a quick look at each field
type and some of their behaviors and
| | 01:37 | characteristics to help you make
these decisions when defining fields
| | 01:40 | inside your own database.
| | 01:42 | First, we have Text fields.
| | 01:44 | A Text field is appropriate for any
type of data that can be stored as text and
| | 01:47 | does not need more specific handling;
| | 01:49 | for example, numbers and dates can be
stored inside of a Text field, but they
| | 01:53 | lose their number-ness or date-ness, and
they can only be addressed as plain text,
| | 01:58 | Much like the example we've talked about before,
| | 02:00 | if I had a Part Number that was
actually numbers, but it was stored as text,
| | 02:03 | it gets handled a little bit
differently when you do things like sorting.
| | 02:06 | A text field can hold about 2
gigabytes of information per field, which isn't
| | 02:10 | really something that you want to test
inside of FileMaker, but it's good to know
| | 02:14 | that you have got those almost
limitless possibilities for storing.
| | 02:17 | It's equivalent to about a billion
characters, or roughly 500,000 pages of
| | 02:21 | English text, but don't ever push
FileMaker text fields to that limit.
| | 02:25 | You would use a Number field whenever
data needs to be treated as a number,
| | 02:29 | for example, in the Part Number if we
wanted to be sorted in numerical order
| | 02:33 | or more specifically if you're
going to use the value in a field in a
| | 02:36 | mathematical formula.
| | 02:37 | We'll see a lot of examples of these
when we get into calculation formulas
| | 02:40 | later in the title.
| | 02:42 | If you define a FileMaker field in the
database as a number, it won't prevent the
| | 02:45 | entry of non-numeric data into a Number field;
| | 02:48 | for example, text characters can be
typed into a number field, but they are
| | 02:51 | going to be ignored in most database operations,
| | 02:54 | so it will store them; it just won't
recognize it they are there.
| | 02:57 | In Date fields, FileMaker Pro is able to
store and retrieve any date between the
| | 03:01 | year 1/1/0001, or the first day of the
first year, and 12/31 of the year 4,000.
| | 03:08 | So those are the ranges that
you've to work with, with your data.
| | 03:11 | And the reason for that is because
FileMaker has internal calendaring functions
| | 03:15 | that have to be represented by
each one of those days in that range.
| | 03:18 | FileMaker Pro will generate an error
dialog if the user attempts to enter a date
| | 03:23 | that's not within that stated range,
or that's not within an acceptable date
| | 03:27 | format, when you enter something into a field;
| | 03:29 | for example, two-year dates are not
accepted after the whole Y2K situation.
| | 03:35 | Internally FileMaker will store a date
as a value that is an integer, or a whole
| | 03:40 | number, that represents the number of
days and have elapsed between 1/1/0001 up
| | 03:46 | to the specific date.
| | 03:47 | So inside FileMaker Pro, it's saying,
how many days have passed since the very
| | 03:52 | first day of the very first year? And
that's really what it's storing inside of
| | 03:55 | your database when you type in a date.
| | 03:57 | No matter how you type it in, that's
how FileMaker is storing it. And we'll
| | 04:00 | use that information when we get into
creating calculations with date fields
| | 04:03 | later in this title.
| | 04:05 | When it comes to Time fields, FileMaker
stores time as a value that represents
| | 04:08 | either a time duration, or a specific
time of day within a 24-hour period.
| | 04:13 | Similar to with date fields, internally,
FileMaker stores the time value as an
| | 04:18 | integer that represents a duration of
seconds, and it represents a duration of
| | 04:23 | seconds from midnight today.
| | 04:24 | So, for example, 10 a.m. this
morning would be stored internally as the
| | 04:28 | number 36,000, which is actually the number
of seconds since exactly midnight this morning.
| | 04:32 | FileMaker Pro will generate an error
dialog if the user attempts to enter a
| | 04:36 | non-numeric data into a
field that's defined as Time.
| | 04:40 | A Timestamp field combines the
functions from both a date and time data types.
| | 04:46 | A timestamp is really just a
combination of the date and time, separated by a
| | 04:49 | space, and it's stored internally in
the FileMaker database as a number of
| | 04:53 | seconds since midnight from 1/1/0001;
| | 04:55 | for example, April 10, 2004 at 3:20
p.m. is actually stored as a number
| | 05:02 | that exceeds 63 billion.
| | 05:05 | Timestamp fields have the same date
range restrictions as date fields, and
| | 05:08 | FileMaker Pro will generate an error
dialog if the user attempts to enter data
| | 05:12 | that is not a valid timestamp into a
field that's defined as a Timestamp field.
| | 05:17 | There are three other types of fields
that we're going to look at in different
| | 05:20 | movies in this title, and they are
Container, Summary and Calculation fields.
| | 05:24 | A Container field is a very versatile data
type that can store any type of binary data.
| | 05:28 | We'll cover this later on in this chapter.
| | 05:30 | The Calculation field contains data that is
computed based on a formula that you will define.
| | 05:36 | Calculations are critical to
FileMaker Pro database development, and you're
| | 05:39 | going to learn a lot more about
these Calculation fields in an upcoming
| | 05:42 | chapter on calculations.
| | 05:44 | Summary fields are a special
FileMaker Pro field type that allows you to
| | 05:47 | aggregate values across a found set of
records and possibly for each subgroup
| | 05:52 | within a sorted found set.
| | 05:54 | Summary fields with the basis of an
important area of FileMaker reporting that
| | 05:57 | we're going to cover
later in a chapter on Reports.
| | 06:00 | Once you're familiar with each field
type that's available to you in FileMaker,
| | 06:03 | you're going to want to assign a
certain type to each of the fields that you
| | 06:07 | wish to define inside of
your FileMaker database,
| | 06:09 | again, a critical part to planning before
you go ahead and add anything to your database.
| | 06:13 | You're going to go through this
exercise by asking yourself what type of data
| | 06:17 | will be stored in a field and how will
I need to have it handled by FileMaker?
| | 06:21 | Let's look at the field list that we've
created in a previous movie and assign
| | 06:24 | to them types, based on what we've just learned;
| | 06:26 | for example, we see that Company Name
could simply be Text, because it could be
| | 06:30 | a combination of text and numbers,
| | 06:32 | so text works fine here.
| | 06:33 | Or if we look at Zip codes, although
zip codes will contain almost exclusively
| | 06:37 | numeric data, they're really not
going to have mathematical value.
| | 06:41 | So it could be a number, if you wanted
to allow Zip code ranges, but this could
| | 06:44 | really go either way.
| | 06:45 | We're going to just call it Text.
| | 06:47 | Date Modified could be more valuable
if you both the date as well as time.
| | 06:51 | So we're going to choose Time stamp,
and Tax Rate will in fact have numbers
| | 06:54 | included, and we're going to want to
use this in formulas to help us compute
| | 06:58 | different invoice values.
| | 07:00 | So that's something that we
would want to have as a Number field.
| | 07:03 | And finally you see things like Phone
Numbers and Fax Numbers, and sure, they are
| | 07:06 | going to have numbers in those fields,
but we never going to use those with any
| | 07:09 | mathematical values, so we'll keep them as Text.
| | 07:11 | Then finally down below in the Company
Logo, you see we've called that a Container.
| | 07:15 | We're going to discuss storing images
inside of a container when we get to that
| | 07:19 | section later in this chapter.
| | 07:20 | And quickly, just by reviewing the
Invoice Fields, we have some of the same
| | 07:24 | decisions to be made.
| | 07:25 | You see Invoice Date.
| | 07:26 | We've selected that to be a date
because then we can use it to determine how
| | 07:29 | much time has elapsed when we've
delivered an invoice versus when it's due,
| | 07:33 | those types of things.
| | 07:34 | And if you look down at things like
Terms and Weight, we've decided that we want
| | 07:39 | those to be numbers, so that we can
maybe calculate shipping costs, or when an
| | 07:42 | invoice might be due based
on elapsed number of days.
| | 07:45 | Once your field list has been reviewed
and each File Type is determined, now
| | 07:49 | you can move on to defining these
fields within the tables inside your
| | 07:52 | FileMaker database.
| | Collapse this transcript |
| Defining fields| 00:00 | As we've discussed in previous movies,
in order to add fields to your database,
| | 00:04 | you're first going to need to determine
what tables you're going to have, then
| | 00:06 | what fields, and then
finally what types of fields.
| | 00:09 | Once you've made all those
determinations, there are a couple of different ways
| | 00:12 | that you can define fields within FileMaker Pro.
| | 00:15 | We discussed adding fields via a Table
view in the Creating new databases using
| | 00:19 | spreadsheet format movie.
| | 00:21 | Feel free to review that
movie for more instruction.
| | 00:23 | But in general, this is a new method
in FileMaker 11, which simulates the
| | 00:27 | experience of working with a spreadsheet
such as Microsoft Excel, allowing you to
| | 00:31 | define fields on-the-fly as necessary,
without even leaving Browse mode.
| | 00:36 | Those fields that you create in Table
view will appear under Manage > Database,
| | 00:41 | under the Fields tab, under the
table that your layout was based on.
| | 00:45 | You can also use this to delete fields,
but a second, and more standard method of
| | 00:53 | defining fields, is through
the Manage Database dialog.
| | 00:58 | We go File > Manage > Database, and
you'll see that we have all of our tables
| | 01:04 | listed and then fields where we can
toggle between the different tables using
| | 01:10 | this dropdown menu in
the upper left-hand corner.
| | 01:13 | We see that Products already has fields
defined because we've imported the table.
| | 01:17 | But if we go up to Customers, we can
see here this is the blank palette that
| | 01:20 | allows us to define our fields.
| | 01:23 | In addition for providing a central
location for creating and editing fields in
| | 01:27 | any table, the Manage Database dialog
also provides tabs for working with Tables
| | 01:32 | and also Relationships.
| | 01:33 | It's a good place to add fields
that you've already listed out.
| | 01:35 | For example, we've determined that in
the Customer database we're going to need
| | 01:40 | the following fields in Field Types.
| | 01:42 | In this movie, I'm going to add all the
fields from that list into the Invoice
| | 01:46 | and Customer tables using the types
that we discussed in previous movies.
| | 01:50 | I may move quickly through some of these
fields in order to get them all added efficiently.
| | 01:54 | This, however, should just illustrate how quick
and easy it is to add fields to your database.
| | 01:58 | First, a discussion on naming the fields.
| | 02:01 | Many users employ conventions that
have the field types denoted, or even
| | 02:04 | special prefixes that you might use to
be able to sort the fields in a field
| | 02:08 | list, similar to how we put the double
underscore before the pk prefix in our primary key field.
| | 02:14 | FileMaker Pro is also very accommodating
when it comes to naming tables and fields.
| | 02:18 | There are only a handful
of restrictions to consider.
| | 02:22 | Watch, for example, as I type in a
Field Name with numbers and hit Create.
| | 02:32 | You see this message appear onscreen,
and you'll see this dialog whenever you
| | 02:35 | try to create a table or a field
that violates one of the restrictions.
| | 02:39 | It's helpful because it shows what the
restrictions are, and you'll notice that you
| | 02:42 | really can't use any special characters, or
numbers, or anything that contains any And Or,
| | 02:46 | Not and those type of things,
also periods and that type of thing.
| | 02:50 | Mainly, they don't want you
reference anything that you might find in
| | 02:53 | the Calculation dialog.
| | 02:54 | We'll be talking about the Calculation
dialog later in this title, and when you
| | 02:58 | get there you'll see that numbers and
some of these characters perform different
| | 03:02 | functions inside of a formula
than they would just by a field name.
| | 03:06 | So by avoiding these characters and
following these rules here in the bullet
| | 03:09 | points, you'll be able to safely create
fields that will not confuse FileMaker.
| | 03:13 | Even though that message pops up,
FileMaker will allow you to create the
| | 03:16 | field, as you see here.
| | 03:19 | But just because certain characters are
allowed in a field and table names, it
| | 03:22 | doesn't mean that you should use them.
| | 03:23 | Should you ever need to share data
between your database and another
| | 03:26 | application, you may have difficulty
because most other applications have even
| | 03:29 | more restrictive naming
conventions than FileMaker does.
| | 03:32 | So it's best to best to err on the
side of caution and just simply follow
| | 03:36 | FileMaker's naming convention rules.
| | 03:38 | And for this reason, it's really a
best practice to use only alphanumeric
| | 03:42 | characters in a table and field name.
| | 03:45 | Let's add the first couple field names.
| | 03:47 | You'll see here that to add a field, you
can type in the name of a field and hit
| | 03:52 | Create, or you can select a field
whose name you want to change, like we're
| | 03:56 | doing here and then type over your new name.
| | 04:01 | You'll notice that I'm using another
type of naming convention where I'm not
| | 04:04 | putting any spaces inside the fields.
| | 04:06 | It's not necessary, but it's a good
practice because if you ever want a
| | 04:09 | publish your data to the Web or
maybe share with another non-FileMaker
| | 04:12 | database application, sometimes even
having spaces in the name can trip up
| | 04:16 | that communication.
| | 04:17 | So I've become used to putting all
the words all together into one, and using
| | 04:22 | capitalization to kind
of make it easier to read.
| | 04:24 | So now in this case, if you remember,
we've selected the 2345 field, and now you
| | 04:29 | see the Change button is available.
| | 04:31 | So I'm going to hit Change and you see
it's allowed us to now get rid of that
| | 04:35 | field and add a new one all at the same time.
| | 04:37 | Once a field has been added, you see now
that you can Duplicate it, or even Delete it.
| | 04:41 | You also see the Options over
here on the right-hand side.
| | 04:45 | Hitting this button will get us to
several different field options, all of
| | 04:48 | which we're going to be
covering in upcoming movies.
| | 04:51 | Another good idea is to Comment out your fields.
| | 04:53 | For example, if we go to the primary
key, you see that we've got the words,
| | 04:58 | "primary key for customers"
listed in the Comment field.
| | 05:01 | This isn't necessary.
| | 05:02 | It doesn't affect any of the
functionality of the field, but as you're going
| | 05:05 | through your field list, it might
provide you some useful information when
| | 05:08 | you're looking for specific
types of fields within your list.
| | 05:11 | You'll also notice that when you hit
the Options/Comments, it toggles between
| | 05:15 | your comments and the field options themselves.
| | 05:18 | This could be a good way for you to
easily find a field in a very long list of
| | 05:21 | fields inside the Manage Database window.
| | 05:24 | For the next set of fields, I'm going
to use another convention that I suggest
| | 05:27 | that you might want to use.
| | 05:28 | We're going to talk about the Address
fields: the Street, City, State and Zip fields.
| | 05:34 | One thing that a lot of developers like
to do is, in order to group these fields
| | 05:39 | together, you'll put the name of the
group of the field, in this case they are
| | 05:47 | all address fields, followed by
the name and then hit Create.
| | 05:50 | And the reason for doing that, as
you'll see in a second, is that they'll all
| | 05:54 | show up in a list so that they are clumped
together when you're looking at the field list.
| | 05:59 | So if I add AddressCity, AddressState,
and you see each time I'm just modifying
| | 06:06 | the name and hitting Create, and
it's creating a new field form me,
| | 06:10 | this is an efficient way to do it,
because it saves me a couple keystrokes.
| | 06:14 | Now that you see all of the Address
fields, they will always be together any
| | 06:17 | time I'm sorting by Field Name.
| | 06:18 | A lot of the naming conventions are
based more around seeing fields in not
| | 06:22 | only this field list, but you'll
notice that you'll see list of fields and
| | 06:25 | things like Calculation dialogs and
various other parts of the FileMaker
| | 06:29 | database application.
| | 06:30 | So it's a good idea to keep them all together.
| | 06:32 | So if you just follow those naming
conventions, at the very least, you'll be
| | 06:35 | in really good shape.
| | 06:36 | So now I'm going to go ahead and use
these same naming conventions to define all
| | 06:40 | the rest of the fields inside of our database.
| | 06:43 | You'll notice when I do the Company Name
first, I'm using the naming convention twice.
| | 06:46 | So I'm both grouping the Name fields
under the Company. I'm also denoting that
| | 06:51 | they are in both name fields, as well.
| | 06:52 | So it sorts first by company and then
by name, and then you'll notice that in a
| | 06:56 | couple of cases, like in CompanyLogo, I
am choosing the Container as a type, but
| | 07:00 | we'll get to that in a later movie.
| | 07:01 | And in the case of DateCreated, I can
easily use date in both DateCreated and
| | 07:05 | DateModified, but I'm going to use
Timestamp in DateModified so that we can use
| | 07:09 | that in upcoming exercises.
| | 07:11 | DiscountRate is something we
might use in a mathematical equation.
| | 07:22 | So we'll make that Number, but here
you see we've accidentally picked the wrong
| | 07:25 | field, but FileMaker allows us to just
click on the field, make a change and
| | 07:30 | then hit the Change button
to correct what we've done.
| | 07:33 | FaxNumber will actually have alpha
and numeric characters with the dashes.
| | 07:37 | So we'll just make that
Text, so it can contain both.
| | 07:55 | Now that we've got all our fields
defined, we'll notice that if we hit the OK
| | 07:59 | button to close out this window, and
if we navigate over to a different view,
| | 08:06 | instead of looking at our view in Table
view where actually we can see all the
| | 08:11 | different fields that we defined
have been added to our layout already.
| | 08:14 | We can also look at this in Form
view so you can see them all listed.
| | 08:21 | If this didn't happen in your version
of the database, there are a couple of
| | 08:24 | reasons that could have occurred,
| | 08:26 | first of which, in your Preferences
under the FileMaker Pro, or in Windows under
| | 08:30 | Edit, under the Layout tab you may
not have this option checked: Add newly
| | 08:35 | defined fields to the current layout.
| | 08:38 | Even if you don't have that checked, a
lot of times when you define fields in a
| | 08:42 | new database, they'll still add the
fields to the layout, but they only do that
| | 08:46 | the first time around.
| | 08:47 | Once you've closed the Manage
Database window and then open it up again, it
| | 08:51 | won't start adding those
fields for you automatically.
| | 08:53 | So don't worry; nothing is broken in your file.
| | 08:56 | Those are just a couple of settings or
scenarios that might require you to have
| | 08:59 | to add a field to a layout manually.
| | 09:01 | If you have to do that, you can go under
View > Layout mode and choose Insert > Field.
| | 09:07 | But we'll be getting into examples
of that in more detail when we start
| | 09:10 | working with layouts.
| | 09:13 | Now you see it's a rather easy and quick
process to define all the fields in your tables,
| | 09:17 | if you've gone through and made the
decisions on what attributes need to be
| | 09:20 | represented as fields once you're
figuring out your tables, and then figuring out
| | 09:23 | what those field types are.
| | 09:24 | Then you can go into them all at once,
and you'll see that in some cases they
| | 09:28 | will even be added to your
database layouts for you.
| | 09:30 | In the next exercise file,, you'll
notice that we will have already created all
| | 09:34 | the fields in the Invoice table and
that there are already be fields inside
| | 09:37 | of the Product table.
| | 09:38 | So if you'd like to play along, you can
follow along using the fields that are
| | 09:42 | already in the file in your next exercise.
| | 09:44 | As you can see, after you determine
your list of fields and their types,
| | 09:47 | FileMaker provides a couple of
different ways to define these fields.
| | 09:50 | You can apply field naming conventions,
as well as choose Field Types, all the
| | 09:54 | while you're setting up your fields.
| | Collapse this transcript |
| Using Auto Enter options in fields| 00:00 | When you're defining fields inside your
FileMaker database, you may notice, while
| | 00:04 | you're in the File > Manage > Database
window, looking at any field list under
| | 00:10 | the Fields Tab, you see by selecting
a field, you'll notice that there's an
| | 00:14 | Options button that becomes
available after the field is created.
| | 00:17 | You'll notice that in our
_pkCustomerID field, we already have some of
| | 00:20 | these options available.
| | 00:22 | If we click on the Options button,
you'll see that we've got a few different
| | 00:25 | decisions to make in the event that
we want some of this functionality
| | 00:28 | built-into our field.
| | 00:29 | For example, developers often design a
database so that some of the fields are
| | 00:33 | automatically populated with the
default data whenever a user creates a new
| | 00:36 | record in that database.
| | 00:38 | These types of field options in
FileMaker are called Auto-Enter options.
| | 00:42 | And they do just what they say really,
it automatically enters a value in the
| | 00:45 | field based on the developer settings.
| | 00:47 | So you'll see this example that we did
when we created the primary key fields.
| | 00:50 | We want to automatically enter a serial
value into the field _pkCustomerID every
| | 00:57 | time a new record is created.
| | 00:58 | So the best way to think of this is,
just read it as it says, Automatically
| | 01:01 | enter the following data into this
field, and then if you can imagine after
| | 01:04 | this, it would say, each
time a new record is created.
| | 01:07 | That's what Auto-Enter means.
| | 01:09 | FileMaker allows developers to
choose from many different options for
| | 01:12 | automatically populating the contents.
| | 01:14 | You can access these under the Auto-Enter tab.
| | 01:16 | One thing you should be aware of is
whatever settings you put in here will
| | 01:19 | only give instructions to FileMaker on what
data to put in the field when a record is created.
| | 01:24 | After that point, a user could
change that value into any other kind of
| | 01:28 | value that they want.
| | 01:30 | That's of course why we check the
Prohibit modification of value during data
| | 01:33 | entry option on the key fields;
| | 01:35 | however, in other fields, we might
want to just create an initial value and
| | 01:38 | allow the user to update it if need be.
| | 01:40 | This of course could help them during
data entry to save them a few keystrokes
| | 01:44 | on a couple of fields.
| | 01:45 | There's also a concept that uses Auto-
Entry options that FileMaker developers
| | 01:49 | like to call creating housekeeping fields.
| | 01:51 | For example, if we click on DateCreated,
and then hit our Options, we'll see
| | 01:57 | that when we go to the Auto-Enter tab,
we can choose any one of these options
| | 02:01 | that are available to us.
| | 02:02 | Let's concentrate on these
first two options in the tab.
| | 02:04 | They relate to Creation and Modification data.
| | 02:07 | A field can automatically track
information about when a record was created, or
| | 02:11 | last modified, and within some limits,
by whom it was modified or created.
| | 02:15 | Both the Creation and Modification
options have the same set of choices:
| | 02:19 | Date, Time, Timestamp, Name, and
Account Name, meaning when this record is
| | 02:23 | created, put today's date, the
current time, or both of those combined as a
| | 02:28 | timestamp, or the name or copy of
FileMaker that was used to create the record;
| | 02:33 | however, you'll notice in this case that
only one of these options is available.
| | 02:37 | That's because when we defined the
DateCreated field, we made that field type Date.
| | 02:44 | It only makes sense to allow a date to
be automatically entered into the Date
| | 02:47 | field, because otherwise we'd be
violating some of FileMaker's storage rules if we
| | 02:51 | tried to put time in there.
| | 02:52 | So if we check Create, and Creation,
Date, and hit OK, now you see the options
| | 02:57 | show up in the Options column in our
field list, and what this means is that
| | 03:01 | every time a record is created, it's
automatically going to take the computer
| | 03:05 | date from the machine that the user
is using, and put that into the date.
| | 03:08 | These are called housekeeping fields,
mainly because every database table
| | 03:11 | usually has these defined.
| | 03:13 | And it's a good idea for you to be
able to keep track of your data or clean up
| | 03:16 | your data, or if you ever have any
problems, and you're trying to figure out
| | 03:19 | what types of things happened last
Thursday, you can just do create a Found set
| | 03:23 | based on that date inside
of the DateCreated field;
| | 03:26 | however, if you don't create these
types of fields right away, it won't
| | 03:29 | retroactively populate any fields if
you decide that you're not going to define
| | 03:33 | these until you've already got
thousands of records in your database.
| | 03:36 | So it's a good idea to do
these before you start adding data.
| | 03:38 | Another example of it is RecordCreatedBy.
| | 03:42 | Notice this time this is a text field.
| | 03:44 | I'm going to hit the Options button,
and now we'll notice that we've got, under
| | 03:48 | Creation, we've got the
ability to choose all of these.
| | 03:51 | That's because any of this type of
data can be stored inside of a text field.
| | 03:55 | We could choose current Date, like we
did earlier, or the Time, which would be
| | 03:58 | the current time of creation.
| | 03:59 | But in this case, we're going to
choose Name, which is the name that's in the
| | 04:02 | Preferences Pane of each
user's copy of FileMaker.
| | 04:06 | And when we did our Preference Preview,
we looked at how you can modify that.
| | 04:10 | So now, every time a record is created, we're
going to automatically get a new serial number.
| | 04:16 | We're going to put a Creation
Date, or we'll put a Creation Name.
| | 04:19 | You also have the option, if you double-
click here, that you can check Account Name.
| | 04:24 | And although Name and Account
Name may seem similar, they're really
| | 04:27 | different concepts.
| | 04:28 | The Name is the name that's inside the
Preferences in your copy of FileMaker Pro.
| | 04:32 | Account Name is going to be the name or
account name used when you logged into the database.
| | 04:36 | Those are all settings that you'll create
when you set up security for your database.
| | 04:40 | Keep in mind that any user could log in
through any number of different machines
| | 04:43 | or copies of FileMaker, so these
really do give you two distinctly different
| | 04:46 | types of information.
| | 04:49 | You'll also notice that we've got
Timestamp and quickly, we see DateModified.
| | 04:54 | In this case, we'll choose
Modification and have it put a Timestamp in.
| | 04:58 | This one is a little bit different,
because instead of putting a value in
| | 05:00 | when the record is created, it's
going to wait till any one of the fields
| | 05:03 | that are defined for any given record
have been modified, and then it's going
| | 05:06 | to put a Timestamp in there.
| | 05:08 | So that field data will continue to
update as records are being modified
| | 05:11 | within your database.
| | 05:12 | All of these are good fields to have
and good fields to define early on.
| | 05:16 | There's another use of Auto-Enter.
| | 05:18 | If we go to AddressState, for example,
and hit Options, you'll notice that we've
| | 05:23 | got this box here called Data.
| | 05:25 | When we check this, our cursor
goes inside of this text entry box.
| | 05:29 | In this case, let's enter in CA.
| | 05:31 | The reason we're doing so is, let's
say, for example, that most of the
| | 05:34 | customers that you're entering into
your database happen to be customers from
| | 05:37 | the State of California.
| | 05:39 | So in this case, what we'd be doing is
saying, inside of the field AddressState
| | 05:44 | automatically put the
abbreviation for the State of California.
| | 05:48 | This way when your users are entering
new customers into the database, they
| | 05:51 | won't have to enter any values into
this field if they happen to be from the
| | 05:54 | State of California.
| | 05:56 | But because it's an Auto-Enter field,
they could just type over the CA and
| | 06:00 | change it to a different
state name, if that one applies.
| | 06:02 | Now let's switch over to the Invoices table,
where we see we've got our fields defined.
| | 06:07 | We're going to use another one
of the options for Auto-Enter.
| | 06:09 | You'll see we have a
field for InvoiceDiscountRate.
| | 06:12 | Now, what's interesting about this
field is that even though it's defined
| | 06:15 | inside of an Invoices table, this is actually
going to pull data from the customer record.
| | 06:20 | Now, you might think to yourself, why
would we define this field inside of Invoices?
| | 06:24 | Well, that's because the discount
rate has to have a value at the time
| | 06:27 | the invoice is created.
| | 06:29 | So we can use an Auto-Enter field in
this case, because we want to just pull
| | 06:33 | in the discount rate at the moment
that record is created rather than if a
| | 06:36 | record was created last year and the
customer discount rate changes, we don't
| | 06:40 | want it to propagate backwards and then screw
up our totals and kind of mess up our books.
| | 06:45 | So what we'd rather do is use the
Auto-Enter feature to insert a snapshot
| | 06:49 | of data at the moment of creation, and
that way it doesn't get updated down the road.
| | 06:52 | Auto-Enter can be useful for savings
some keystrokes during data entry, but also
| | 06:57 | for taking a snapshot of data
at the time a record is created.
| | 06:59 | Let's take a look at how that would work.
| | 07:01 | We'd hit Options and choose this
value down here: Looked-up value.
| | 07:06 | By hitting Specify, we're going to
choose to look up data from customers.
| | 07:13 | Remember that we have a
relationship between customers and invoices.
| | 07:16 | So if we're in the context of an
invoice layout, and we're looking up to the
| | 07:21 | parent, we know that because
Invoices is the child in the parent-child
| | 07:25 | relationship, that means that there
will only be one related parent record.
| | 07:29 | That way if we use a look-up, going
upstream, so to speak, we can point to one
| | 07:35 | field, and it will only have one matching value.
| | 07:38 | Now, when a new record is created,
it's going to go find the related parent
| | 07:42 | and pull the value that's inside the
DiscountRate field in the related parent customer record;
| | 07:48 | however, if I go into this field a
month later and change that value, it's not
| | 07:52 | going to change the initial value that
was placed inside the invoice discount
| | 07:55 | rate at the time the invoice record was created.
| | 07:58 | So now let's hit OK, and
now we're back in Browse mode.
| | 08:01 | So let's take a look at what
happens when we create a new record.
| | 08:04 | One of the ways you can create a new
record is by hitting the button in your
| | 08:07 | Status toolbar, and now we look
onscreen, and we notice we've got a primary key
| | 08:13 | value automatically created, the
words CA have been added inside our
| | 08:17 | AddressState, and also the dates that
these records were created, and an initial
| | 08:21 | value for modification.
| | 08:22 | You'll notice, also, when we click into
modification, that it gives us a full
| | 08:26 | string, including both the Time and the Date.
| | 08:28 | You'll also notice that if we go and
we try to edit the primary key for the
| | 08:32 | customer, by hitting the Delete field,
we get a message that says, this action
| | 08:36 | cannot be performed because
the field is not modifiable.
| | 08:39 | That's because if we go under File >
Manage > Database, we see that it says,
| | 08:44 | can't modify data, Prohibit
modification during data entry;
| | 08:49 | however, if we were to go in and change
any of these other values, for example,
| | 08:55 | California to Washington, and then click
outside to commit the record, we see we
| | 08:59 | don't get that error, and that's
because we didn't check the prohibit
| | 09:01 | modification of value
during data entry on this field.
| | 09:04 | Also, you'll notice that the
modification time is updated by one minute, because
| | 09:09 | we made a modification to
the field after we created it.
| | 09:13 | Using the Auto-Enter field options,
developers can design a database so that
| | 09:17 | some fields are automatically populated
with default data when a user creates a
| | 09:20 | new record, and these are decisions
that you'll want to make when deciding what
| | 09:24 | fields you need to create in your database.
| | 09:25 | So in addition to deciding what
tables, what fields, and what field types,
| | 09:29 | you're also going to want to consider
some of the field options that you have
| | 09:31 | available to you.
| | Collapse this transcript |
| Reviewing field validation options | 00:00 | Any database system that you create
really should strive to have consistent data.
| | 00:05 | Without data consistency, it becomes
extremely difficult, if not impossible, to
| | 00:09 | derive meaningful and viable information about
whatever the database is designed to keep track of.
| | 00:14 | So even in your best efforts to
create a good architecture, if you're not
| | 00:17 | managing the types of data that are
going into the database, you might have some
| | 00:20 | problems with some of the results
you're getting out of the database.
| | 00:23 | So to ensure that data is entered
into your database in a consistent and
| | 00:26 | reliable manner, you must design checks
and restrictions on the way that users
| | 00:30 | are allowed to enter data in the system.
| | 00:33 | This is where another field option
called Field Validation comes into play.
| | 00:37 | Field Validation, which can be found
under the File > Manage > Database Window,
| | 00:42 | clicking on any field, and choosing Options,
you'll notice that in the Field options,
| | 00:47 | you've got a Validation tab.
| | 00:49 | Field Validation allows you to test
field data against specific criteria, and
| | 00:53 | possibly even warn the user if the
value doesn't pass muster in some way.
| | 00:57 | So, for example, you can use your
field validation to make sure that a price
| | 01:01 | that was entered is greater than 0, or
make sure that a ZIP code field is not
| | 01:05 | empty, those types of things.
| | 01:07 | You might be familiar with this type
of experience as a user, whether you're
| | 01:10 | using database system or
even making orders online.
| | 01:13 | If you forget to put in a ZIP code field,
the database that runs a Web site, for
| | 01:17 | example, will come back and tell you, oops!
| | 01:19 | You've forgotten that.
| | 01:20 | Can you make sure to add a
value before we let you proceed?
| | 01:22 | As you'll learn later in this movie,
if a user tries to commit a record
| | 01:25 | containing field data that violates
the validation rules, a user is going to
| | 01:29 | receive a warning, and be prompted to
change the nonconforming data; thus,
| | 01:33 | keeping your data consistent and reliable.
| | 01:35 | They will be frozen in time, not
allowed to move forward or backward without
| | 01:39 | addressing the violation of the data.
| | 01:41 | Of course, this can be somewhat of a
hindrance to data entry, so you have to
| | 01:45 | make these Validation
Option selections very carefully.
| | 01:48 | So let's do an example here.
| | 01:50 | If we went into the AddressEmail, and
let's say it's very important for you to
| | 01:54 | communicate with your users via e-mail,
and that every time that they order from
| | 01:58 | you, you send them a confirmation e
-mail that they need to reply to.
| | 02:00 | So in that case, you've got a
business rule that says we need to have a
| | 02:03 | customer's e-mail in order to be
able to complete this workflow.
| | 02:06 | So if we double-click on AddressEmail,
or we can select it and hit Options, either
| | 02:11 | one of those two ways, it'll bring
our Field Options window forward.
| | 02:16 | You can select the Validation tab, and
beginning at the very top of the dialog,
| | 02:20 | we can see that we've got a couple
of decisions that we need to make.
| | 02:23 | First, you'll see Validate this
field Always or Only during data entry.
| | 02:26 | The Only during data entry
is of course the default.
| | 02:30 | When you create a new field, it means
that the validation that you select,
| | 02:33 | if you select any, will occur only when a
user manually enters data into the fields.
| | 02:38 | There are other types of ways that
you can get data into the field, such as
| | 02:41 | scripts or even importing data into
your database, but if you have Only during
| | 02:46 | data entry selected, those
other ways will be a mute.
| | 02:49 | This is a default setting, because it's
more common that you want to control how
| | 02:53 | human beings, or your users, are
entering data, rather than other technical
| | 02:57 | mechanisms like importing or scripts.
| | 02:59 | So, for example, let's say that
anytime someone's data entering a customer
| | 03:03 | record, I want to make sure
that they gather the e-mail.
| | 03:05 | But let's say I've got a huge database
of leads that I got from a conference,
| | 03:09 | and I just want to
import those into my database.
| | 03:11 | Those might not be customers yet, so I
don't necessarily need their e-mail until
| | 03:14 | we start to engage them.
| | 03:16 | So in that example, I do want to bring
records into my database through an import.
| | 03:20 | But when a user gets to it, and I want
to make sure that the user is alerted
| | 03:23 | that we don't have an e-mail.
| | 03:24 | So conversely, choosing Always means
that whatever rules we apply inside the
| | 03:29 | Validation tab will always have to take
place, or the record won't be allowed to
| | 03:33 | be added, or the data won't be
allowed to be added if it violates muster.
| | 03:37 | This is a very strict level of Field
Validation, and you should use caution when
| | 03:41 | you're choosing Always.
| | 03:43 | We'll keep this one on the default, data entry.
| | 03:45 | For the sake of the AddressEmail option,
we're going to leave it as Only during
| | 03:49 | data entry, because we may want to
import customer records from other sources
| | 03:52 | that don't have e-mails, similar to
the example that we just discussed.
| | 03:55 | An additional check box in the upper
section of the dialog also allows you to
| | 03:59 | choose whether or not the
user can override data entry.
| | 04:02 | So you see that this is also kind of a
soft sort of reminder that there's a rule
| | 04:06 | about the data in the field.
| | 04:08 | If that's checked, that means that
the user can choose to ignore it;
| | 04:12 | however, if you uncheck it, that means
they have no choice but to comply before
| | 04:15 | they can proceed on with their activity.
| | 04:17 | They could, of course, just delete the
record they're working on, but they won't
| | 04:20 | be able to create a record,
and ignore your field validation.
| | 04:24 | So now in the central section you'll
see that we've got the various different
| | 04:26 | choices that we have to
apply validation to a field.
| | 04:30 | These validation rule options that
you see here are not mutually exclusive,
| | 04:34 | meaning that you can pick more than one,
and therefore have various different
| | 04:37 | rules that the data will have to pass
in order to be added into the database;
| | 04:41 | however, some of them really don't make
sense to choose both at the same time,
| | 04:45 | so FileMaker won't allow you to do that.
| | 04:47 | For example, choosing Unique or Existing,
it's only going to allow you to choose
| | 04:51 | either/or because those conflict with
each other and it doesn't really make sense.
| | 04:55 | However, if I say, Not empty and
Existing, it will allow me to do that.
| | 04:59 | You'll also notice that
Strict data type > Numeric;
| | 05:03 | I can only choose one of
those rather than multiples.
| | 05:07 | So under Strict data type, I can say,
this field must only have numeric data
| | 05:10 | entered, a 4 digit year
date or be a time of day.
| | 05:15 | As we saw here, I can check Not empty,
which is what we want to do in this case,
| | 05:19 | or choose from either a
Unique value or Existing value.
| | 05:22 | These are probably the most common
settings that you may have inside of FileMaker.
| | 05:26 | Member of a value list ensures that the
field value that you're trying to enter
| | 05:30 | into the field also exists in a
value list somewhere within our database.
| | 05:35 | Later on in this movie, we'll show you
how to create value lists, and this is
| | 05:38 | just a number of one of the useful ways that
you can use those value lists once created.
| | 05:42 | In range is pretty self-explanatory.
It gives you two entry boxes, and whatever the
| | 05:46 | data that you enter in must fall
within the range, whether your field is a
| | 05:49 | number field or a date field, it will
be able to determine whether or not the
| | 05:53 | date falls within the range or a
numerical value falls within the range.
| | 05:57 | Validate by calculation is very popular;
| | 05:59 | however, it's going to require an
understanding of the calculation dialog and
| | 06:02 | functions which we'll be covering
later on in this title, and we're even
| | 06:05 | going to use the Validate by calculation
option as a demonstration to show how those work.
| | 06:10 | So now finally, we're just going
to leave the AddressEmail validation
| | 06:12 | settings to Not empty.
| | 06:14 | We'll hit OK, and hit OK again.
| | 06:17 | Now, let's create a new record.
| | 06:19 | When we try to commit the record,
you see when we get this message,
| | 06:23 | "AddressEmail" is defined to require
a value, and you must enter a value.
| | 06:29 | So until we enter something into this
field, it's not going to let us pass,
| | 06:33 | but one thing that you'll notice is that
that message is a little bit nondescript.
| | 06:39 | So there's something that we
can do about that if we need to.
| | 06:42 | First, we'll enter a value to let us move on.
| | 06:47 | We'll go to Manage > Database, under
the File menu, and go to AddressEmail and
| | 06:52 | double-click on it, and you'll
see we've got Not empty chosen.
| | 06:55 | But if you notice down below, we can
choose to Display a custom message,
| | 06:58 | should the validation be violated.
| | 07:00 | So in this case, we can do something a
little bit more user-friendly, like "You
| | 07:10 | must enter an e-mail before proceeding."
| | 07:12 | Now, when we hit OK, and OK, and try to
create a new record, you see that it's
| | 07:17 | a little bit more user-friendly of a dialog
than the other message that popped up earlier.
| | 07:22 | One important thing. Since we're going
to be using this database for our various
| | 07:26 | other exercises, we don't want the
users to have the same experience where they
| | 07:29 | keep seeing this message.
| | 07:31 | So we're going to just delete a record,
we're going to go under File > Manage
| | 07:37 | > Database, and we're going to turn off the
Required, and we're going to turn off the Not empty.
| | 07:44 | This way it won't be a hindrance to
us when we're doing other exercises.
| | 07:48 | But you notice though, that by
deleting the record, it doesn't require us to
| | 07:51 | enter a value, and that's because
FileMaker doesn't care if you're deleting a
| | 07:54 | record, because that data is not going
to violate the rules that it had set up
| | 07:57 | for the data that's already storing.
| | 07:59 | FileMaker Field Validation allows you
to test data against specific criteria to
| | 08:04 | warn your users if a field value
does not pass muster in some way,
| | 08:08 | thus allowing you to keep your
data consistent and reliable.
| | 08:11 | All are keys to having an
effective storage mechanism inside your
| | 08:14 | FileMaker database.
| | Collapse this transcript |
| Building with container fields| 00:00 | There is a special type of field that we
haven't reviewed yet, that's called the
| | 00:03 | Container field, and Container fields
comprise an important building block
| | 00:07 | for any FileMaker Pro solution, in
which you want to store and/or display more
| | 00:11 | than just text, numbers, dates, and
times, like we've been working with so far.
| | 00:15 | With the Container field, your database
solutions can store and display digital
| | 00:18 | images, videos, play music or sounds,
and even store electronic documents, such
| | 00:23 | as PDF or Word documents.
| | 00:25 | The Container field is a versatile
data repository that can store any sort of
| | 00:29 | binary data, and binary just is a
generic term for data that cannot meaningfully
| | 00:33 | be represented as text.
| | 00:35 | When we set up our fields in our
database, under File > Manage > Database, and
| | 00:41 | you'll see that we set up a field
already called CompanyLogo and gave it the
| | 00:45 | field type, Container.
| | 00:46 | So let's use this field to
experiment with Container fields and the data
| | 00:49 | that they can store.
| | 00:51 | So once we've got a field defined,
which we do already, let's go in the Layout
| | 00:55 | mode, and we're going to practice
inserting a Container field into our layout.
| | 01:00 | We'll talk more about inserting fields
into layouts when we discuss the chapters
| | 01:04 | on working with layouts, but for now we
can either choose Insert > Field, or you
| | 01:10 | can choose, on your toolbar, the
Field tool, which we'll use in this case.
| | 01:13 | Simply click down with your mouse,
and you'll see your cursor turn to like a
| | 01:16 | hand that's grabbing a field, and
we'll drag that down to an area in our
| | 01:21 | layout, and we'll release it.
| | 01:22 | Now, FileMaker pops up and asks us,
what field would you like to place here?
| | 01:27 | We'll say CompanyLogo, and hit OK.
| | 01:31 | Since the Container field can contain
images or video or sound, we might want to
| | 01:35 | resize it so that it's a little bit
larger so that we can actually see the
| | 01:38 | contents contained within.
| | 01:41 | So when you have a field selected,
which you'll see by the handles in the four
| | 01:44 | corners, you can grab any one of the
corners to click down, drag, and then
| | 01:48 | release to thus change the size of your field.
| | 01:51 | You can easily identify Container fields
on your layout, because they don't have
| | 01:55 | text baselines, and that the name of
field stays centered, regardless of how
| | 02:00 | large you make the field in Layout mode.
| | 02:02 | Now, back in Browse mode, if we go
under View to Browse and hit Save for our
| | 02:08 | changes, you'll see that we can click
into this area now, and now it will allow
| | 02:12 | us to go under our menu and hit Insert,
which allows us to add different types
| | 02:17 | of data into the Container field.
| | 02:19 | You'll also notice that if you right-
click or hold down the Ctrl key and click,
| | 02:23 | you get these same options.
| | 02:25 | Let's start by adding a picture.
| | 02:27 | I'm going to choose Insert Picture and
go into our Exercise Files, where we are
| | 02:33 | going to choose this file called
author.tiff and then select Open.
| | 02:40 | Now you see the picture we chose in the
field, and you'll notice that when you
| | 02:44 | navigate back to the previous
record, that image doesn't appear.
| | 02:47 | So just like any other piece of data in
a field, any one record will store any
| | 02:52 | binary data, but only for that
record where you've inserted it.
| | 02:55 | Also, once you have data in the
field and you click on the field, or the
| | 02:59 | contents, by right-clicking, or in Mac,
you can hit Ctrl and then click, you'll
| | 03:04 | notice that we now have the
option to Export Field Contents.
| | 03:07 | So this way if I choose this option,
you see that it allows me to export out
| | 03:12 | the value that we're storing in the
container and save it somewhere else on my database.
| | 03:16 | This isn't quite as dramatic if I am
the person who put the value in there,
| | 03:19 | But imagine a database that's
shared by various different users.
| | 03:22 | if someone wants to take an image or
a sound file or a movie that you've
| | 03:25 | created, they can easily just log into
the database, navigate to the record, and
| | 03:29 | then right-click to save the
file locally on their own desktop.
| | 03:33 | You can remove data in the Container
field by simply clicking on the field and
| | 03:36 | hitting the Delete key on your keyboard.
| | 03:39 | Now let's try adding a QuickTime.
| | 03:41 | This time we'll do
through it Insert > QuickTime.
| | 03:44 | Now let's choose Managing Fields
in the Exercise Files, and this time
| | 03:48 | we'll choose a movie. I hit Open.
| | 03:52 | Not only do we see the movie, but we
see a bar down here that allows us to
| | 03:55 | play the movie and control the volume, much
like we would do so with any other type of movie.
| | 04:03 | The same is true for sound files.
| | 04:05 | So you can include video clips or audio
clips, anything you want, and of course
| | 04:10 | it will be only stored in that one
record, and then naturally, any other user
| | 04:14 | can just right-click to export
that video out to their own desktop.
| | 04:19 | Let's click inside and hit Delete to
clear out that value, and now you'll see,
| | 04:23 | if we insert a file, we can choose a
TextFile, and you'll notice that when you
| | 04:31 | click a file, it puts the name of the
file with the extension and then an icon
| | 04:35 | that represents that type of file.
| | 04:37 | For example, if I click in and hit
Delete again and hit Insert > File, this
| | 04:43 | time I am going to choose a FileMaker
file or a PDF, something that's not a
| | 04:49 | standard file, you'll notice that the
icon changes but that the entire name
| | 04:53 | with the extension appear.
| | 04:54 | One of the things you might notice
here is that we're adding one file at a
| | 04:57 | time to each container.
| | 04:58 | Now, if you ever need to add more
than one file to any one record, so for
| | 05:03 | example, let's say you've got a
customer record and you want to store their
| | 05:06 | signature page for the original
contract, as well as a company logo,
| | 05:11 | that would require doing one of two things:
| | 05:13 | either creating two container fields,
| | 05:15 | one that would store the logo and then
one that would store the signature page
| | 05:18 | scan, or you can take any number of
files and zip them together into a
| | 05:23 | packaged set of files, and then you
can just store that zipped package in the
| | 05:27 | container as one single file.
| | 05:29 | Now, there's one very
important word of caution here.
| | 05:31 | Your database will increase in size
every time you add a file to a container
| | 05:36 | field, and it will increase by the
size of the file you are storing.
| | 05:39 | What does that mean?
| | 05:40 | Well, it's not a very big deal when you
are adding smaller sized files, like PDFs
| | 05:44 | and such, but if you were to add a
four gigabyte video, which of course, four
| | 05:49 | gigabytes is our maximum size capacity
for a Container, if you were to add a
| | 05:52 | video clip that was four gigabytes in
size, that means now that your FileMaker
| | 05:56 | database has just grown four gigabytes in size.
| | 06:00 | Imagine if you add assets to Container
fields for thousands of records of your
| | 06:04 | database; your FileMaker database will get huge.
| | 06:07 | Don't worry; FileMaker does have a file
size limit of eight terabytes, which is
| | 06:12 | pretty enormous, but still you're
going to quickly encounter some performance
| | 06:15 | issues when you're sharing your
database over a network, or even just trying to
| | 06:19 | import your database via e-mail, or
any other kind of system like that.
| | 06:23 | So the best idea is to either make
sure you are conscious of the size of the
| | 06:27 | files, or you can use this other option
I'd like to introduce you to, which is
| | 06:30 | called storing a reference to a file.
| | 06:32 | So let's click inside here and hit
Delete, and then go under Insert to File and
| | 06:39 | choose one of the files that we want to insert,
| | 06:41 | let's say, for example, this TextFile.
But you'll notice in the bottom left-hand
| | 06:47 | corner we have an option called
Store only a reference to the file.
| | 06:50 | You'll see when I click on that and
hit Open, it still displays the image or
| | 06:54 | file at the same resolution or
quality as it always would have if I just
| | 06:57 | embedded the file, but now it's just
storing the path to the location of the
| | 07:01 | image, or file, or video using the
QuickTime engine to display the image itself.
| | 07:06 | So since it's only storing a path, it's
very small amounts of text rather than
| | 07:10 | this huge video file, or image, or
sound or whatever it is you are trying to
| | 07:13 | embed in your files;
| | 07:14 | therefore, storing a path almost
has no impact on the overall size of
| | 07:18 | your FileMaker file.
| | 07:19 | This is a much more efficient way to
store images or videos and just keep them
| | 07:23 | as a reference for that matter, or
movies, or files or whatever you want to store
| | 07:26 | inside of Container field.
| | 07:28 | Just keep in mind that the moment that the
path breaks, so will the display of the image.
| | 07:33 | So, for example, if I were to clear
this out and insert a picture and choose
| | 07:42 | Managing Fields / 05_06, and this
time choose our image, storing only a
| | 07:46 | reference to the file, there we have the image.
| | 07:49 | But if I open my Exercise Files, and
I move that image out, let's see what
| | 07:56 | happens when I navigate back to the record.
| | 07:58 | You'll see here, this file cannot be found.
| | 08:01 | That's because I stored a reference that was
specifically from this file to that location.
| | 08:06 | If we move that back to the location and then
Refresh, you'll see that it finds the image.
| | 08:12 | Now, this can be very delicate,
because if your file is stored on a network,
| | 08:17 | that path is really from the server
back to the file, so it can get kind of
| | 08:21 | complicated and you need to be careful
with it, but certainly there are ways
| | 08:24 | that you can store this media as a
reference, not impacting the performance of
| | 08:27 | your file, but at the same time keep a
centralized directory somewhere on your
| | 08:31 | network that all users can use.
| | 08:33 | It's great for you to use, but if
however the purpose of the database itself is
| | 08:37 | to store media or collateral documents
in a common location accessible to all
| | 08:41 | authorized users, then embedding the
files in a Container field may in fact be
| | 08:45 | the best solution for you.
| | 08:46 | If the file size are large, then what
you want to do is get a database that
| | 08:50 | stores files on a hosted server, with
plenty of fast storage and network access
| | 08:55 | that all of your users can get to.
| | 08:57 | This way when a user embeds something
in a stored directory, that way all users
| | 09:02 | will be able to have access from the
FileMaker database back to that path.
| | 09:05 | FileMaker Pro provides you with a
really unique and interesting type of field,
| | 09:09 | the Container field.
| | 09:10 | This allows you in your database
solutions to store and display digital
| | 09:14 | images, video, play music or sounds,
and even store electronic documents, such
| | 09:18 | as PDF or Word files.
| | Collapse this transcript |
|
|
6. Working with RecordsCreating and duplicating records| 00:00 | So far in this title, we've discussed
how to work with FileMaker to set up
| | 00:03 | tables and fields in a
FileMaker file for you to store data.
| | 00:07 | Now, we're going to turn the
discussion to working with data in those tables.
| | 00:10 | In this chapter, we're going to be
talking about working with records of data,
| | 00:14 | starting first with
creating or duplicating records.
| | 00:17 | If you open up the file entitled 06_01,
you'll notice that it has two records
| | 00:21 | of data stored in it.
| | 00:22 | We know that because in the upper left-
hand corner of the Status toolbar, we
| | 00:26 | see that there is a total number of two
records, and that we're on the second record.
| | 00:30 | We, of course, can use the Book icon
to navigate to the other records in the
| | 00:34 | database, or simply type in a number
and hit Enter to navigate us directly to
| | 00:39 | the record of our choosing.
| | 00:40 | A record in a database is an instance of
whatever we're storing in the database table.
| | 00:45 | So, in this case, we're in a
layout based on the Customer table.
| | 00:49 | So, that means that any one of these records
that we're storing represents any one record.
| | 00:53 | If you're familiar with spreadsheets,
you'll be familiar with the Table view,
| | 00:58 | and you'll notice that FileMaker records are
no different than a row inside of a spreadsheet.
| | 01:03 | Back into Form View. There's different ways
that you can add records to your database.
| | 01:07 | Most common are to go under the Records
menu and choose New Record, or you can
| | 01:11 | follow one of the shortcuts that you
see listed next to the option in our menu.
| | 01:16 | On a Mac, you would use Command+N, and
on Windows, it would be Ctrl+N. You can
| | 01:21 | also use the buttons in your Status
toolbar. As you see here, New Record is one
| | 01:25 | of your default options.
| | 01:27 | Pressing this button will allow you
to create one of these new records.
| | 01:30 | We notice now that our count changed to 3.
| | 01:33 | We see that some of the fields have
already been populated, because those are
| | 01:35 | set for Auto-Enter, and you'll
also notice something else onscreen.
| | 01:39 | All the other fields go blank.
| | 01:40 | Now granted, you could have just come
from a record that had data in all of the
| | 01:43 | fields, and when you hit New
Record, most of the things go blank.
| | 01:47 | If you have a bunch of fields onscreen
that don't have Auto-Enter, the entire
| | 01:50 | field itself will go blank.
| | 01:52 | It's important that both you and your
users understand that you haven't deleted
| | 01:55 | anything by hitting that button.
| | 01:57 | But instead what you've done is created
a new blank record that will allow you
| | 02:00 | to enter data into the database.
| | 02:02 | You're going to see that the
fields onscreen are all blank, except for
| | 02:05 | the _pkCustomerID, AddressState,
the DateCreated, RecordCreatedBy, and
| | 02:10 | the DataModified, and those, of course,
were the ones that we set up with Auto-Entry.
| | 02:14 | We covered Auto-Entry in the previous chapter.
| | 02:16 | When you click inside of a field,
you'll notice that that field becomes black,
| | 02:20 | and your cursor starts blinking.
| | 02:22 | That indicates the active field
and the location of your cursor.
| | 02:25 | This will allow you to add new
information into the field, like, for example,
| | 02:30 | the name of a company.
| | 02:31 | Then after you've entered all the
appropriate information, you can click
| | 02:34 | outside of the field.
| | 02:36 | This is actually how FileMaker saves data.
| | 02:39 | So, at the moment that we were still in
the field, and you see all of the other
| | 02:42 | fields show up with the dotted lines,
it hadn't yet saved it to the database.
| | 02:46 | There is no Save button in FileMaker,
because it is a database. And a lot of
| | 02:50 | users who use other applications
aren't used to this concept, because in most
| | 02:53 | cases, you have to hit Save to commit
any of the changes that you've just made,
| | 02:57 | for example, on a spreadsheet, or on a
Word document, or really anything else.
| | 03:01 | But in FileMaker, and other databases,
you just type the information into the
| | 03:04 | field, and then click outside of
the field, and this action is called
| | 03:08 | committing a record.
| | 03:09 | That's the activity of saving it.
| | 03:11 | Now, keep in mind that you can't
really navigate off the record.
| | 03:14 | Anything you do, if you change to another
layout or various other things, will commit it.
| | 03:18 | So really, FileMaker almost
has an autosave-type option.
| | 03:23 | These other events that will commit a
record include clicking outside the Field
| | 03:26 | area, pressing the Enter key, unless,
of course, you change the field behavior
| | 03:31 | of the Enter key, and we'll
discuss that in Layout movies.
| | 03:33 | If you switch modes, for example, from
Browse mode to Find mode, or Browse mode
| | 03:37 | to Layout mode, your value will
automatically get committed, or if you switch
| | 03:40 | from one layout to another, or even
creating new records by hitting New Record,
| | 03:44 | or if you simply close the file completely.
| | 03:47 | By the way, if you have any field
validation that you set up in these fields,
| | 03:50 | it's going to try to run the
validation before it allows any of these
| | 03:53 | activities to occur.
| | 03:54 | So, not having data that passes
muster might prohibit one of these
| | 03:58 | activities from occurring.
| | 03:59 | Tabbing from field to field within a
record, however, will not commit the record.
| | 04:03 | It's a good idea to get this concept of
committing a record down, because you'll
| | 04:06 | see this come up later in things like
scripts and calculations, or just working
| | 04:10 | with some more complex data entry concepts.
| | 04:13 | There are other ways to create records,
too, for example, using script steps, but
| | 04:17 | we'll cover those in the chapter on scripting.
| | 04:19 | Another way to add records to the database
is do what's called duplicating a record.
| | 04:22 | So, if you already have a record in
your database, like this Record number 3
| | 04:26 | that you see here, and most of the
information in your new record is going to be
| | 04:29 | the same, then you can save yourself
some data entry by simply duplicating it.
| | 04:33 | We can choose the option Duplicate
Record, which then creates an exact
| | 04:36 | duplicate of this record, except that
that the primary key value has changed
| | 04:40 | because that's the role of a primary key value.
| | 04:42 | But we'll notice now that we can go in and
type some other data, and thus commit it.
| | 04:48 | You see the data in the original field
doesn't change, but now we have a new
| | 04:51 | record that was created using the original.
| | 04:53 | So, this is a good idea if you want
to save yourself a lot of data entry.
| | 04:57 | The commands for duplicating the record
can be found in the same locations, like
| | 05:00 | we mentioned ,under the Record menu, or
you can see if you open up your Status
| | 05:04 | toolbar, you can add by right-
clicking > Customize toolbar.
| | 05:09 | You can add Duplicate if you'd like.
| | 05:11 | It's not one of the defaults, however.
Or you can use the shortcut keys: Ctrl+D
| | 05:16 | on Windows or Command+D on Apple.
| | 05:19 | Now, of course, since we've duplicated
a record, you see that we've got four
| | 05:22 | total records in our database.
| | 05:23 | These two options, of course, are
how you can create new records in your
| | 05:26 | database, which are an important
building block when you're managing the data
| | 05:30 | that goes inside of your FileMaker Pro database.
| | 05:32 | These two options for either creating
or duplicating records are important
| | 05:35 | building blocks when managing the
data that goes inside of your FileMaker
| | 05:38 | Pro file.
| | Collapse this transcript |
| Editing and locking records| 00:00 | Once you have added records to your
FileMaker database, or if you've already got
| | 00:03 | records in your FileMaker database, you
have the ability to edit the data that's
| | 00:06 | already in those fields.
| | 00:08 | Now I should mention that you can
control whether or not some of your users, or
| | 00:11 | all of your users, can edit
values inside of the database.
| | 00:15 | There's something that you'll find
under File > Manage > Security, and it will
| | 00:18 | allow you to set up accounts and privileges.
| | 00:20 | Now, we are not going to be covering
that in this title, but I urge you ,if
| | 00:23 | this is of interest to you, to go
check out the FileMaker Help System under
| | 00:26 | the topic Security.
| | 00:29 | You can also prevent users from
entering a field when in Browse mode through
| | 00:32 | Field Attributes, which we'll discuss in a
later chapter on Formatting Layout Objects.
| | 00:37 | But assuming that you've allowed users
to make edits to the data that's in your
| | 00:40 | database, all they need to do
is click into one of the fields.
| | 00:44 | You'll see that it puts a border
around the active field, and puts the
| | 00:48 | position of your cursor as a blinking line,
and then they simply need to just start typing.
| | 00:53 | You'll see here I am hitting the
Delete key, and I am typing in a new value.
| | 00:57 | I can now tab to other fields, or
click into other fields if I'd like to.
| | 01:02 | You see I've just Drag+Selected the entire
contents and by typing anything into this field,
| | 01:06 | it will overwrite the previous value.
| | 01:08 | Now, once you've made a change to a
field value, and you click outside of the
| | 01:12 | record, this is what's
called committing the entry.
| | 01:15 | This is how FileMaker saves changes to
data and once the record is committed,
| | 01:19 | it's automatically saved
to your FileMaker database.
| | 01:22 | Therefore you, or your users, do not
need to save any of the changes that you've
| | 01:26 | just made, like you may
have to in other applications.
| | 01:28 | Now, keep in mind there is one
way that you can undo changes.
| | 01:31 | For example, if we go down into this
Notes field and we type in a value, before
| | 01:36 | we commit the field, there you see
we've committed this value, but now if I
| | 01:40 | make changes, I can go under the Edit
menu to undo typing, which will then change
| | 01:45 | the value that I just entered.
| | 01:47 | You can do this multiple times, as long
as the user has not committed the change.
| | 01:51 | So it doesn't allow you a lot of
recourse for updating any changes that you make
| | 01:54 | in a field, but if you can train your
users that before they commit, they can
| | 01:58 | undo the changes that they've made.
| | 02:00 | Otherwise, simply committing the record
will commit those changes to the database.
| | 02:03 | Another very important thing to know
about editing records is that only one user
| | 02:08 | can be editing a record in
a database at the same time.
| | 02:11 | This means that a user can only be
editing a single record, not the concept of
| | 02:15 | editing inside of the database.
| | 02:17 | It's very common to share your
FileMaker databases on a network,
| | 02:20 | so in that case, you may have multiple users
that are interested in working on a single record.
| | 02:24 | Let's take a look at what that would look like.
| | 02:26 | I am going to open up a new window
which is basically, just another copy of the
| | 02:29 | same database that I am currently
working on, and you'll see by going under
| | 02:33 | Window, to New Window, it's going to pop
up the same database on the same record
| | 02:38 | on the same layout, and this is just to
demonstrate two different users trying
| | 02:41 | to access the same record at the same time.
| | 02:44 | If you are interested in more details
on managing windows, feel free to take a
| | 02:47 | look at the FileMaker Help
System under Managing Windows.
| | 02:49 | Now, let's say I am a user over here,
and I've selected Record number 4, and I
| | 02:54 | click inside the field,
and I start making a change.
| | 02:57 | User number 2, who would be on another
computer, could be on Record number 1 and
| | 03:01 | you see they can click into the Notes
field, and they can start entering in
| | 03:05 | whatever kind of value that they'd like to.
| | 03:07 | Now, what if User number 2
navigates over to Record 4?
| | 03:11 | Now, you see that we have two
users modifying the same record.
| | 03:15 | What happens now if I try to click
inside this field and make a change?
| | 03:18 | I am going to hit the Delete key right now.
| | 03:19 | Now, you see a window popped up saying
the record cannot be modified in this
| | 03:23 | window, because it's already
being modified in a different window.
| | 03:26 | Now, that's a message that you see if you
have two windows open at the same time, like I do.
| | 03:30 | But the message that you'll see if you
are sharing a database is very similar,
| | 03:34 | just a slightly different wording, and
it basically says another user is already
| | 03:38 | updating this record.
| | 03:39 | This is what's called Record Locking,
and it prevents confusion while updating
| | 03:43 | records in your FileMaker database.
| | 03:44 | For example, if we allowed two users
to edit the same record or even the same
| | 03:49 | field at the same time, how's one user
going to know that their changes that
| | 03:52 | they've just entered got
completely overwritten by somebody else?
| | 03:55 | So when this record locking message
appears in a multiuser environment,
| | 03:58 | you'll see the information on the
account of the person who is making a
| | 04:02 | change, which allows you to possibly
contact that person and say, hey, are you
| | 04:05 | editing this field?
| | 04:06 | Can I get in there when you are done?
| | 04:07 | It's not a bug or anything
to work around in FileMaker.
| | 04:10 | It's actually there by design because
this is a way that two users who are
| | 04:13 | trying to edit the same record
makes only one of them aware that their
| | 04:16 | changes have been saved.
| | 04:17 | So this way the other person is going
to be restricted from making any changes,
| | 04:20 | so that there is no confusion by the
users or the database as to who got to
| | 04:24 | save the last change.
| | 04:25 | The concept of record locking is
something you'll need to be taking into
| | 04:28 | consideration when you are training
your users on updating records in your
| | 04:31 | FileMaker database when it's hosted.
| | 04:33 | It's important for you to understand
how changes can be made, and even some of
| | 04:36 | the restrictions that may occur that
prevent multiple users from editing the
| | 04:40 | same record at once.
| | Collapse this transcript |
| Deleting records and backing up files| 00:00 | In addition to adding and editing
records inside your FileMaker database,
| | 00:04 | deleting records is also pretty
easy to do, and actually it might be a
| | 00:07 | little bit too easy.
| | 00:08 | I'm going to show you how you can delete
data out of your FileMaker database and
| | 00:11 | then talk to you about some ways that
you might want to protect your database
| | 00:14 | against accidental deletions.
| | 00:15 | First, just like creating and
duplicating records, you can delete a record by
| | 00:19 | going under either the Records menu
and choosing Delete Record, or using the
| | 00:24 | corresponding Quick Key, which in Apple
would be Command+E, or in Windows would
| | 00:28 | be Ctrl+E. Or you can go under the Status
toolbar and see the button for Delete Record.
| | 00:33 | Selecting any one of these options will
delete the record that you're currently
| | 00:36 | on at the time that you perform the action.
| | 00:38 | So you see here that we're on record number 4.
| | 00:41 | So if I hit the Delete Record button,
first you'll see that FileMaker will never
| | 00:46 | just go ahead and delete the record.
| | 00:47 | It's going to first ask your user,
would you like to permanently delete this
| | 00:51 | entire record with there default option to cancel?
| | 00:54 | This is in case they unintentionally
hit the Delete button and therefore don't
| | 00:57 | have to lose the data.
| | 00:58 | Your users can easily hit the
Cancel button to not delete any records.
| | 01:02 | However, if you do choose to delete a
record, you'll notice now that your record
| | 01:06 | count, in this case went, from four
records to three records, meaning that that
| | 01:10 | record is permanently deleted
and no longer part of the database.
| | 01:13 | You can't undo a delete, either.
| | 01:15 | If you go under your Edit, you'll see
that you have Can't Undo and Can't Redo.
| | 01:19 | So there's no way to retrieve
a record once its been deleted.
| | 01:22 | Just like when you create a record,
or you edit a record in FileMaker,
| | 01:25 | deleting a record is final.
| | 01:27 | You should also be aware that under
the Records menu, right below the Delete
| | 01:32 | Record option, is an option
called Delete All Records.
| | 01:35 | This doesn't have a corresponding
Quick Key, luckily, but your users should be
| | 01:39 | aware that if they accidentally select
this option, instead of Delete Record,
| | 01:43 | they're going to see a dialog that's
supposed to be different, but to many users
| | 01:47 | might not be different enough.
| | 01:48 | You'll notice here that it says,
Permanently Delete all three records, and it's
| | 01:52 | getting that number three because
of the Found Set that we've created.
| | 01:55 | We'll talk more about Found Sets in
the chapter on Finding Records, but the
| | 01:59 | Found Set is however many records you
currently have active in the database.
| | 02:03 | If you have all records active in the
database, that means that hitting Delete
| | 02:07 | All will completely empty
out your FileMaker database.
| | 02:11 | This is a little bit too much power to
put in the hands of your users, so your
| | 02:14 | users should be cautioned during user
training to never hit Delete All, unless
| | 02:18 | they absolutely need to.
| | 02:20 | As a matter of fact, you can
configure Security to not allow users to
| | 02:23 | delete records at all, or just allow Admin
users to be able to perform delete activities.
| | 02:28 | Since the database is just a
storage container, you can imagine the bad
| | 02:32 | repercussions when it is completely emptied out.
| | 02:34 | Since we're discussing what happens
when somebody accidentally deletes your
| | 02:37 | database, it's probably a good time to
talk to you about backing up your data.
| | 02:41 | Now, there's a couple of ways
that you can back up your database,
| | 02:44 | first of which, you can go under your
File menu and choose Save Copy As, which
| | 02:48 | allows you a couple of
different options for saving copies,
| | 02:52 | either as an empty clone or a
compacted copy that contains data.
| | 02:56 | For a backup, you'll want
to choose compacted copy.
| | 02:59 | But the more common way to do
backups is through FileMaker Server.
| | 03:02 | If you're hosting your database, you
can consult the FileMaker Server Help
| | 03:06 | System to show you how to set up
something that's called a Backup Schedule.
| | 03:10 | However, if you do not host your
database on FileMaker Server, it's a good idea
| | 03:13 | to use the File > Save a Copy
As activity as often as possible.
| | 03:17 | You should never have just
one copy of the database.
| | 03:20 | You should always be employing
some type of backup mechanism.
| | 03:23 | It's very important, since the data in
your database is usually the lifeblood of
| | 03:26 | an organization, that you really need to
have some sort of backup plan in place.
| | 03:30 | When working with databases,
everyone is bound to make mistakes.
| | 03:33 | So FileMaker allows you the ability to
delete records, so that you can correct
| | 03:36 | your mistakes and therefore
maintain the integrity of your database.
| | 03:39 | However, users must use caution when
deleting records, so that you do not create
| | 03:43 | problems caused by
permanently deleting important data.
| | Collapse this transcript |
|
|
7. Importing and ExportingImporting data| 00:00 | So far in this title, we've been
working with creating one record at a time,
| | 00:04 | but the true value of a database is
to store and manage a lot of data.
| | 00:08 | The best way to get a large amount of
data into your database at one shot is to
| | 00:11 | import data from another source.
| | 00:13 | We've already discussed creating a
database from a spreadsheet, and even
| | 00:17 | importing a spreadsheet into your
database as a new table, but in this movie,
| | 00:20 | we'll discuss just importing
the data into your database.
| | 00:24 | This will also allow us to work with large
sets of data in some of the upcoming chapters.
| | 00:28 | First, let's take a look at our Products layout.
| | 00:30 | You'll notice here in Products
that we no longer have any data,
| | 00:33 | even though when we first set up this
file we imported not only the table and
| | 00:36 | field definitions, but also its data.
But for the sake of this exercise, we're
| | 00:40 | going to work with an empty Products table.
| | 00:42 | So, in order to bring data into this
table, we're going to use a function that's
| | 00:46 | called the Import function.
| | 00:47 | The Import function can be found
under the File menu by choosing File,
| | 00:51 | then Import Records.
| | 00:53 | FileMaker allows you to exchange
information with other applications by
| | 00:56 | exporting data from other file formats,
then importing that data into FileMaker Pro.
| | 01:01 | So, here we're going to assume that
we already have exported data from
| | 01:04 | another data source.
| | 01:05 | Most data applications will allow you
to create data exports, so this is a
| | 01:09 | pretty common function.
| | 01:10 | So, what I'm going to do is choose
File from the File > Import functions.
| | 01:14 | We're going to choose the
exercise folder 7/07_01.
| | 01:18 | Now, you'll also notice, in the bottom
left-hand corner, that you can choose from
| | 01:24 | various different file format types.
| | 01:26 | These are all the
compatible import source formats.
| | 01:29 | The most common are Comma-Separated
Text, or a CSV file or, a Tab-Separated
| | 01:34 | Text or a .TXT file.
| | 01:36 | Then of course, there's two options for
Excel, either the older format of Excel
| | 01:39 | or the newer XLSX format.
| | 01:42 | If FileMaker Pro does not support the
format of a particular application, you
| | 01:46 | may still be able to convert that data
by exporting data from that application
| | 01:50 | into a format that FileMaker Pro
supports, like one of these on this list.
| | 01:54 | For example, FileMaker Pro does
not import Microsoft Access files,
| | 01:58 | but you can export the data from
Microsoft Access into a format that FileMaker
| | 02:02 | Pro does support, and then
import that data into FileMaker Pro.
| | 02:06 | In this case, we're going to import
data into an empty table, or the Products
| | 02:11 | table, more specifically, and when
importing, we should exercise more caution, as
| | 02:15 | some of the Import options will
overwrite existing data and cannot be undone.
| | 02:19 | So, it's important first to pay
attention to what layout you're on when you
| | 02:23 | first invoke the Import dialog.
| | 02:25 | Here, we've purposely chosen the
Products layout, because it's based on the
| | 02:29 | table, Products, that currently has no data.
| | 02:31 | But if I was trying to import Products
data, and I happen to be on the Customers
| | 02:35 | layout, it's going to try to force that
Product data into the Customer layout.
| | 02:40 | That's not the desired
effect that we're going for here.
| | 02:43 | So, step number one is pick the context
or the layout that represents the table
| | 02:47 | for which you're trying to import data.
Then go under File > Import. Now we're
| | 02:51 | going to choose the Products.csv, which
is a Comma-Separated Text document, and
| | 02:56 | we're going to hit Open.
| | 02:57 | The first thing that you should know is
that the source file you're selecting
| | 03:00 | doesn't need to have the same number
of fields, or have fields in the same
| | 03:04 | order as the target file.
| | 03:05 | It just needs to have the same type of data.
| | 03:07 | So, in our case, this Comma-
Separated File has fields created for all the
| | 03:11 | different types of attributes for each product.
| | 03:14 | During this Import process, this Import
Field Mapping window allows you to line
| | 03:18 | up the different fields from your source
with the appropriate destination fields
| | 03:22 | inside of your target table.
| | 03:23 | Let's open up this window just a
tad, so we can see all the fields.
| | 03:26 | You'll see here that we've got the
source on the left-hand side, which is
| | 03:30 | Products.csv, and then our destination
table, which is going to be the target
| | 03:34 | where all the data is going to go.
| | 03:36 | You see that at this point, you can
change to other tables, but right now we're
| | 03:39 | going to stick with Products.
| | 03:41 | On this screen, you have a couple
of decisions that you need to make.
| | 03:43 | The first one is that double-check
to make sure that your Target table is
| | 03:46 | correct before you proceed, and you
can see here that we've got the correct
| | 03:49 | one, Products, chosen.
| | 03:50 | Then you're going to see the two sets of fields,
the one on the left, and the one on the right.
| | 03:54 | At this point, you're going to have to line
up the field, so that they actually match.
| | 03:57 | One way you can start to line them up
if you have similar field names is by
| | 04:01 | using this dropdown menu in
the bottom right-hand corner.
| | 04:04 | You can choose last order,
creation order, field names, for example.
| | 04:07 | By choosing field names, you see that
it's given us a little bit of a head start
| | 04:11 | by lining up some of them with the
data that might be in the right spot;
| | 04:15 | however, you'll see some that do have the
same name aren't lined up appropriately.
| | 04:18 | That's what these little handles are for
within FileMaker that allows to line up
| | 04:22 | these fields to the right spot.
| | 04:23 | Only the fields in your Target
side, or the right side, can be moved.
| | 04:27 | So, in the case of Cost, we'll want to
click on the Field and move the handles
| | 04:31 | up, as you see in the blue
highlight, to line up with the Cost field.
| | 04:35 | There's a couple of other ones
that would work in the same manner.
| | 04:37 | Now, in some cases, you're going to
be lining up fields that don't have
| | 04:42 | names that match exactly.
| | 04:43 | Like, for example, the fields in our
Target file, called Unit Dimensions, is going
| | 04:48 | to line up with the field from
the Source, called Dimensions.
| | 04:52 | You'll also notice that in this case,
there isn't an arrow between the two fields.
| | 04:55 | An arrow indicates that we do want to move
fields from the Source to the current table.
| | 05:01 | If we uncheck the arrow, by simply
clicking in between two fields, we'll see
| | 05:05 | that that will omit them from the Import.
| | 05:07 | So, once you're done lining up your
desired fields, you'll want to select the
| | 05:11 | values that you do want to import by
making sure they have an arrow, and
| | 05:15 | unchecking the items that do not.
| | 05:17 | You'll also notice that some fields,
like Extended Cost and Extended Price, don't
| | 05:22 | have arrows next to them and show up in gray.
| | 05:24 | That's because those are calculated
fields that you cannot put data into,
| | 05:27 | because they're evaluating data from
various other fields, and you will always
| | 05:31 | omit these from your Import.
| | 05:33 | As a matter of fact, if you try to
include them, you'll see the arrow with the
| | 05:36 | red line next to it, which as indicated
down here below, means the Target cannot
| | 05:40 | receive data into this field.
| | 05:42 | So, we'll make sure that
those are all turned off.
| | 05:45 | Now, once you have all your fields
lined up between the Source and the Target,
| | 05:48 | you'll need to choose whether or
not to import the first record.
| | 05:51 | You'll see that option here in the
bottom left-hand corner of your window,
| | 05:55 | and you'll choose that option if the Source
file uses the first record as column headers.
| | 06:00 | Many times, you'll see this with
spreadsheets that use the first row to identify
| | 06:04 | what the column header names will be.
| | 06:06 | In our example, our first row is the
column header information, so we do want to
| | 06:10 | check this option, so that we don't
import a record that has the words Dimension,
| | 06:14 | or Description or Price inside the
appropriate fields in our new product table.
| | 06:18 | If you get all the way to this stage,
and you realize that in your current table
| | 06:22 | you don't have a field for you to be
able to map up with one of the Source
| | 06:25 | fields, you can always go down to the
bottom right-hand corner and hit your
| | 06:28 | Manage Database button, which will bring
up the Manage Database and go right to
| | 06:32 | Fields and allow you to create a new field.
| | 06:34 | Once that new field is created, you'll
see that on the Target Fields list, and
| | 06:38 | then you can match up your Source
field with the new field you've created.
| | 06:42 | This makes it so that you don't have to
close out this window and start all over
| | 06:45 | again, just because you've forgotten a field.
| | 06:47 | Now we're ready to import, so
we're going to hit the Import button.
| | 06:50 | Before it proceeds with the import,
you're going to see the Import
| | 06:53 | Options window up here.
| | 06:54 | The main decision to make here is
on the top, whether or not to perform
| | 06:58 | autoenter options while importing.
| | 07:00 | If you recall when we discussed
setting up autoenter options, anytime a new
| | 07:04 | record is created, things like Date
Created or serial values like Primary Keys
| | 07:09 | can be automatically
populated for every new record.
| | 07:12 | Since, in this case, we're actually
going to be creating a new record in our
| | 07:15 | database for every record that exists
in the source, we have the option here to
| | 07:19 | say whether or not our
autoentry values should be triggered.
| | 07:22 | In this example, we actually do want to
check the box, so that our Primary Key
| | 07:26 | values, or our _pkProductID values, will
continue to serialize, and at the same
| | 07:31 | time FileMaker's internal counter
will be updated to the new serial value
| | 07:36 | reflected by the total number of records
we're importing into the Product table.
| | 07:40 | After we hit Import, we then see
something called the Import Summary.
| | 07:43 | This shows the total number of fields that were
imported, or any errors that may have occurred.
| | 07:48 | An error would indicate that it did
not import a record, because one of the
| | 07:52 | fields had violated a validation setting,
| | 07:54 | for example, if you set up a field in
your database, to only accept nonempty
| | 07:59 | values into a Product Name field, then
those records from your source will be
| | 08:04 | skipped during the import
if they do contain no value.
| | 08:07 | However, if your Validation setting is
set to Only during data entry, then they
| | 08:11 | will be included in the import
and will not show up as an error.
| | 08:15 | Once we dismiss this summary, we hit
OK, and now we see that we've got 30
| | 08:19 | records in our new Products table.
| | 08:21 | FileMaker not only added the new
records, and lined up all the fields as
| | 08:25 | we've instructed, but you can see
here, it automatically created serial
| | 08:29 | values for every product.
| | 08:30 | If we go under the File > Manage >
Database, double-click on the _pkProductID,
| | 08:36 | we'll see that it's also updated the
new value with the new number of records
| | 08:40 | that are in our database.
| | 08:41 | You'll also see that it's created what's
called a Found Set that includes all of
| | 08:45 | the records that we imported in.
| | 08:46 | This way, if we already had, let's say,
a thousand records in the database, and
| | 08:49 | we import in 30, it doesn't mix them
with the general population of data until
| | 08:54 | we get to approve them one last time.
| | 08:56 | That way, we could go under Records >
Delete Found Records, and delete the newly
| | 09:00 | imported records, in case we've done
something wrong during the import process.
| | 09:04 | Now, we're going to do one more
example of the imports to show a
| | 09:06 | little different method.
| | 09:07 | We'll do it a little bit quicker this
time, File > Import Records, the same way
| | 09:11 | as we had done before.
| | 09:12 | This time, we're going to select
FileMaker Pro Files, and we're going to choose
| | 09:16 | a FileMaker file called Products_Plants.
| | 09:19 | I wanted to show you this option,
because importing from other FileMaker
| | 09:22 | databases where the fields
match is a lot easier of a process.
| | 09:27 | We simply then choose this matching
names option, and all of the fields
| | 09:30 | automatically sync up with their
appropriate fields from the source.
| | 09:34 | Now we hit Import,
perform autoenter options again.
| | 09:37 | And this time you'll see we have no
errors, but ten new records were created,
| | 09:40 | and the ten new records that were
imported are isolated as a Found Set, giving
| | 09:44 | us an opportunity to delete
these records if we need to.
| | 09:48 | The true value of a database is to store
and manage as much data as you can, and
| | 09:52 | the best way to get a large amount of
data into your database at one time is to
| | 09:55 | use the Import functionality.
| | Collapse this transcript |
| Importing records to refresh data| 00:00 | In previous movies, we've discussed how to
import large data sets from other data sources.
| | 00:05 | You can also import data into your
tables repeatedly using the same data source
| | 00:09 | in order to obtain certain updates to
the fields within your target table.
| | 00:13 | In this video we're going to do some
initial steps of data import, and then I'm
| | 00:16 | going to show you how to use
another data import to refresh data.
| | 00:19 | First, we're going to start with
importing records into our Customer table.
| | 00:22 | Since we've done this already in a
previous movie, we're going to move through
| | 00:25 | these steps a little quickly.
| | 00:26 | This time we'll start with the
Customers table as our target; therefore we
| | 00:30 | will navigate to the Customers layout.
| | 00:31 | Once we've chosen our target, we go to
File > Import and choose File, and from
| | 00:37 | our Exercise Files we're going to
choose the Customers Excel spreadsheet.
| | 00:45 | Now we are going to choose the option
for Field Names, and now were going to
| | 00:50 | line up the Field Names on the left-
hand side, which is our source, with the
| | 00:54 | right-hand side fields,
which are our current table.
| | 01:00 | Now once we've lined up all the fields
from our source with the fields from our
| | 01:03 | target, we're going to want to go and
omit all the fields we don't want to
| | 01:07 | import by making sure that the arrow
between the two fields is not selected.
| | 01:13 | Now let's hit Import, and in this case
we're going to choose to perform the
| | 01:17 | autoenter option so that
our primary keys get updated.
| | 01:20 | After a moment we see that we've
imported in 1,524 records into our database.
| | 01:26 | We hit OK, and now we notice that we have
brought in the first record of just Field Names.
| | 01:31 | Now in this case, we can just hit
Delete Record and delete the one record.
| | 01:36 | But now that we see we've got all the
other records that we've imported in
| | 01:40 | from our import source.
| | 01:41 | Now let's take a look at
the Import Source for second.
| | 01:44 | Here we see all of the data that we've
imported into our FileMaker database.
| | 01:47 | Now in this example, let's say that we're
working with an import source that gets
| | 01:51 | created from another application on a
daily basis, but sometimes the data from
| | 01:55 | the import source changes.
| | 01:57 | Let's say, for example, we go
in to a couple of Notes fields.
| | 02:10 | We've made those changes, and we add
a last name to one of the records.
| | 02:15 | We'll hit Save on the source.
| | 02:17 | Now back in FileMaker, we can see
those same records in our database.
| | 02:22 | We see that there is no Notes field in
the first record, no notes in the second,
| | 02:26 | no notes in third and on
number four, there's no last name.
| | 02:32 | So one way we can maintain the records
that we've got inside of our FileMaker
| | 02:37 | database, but still bring in only the
updates from a source file, is also through
| | 02:42 | the Import activity.
| | 02:43 | So what we're going to do is
we're going to perform another Import.
| | 02:46 | We'll go to File > Import
Records and choose File again.
| | 02:51 | We're going to point to the same import
source, and when we hit Open, it's going
| | 02:56 | to bring us back to our
Import Field Mapping dialog.
| | 02:58 | The good news is in this case,
FileMaker remembers what our last order was, so
| | 03:02 | we don't have to go through the
activity of matching up these fields.
| | 03:05 | But now in this case you see
down in the Import Action, we've got
| | 03:08 | three different options.
| | 03:09 | We're going to choose one of these other
options to allow to use do this import.
| | 03:13 | The three different options that are
available to us include adding new records
| | 03:16 | from the source file, which is really a
default import, and that's what we've
| | 03:19 | done in our previous movies.
| | 03:21 | You'll notice though at the bottom
there's an option that's called Update
| | 03:24 | matching records in found set.
| | 03:26 | With this selected, you can update
matching records and fields in your target
| | 03:29 | file with data from another file.
| | 03:32 | After selecting this option, we go back
up into the Import Field Mapping area,
| | 03:36 | and now we will only select the
fields that we want to update.
| | 03:39 | So, for example, we've only made
changes to notes and last name, so let's
| | 03:44 | uncheck all the other fields.
| | 03:46 | You'll notice now also when you first click on
one of these fields, you get this double arrow.
| | 03:51 | We will see down here that's one of the
match records based on this field options.
| | 03:55 | We'll get to that in a second.
| | 03:56 | So we want to click every field twice that
we do not want to include in this update.
| | 04:01 | Now you see we've only indicated the
last name and the notes fields as the
| | 04:05 | fields that we want to update on this import.
| | 04:07 | When you have the Update matching
records in found set option selected, you also
| | 04:11 | need to determine what the match fields are.
| | 04:13 | If the data in a match field of a
record in the target file matches the data in
| | 04:17 | the match fields selected of the
record in the source file, then that record
| | 04:22 | will be chosen to update.
| | 04:23 | So, for example, if we happened to
choose a value that we feel will be unique
| | 04:27 | in each record, let's say, for example,
AddressEmail, when we first click on it
| | 04:33 | we get the arrow which would just
simply include it in our updates, but if we
| | 04:36 | click on it again we get the double
arrow, indicating that this is a match
| | 04:39 | record based on this field.
| | 04:41 | The match fields you choose must
uniquely identify each record in your database.
| | 04:45 | For example, in a database of people
you could use just one match field like
| | 04:49 | this Email, or we could
use a combination of fields.
| | 04:52 | For example, if the Email matches and
the First Name matches, then we know
| | 04:57 | we've got a match record.
| | 04:58 | In that case, only will the updates in
the two fields that we've chosen in the
| | 05:01 | source file be pushed over into the target file.
| | 05:04 | You'll also notice when you choose
Update matching records in found set that
| | 05:07 | you've got another option here to
check: Add remaining data as new records.
| | 05:11 | That means if you've added new records
in your source file, and they do not have
| | 05:15 | a match in your current table,
| | 05:16 | the new records will be added
each time you refresh via import.
| | 05:19 | We don't have any new records in
our source file, but this is a good
| | 05:22 | default option to check.
| | 05:24 | You'll also see that we're going to
make sure to omit the first record, to
| | 05:27 | only bring in the data so that we don't have
field names represented at one of our records.
| | 05:31 | Now when we hit Import, we get the
same message, Perform autoenter options.
| | 05:37 | In this case, we don't want to perform
any autoenter options because we haven't
| | 05:40 | chosen any fields that have
autoenter associated with them.
| | 05:43 | We only have the Notes field and the
Last Name, so in this case, it really won't
| | 05:47 | perform any tasks for us
anyway, so we'll just turn it off.
| | 05:50 | We hit Import, and now when you read
this message, it does say, You've just
| | 05:54 | imported in 1,523 records.
| | 05:56 | But if you hit OK and you look, you'll
notice that you haven't increased anymore.
| | 06:00 | You had 1,526 records in the database
before, but now you have a Found Set of 1,523.
| | 06:06 | That's because over in your source file,
we see we've got 1,524 records, with the
| | 06:12 | first row counting as the column headers.
| | 06:14 | What we're seeing here is that a
Found Set will be created with all of the
| | 06:17 | records that were determined to have the match.
| | 06:19 | Now the more interesting thing that's
happening here is now we'll notice, in the
| | 06:23 | notes fields, that previously didn't have
a data for the first three records that
| | 06:27 | we've got all the data from
the updates from the source file.
| | 06:30 | Also, in record number 10, we
notice that a last name has been added.
| | 06:35 | So this process can be very useful, for
example, if you might have a copy of a
| | 06:38 | database on your desktop computer and
another copy on your laptop computer.
| | 06:42 | You can update some of the files in
your office with the changes that you make
| | 06:44 | on the road, or you can just select
some of the fields to update while leaving
| | 06:48 | the records in fields to do not
select untouched within your database.
| | 06:52 | This is a great way to refresh data
inside your FileMaker database with updates
| | 06:56 | from a source file that could be
FileMaker database, Excel or any other
| | 07:00 | supported import format.
| | Collapse this transcript |
| Exporting data| 00:00 | FileMaker Pro allows many
sophisticated ways to connect to other
| | 00:03 | non-FileMaker data sources.
| | 00:05 | However, sometimes you might want to
just share some of your data without a
| | 00:08 | direct connection to those sources.
| | 00:10 | In these cases, you can use
FileMaker's ability to export data out of your
| | 00:14 | FileMaker database in order to share.
| | 00:16 | You can export FileMaker data to a
new file and then open that up in
| | 00:20 | another application, or use that file as an
import source to import into the other application.
| | 00:25 | So in this movie, we are going
to take a look at exporting.
| | 00:27 | First, if we take a look at the file,
we see that we are in the Customers
| | 00:30 | layout, and we also see that we've
got 1,523 records in our database.
| | 00:34 | Now, these are important, because if
we do export right now, it's going to
| | 00:38 | export out customer information.
| | 00:40 | But if we navigate over to the Products
table, for example, it's going to export
| | 00:44 | out the product information.
| | 00:46 | It's important that you first choose a
layout that's based on the table that has
| | 00:49 | data you want to export before you
even initiate the Export command.
| | 00:53 | The other thing is that FileMaker will
only export the amount of records that
| | 00:56 | are in a current Found set.
| | 00:58 | So, for example here, you see that
in Products, we've only got 10 records
| | 01:02 | chosen, even though we have 40
total records stored in the database.
| | 01:05 | If we perform an export right now on this
layout, only 10 records will be exported.
| | 01:10 | But if we go back to the Customers
layout and then go to File > Export Records,
| | 01:15 | we see that we have the Export
Records to File window appearing.
| | 01:19 | Here we've got a couple
of options to choose from.
| | 01:21 | First, what are we going to
name the file we're exporting?
| | 01:23 | We will call this one Export.
| | 01:26 | And where do we want to save it?
| | 01:27 | We will choose Desktop.
| | 01:29 | Then you want to choose the File Format.
| | 01:31 | If we click on this dropdown, we see
the different File Format types that we
| | 01:35 | have to choose from.
| | 01:36 | FileMaker allows you to export out as text
files or some specialized Merge or DBF files.
| | 01:43 | You can also export a Found set of
data out as an HTML Table, which could be
| | 01:47 | useful if you are building a static Web page.
| | 01:49 | You can also export data out of
FileMaker into another FileMaker Pro file, which
| | 01:54 | can be useful to create backups, and if
the application that you're sharing data
| | 01:58 | with imports XML data, you can choose
the XML option, leaving us with the two
| | 02:02 | other Excel Export options.
| | 02:04 | Here we are going to choose Comma-
Separated Text, which then appends the name
| | 02:08 | of our file with .CSV.
| | 02:10 | These are the most common types of
File Formats that are able to be imported
| | 02:14 | into other non-FileMaker data sources.
| | 02:16 | Now we hit Save, and we are presented with
the Specify Field Order for Export window.
| | 02:21 | You see here on the left-hand side of
this window that we have a dropdown that
| | 02:25 | lets us choose from any of the
different tables that we had in our database.
| | 02:28 | We will keep it on the Current Table, but
you also see that it's on the Current Layout.
| | 02:32 | Sometimes you have a layout that has
only a subset of the fields in your table.
| | 02:36 | In this case, we happen to have all of them.
| | 02:38 | But it might be easier for you to
export files out if there's a smaller amount
| | 02:42 | of fields to choose from.
| | 02:43 | But in this case, let's say that we want
to just export out our customer mailing
| | 02:46 | information, so it can be
uploaded to a bulk mailing system.
| | 02:49 | So in that case what we do is we will
choose fields, on the left-hand window, that
| | 02:53 | we want to include as part of this export.
| | 02:55 | Here you see when I select AddressCity,
I can choose the Move button, or I can
| | 03:00 | double-click on a field, or I can click
on a field, hold down the Shift key and
| | 03:06 | hit Move, and we see both
fields that I had selected moved.
| | 03:09 | Now, once you see the fields in the
Field export order, I can select one and use
| | 03:14 | the handles to move them into a specific order.
| | 03:16 | I can do CompanyName first,
Street, City, State, and Zip.
| | 03:21 | Also, if you make a mistake, you can
always hit Clear and then go back and add
| | 03:25 | more fields after that.
| | 03:26 | Once you have selected all of the fields,
you can choose the Export button, and
| | 03:30 | now we see that we've got our export
file on our desktop, and opening up this
| | 03:34 | file will show that we've exported out
all of the records, but only the fields
| | 03:39 | that we've chosen during the export process.
| | 03:42 | You can export out as many times as
you would like out of your FileMaker
| | 03:45 | database, in whatever way that you
choose, without any risk of changing or
| | 03:49 | deleting the data in the original
file, unlike importing, where each time
| | 03:53 | you import, you're adding more records or
changing existing records in your database.
| | 03:57 | The importing and exporting
features can serve as valuable time-saving
| | 04:01 | functions, especially when you're
working with large sets of data or have users
| | 04:04 | without access to FileMaker Pro.
| | Collapse this transcript |
|
|
8. Creating LayoutsUnderstanding layouts | 00:00 | FileMaker Pro developers spend a
significant amount of time working with
| | 00:03 | layouts because layouts are the
primary way of presenting and organizing
| | 00:08 | data in FileMaker Pro.
| | 00:10 | Layouts serve both as user interfaces, as
well as areas for design and development.
| | 00:14 | Throughout this chapter, you're
going to learn how to work efficiently
| | 00:17 | and effectively with layouts,
which is an essential skill for any
| | 00:20 | FileMaker developer.
| | 00:21 | Layouts come in various shapes and
forms, and can be rather simple or extremely
| | 00:25 | detailed, all depending on the needs of
the particular system that you're trying
| | 00:28 | to create, as well as the aesthetic
sense and design skills of the creator.
| | 00:33 | Generally speaking, FileMaker is going to
have one of three different layout types.
| | 00:38 | First, you're going to see that there's
a Form View, which is what we're looking
| | 00:41 | at here with Customers.
| | 00:43 | The Form View is different from any
other type of layout, because the Form View
| | 00:47 | will only show one record at a time.
| | 00:48 | But it's generally a good idea for
you to have at least one Form View per
| | 00:52 | primary table in your database.
| | 00:55 | This way you're giving users a good
place to do data entry, to do searches, or
| | 00:59 | to edit data onscreen, or if they
just want to see the most amount of
| | 01:02 | information onscreen at a time, most
likely you're going to use a Form View.
| | 01:06 | Commonly, these layouts are
referred to as Detail layouts.
| | 01:10 | Also, it's common to have a List View.
| | 01:13 | You see we've got Customers as a detail,
but we can also click on List View.
| | 01:19 | List View just simply changes the
property of a layout, and allows us to scroll
| | 01:23 | through and see many different
records onscreen at any given time.
| | 01:27 | Finally, other types of reports can be
made up of Table Views, which is really
| | 01:32 | just another way to view many different
records in a List View, but developers
| | 01:36 | also like to call certain layouts reports.
| | 01:39 | Reports are layouts that are specific
ways to view and output FileMaker data.
| | 01:44 | Layouts are the primary user interface
and display mechanisms in FileMaker Pro,
| | 01:48 | and each individual data entry screen,
List View or Report, is going to be a
| | 01:52 | separate layout within your database system.
| | 01:56 | You can see here that this one
FileMaker file has four different layouts.
| | 02:00 | In some applications, you might need
only a handful of layouts, and in other
| | 02:04 | applications you might need several hundred.
| | 02:06 | There is no practical limit to the number of
layouts that you can create in a database file;
| | 02:10 | it all depends really on what you need to do.
| | 02:13 | Later on in the movies in this chapter,
we're going to create Detail layouts for
| | 02:16 | each primary table, and then a
corresponding List View, and then in the
| | 02:19 | Reporting section, we'll create reports.
| | 02:22 | In order to create a report, you
must do so when you're in Layout mode.
| | 02:27 | Once in Layout mode, you'll see that
the Records menu changes to Layouts,
| | 02:31 | and allows you various different options
where there used to be options for your Records.
| | 02:35 | Here, you can create a new layout,
duplicate a layout or delete a layout, or
| | 02:40 | even navigate to the various
different layouts that you currently have.
| | 02:43 | You can restrict a user's ability to
access Layout mode by changing the settings
| | 02:47 | in his or her privilege set.
| | 02:49 | For more information on this, see
Security under FileMaker Help for details.
| | 02:54 | As a FileMaker developer, you'll spend
a lot of time going between Layout mode
| | 02:58 | and Browse mode, modifying your layouts.
| | 03:00 | There are a couple of
different ways that you can do that,
| | 03:03 | first of which, you can go under the
View menu, or you can use one of the
| | 03:07 | shortcuts that's available to you, or
you'll notice on the very bottom of your
| | 03:11 | layout, you can toggle between the
modes by simply choosing the mode that you
| | 03:15 | want to navigate towards.
| | 03:16 | However, you'll find that probably the most
efficient way is by using a keyboard shortcut.
| | 03:21 | Now, you see that we have four different
layouts already created in our database.
| | 03:26 | We haven't created any of those
layouts, but what we did is we created new
| | 03:29 | tables in this database.
| | 03:31 | Every time you create a new table,
FileMaker will automatically create a
| | 03:35 | form layout for you.
| | 03:36 | If you create all the tables at once
and define all those fields, it will also
| | 03:40 | place all the fields onto that layout as well.
| | 03:43 | So, you see we have the four default
Form View layouts created already for us.
| | 03:48 | If you want to create a new one, you go
into Layout mode and create new layout.
| | 03:52 | In the following movies, we're going to
explore how to create List layouts for
| | 03:55 | each one of our primary layouts, as
well as some specialty ones, like Mailing
| | 03:59 | Labels and Envelope layouts.
| | 04:01 | Because layouts are the primary way
of presenting and organizing data in
| | 04:04 | FileMaker Pro, and layouts serve both
as user interfaces as well as areas for
| | 04:08 | design and development, you'll spend a
significant amount of time working with
| | 04:11 | layouts, and you'll want to be
familiar with the concept of a layout.
| | Collapse this transcript |
| Using the Layout Assistant to create List views| 00:00 | We've talked about the different types
of layouts that you traditionally create
| | 00:03 | inside of FileMaker databases,
| | 00:05 | one of which is a Form layout, which is
called the Detail View, which displays
| | 00:09 | all the fields possible onscreen at a time.
| | 00:11 | But there's another field
type that's called a List View.
| | 00:14 | List View is not only a way to view
your layouts and records, but it's also a
| | 00:19 | way that you can create a layout in
order to show the maximum amount of records
| | 00:23 | onscreen at a given time.
| | 00:24 | Perhaps you want to create one of
these List Views, or maybe you just want to
| | 00:27 | display the same data with a
different look or functionality, but in either
| | 00:30 | case, you'll need to create a new layout.
| | 00:33 | So, let's say that we want to create a
List View for each one of the primary
| | 00:36 | tables in our database.
| | 00:37 | We'll begin by first going into Layout mode.
| | 00:41 | There are various different
ways you can enter Layout mode.
| | 00:43 | You can go under the View menu and
choose Layout mode, or use the shortcut key,
| | 00:47 | which is Command+L on Mac, or Ctrl+L on Windows.
| | 00:52 | In either case, this
will get you to Layout mode.
| | 00:55 | Once you're in Layout mode, you can go under
the Layouts menu and choose New Layout/Report.
| | 01:00 | You can use your quick keys for
Ctrl+N or Command+N, or hit the New
| | 01:04 | Layout/Report button.
| | 01:06 | This pops up the New Layout/Report
dialog window, which is very useful for
| | 01:10 | creating various different types of layouts.
| | 01:12 | You'll see that on this screen, you've
got a couple of different decisions to make.
| | 01:15 | The first one is the most important.
| | 01:17 | When you're creating a layout, the
first and most important thing that you need
| | 01:21 | to specify is what's called
the context of the layout.
| | 01:25 | This is the term for what
table the layout will be based on.
| | 01:28 | Every layout in your FileMaker database has to
be based on one of the tables in your database.
| | 01:34 | So, for example, what we're trying to
do here is to create a List View for each
| | 01:37 | of the primary tables.
| | 01:38 | Since we already have a Form, or Detail
View for customers, we're going to first
| | 01:42 | start off by creating a List View for customers.
| | 01:44 | So, that means that this layout will
need to be based on the table, Customers.
| | 01:49 | So, this is the first time we're
seeing in our FileMaker database that we're
| | 01:52 | creating two layouts based on the same table.
| | 01:54 | Again, you can create an unlimited
amount of layouts in your database, and an
| | 01:58 | unlimited amount based on any given table.
| | 02:00 | So, in this case, we'll choose Customers,
and the next decision we're going to
| | 02:03 | make is what we're going to name the layout.
| | 02:05 | Here, we'll call this layout Customer
List, to make it obvious to our users.
| | 02:10 | Then we're going to choose whether or
not this layout will appear in the Layout
| | 02:13 | dropdown list in Browse mode.
| | 02:15 | All layouts will appear in the Layout
dropdown list in Layout mode, so that
| | 02:19 | you can access them and manipulate
them accordingly, but only some of them
| | 02:22 | will appear in Browse mode, and those are
the ones where you have this option checked.
| | 02:26 | We want all of our users to be able to
use the Customer List, so we'll leave
| | 02:29 | this option selected.
| | 02:31 | Next, we need to select a layout type.
| | 02:33 | We've got various different
layout types to choose from.
| | 02:36 | We've got the Standard form, which
allows us to create a Form View or a
| | 02:40 | Detail View layout.
| | 02:41 | We've got Table View, which allows us
to create a spreadsheet type view with
| | 02:44 | multiple records onscreen at a time.
| | 02:46 | Similarly, a List View will also give
us multiple records onscreen at a time,
| | 02:50 | but it won't appear as
though it's a spreadsheet.
| | 02:52 | We've also got Reports, Blank layouts,
Labels, and Envelopes, all of which we'll
| | 02:57 | use in upcoming movies.
| | 02:59 | In this case, we're going to
choose List view, since we're creating a
| | 03:01 | Customer List view.
| | 03:03 | We see, as we choose each one of them,
our preview option changes on the right.
| | 03:07 | This gives us a little bit of an idea
of what our layout is going to look like
| | 03:10 | when we're finished.
| | 03:11 | The other option when you choose
List view is whether or not you want to
| | 03:14 | constrain the columns to a page width.
| | 03:16 | Here, you would have the print
driver cutoff area on your layout, and if
| | 03:20 | you choose to constrain, it's going to wrap
your List view around and give you multiple rows.
| | 03:25 | In the majority of the cases when you
create a List view, you're only going to
| | 03:29 | want to have one row of information.
| | 03:31 | This way, you can maximize the amount
of data that you can fit onscreen for
| | 03:34 | either printing off various different
records, or just viewing as many onscreen
| | 03:38 | at a time as you can.
| | 03:39 | So, we're not going to choose
Constrain columns to page width.
| | 03:43 | We're just going to make sure that we
only put as many columns that will fit
| | 03:46 | on one printed layout.
| | 03:48 | Hitting the Next button allows us
to specify the fields that we want to
| | 03:53 | include in our List view.
| | 03:54 | Now, as I mentioned before, it's
pretty traditional to create a List view for
| | 03:58 | every primary table that
you have in your database.
| | 04:00 | This will be helpful when you're
doing things like searching, or printing
| | 04:03 | multiple records, but the key on a List
view is that it's only going to have a
| | 04:06 | subset of the fields.
| | 04:08 | It will have enough fields for you
to identify whether this is the record
| | 04:11 | you're looking for.
| | 04:12 | Then when you select that record, you
can then navigate over to a Form view to
| | 04:15 | be able see all of the fields available.
| | 04:17 | So, when you're selecting fields for
your List view, choose fields that will
| | 04:20 | help you identify this record
over other records in the found set.
| | 04:24 | In this case, we'll pick things like
AddressCity, and if I select it and hit the
| | 04:28 | Move button, you see it show up in
our Fields shown on layout/report.
| | 04:32 | You can also just double-click on a field
to easily get it over to the other side.
| | 04:36 | So, we'll click State, Name, or choose
NameFirst, and hold down the Shift key in
| | 04:42 | NameLast, and hit Move, and you see
both of them go over at the same time, and
| | 04:48 | Title, and let's just say the
last one we pick is AddressEmail.
| | 04:52 | Just like other windows that you've seen
that are similar, you can choose one of
| | 04:56 | these items, and then grab the
handles and move it to the top of the list.
| | 05:00 | This will be the order in which the
fields appear as columns from left to right.
| | 05:10 | Once we've got all the fields, and in the
order that we want, we can hit the Next button.
| | 05:15 | Next, you'll see the option for
choosing the record that you want to sort by.
| | 05:18 | When you're in List view, you're going
to see your records sorted in a certain
| | 05:21 | way, and this is where you choose the
field that you want to sort them by.
| | 05:25 | Let's say, in this case, we'll
pick CompanyName, and hit Move.
| | 05:29 | Also, while we have the fields sorted,
we want to choose whether or not we're
| | 05:31 | going to see them displayed in
ascending or descending order.
| | 05:35 | We'll talk more about sorting
options in the chapter on sorting.
| | 05:38 | For now, we'll hit Next, and you
see we move on to select the theme.
| | 05:43 | FileMaker ships with many pre-designed
themes, but the majority of the time you
| | 05:49 | can use FileMaker's Layout tools to
design the layout just the way you like.
| | 05:52 | So, you'll just end up
choosing Default or the Standard.
| | 05:55 | In this case, they're both the same,
but if I've made changes to one of my
| | 05:58 | existing layouts, it's
going to be saved as a default.
| | 06:01 | That way, I can apply that same
layout style to any new layouts I create.
| | 06:05 | For now, we'll just
choose Standard, and hit Next.
| | 06:08 | On the next screen, you see
we've got something called Header and
| | 06:10 | Footer Information.
| | 06:12 | This allows us to choose different
pieces of static data that could appear in
| | 06:15 | our header, which is the part at the
top of the screen, or in our Footer, which
| | 06:20 | is a layout part on the bottom.
| | 06:22 | We'll choose Page Number in the
bottom right-hand corner, and hit Next.
| | 06:28 | The final option allows us to
choose whether we want a script made.
| | 06:32 | We haven't covered script yet, so
we'll skip this until a later chapter.
| | 06:36 | When you're done, you can choose
whether or not you're going to view your
| | 06:39 | layout in Browse mode, so that you can
see the data, or in Layout mode, so you
| | 06:43 | can make further changes.
| | 06:44 | Let's go into Layout mode, and hit Finish.
| | 06:47 | Now you see that I've got a new layout.
| | 06:50 | The main thing that you'll notice is
that the part that's called the body, which
| | 06:54 | is where all the fields exist, is very
short, compared to our Customer layout,
| | 07:00 | where the body is much taller.
| | 07:01 | You see in the Customer List, it's very short.
| | 07:05 | This is what allows many records to
appear on one layout at a given time.
| | 07:09 | When we look at this in Browse mode,
we can now see that we get multiple
| | 07:14 | different records onscreen at a given
time, making it easier for us to view all
| | 07:18 | of the different records in either
a Found Set or a printable layout.
| | 07:22 | The other thing that you'll notice is
the reason that we do see multiple records
| | 07:25 | onscreen is not only because the body
part is so much shorter, but also because
| | 07:29 | we've chosen View As a list.
| | 07:32 | If we didn't have View As a list, we
would just see one record onscreen at a
| | 07:36 | time with a very short body.
| | 07:37 | We'll make sure that any List view
that we create still has List view
| | 07:42 | associated with it.
| | 07:43 | In the next exercise file, you'll see
that I will have created Product list and
| | 07:47 | Invoice list layouts.
| | 07:48 | You can do the same thing as
additional practice, if you like.
| | 07:51 | Because layouts are the primary way
that your users will interact with your
| | 07:54 | data, the Layout Assistant is a great
way to quickly create new layouts for
| | 07:58 | your system.
| | Collapse this transcript |
| Using the Layout Assistant to create labels and envelopes| 00:00 | In a previous movie we looked at using the
Layout Assistant to create a new List View.
| | 00:05 | You can also use the Layout Assistant
to quickly create specialized layouts,
| | 00:09 | like mailing labels or envelopes.
| | 00:11 | FileMaker has labels and envelope sizes
built right into the Assistant to make
| | 00:15 | creating layouts very easy.
| | 00:17 | In this movie, we will create
customer mailing labels and customer mailing
| | 00:20 | envelopes using the Layout Assistant.
| | 00:22 | So first we are going to start by
going to our Customers table and creating a
| | 00:26 | new customer labels layout.
| | 00:28 | In order to do this, we will have to
first enter Layout mode, because that's the
| | 00:32 | first step in creating a new layout.
| | 00:34 | Then we will invoke the new Layout
Assistant, in this case by hitting the button
| | 00:39 | in the Status toolbar.
| | 00:40 | And then of course we go through
our decisions that we need to make.
| | 00:43 | What's the context of this layout?
| | 00:44 | Since it's going to be customer
mailing labels, we will keep it on Customers.
| | 00:48 | Then we need to come up with a name,
and we will call it Customer Mailing
| | 00:55 | Labels, and choose to Include it in our layouts.
| | 00:58 | Now we have to choose the layout type.
| | 01:01 | If you notice all the way down on the
bottom, we have an option for Labels.
| | 01:04 | There are actually two Labels in here.
| | 01:07 | Vertical labels is for Japanese format only.
| | 01:10 | So we are going to check Labels, and
we see in the preview that this gives us
| | 01:14 | mailing label type layouts.
| | 01:16 | We are going to hit Next, and you will
notice that the next view here, we can do
| | 01:21 | one of two different things.
| | 01:22 | We can use custom measurements to
determine the total number of columns of
| | 01:26 | labels across, as well as
the width and height in inches.
| | 01:30 | We can also manipulate
our page margins, if need be.
| | 01:34 | But the most common thing to do is
use the label measurement for one of the
| | 01:37 | templates that's stored within FileMaker.
| | 01:39 | You will notice that FileMaker stores
layout default sizes for almost every
| | 01:44 | single Avery label format available.
| | 01:46 | You will see also that you've got
options for DYMO labels, as well.
| | 01:51 | DYMO and Avery are some of the leading
producers of labels that you can buy at
| | 01:55 | office supply stores.
| | 01:56 | We will keep it on Avery 5160, which is
one of the more popular label layout options.
| | 02:02 | Hit Next, and now we are going to
choose the fields that we want to have
| | 02:05 | appear inside each label.
| | 02:07 | But this is a little bit different than
other layouts that we will create using
| | 02:10 | this Layout Assistant, because when
we choose the fields, they're going to
| | 02:13 | appear inside this Label Contents box,
which we can manipulate. I will show you.
| | 02:18 | First, let's pick the fields
that we want to have appear.
| | 02:21 | Let's say, first CompanyName,
and we will hit Add Field.
| | 02:25 | Now, you will notice
something kind of peculiar here.
| | 02:27 | We've got the double
brackets on each side of the name.
| | 02:30 | This indicates that this is
what's called a merge field.
| | 02:33 | So this entire text area is just going
to be filled with merge fields, which is
| | 02:36 | kind of cool, because it allows us
to format them as text and also to put
| | 02:40 | different text characters in
between the different values.
| | 02:43 | For example, here, we are going to
actually hit the Return character on our
| | 02:46 | keyboard to start another line, and then
we are going to pick AddressStreet, and
| | 02:51 | we are going to hit Return again.
| | 02:55 | Then we will choose AddressCity, but
this time we will put a comma after it and
| | 02:59 | a space, followed by AddressState,
a space and then AddressZip.
| | 03:06 | So in this case what we are doing is
we are treating these fields just like
| | 03:09 | they are placeholders, but in text
format, allowing us to put spaces, return
| | 03:14 | characters, add commas, and when we get
into Layout mode, we can even add text
| | 03:17 | formatting to them.
| | 03:19 | So now we are going to hit Next.
| | 03:20 | And now that we're finished, we can look
at this in Preview mode or in Layout mode.
| | 03:25 | Let's go into Layout mode first.
| | 03:26 | We will hit Finish.
| | 03:28 | Now, you will notice that this is a
unique type of layout, because its grayed
| | 03:32 | out the two columns to the right.
| | 03:33 | We've chosen Avery 5160 labels, which
is three columns, three vertical columns,
| | 03:39 | and FileMaker only allows us to
manipulate the furthest left column, because of
| | 03:43 | course whatever we put in that column is
going to show up in the others as well,
| | 03:46 | it just wraps around
vertically from column to column.
| | 03:49 | You'll see it's one big textbox and
when we double-click on it, we can use our
| | 03:54 | cursor, which is now using the Layout
Text tool, to go up and change the format.
| | 03:59 | For example, we can say Style > Bold for
the CompanyName and click outside of that.
| | 04:05 | Now, you will see in the
case of the merge field,
| | 04:07 | it looks like some of these fields
are bleeding off the side into the other
| | 04:11 | column, but one of the things about
merge fields is that they must occupy enough
| | 04:15 | space on the layout to fit the whole
name of the field, but when the data is
| | 04:19 | placed in Preview mode, it won't
necessarily take up that much space.
| | 04:23 | So let's preview these in Browse mode by
going to View > Browse mode and hitting Save.
| | 04:28 | You will see that we've got only one
record, and that's because we have to make
| | 04:32 | sure that we are viewing these as a List.
| | 04:34 | So we will change that to view as List.
| | 04:36 | We see that we've got various different records.
| | 04:39 | Now when we go into Preview mode, by
hitting this button here or by going under
| | 04:43 | View to Preview, this will show us
what it looks like when we print.
| | 04:47 | So now it looks like Standard labels.
| | 04:50 | Now if we feed Avery 5160 label forms
into our printer and print these, they
| | 04:55 | will print in perfect size into
these three-column-across label layouts.
| | 05:01 | Similarly, we can quickly create
Envelope layouts for customers, as well.
| | 05:05 | Any new layout starts in Layout mode.
| | 05:07 | So let's go View > Layout.
| | 05:09 | Hit the New Layout/Report button,
keep it in Customers, but call it
| | 05:14 | Customer envelopes.
| | 05:18 | Scroll all the way down to Envelope, hit
Next, and we will do the same thing here.
| | 05:26 | CompanyName, Return, Street, Return,
City, comma, space, State, space,
| | 05:41 | same thing we did in the last example.
| | 05:43 | We hit Next, we look at it in Layout
mode, and you see, again, it's just
| | 05:48 | text, but it's put into a special area into
the Layout, because we've chosen envelopes.
| | 05:52 | Now when we go into Browse mode, we can
see that we are viewing them as forms,
| | 05:57 | because it's just one record per page;
thus only printing one address on
| | 06:02 | every given layout.
| | 06:03 | Because layouts are the primary way
that your users will interact with your
| | 06:07 | data, the Layout Assistant is a great
way to quickly create new specialized
| | 06:11 | layouts that use columns or
specific templates for envelopes or Labels.
| | Collapse this transcript |
|
|
9. Working with LayoutsUsing the Layout Setup dialog box | 00:00 | In the previous chapter we discussed
creating layouts, and once layouts are
| | 00:04 | created you have various ways
to configure each one of them.
| | 00:07 | In this chapter, we'll discuss the
different options available for existing layouts.
| | 00:11 | Let's start first by looking at
the Customer layout in Layout mode.
| | 00:15 | We'll navigate over to Layout
mode by going View > Layout mode.
| | 00:20 | Although we chose a lot of settings
when we created the layout for the first
| | 00:23 | time, we can also edit this information
at anytime in the future by using what's
| | 00:27 | called the Layout Setup. The Layout
Setup dialog can be accessed, in Layout mode
| | 00:33 | only, by clicking on either this icon
that's next to the layout list with the
| | 00:37 | little pencil on it, or by going
under Layouts to Layout Setup.
| | 00:43 | In either case, the Layout Setup
dialog appears, and you see that there are
| | 00:47 | various different tabs,
all with their own options.
| | 00:50 | The first option you see is the ability
to change the existing name of the layout.
| | 00:55 | You could also choose to change the
context of the layout. By checking your and
| | 01:01 | checking this box, you can include the
layout in the existing list of layouts
| | 01:05 | when you're in Browse mode.
| | 01:06 | You'll notice that all three of
these options were available when we
| | 01:08 | first created layout.
| | 01:09 | So if you've ever need to make any
changes, you would do them through the
| | 01:13 | Layout Setup dialog.
| | 01:14 | But in addition to the layout's Name
and Context, there are several other
| | 01:17 | attributes and behaviors that are
controlled by the settings in this
| | 01:20 | Layout Setup dialog.
| | 01:22 | Under General, you'll notice that
we have two options in the middle.
| | 01:25 | You can see that Save record
changes automatically is set by default.
| | 01:29 | This makes it so that any changes that
your users make while in Browse mode will
| | 01:33 | be saved when they leave a record.
| | 01:35 | So it takes on FileMaker's native
functionality of automatically saving any changes;
| | 01:40 | fowever, if you uncheck this box, users
will be presented with a dialog to save
| | 01:45 | the record each time they make a
change and then leave a record.
| | 01:48 | Let's take a look at what that looks like.
| | 01:50 | Right now, if you don't make any
changes, we say OK, and we go into Browse mode,
| | 01:57 | and we make a change with no issues.
We go into Layout mode, invoke the
| | 02:05 | Layout Setup dialog, uncheck that box
and hit OK. Now go back into Browse mode,
| | 02:13 | and now we go in and we hit
Delete and try to commit the record.
| | 02:18 | Now, we see that a message appears asking
us whether or not we want to save the record.
| | 02:22 | If we say Don't Save, the value
reverts back to where it originally was.
| | 02:26 | If we click in there and hit Delete again
and this time hit Save, we see that
| | 02:30 | now we've told FileMaker to commit the change.
| | 02:32 | This could be a good idea for
users who are having trouble with
| | 02:35 | making unintended changes.
| | 02:38 | Back in Layout mode, with the Layout
Setup, we'll return it to the default, and
| | 02:42 | you will see that we've got an option
down here below for enabling Quick Find.
| | 02:47 | We're going to talk more about that in
the chapter on Find, but this is one of
| | 02:50 | the new features inside FileMaker 11.
| | 02:53 | In the Views tab, you can control
whether or not the user can use their View
| | 02:58 | Settings to toggle between Form
View, List View and Table View.
| | 03:02 | It's probably a good idea, when you have a
Detail View like the Customers record,
| | 03:06 | to only allow them to view it in
Form View rather than List View.
| | 03:10 | So in that case, we can deselect this
List View option and even the Table
| | 03:14 | View option. That way the users
won't have the ability to toggle between
| | 03:17 | those different options.
| | 03:19 | You also see down below that you can
pick the Default View, if you have more
| | 03:22 | than one option available, but you see
now that List View has been grayed out
| | 03:25 | because we've removed that
option by deselecting that check box.
| | 03:29 | You'll also notice that you must have
at least one View selected; otherwise, no
| | 03:32 | one can actually see your Layout.
| | 03:34 | You'll notice within the Table View you
have several different properties: You
| | 03:38 | can show your grids horizontally and
vertically, and you can choose from some
| | 03:42 | of the default options which allows
the users to resize column headers or
| | 03:46 | reorder them by clicking them and dragging them,
or even sorting by clicking on the column header.
| | 03:51 | All those are pretty cool features
when your users are in Table View, so you
| | 03:54 | might want to leave those selected.
| | 03:55 | One of the things that you might want
to choose is whether or not to include a
| | 03:58 | Header part and a Footer part.
| | 04:00 | Those of these parts here, and in the
upcoming movies we will discuss the roles
| | 04:04 | of the different parts, which might help
you make those decisions in the future.
| | 04:07 | You can also do a custom height for
your row. By default it'll take on a
| | 04:11 | 14-pixel height, but you can
change that by selecting this option and
| | 04:15 | then making the change.
| | 04:17 | And finally, if you've come up with a
Custom View that is based off of a Label
| | 04:23 | Layout, you can decide to print in
different columns, either across or down or
| | 04:27 | use fixed page margins.
| | 04:29 | This is when you get into more
intermediate or advanced layout design.
| | 04:33 | And then later in this movie, we are
going to have an entire discussion on
| | 04:36 | Script Triggers, but this is where
you would assign what's called a Layout
| | 04:39 | Level Script Trigger.
| | 04:40 | So you can see that the Label Setup
dialog allows us to modify many of the
| | 04:46 | original settings on the existing
layouts, and then provides us some control
| | 04:49 | over some of the other
functionalities that are based on the layouts that
| | 04:52 | exist within our system.
| | Collapse this transcript |
| Understanding layout parts| 00:00 | When you're working with layouts in
FileMaker, you'll notice that they are
| | 00:03 | divided up into several different layout parts.
| | 00:05 | For example, if we go into Layout
mode, we'll notice on the left-hand side
| | 00:11 | that we've got the small, little
bubbles, and there are also these dividing
| | 00:14 | lines. These dividing lines indicate
when a part has changed, and the bubble
| | 00:19 | is a label for the part.
| | 00:21 | In the case of the Customer layout, or
really any standard form layout, we'll have
| | 00:26 | a Header, a Body and a Footer.
| | 00:28 | In this movie, I'm going to describe the
different roles of these parts and how
| | 00:31 | you can manipulate the parts
that are currently on your layout.
| | 00:33 | First of all, you should know that
each layout must have at least one part,
| | 00:37 | and layout parts can contain fields, portals,
buttons, text and any other layout object.
| | 00:43 | The dotted horizontal lines that I
mentioned earlier mark the division between
| | 00:46 | layout parts, and the part Label
appears at the left of the divide line.
| | 00:51 | There are other ways that you can view
the layout parts; for example, if one of
| | 00:55 | the layout parts is covering a field
or a layout object that you want to work
| | 00:58 | with, you can go to the very bottom of
your screen and click to either toggle
| | 01:02 | between Horizontal or
Vertical display of the layout parts.
| | 01:06 | Viewing them vertically is a pretty
good way to keep them out of the way when
| | 01:10 | you are designing your layouts, but
by default you'll see them displayed
| | 01:13 | horizontally, so that you can
see the full name of the part.
| | 01:16 | Layout parts are broken into two groups,
Non-summary parts and Summary parts.
| | 01:21 | Let's first take a look at the Non-
summary parts, the way you work with the
| | 01:25 | different layout parts is by
going into the Part Setup dialog.
| | 01:29 | You can access the Part Setup dialog
under the Layouts menu and choosing Part
| | 01:34 | Setup, here you'll see the parts that
we currently have available, as well as
| | 01:38 | some action buttons on the right-hand side.
| | 01:40 | You'll notice that if you hit Create,
you'll get another dialog called the
| | 01:44 | Part Definition, which shows us all the
different parts that we can create on a layout.
| | 01:48 | We'll start at the top, and we'll
just review the non-summary parts.
| | 01:52 | The Title Header that you see selected
by default will appear only at the very
| | 01:57 | first page that gets printed, and will
replace the normal Header on that page.
| | 02:01 | The Header part, which is grayed out
here because we've already selected one,
| | 02:05 | will allow any layout object that's
placed in that part to appear on the very
| | 02:09 | top of every page that gets
printed off of your layout.
| | 02:12 | The Title Header, of course, will
supersede that on the very first page; the same
| | 02:17 | is true with Footers which are
grayed out because we've already got one
| | 02:19 | selected. That, of course, will allow
any layout object that's placed in the
| | 02:23 | Footer to appear at the bottom of any
printed page or any page viewed in Browse
| | 02:27 | mode, and Title Footer will do the same thing.
| | 02:30 | It'll supersede the Footer and allow
you to print only something on the very
| | 02:33 | last printed or viewed page of your layout.
| | 02:36 | The only non-summary part that
leaves you with is then the Body.
| | 02:40 | Of course, the Body is also grayed
out here in this part Definition dialog
| | 02:43 | because we already have a body in our layout.
| | 02:46 | The majority of the layouts you are
going to create will contain a Body, but
| | 02:49 | there are some specialized, and
somewhat intermediate techniques that involve
| | 02:52 | having no Body part at all,
so it's certainly not required.
| | 02:56 | You can only have one Body part per
layout in each object that you put in the
| | 03:01 | body including any field object like a
field, or text objects or even graphics,
| | 03:05 | will appear once for every record
in the Found Set that you create.
| | 03:09 | We've seen that with list views when
we create a very short or not very high
| | 03:14 | Body part that will iterate itself over
-and-over again, many different times
| | 03:18 | depending on at what
resolution your screen is set to.
| | 03:21 | So if you create a Body part that has a
smaller height, then you can create a List View.
| | 03:25 | If you create a Body part that's the
full height of your screen, you'll just see
| | 03:28 | one record at a time.
| | 03:30 | So if we hit OK to escape this option,
you see that we had the Title Header
| | 03:34 | selected, and it has now added
the Title Header to our layout.
| | 03:38 | Through the part Setup dialog,
however, we can choose the Title Header
| | 03:41 | either change it to a different part, or
delete it completely, which we'll do in this case.
| | 03:48 | You can also change the order of the
parts, if you have multiple different parts
| | 03:51 | together, by clicking on
it and moving the handles.
| | 03:54 | You see the locks here in this case
because the Header cannot be moved
| | 03:58 | anywhere, but at the top of the page,
and the Footer can only be moved to the
| | 04:01 | bottom of the page.
| | 04:02 | So you really don't have
any options to move these.
| | 04:04 | But when you get several different
summary parts involved, you might want to
| | 04:07 | move them into different
locations using the handles.
| | 04:10 | And all the different selections that
we've discussed will be made based on the
| | 04:13 | needs of your specific layouts.
| | 04:15 | We will be talking about the non-
summary parts, like Leading Grand Summary and
| | 04:20 | Sub-summary when sorted by, and
Trailing Grand Summary, when we get over to the
| | 04:24 | reports section, as they become vital components
to creating subsummary reports in FileMaker Pro.
| | 04:32 | Having an understanding of the
different layout parts that are available to
| | 04:35 | you will help you when you're
planning and creating the different layouts in
| | 04:38 | your FileMaker database.
| | Collapse this transcript |
| Understanding the new Inspector | 00:00 | One of the most significant new
features in FileMaker Pro 11, when it comes to
| | 00:04 | working with layouts, is something
that's called the Inspector tool, which can
| | 00:08 | be used to view and modify settings
for various different layout objects.
| | 00:12 | You can access the Inspector tool by
going from View into Layout mode, and
| | 00:16 | you'll see now that there is a new
button here that looks like a little i with a
| | 00:20 | small circle around it.
| | 00:22 | By selecting this button, you'll see a
new palette appear onscreen, and within
| | 00:28 | this palette, you see that
there are three different tabs:
| | 00:30 | Position, Appearance and Data.
| | 00:33 | This is what's called the New Inspector
palette, and it's brand-new to FileMaker Pro 11.
| | 00:37 | You'll notice that since you have three
different tabs, you can also invoke the
| | 00:41 | Inspector multiple times.
| | 00:43 | You can either hide it, showing your
first Inspector, or if you go under View,
| | 00:51 | you can also choose the check box next
to Inspector, to show on, or you have a
| | 00:55 | shortcut which is Command+I
in Apple and Ctrl+I on Windows.
| | 01:00 | You'll also notice, though, that
you have this New Inspector option.
| | 01:03 | Hitting the New Inspector will allow you to
have two palettes onscreen at any given time.
| | 01:08 | For example, you could hit Position
on one, and Appearance on another,
| | 01:12 | and you can also continue to add new
Inspectors onscreen for as many different
| | 01:17 | options as you'd like.
| | 01:18 | So conceivably, you could have one on
here for each of the three tabs that
| | 01:21 | are available to you.
| | 01:23 | What's nice about the Inspectors is they
will stay open each time you access the
| | 01:27 | Layout mode until you close them.
| | 01:28 | You'll notice, if we go back in
Browse mode, my Inspectors disappear.
| | 01:32 | If I go back in the Layout mode,
they'll reappear in the positions where I
| | 01:36 | originally selected them.
| | 01:39 | And if I close them now FileMaker
remembers what that last position was.
| | 01:43 | Many of the controls in the Inspector
had previously been available via Windows
| | 01:47 | or menu items in previous versions of FileMaker.
| | 01:49 | For instance, you'll notice that the
top sections of Position and Appearance
| | 01:55 | tabs provide controls for an
Object's Position, Size and Font attribute.
| | 02:00 | These used to be in a separate object Info
palette, which no longer exists in FileMaker.
| | 02:05 | Many other applications follow the same
palette concept, and now FileMaker has
| | 02:09 | followed suit to make it easy to see nearly
all of your object controls all in one place.
| | 02:14 | We're going to be using the Inspector
prominently throughout several of the
| | 02:18 | movies remaining in this title.
| | 02:20 | But if you wonder where some of the
many controls from previous versions of
| | 02:23 | FileMaker have gone, look
first into the Inspector.
| | Collapse this transcript |
| Exploring the Status Area in Layout mode| 00:00 | Once you've created layouts in your
FileMaker Database, you'll want to start
| | 00:03 | modifying them and making them more
attractive and useful to your users.
| | 00:07 | You may want to first make yourself
familiar with the tools that you have
| | 00:10 | available in Layout mode
before you start making any changes.
| | 00:13 | So, if we go into Layout mode, by
going View > Layout mode, we'll notice that
| | 00:18 | all the tools in the toolbar and all
the icons will change when we go from
| | 00:22 | Browse to Layout mode.
| | 00:24 | We'll notice in Browse mode, we've got
one Status toolbar, and in Layout mode
| | 00:29 | we've got an entirely different set of tools.
| | 00:31 | Starting in the upper left-hand corner,
you'll notice that your Navigation tools
| | 00:34 | now become the way that you navigate
between the layouts in Layout mode.
| | 00:38 | So, rather than giving you a full
record count, you'll see the full number of
| | 00:41 | layouts that you currently have in your system.
| | 00:43 | You'll also be able to navigate
between those layouts by using the Book icon.
| | 00:48 | And if you click inside that field, and
type in a number and hit Enter, it will
| | 00:52 | navigate directly to the
layout, based on its number.
| | 00:55 | And you will see a button to the right
of the Navigation tools, called the New
| | 00:58 | Layout/Report button, which we've
been using to create new layouts.
| | 01:02 | Then you see a series of different tools,
and by default you'll notice that the
| | 01:06 | Pointer tool is active.
| | 01:08 | That's what allows you to point and
grab and select different items that are on
| | 01:12 | your layout, and that's the most common
one used, so that's why it's the default
| | 01:16 | when you first enter Layout mode.
| | 01:18 | And you'll notice that when you have
the Selection tool active and you do click
| | 01:22 | on something, that you can tell that a
layout object is selected, because it's
| | 01:25 | got these handles in all four corners.
| | 01:29 | You'll see when I select something else,
you'll notice that it has the handles available.
| | 01:34 | Next, you will notice
that we've got a Text tool.
| | 01:36 | By clicking on this Text tool, it turns
our Cursor into a crosshair and when we
| | 01:41 | click into a certain area of the layout,
it allows us to type in text that can
| | 01:48 | then become part of our layout.
| | 01:49 | So you don't have to just have text as
field labels, but you can type your own
| | 01:53 | text in when you are designing your own layouts.
| | 01:55 | You can also double-click on any one of
your field labels, and modify the text
| | 02:00 | that displays for each field label.
| | 02:02 | This, however, does not change
the original name of the field.
| | 02:05 | What might be a good idea is to make it
more useful for users is if you go on
| | 02:08 | and change some of your field labels,
so that they have more user-friendly
| | 02:12 | names, rather than the naming conventions that
you applied when you were first defining them.
| | 02:17 | You'll see a couple of examples of that here.
| | 02:22 | To the right of your Text tool,
you'll see that you've got several
| | 02:25 | different drawing tools.
| | 02:26 | For example, you can click on this Line
Drawing tool to draw a line on your layout.
| | 02:31 | You can also select the line with the
Pointer tool and hit Delete to remove it.
| | 02:35 | You've also got the ability to create a
square, a rounded rectangle or an oval,
| | 02:41 | by selecting one of these drawing
tools and just picking the space on your
| | 02:44 | layout and then releasing the Cursor.
| | 02:47 | Next, you've got a series of layout
tools that add different layout objects, that
| | 02:51 | have different functionality to your layouts.
| | 02:53 | We'll be using each one of these
throughout the remaining chapters.
| | 02:56 | As you will see, we've got Field
Control options, the ability to add buttons
| | 03:01 | and assign actions to them, create something
called a Tab Control, Portals, Charts and so on.
| | 03:07 | You'll notice another tool at the end,
which is called the Format Painter.
| | 03:11 | And if you select something using your
Pointer tool, and then choose your Format
| | 03:16 | Painter, the next item that you click
will then adopt the same format as the
| | 03:22 | original item you selected.
| | 03:23 | This is similar to the Painter tools in other
applications that you might be familiar with.
| | 03:28 | If you are not already showing the
Format toolbar, you can do so by clicking on
| | 03:32 | the two As right next to the Revert button.
| | 03:36 | This will drop down the ability for you
to modify different text on your layout,
| | 03:40 | much like this text that we have selected.
| | 03:43 | We can change the Font, or even the
Size, or even choose to Bold, Italic and
| | 03:50 | choose different Alignment options.
| | 03:53 | Clicking on this box allows us to
choose a different color, as well.
| | 03:57 | Here, you will see that we can choose
different lines, whether it's a Line tool
| | 04:00 | that we selected onscreen or the lines
that are borders outside of our fields.
| | 04:06 | And here you will notice
some controls for lines.
| | 04:09 | If you've used the Line Drawing tool in
various different areas on your layout,
| | 04:14 | you can choose the thickness of the
line, the color of the line, and even any
| | 04:21 | fill colors of any objects that are
selected, and different effects and patterns
| | 04:26 | that you can apply to either a line or
different layout objects on your layout.
| | 04:30 | And you can select them and delete them.
| | 04:35 | Any changes that you make on your
layout can be saved by simply clicking this
| | 04:39 | button, or you can revert the layout back to
its original design by hitting the Revert button.
| | 04:44 | You can navigate back to Browse
mode by hitting the Exit Layout button.
| | 04:47 | You will also notice in your toolbar
that you have a quick and easy way to get
| | 04:51 | to the Manage Database, or managing
any one of these other options instead of
| | 04:55 | having to go into the File menu.
| | 04:56 | I also have a couple of tips for you
while you are in Layout mode, when you are
| | 05:00 | using some of these tools.
| | 05:02 | For example, if you want to select
multiple objects at one time, you can
| | 05:05 | drag-select, which means clicking down
on your mouse and holding down the mouse
| | 05:11 | as you drag, and you will see this
dotted line appear, and you can select as
| | 05:14 | many layout objects as you want,, and when
you release, you see that they all have
| | 05:18 | handles on them, allowing me
to treat them as one object.
| | 05:21 | So, for example, I can click and drag all
these address fields down below the logo.
| | 05:26 | Also, if I select a field while
holding down the Ctrl key on Windows or the
| | 05:34 | Option key on Mac, and while holding
down those keys I drag, it will create a
| | 05:40 | copy applying the same format into the
field, but as I release, it will allow
| | 05:45 | me to choose another field, with or without the
label, to appear in that location on the layout.
| | 05:53 | This is a good way for to be able to
copy various different formats of the
| | 05:57 | fields on your layout one after another as
you apply new fields to your layout onscreen.
| | 06:02 | You can also use the drag-select tool
to select object and then hit the Delete
| | 06:06 | key on your layout, thus
removing it from the layout completely.
| | 06:09 | Finally, you can also select the
layout object, like a field, and when you see
| | 06:14 | the four handles, you can choose one of the
corners and then drag to resize the field.
| | 06:21 | So here you see now, I have got a larger
Notes field, allowing me to display more
| | 06:25 | data in the Notes field than I had before.
| | 06:27 | I'll be making some of the same
changes on some of the other layouts in
| | 06:30 | upcoming exercise files, but if you'd
like, you can do the same on this file
| | 06:34 | for more of a practice.
| | 06:35 | All of these tools will become useful when
making changes to the designs of your layouts.
| | 06:40 | It's best to understand the tools
that you have at your disposal before you
| | 06:43 | continue on to make these layout changes.
| | Collapse this transcript |
| Managing layouts and layout folders| 00:00 | A FileMaker Pro file can have
dozens or even hundreds of layouts;
| | 00:04 | therefore it's useful to organize your
layouts in such a way that both you and
| | 00:08 | your users of your database can
easily find what you're looking for.
| | 00:11 | There is a new feature in FileMaker
Pro 11 that helps you accomplish this
| | 00:15 | easier, and it's called
the Manage Layouts dialog.
| | 00:18 | You can access this newly designed Manage
Layouts dialog in a couple of different ways.
| | 00:22 | In Browse mode, you can go under File,
to Manage, to Layouts, or you can
| | 00:27 | also invoke the Manage Layouts dialog by
using one of the quick keys like you see here.
| | 00:32 | On Windows, you would do Ctrl+Shift+L
keys together, and on Mac, you would do
| | 00:38 | Command+Shift+L keys together.
| | 00:42 | Also, when in Layout mode, you can
go to the top of the Layout list and
| | 00:47 | choose Manage Layouts.
| | 00:49 | Of course, you do not need to be in
layouts to modify this list. As you saw
| | 00:53 | we are able to go to the File menu in the
shortcut keys while in Browse mode as well.
| | 00:57 | The Manage Layouts dialog box has
been redesigned in FileMaker Pro 11 to be
| | 01:02 | more useful, by allowing you to organize and
navigate layouts in a number of different ways.
| | 01:06 | First, you'll notice on the far left,
there is check box in the first column.
| | 01:11 | This indicates whether or not the
layout will be included in the Layout menu
| | 01:14 | while in Browse or Preview modes.
| | 01:16 | This can be useful when you're hiding
Utility Layouts that shouldn't be directly
| | 01:20 | accessed by some of your users.
| | 01:21 | To take a look at this in action, for
example, we uncheck the Customer Envelopes,
| | 01:28 | and go back into Browse mode and when
we click on our list, we now see the
| | 01:32 | Customer Envelopes are no longer available.
| | 01:36 | However, if we go back into our Layout
window and select the Customer Envelopes
| | 01:43 | check box, we now see that available to us.
| | 01:47 | However, when you're in Layout mode,
regardless of whether or not you check
| | 01:51 | one of those blue check boxes, all of the
layouts will be available to you in the Layout list.
| | 01:56 | This is how you can access them to
make modifications, regardless if you can
| | 01:59 | see it in Browse mode.
| | 02:00 | You'll also notice in the Manage
Layouts window that next to each layout you've
| | 02:04 | got a double-headed arrow. Much like
various other dialogs within FileMaker,
| | 02:09 | this means that you can move your Layout
Name, either up or down within the list.
| | 02:13 | For example, if I want to move all of
the Customer layouts together, I can
| | 02:18 | select one of the layouts and while
it's highlighted blue, I can click down on
| | 02:22 | the handle and move it up until you see
the blue line with the round head on it
| | 02:28 | in the proper location.
| | 02:29 | I can then release that, and you
see that I have reordered the layout.
| | 02:33 | Trying that a couple of more times, I
will choose the Customer Envelopes and
| | 02:39 | also the Customer List, and I
put them now into a custom order.
| | 02:44 | And one more time. We will just move
Product List under the Product Layout.
| | 02:48 | At the top of the Manage Layout
dialog are two Filtering tools.
| | 02:52 | One of these might be familiar to you
if you've used other Apple applications
| | 02:56 | because it's a pretty standard filtering
tool. It allows you type in a keyword, and
| | 03:02 | as you type, you can automatically see
your list filtered to show only layouts
| | 03:06 | that have that keyword in their name.
| | 03:09 | You can hit the X to reset these.
| | 03:11 | You'll also notice there is a dropdown
menu to either Show All of the layouts or
| | 03:15 | to see layouts in certain folders.
| | 03:17 | But you see here, we don't have any
folders defined, and that brings us down to
| | 03:22 | the bottom left-hand corner,
where we can define folders.
| | 03:25 | If you hit the New button with the
Plus sign, it's going to invoke the New
| | 03:29 | Layout Report dialog, and you'll
see that they have the same icon.
| | 03:32 | But if you click the arrow next to it,
it allows you to either invoke that
| | 03:37 | window, or you can choose
a new Folder or Separator.
| | 03:40 | If we choose Folder, a window pops up,
asking us to choose a name for out folder,
| | 03:44 | and we will call them Customers.
| | 03:48 | You now see a folder appear on your
list, and it also has handles that allow
| | 03:52 | you to select the line and then move the
handles to the appropriate location on your list.
| | 03:57 | Now putting a layout in a
folder is a little bit trickier.
| | 04:01 | You'll see here we have got the
Customers Layout below the Customers Layout
| | 04:04 | folder, and I am going to select the
handles. And in this case I can click down
| | 04:08 | and hold it and move it up, but right
now by the position of the loop at the end
| | 04:12 | of the line, this would only put it
below the folder where it currently exists.
| | 04:16 | But instead if I move it to the
right a tad, and then you see the folder
| | 04:20 | highlight, I can release it, and
this now indicates, because of its
| | 04:25 | indentation, that it's now
contained within the Customers folder.
| | 04:28 | We will try that again with the
Customers List, and you see the folder
| | 04:33 | highlight, and you release.
| | 04:35 | Click, grab the handle, see the
folder highlight, and release.
| | 04:41 | You do that for each layout that you want to
have contained within this Customer folder.
| | 04:45 | I am going to create two more folders
real quick, one is for Products, and
| | 04:54 | you'll notice that this folder
appeared on the bottom of the list.
| | 04:58 | I will do that again and choose Invoices.
| | 05:06 | Now this one appeared as a subfolder,
which is not the desired effect, but the
| | 05:10 | reason it did that is
because we had a folder selected.
| | 05:13 | So in this case, we can hit the
Delete button on our keyboard to remove the
| | 05:17 | Invoices folder, and instead make
sure that that folder is not selected.
| | 05:23 | Now we can define the Invoices folder.
| | 05:27 | Of course, maybe we want to have a subfolder.
| | 05:30 | For example, let's say we want to
have one that's called customer reports.
| | 05:33 | We can select the Customer folder,
select Folder again, and type Reports this
| | 05:40 | time, and then now move only our
printable reports into that folder, in the same
| | 05:48 | manner as we did in the first place,
and we can even move the entire folder and
| | 05:54 | its contents below the other two lists.
| | 05:57 | And finally, you will see that we can
collapse these, thus helping us clean up
| | 06:03 | and organize our lists, and we can then
move the folders into their appropriate
| | 06:10 | locations using the same tools.
| | 06:25 | Not only can you use these folders to
help you organize your Manage Layouts
| | 06:29 | window, but now you'll notice that your
dropdown above allows you to just view
| | 06:34 | certain folders at a time.
| | 06:38 | But this also has an interesting
effect when you go back into Browse mode.
| | 06:42 | Now when you look at your Layout list,
you see that you have got these cool
| | 06:46 | dropdown menus that helps you make a
more compacted list of layouts and direct
| | 06:51 | your users to the appropriate groups of layouts.
| | 06:58 | Back in Layout mode, going into the
Manage Layouts window, you'll also see that
| | 07:04 | when you select a layout, you can
choose the Edit button to edit any one of the
| | 07:09 | options in the four tabs
in your Layout Setup dialog.
| | 07:12 | Here we are just simply going to
choose to rename these detail fields as
| | 07:18 | Details; see how easily we can do that.
| | 07:22 | But you'll notice, of course, that you
can make any number of different changes,
| | 07:31 | all from within the context
of this Manage Layouts window.
| | 07:35 | You'll also see that with a Layout or
folder chosen, you can Duplicate, which
| | 07:39 | would create either a new layout folder,
or you can select a layout which then
| | 07:43 | would duplicate the same layout and
give it the name Copy at the end of it.
| | 07:47 | Of course, with the layout selected
you can then hit the Delete button, which
| | 07:51 | will then delete whatever layout you have chosen.
| | 07:54 | And the final point of navigation in
this window is the ability to select
| | 07:58 | a layout and Open it.
| | 08:00 | You'll notice, in this case, it opens
it as a new window over the original
| | 08:04 | window that you had open, allowing you
to navigate to these layouts in Layout
| | 08:08 | mode, so that you can make modifications.
| | 08:10 | With the number of your layouts and
your solution constantly growing, it's a
| | 08:13 | good idea to come up with a strategy
for managing the layouts into folders.
| | 08:17 | The new Manage Layouts window in
FileMaker Pro 11 allows you one location to
| | 08:22 | make any of the changes
that your layouts require.
| | Collapse this transcript |
|
|
10. Formatting Layout ObjectsArranging, aligning, grouping, and locking layout objects| 00:00 | Layout Objects are the
building blocks of layouts.
| | 00:03 | Everything you place on a layout, be
it a field or an image or a portal or a
| | 00:07 | label, is considered an object.
| | 00:09 | All objects have particular
attributes that you can manipulate.
| | 00:12 | However, you must be in Layout
mode to be able to edit any layouts.
| | 00:15 | So let's start there first.
| | 00:17 | We'll go View > Layout mode.
| | 00:20 | Once in Layout mode, you can group any
combination of objects so that you can
| | 00:24 | edit or move them together, or change
the stacking order of objects to get the
| | 00:28 | different effects when objects overlap.
| | 00:30 | These are all done through Grouping tools.
| | 00:32 | The Grouping tools can be
found in your new Inspector.
| | 00:35 | In order to invoke the Inspector, you
can hit the i button, or what you'll
| | 00:39 | probably get accustomed to doing is
also hitting Command+I or Ctrl+I, while
| | 00:43 | in Layout mode only.
| | 00:45 | You'll see the Grouping tools can
be found under the Position tab.
| | 00:48 | We're going to be exploring all three
of these tabs, but right now we're going
| | 00:52 | to focus on the Position tab, and more
specifically, the Arrange & Align set of tools.
| | 00:57 | You see we can collapse all the other
tools away, and just leave the Arrange &
| | 01:02 | Align ones available to us.
| | 01:03 | You'll notice there are several
different things that we can do.
| | 01:06 | We can Group, Arrange, Lock, Resize,
Align or Space different groups of objects.
| | 01:12 | For example, if you look in our
Customer Detail layout, you can see that there
| | 01:15 | is a series of fields that
are not aligned properly.
| | 01:18 | If we select all of these objects, we can
use the Align tool to straighten them out.
| | 01:22 | First, the best way to select a large
group of objects is to click down on
| | 01:26 | your mouse with your Pointer tool, and
then drag-select all the objects that
| | 01:31 | you want to work with.
| | 01:33 | Here you can see that I'm fully
containing all of the fields, so I'll release
| | 01:37 | my mouse, and now I've successfully been able
to select all the fields that I want to align.
| | 01:42 | Now I could do this manually by using the
arrows on my keyboard, and doing one at a time.
| | 01:48 | But instead, I'm going to use one of the
tools that I've got over here in my Inspector.
| | 01:52 | In this case, we're
going to use the Align tools.
| | 01:54 | You see here by rolling over each one, you
get a description of what each tool does.
| | 01:59 | But I'm going to use the first
one here, called Align left edges.
| | 02:02 | By simply clicking that button, you see
now that I've been able to exactly line
| | 02:07 | up all of the fields that I just selected.
| | 02:09 | Now we can do the same
thing to the field labels.
| | 02:11 | Since the field labels are not connected
to the fields, let's drag-select those.
| | 02:18 | Now you'll notice that we've got one
that's overlapping the fields, but you can
| | 02:21 | see that it still selected,
because of the handles that appear.
| | 02:25 | Now let's go into Align, but this
time, let's choose Align right edges.
| | 02:29 | Now you see that all of the fields
have lined up to the right edges.
| | 02:33 | However, they're not in the right position,
because they still overlap the fields.
| | 02:36 | This one is easy.
| | 02:37 | We can just simply click the left arrow
on our keyboard, and even hold it down
| | 02:43 | until we get it all the
fields to the desired position.
| | 02:47 | This is the kind of thing that could
have really taken a long time if we did
| | 02:50 | them one after another.
| | 02:51 | Now you'll also notice in the Company
Name field, you'll see that the field
| | 02:54 | labels are a lot higher than the field.
| | 02:56 | Now this is something we could easily
fix by just selecting the field label and
| | 03:00 | using our arrow tools, or we
could use one of our Align tools.
| | 03:03 | I'm going to select both the Company
Name field label, and I'm going to then
| | 03:08 | select the field by holding down the Shift key.
| | 03:11 | That's the same for either Mac or Windows.
| | 03:13 | Once I have those two field
objects selected, I'm going to choose the
| | 03:18 | Align horizontal centers.
| | 03:22 | Now you'll see those lines up.
| | 03:23 | I'll do the same thing down here
for Zip, holding the Shift key,
| | 03:28 | horizontal centers.
| | 03:29 | Of course, you can still finesse some
of these arrangements by selecting a
| | 03:34 | single object or objects, and
just simply using your arrow keys.
| | 03:39 | Another thing you may notice is that
the CompanyWebsite field is a lot wider
| | 03:43 | than the rest of the fields.
| | 03:45 | This is probably more desirable, since
the standard field size that we've been
| | 03:48 | using probably doesn't fit a lot of the
text that's going to be inside the field,
| | 03:52 | like in Company Name, for example, or
maybe some of the name fields, as well.
| | 03:56 | There is a series of tools in the
Arrange & Align section that will allow us to
| | 04:00 | resize fields and groups
the fields that are selected.
| | 04:03 | So let's go ahead and select all of
these fields again by clicking down, and
| | 04:06 | drag-selecting, and then releasing.
| | 04:10 | We see we've got all the fields selected now.
| | 04:11 | You'll notice in the Resize, we've
got a couple of different options.
| | 04:16 | Resize to the smallest width,
and Resize to the largest width.
| | 04:20 | As you can see from the icons,
depending on which one of these we choose, the
| | 04:24 | field objects that we have selected
will either constrain to the smallest size,
| | 04:29 | which would mean the CompanyWebsite
would be as small as the rest of them, or
| | 04:33 | the rest of these would expand to the
largest width, which is what we're going
| | 04:36 | to do by selecting this button here.
| | 04:39 | Now you see we've got much more manageable
field sizes, all in the click of just one button.
| | 04:44 | We might also want to use the arrow
keys to select the CompanyLogo field label,
| | 04:48 | and move it to more desired position.
| | 04:50 | Now I'm going to demonstrate a Layout
design technique that uses a lot of the
| | 04:55 | Arrange & Align tools, but it's also going
to use the Position tool that you see here.
| | 04:59 | A lot of developers like to use the
Shape tools that you see above, to be able
| | 05:04 | to add a little bit of design to their layouts.
| | 05:06 | For example, I can choose
the Rounded Rectangle tool.
| | 05:08 | You see my cursor becomes a crosshair.
| | 05:12 | I can draw a border edge around all of
the field objects that I currently have
| | 05:19 | onscreen, just to sort of
organize them all in the same place.
| | 05:23 | Now one thing I want you to notice,
now that we've expanded the Position
| | 05:26 | section. You'll notice when we have
an object selected or even a group of
| | 05:30 | objects, we see several numbers show up.
| | 05:33 | These numbers are actually giving us the
measurement, or the size, of the selected
| | 05:37 | field object or objects.
| | 05:38 | In this case, you see that we've got a
rectangle object that's 637 pixels wide
| | 05:44 | and 427 pixels high.
| | 05:47 | Now if in your copy of FileMaker you
don't see px right here, which stands for
| | 05:51 | pixels, and maybe you see something
like inches, then just click on it like I
| | 05:55 | just have, and it will toggle to the proper increments.
| | 05:57 | But from my experience, I would
suggest that you always use pixels since they
| | 06:01 | are the smallest unit of measure.
| | 06:03 | In most cases, on FileMaker layouts,
you're really only moving Layout objects
| | 06:06 | very short distances anyways.
| | 06:08 | So toggle over to pixels, and then you
can take a measurement as to how wide
| | 06:13 | your Layout Object might be.
| | 06:14 | You can move it around as well by
hitting the arrow keys, and watch as these
| | 06:19 | values change when I move this down just a tad.
| | 06:22 | What this is giving us an indication is
how far from the Left our Layout Object is.
| | 06:27 | You see we're flushed to the Left, so it's 0.
| | 06:30 | How far from the Top we are,
| | 06:31 | 22 pixels from the very Top edge of our window.
| | 06:35 | How far from the very furthest right
edge we are, as well as the distance from
| | 06:40 | the Bottom of the
selection to the Top of the layout.
| | 06:43 | So this gives us a distance
from here all the way to the Top.
| | 06:48 | Now we might want to give a little bit
of relief over on the left-hand side.
| | 06:50 | So we can just click in here, and
put a value in ,like let's say 5 or
| | 06:55 | something, and hit Enter.
| | 06:56 | You'll see it adjusts just a tad.
| | 07:00 | We notice that one of our
field labels is a bit off,
| | 07:03 | so maybe we'll select this field label.
| | 07:05 | Use our arrow keys to move
it inside our new rectangle.
| | 07:14 | Now we can see that once we no
longer have an item selected,
| | 07:18 | that we don't see any figures
here inside the Position section.
| | 07:21 | Now let's grab this oval.
| | 07:22 | I'm going to show you another
way to format a layout object.
| | 07:25 | We're going to change its Color.
| | 07:27 | Notice here in your Layout toolbar,
we've got a section that says Fill.
| | 07:33 | Once selected, you'll see
that you get a Color palette.
| | 07:35 | In addition to these standard colors,
you can also click Other Colors.
| | 07:39 | Now keep in mind that this is what the
Other Colors window looks like on a Mac;
| | 07:43 | on Windows it's slightly different.
| | 07:44 | But I'm going to choose all the different
options that I've got, until I find one that fits.
| | 07:49 | Here we go. I'm going to use the Crayon one that's
available to me in Mac, and I'm going to
| | 07:53 | choose this color, and hit OK.
| | 07:55 | Now you see my entire
Layout object has changed color.
| | 08:00 | Keep in mind that you can select several
Layout objects, and apply color to them
| | 08:03 | all at the same time.
| | 08:05 | Now we're going to grab the Rectangle tool.
| | 08:08 | We're going to draw a
rectangle in the middle area.
| | 08:15 | Now we see we have that selected.
| | 08:17 | If we look, we see we've got the
Width at 637, but let's select our
| | 08:21 | Rounded Rectangle again.
| | 08:22 | We see that we have the same Width
there, but we notice that the Height is a
| | 08:26 | little bit different.
| | 08:27 | We've got 415 and 427.
| | 08:32 | Let's say we make this one 410,
and we'll type and hit Enter.
| | 08:37 | We see that it just adjusted.
| | 08:39 | Now let's align these lines up a
little bit better by using our arrow keys.
| | 08:43 | Make sure we've got square selected. Nudge it over.
| | 08:49 | We see down here we can overlap just a tad.
| | 08:54 | Let's move them down, so
they're flushed with the bottom.
| | 08:56 | We can also see that the 449 for
the Square we drew matches the 449 for
| | 09:02 | the Rounded Rectangle.
| | 09:03 | Now we've got two layout objects.
| | 09:04 | But what I'm going to do here is I'm
going to select the Square, and I'm going
| | 09:07 | to give that a different Fill Color.
| | 09:10 | At this point, your Layout
looks something like this.
| | 09:13 | Now if I select both of the objects,
and if you remember you can select
| | 09:15 | multiple objects by holding down the Shift key,
| | 09:18 | I'm going to use the Group tool
to make them all one single object.
| | 09:24 | You see that they've become one
single object, because I've now only got
| | 09:27 | four corners, even though I had all eight
handles showing when both objects were selected.
| | 09:32 | But the problem is that we can't
see any of our field objects here.
| | 09:35 | So we're going to use another one of
the tool sets, called the Arrange, which
| | 09:39 | allows us to move this layout object
back or forward within what's called the
| | 09:43 | stacking order on our Layout.
| | 09:45 | At any given time, a Layout Object
is either above or below other Layout
| | 09:50 | Objects, with the original blank canvas
background always being the furthest back item.
| | 09:54 | So what we're going to do in this case
is take our selected layout object, and
| | 09:58 | select this option here called Send to back.
| | 10:02 | Now that we hit Send to back, we
see that all of the other field layout
| | 10:05 | objects are presented forward, and now the
users can see them and interact with them, as well.
| | 10:11 | Finally, we can use the Lock objects,
| | 10:13 | as you see here, to be able to
lock this object, so that we can't
| | 10:17 | inadvertently move it.
| | 10:18 | This is customarily used for Layout
design objects that you're done working
| | 10:23 | with, that you don't want to mess up
inadvertently while clicking on other Layout objects.
| | 10:26 | You'll notice the difference between a
locked object and an unlocked object.
| | 10:30 | You can see when I select this field
object here, I have the black handles, and
| | 10:35 | here we've got gray handles,
indicating that it's locked.
| | 10:37 | Of course, you can simply unlock one of
the objects by toggling the Lock icons
| | 10:42 | within your Inspector.
| | 10:44 | I'll be making the same changes to
other layouts in the exercise file in
| | 10:49 | upcoming Exercise Files.
| | 10:50 | But if you want some additional practice,
go ahead and do the same thing we've
| | 10:53 | done here to your Customer Detail,
Product Detail and Invoice Detail Layouts.
| | 10:58 | Getting familiar with some of these
tools is going to help you when you want to
| | 11:00 | fine-tune the layouts that you've
created inside of your FileMaker database.
| | Collapse this transcript |
| Placing and formatting objects, parts, and graphics| 00:00 | When you're designing your layouts in
FileMaker, in addition to being able to
| | 00:04 | add Layout objects, like text or fields
to your layouts, you can also add images.
| | 00:08 | Now, images are normally found,
contained within a field, like a container field
| | 00:13 | on your layout, but you can just have
images added as part of the layout itself.
| | 00:17 | This will give you a
little bit nicer design feel.
| | 00:19 | Let's say, for example, you want to
add a logo to your layouts in FileMaker.
| | 00:23 | If we look inside our Exercise Files,
we'll see that we have a file called Logo.jpg.
| | 00:30 | Let's say we want to add this image
in our Header inside of each of our
| | 00:34 | layouts in our database.
| | 00:36 | First, we'll have to go into Layout
mode, because that's where we make all of
| | 00:39 | our Layout design changes.
| | 00:41 | If we want to add it into our Header,
we notice that the Header part might be a
| | 00:44 | little bit small to be able to fit
any kind of a normally-sized logo.
| | 00:49 | For example, if our logo is 50-pixels high,
we're going to first need to resize the Header.
| | 00:53 | So, you'll notice in our Inspector, and
if you don't have your Inspector up you
| | 00:56 | can hit this I button, or do Ctrl+I or
Command+I, you'll notice that even when
| | 01:01 | we select a part, we see that we can get
measurements on the Height of the part.
| | 01:07 | For example, the Header part
right now is only 18-pixels high.
| | 01:11 | So, let's say we want to make it larger.
| | 01:13 | We can click inside the
field that says 18-pixels high.
| | 01:16 | We can type on our keyboard
55 pixels, and hit Enter.
| | 01:19 | You see that automatically
changes the size of our Header part.
| | 01:24 | Now we can fit a logo, in this case a
logo that happens to be 50-pixels high,
| | 01:30 | into that Header part.
| | 01:31 | So, now what we'll do is we'll
choose Insert, and choose Picture, and
| | 01:36 | we'll choose that Logo.
| | 01:40 | You'll notice here that if you insert a
picture, you can also store that only as
| | 01:45 | a reference to the file.
| | 01:46 | You'll notice this check mark's
in the bottom left-hand corner.
| | 01:49 | Now, that's only advised if the
image that you're going to be storing is
| | 01:52 | going to always live in the same
location, as it pertains to where the
| | 01:55 | database location might be.
| | 01:57 | In this case, it's not going to be,
because we're just using this as an image
| | 02:00 | inside of a layout for design purposes.
| | 02:03 | So, it's a good idea that we make sure,
in these cases, that we uncheck the Store
| | 02:07 | only a reference to the file, because
otherwise, if we move that logo from its
| | 02:10 | current location, we would have a
broken image on all the layouts where we're
| | 02:13 | using this for design purposes.
| | 02:15 | So now we can hit Open, and we
see the image appear on our layout.
| | 02:20 | We can move it around, if we'd
like, using our arrow keys, and find a
| | 02:23 | desired position for it.
| | 02:24 | You should keep in mind though,
whenever you're working with images inside of
| | 02:29 | your FileMaker layouts, you can use
images that are the entire size of the
| | 02:32 | layout, if you'd like to.
| | 02:34 | A lot of times individuals like putting
faded or watermarked logos or those types
| | 02:38 | of things in the background of layouts.
| | 02:40 | But keep in mind that whatever images
you're adding, every time you add an image
| | 02:44 | to one of the layouts in your FileMaker
database, your FileMaker database will
| | 02:47 | grow in size, proportionate to the
size of the image that you just added.
| | 02:52 | So, it's very important that you use
smaller-sized images, or a good rule of
| | 02:57 | thumb is to take Web-readied images, or
if you're using an image software, you
| | 03:01 | can save it for the Web.
| | 03:03 | In that way, it's very small
resolution, 72 dpi, those types of things.
| | 03:07 | You're not going to really
increase the size of your FileMaker file.
| | 03:10 | For example, if you added a 1-megabyte
logo to every layout in your database,
| | 03:14 | let's say you have ten layouts,
| | 03:16 | that's 10 megabytes in size
that your database just grew.
| | 03:18 | It's tough for FileMaker to render
these layouts over a network, if you're in a
| | 03:22 | shared or server environment.
| | 03:23 | So, keep that in mind, when you're
choosing images that you want to store on
| | 03:27 | your FileMaker layouts.
| | 03:28 | Once you have an image on a layout,
it acts just like any other object.
| | 03:31 | So, if you want to align it with other
objects, like by selecting this image,
| | 03:35 | and holding down the Shift key and
selecting the Lock Layout object that we have here.
| | 03:39 | We can use things like Align, if we
want to, or line them up in the middle.
| | 03:44 | So, FileMaker, as you can see, just
treats it as just another Layout object.
| | 03:49 | I'll be making these same
changes on other layouts,
| | 03:51 | you'll see this in upcoming Exercise
Files, but you can do the same on these
| | 03:54 | other layouts as well if
you want some extra practice.
| | 03:57 | Images are a great way to add some
style or corporate identification to your
| | 04:00 | FileMaker layouts or reports.
| | 04:02 | If you find yourself working with
graphics, use the tools that I've just
| | 04:05 | described to get the desired look
and feel on your FileMaker layouts.
| | Collapse this transcript |
| Formatting fields and applying field attributes| 00:00 | If we look at our Customer Detail Layout,
and we go into Layout mode, you'll see,
| | 00:05 | just like is the case on all the other
layouts in this database, that we placed
| | 00:09 | several fields on the layout.
| | 00:12 | Now when we place these fields on the
layout, we don't necessarily have to
| | 00:14 | settle for just their flat, plain-looking feel.
| | 00:16 | You can use some Field Attribute
tools to give them a different, and
| | 00:19 | more professional look.
| | 00:21 | So when you are in Layout
mode, you can select any field.
| | 00:23 | Let's say in this case, we're going to
select the CompanyLogo field that we have
| | 00:26 | in the middle of the screen.
| | 00:27 | And then open the Inspector.
| | 00:29 | If you don't have the Inspector open
already, you can hit the i button, or
| | 00:33 | Command+I on Mac ,or Ctrl+I on Windows.
| | 00:36 | You can change the color of the field,
for example, by going into the Appearance.
| | 00:42 | So you've got several different options
here for modifying the appearance of an object.
| | 00:46 | We've got a field object, the
CompanyLogo field selected, and we can change the
| | 00:50 | color if we'd like, by
selecting one of these colors,
| | 00:53 | if we want to make it stand out from
the rest of the fields on the layout.
| | 00:59 | Or here we can just choose white, which makes
it pop a little bit from the gray background.
| | 01:04 | You'll also notice that the item next
to it, although it is a selection of
| | 01:08 | several different patterns, these
first two here are the most useful.
| | 01:11 | I'm pretty sure you're not
going to use any of these patterns.
| | 01:14 | But you might want to use this toggle
here between having a Solid background or
| | 01:20 | a transparent background.
| | 01:22 | So you see even though we have a
white color on this field and we apply the
| | 01:25 | transparent background, you can
see the gray color come through.
| | 01:28 | In this case, we'll say Solid.
| | 01:30 | That way, it cuts it apart from
the rest of the fields in the layout.
| | 01:34 | See, we can actually select a field,
and hold on our Shift key, and do the same
| | 01:43 | to all the rest of the
fields in our layout, if we'd like.
| | 01:45 | So I'll make that a Solid color.
| | 01:50 | You see that we've now got contrast
between the gray background and the field color.
| | 01:56 | In addition, if we go back to selecting
our CompanyLogo, we've got some effects.
| | 02:00 | So by default, there are no
effects on a field, or an object.
| | 02:03 | But I could choose a Drop Shadow, for example.
| | 02:06 | If you look very closely, you can see
a small, little, 3D-looking Drop Shadow
| | 02:11 | effect, which will get more dramatic if
we go to this next line, and we choose
| | 02:14 | Line, and pick, let's say, a thicker line point.
| | 02:18 | You'll notice now that we've got
this gray Drop Shadow effect behind it,
| | 02:23 | we can change the Color of the
lines to give it more contrast.
| | 02:28 | So you can see there, it gives it more
of a 3D effect, or it appears as it's
| | 02:32 | kind of floating above your layout.
| | 02:34 | Using these same tools, we can also affect
the way the text appears inside of a field.
| | 02:38 | For example, if we select the Notes field,
| | 02:40 | you'll see that we've got an option here
that allows us to display Text baselines.
| | 02:45 | Those are these dotted lines here that
show where each row of the text that's
| | 02:48 | contained within the field will appear.
| | 02:52 | We can choose to show Text baselines,
give them different colors, if we'd like to.
| | 02:58 | We'll just keep them as their default,
as you see every one of your fields that
| | 03:01 | contains non-container values
has Text baselines by default.
| | 03:05 | We can also make modifications to
the text that appears inside the field.
| | 03:09 | So, for example, I can choose a field,
and then choose different fonts, if I'd
| | 03:14 | like to, from the Text section of the
Appearance tab on the Inspector, or even
| | 03:18 | Highlight the values inside the
field, Bold, Italics and such.
| | 03:22 | I can also choose Paragraph Alignment.
| | 03:24 | You're probably familiar with a lot
of these text formatting tools from
| | 03:27 | other applications.
| | 03:28 | They all perform the same
way here inside of FileMaker.
| | 03:30 | So I can select a field, or a group
of fields, and apply the same Text, or
| | 03:35 | Alignment, or Line Spacing to them at
the same time, or I can choose a text
| | 03:39 | object, like the
Customer Layout, and do the same,
| | 03:41 | Toggle between Bold and
Italic, those types of options.
| | 03:46 | In addition to the way that a field
looks when you are in Layout mode, you can
| | 03:49 | also control the way that the
data within the field is formatted.
| | 03:52 | For example, if we navigate over to
the Product Detail layout, and save our
| | 03:57 | changes on this layout, you'll see
that we have a series of fields that
| | 04:01 | represent dollar values, like Price and Cost.
| | 04:05 | When we select Cost, the Cost field was
defined as a Number field, when we first
| | 04:10 | set this up inside of the
Manage > Database window.
| | 04:12 | Therefore, it's going to contain
numerical values, but more specifically here,
| | 04:16 | it's going to contain dollar values,
because it's the cost of a product;
| | 04:20 | same thing with Price over here.
| | 04:21 | So if we go into the Inspector and
choose the Data tab, you'll notice at the
| | 04:26 | very bottom, if we collapse
some of these other sections,
| | 04:29 | you'll notice that we've
got a Data Formatting section.
| | 04:32 | From here, if I drop down and choose Currency,
| | 04:36 | it gives me various different options
that I can use to apply towards the data
| | 04:40 | that's going to be stored within these fields.
| | 04:42 | So, for example, I'll choose Cost, I'll
hold down my Shift key, and also choose Price.
| | 04:46 | Now I'm going to choose Currency
again, and it gives me several different
| | 04:51 | options. Here I can choose Fixed number
of decimals, and what the leading Symbol
| | 04:56 | will be, whether or not I want to use
a thousands separator, and some other
| | 05:00 | international options that I can choose.
| | 05:02 | If it's Negative, what Color do I
want to show, those types of things.
| | 05:09 | So now, if you go into Browse mode, save
your changes, you can see that the data
| | 05:14 | is stored in here as 2,787.50.
| | 05:18 | But when it's formatted in the
layout, we can see the Dollar sign and a
| | 05:21 | thousands separator in the decimal places.
| | 05:23 | We don't have a value inside of Price just yet.
| | 05:25 | But this helps you format data
appropriately based on how it's going to be handled.
| | 05:30 | Now the thing to keep in mind is if
there is another layout that also has the
| | 05:33 | Cost field on it, we would have to apply
the same formatting to it, in order for
| | 05:37 | it to show this currency formatting,
| | 05:40 | although I could just copy this field
and paste it to another layout, and it
| | 05:43 | would carry with it the
formatting that I just applied.
| | 05:46 | So keep in mind that applying
formatting on the layout is only applying it
| | 05:50 | towards that one field on that layout,
unless you copy an already formatted
| | 05:54 | field to another layout.
| | 05:56 | Same is true for Date fields, by the way.
| | 05:57 | It's not just for Currency.
| | 05:59 | If you look at the Date Created field,
you see that we can either format it
| | 06:02 | as entered, or we've got some other
options here to show different formats for dates.
| | 06:07 | Now this does not change the
underlining data in the database.
| | 06:10 | If you remember, FileMaker is storing
dates, for example, as an integer, the
| | 06:14 | number of days since the year 1/1/0001.
| | 06:17 | So it doesn't matter how you view it
when you are looking at it in Browse mode,
| | 06:21 | or when you are printing or
viewing it in Preview mode.
| | 06:24 | This is just simply a formatting
instruction that you are giving it for this
| | 06:27 | field on this layout.
| | 06:29 | So, for example, if you save our
changes as we go into Browse mode,
| | 06:33 | you look, we could change this, for
example, from the Standard Formatting to
| | 06:39 | something like this.
| | 06:43 | Now we go into Browse mode and hit Save.
| | 06:45 | You see there are different ways.
It doesn't change the underlining data or the way
| | 06:48 | that it was entered,
| | 06:49 | but you see where there are different
ways that we can manipulate dates, as well.
| | 06:53 | So there is a whole series of
different ways that you can manipulate these.
| | 06:56 | One other one I'll show you back on
the Customer Detail is our CompanyLogo.
| | 07:01 | If we go back into Layout mode, and
choose CompanyLogo, you see that this
| | 07:05 | last icon over here in Data
Formatting allows us to give different
| | 07:09 | instructions on how the images that
might be contained within the container
| | 07:13 | field will be managed.
| | 07:15 | So here we can Crop to frame, for
example, or Reduce the image to fit.
| | 07:20 | So if you crop it, then an image
that's any larger than, let's see, we've
| | 07:25 | got 325 pixels wide.
| | 07:27 | If you have an image that's let's say
500 pixels wide, it's just going to crop
| | 07:30 | only 325 pixels portion of it.
| | 07:34 | Reduce image to fit is
probably the most general option.
| | 07:38 | It's the default option.
| | 07:39 | That's most likely what you're going
to use, because no matter what the image
| | 07:41 | size is that you're putting into your
container field, you can make it fit
| | 07:44 | inside of the size of the
container field on your layout.
| | 07:48 | Make sure you check Maintain
original proportions, in that case ,as well.
| | 07:51 | So here you can align images internally.
| | 07:53 | So nine times out of ten you're going
to say Reduce image to fit, Maintain
| | 07:56 | original proportions,
and align on your settings.
| | 07:58 | I'll be making these same changes on
other layouts in our Exercise Files, but if
| | 08:02 | you're looking for some extra practice,
feel free to go ahead and use this
| | 08:05 | version of the exercise file to do the same.
| | 08:07 | So you've got a couple of different
formats that you can choose from there. Even
| | 08:10 | though FileMaker stores data
in specific ways internally,
| | 08:13 | you can use the Field Attribute tools,
and even some of the ways that you could
| | 08:16 | format data inside your field to give
your users a look and the feel that's
| | 08:20 | appropriate to the data that's been
stored, or the type of the field that you're
| | 08:24 | placing on your layout.
| | Collapse this transcript |
| Setting field behaviors| 00:00 | Sometimes when you place a field on a
FileMaker layout, it's really just there
| | 00:03 | for display, rather than to allow
users to edit the data within the field.
| | 00:07 | A good example of this would be our primary
key for any given record in your database.
| | 00:11 | The primary key that we have here,
the Customer ID, is not a field that you
| | 00:16 | want users modifying.
| | 00:17 | As a matter of fact, if they do modify it,
it could break any relationships that
| | 00:20 | you've got set up between the
customer table and any other child table.
| | 00:23 | But as you see here, when I place this
field on the screen, by default, it does
| | 00:27 | allow entry into the field.
| | 00:28 | This can be dangerous, since each
record should have its own unique value and
| | 00:32 | users should never change them.
| | 00:34 | If you would like to control the way
that the users interact with the data in
| | 00:37 | your field, or whether or not you want
to allow them to do so at all, you can do
| | 00:40 | this through something
that's called Field Behaviors.
| | 00:43 | Of course, this all takes place in
Layout mode, so let's go to Layout mode,
| | 00:46 | into the View menu.
| | 00:48 | And if we select our field, you'll
notice under the Data tab of the Inspector -
| | 00:53 | if you don't have the Inspector
open, you can do Ctrl+I on Windows or
| | 00:58 | Command+I on Mac, or hit this little I
button here - you'll notice that there's
| | 01:02 | a tab called Data, and in one of those
sections in the Data tab is something called Behavior.
| | 01:07 | By default, any field that you
place in your layout will allow entry in
| | 01:11 | Browse mode and Find mode.
| | 01:13 | And what's interesting is that you
can choose either one of the two modes.
| | 01:16 | So simply put, you can choose whether
or not you want your users to be able to
| | 01:19 | click on this field when you're
looking at it in Browse, which will allow
| | 01:22 | editing, or allow them to enter the
field in Find mode, which means that you can
| | 01:26 | enter a Find criteria in the field.
| | 01:28 | Now, the reason that they are separate
is because entering data into a field in
| | 01:31 | Find mode won't actually modify the
original field's data, since there is no
| | 01:35 | field chosen when you're in Find mode.
| | 01:37 | So if you want to be able to search by
a Customer ID but not allow someone to
| | 01:40 | change one, then in that case what you
would want to do is take the check mark
| | 01:44 | off of the box next to Browse mode,
but leave the one next to Find mode.
| | 01:48 | Now, if we go into Browse mode and Save
our changes, you'll see that we cannot
| | 01:54 | click into that field on any
of the records in our database;
| | 01:58 | however, if we go into Find mode, you
see that we can click right into that
| | 02:03 | field, which allows us to enter
criteria when we're doing a search.
| | 02:06 | We'll cover more information on
Find mode in an upcoming chapter.
| | 02:10 | There's also a couple of other things you
can control under the Field Behaviors dialog.
| | 02:13 | Let me go back into Layout mode.
| | 02:16 | You'll see that you can apply
Visual Spellchecking to a field.
| | 02:19 | So, for example, if you have your Notes
field selected, you can choose whether
| | 02:24 | or not to apply the Visual Spellchecking,
which means as you type you can see
| | 02:27 | a red line underneath it, whenever
there's a word that does not match the
| | 02:31 | spelling inside of your computer's dictionary.
| | 02:34 | By default, it's left unchecked, so
it's really up to you on whether or not you
| | 02:37 | want to use that functionality.
| | 02:38 | And you'll also notice that
there's a Go to next object.
| | 02:41 | We're going to cover something that's
called the Tab Order in a later movie, but
| | 02:45 | basically as you're tabbing, you will
go from one field to the next, and that's
| | 02:49 | traditionally, by default, done with a Tab key;
| | 02:52 | however, you can change that
behavior on any given field.
| | 02:54 | So, for example, in order to be able
to tab out of the CompanyName field, I
| | 02:58 | could change it to the Return character, or Enter.
| | 03:01 | One thing you should keep in mind,
however, is that pressing the Enter key will
| | 03:04 | commit changes in a field, so if you
turn this Enter key on, it's not going to
| | 03:08 | commit the changes in the field, but
instead skip on to the next field that's
| | 03:12 | not yet committed in the record.
| | 03:13 | So you've got this concept of how
you save something to FileMaker.
| | 03:16 | If your users are used to just hitting
the Enter key, which works on any other
| | 03:20 | field by default in the system, then
changing this around might be a little bit awkward.
| | 03:24 | Although sometimes users that are used
to working on different platforms might
| | 03:27 | be used to hitting the Return key,
which is a Return and Enter key on some
| | 03:31 | keyboards, in order to be able
to move on to the next field.
| | 03:34 | So here you can allow Tab and Enter
to move people on to the next field,
| | 03:38 | because otherwise in FileMaker by
default, if they hit Return, they are just
| | 03:40 | going to add a Return character or an extra row
of spaces inside of whatever field they are in.
| | 03:45 | So I will be making these same types of
changes on other layouts, and you will
| | 03:48 | see these in upcoming Exercise Files.
| | 03:49 | And if you want some extra practice,
you can go into this file, the 10_04 file,
| | 03:53 | and make these changes
in other layouts yourself.
| | 03:55 | Many fields in your FileMaker
layouts will have their own independent
| | 03:58 | usage roles, and working with the
Field Behavior dialog will allow you to
| | 04:01 | control these, one by one.
| | Collapse this transcript |
| Using the Tab Control feature| 00:00 | The Tabbed User Interface is a popular
design feature with many applications.
| | 00:04 | FileMaker Pro offers you a Layout
tool that allows you to create the tabbed
| | 00:09 | interface in your layouts.
| | 00:10 | And then when selected, each one of
these tabs can display a unique set of
| | 00:14 | objects and/or data, thereby allowing
you to use the same section of layout real
| | 00:18 | estate for multiple purposes.
| | 00:20 | The term Tab Control refers
to the entire Layout object.
| | 00:23 | Each Tab Control in FileMaker can
contain one or even more individual
| | 00:27 | tabs called Tab panels.
| | 00:28 | It's really not a navigation tool;
rather, it's a layout organization tool used
| | 00:33 | to selectively display different sets of fields.
| | 00:35 | I am going to show you how
to create a tabbed interface.
| | 00:38 | If you open up your 10_05 Exercise
File and navigate to the Customer Detail
| | 00:42 | layout, you see what we have on this
screen is a pretty classic situation of a
| | 00:45 | cluttered screen, and way too much
information all on one screen at a time.
| | 00:49 | Now, if you could talk to your users
and say, can I put these things into
| | 00:53 | different sections on the layout?
| | 00:55 | A lot of people might say that, yes,
I could group these fields together.
| | 00:58 | For example, we've already
grouped some of the Address or Contact
| | 01:01 | Information fields together.
| | 01:02 | But you will see that these fall into
different groups. If we look at, some
| | 01:05 | might be Discount and Tax Rate, could
be determined financial, for example.
| | 01:09 | But let's say you do go back to your
users and say, help me group these fields
| | 01:14 | together, and let's say you
come up with several groups;
| | 01:16 | for example, you could have Contact
fields, which could be your Address, maybe
| | 01:21 | the Company Name, Web Site, Phone
Number, those types of things, and then
| | 01:24 | financial fields, Discount,
Tax Rate. How about Notes?
| | 01:28 | Maybe give the Notes its own Tab panel,
so you can make it a lot larger, and it
| | 01:31 | could take up more screen real estate.
| | 01:32 | And the same thing with this logo, that
seems to be occupying a great deal of
| | 01:36 | space in the middle of our screen.
| | 01:37 | Once you and your users have
determined a plausible set of groups that your
| | 01:41 | fields can fit into, what you'll want
to do now is go into Layout mode, and
| | 01:46 | you'll notice in our Layout toolbar, we've
got something here called the Tab Control tool.
| | 01:50 | Now, if we want to draw the Tab
Control tool in the space that's currently
| | 01:54 | occupied by the Fields, we'll need
to make a little bit of room for it.
| | 01:57 | So what I am going to do is I am going
to suggest that we Drag+Select by holding
| | 02:01 | down our Pointer tool, and when we Drag+
Select, we're going to grab all of the
| | 02:07 | fields in the layout, and to put them
into our Clipboard for a moment, we're
| | 02:11 | going to hit Cut, which now
gives us a clean slate to work with.
| | 02:15 | We're then going to choose our Tab
Control, which turns our Pointer tool to a
| | 02:19 | crosshair, much like some of
these other Tab Controls do.
| | 02:22 | What we're going to do here is we're
going to draw this Tab Control, and have it
| | 02:26 | occupy the full space inside
of our Customer Detail layout.
| | 02:31 | Now what you see onscreen is
something called the Tab Control Setup dialog.
| | 02:35 | This is where it allows you to determine
what number of tabs will appear in your
| | 02:38 | Tab Control, and what you will
name those Tab panels as well.
| | 02:41 | And since we've determined that we've
got four different groups of fields, let's
| | 02:44 | create a Tab panel for each one of them.
| | 02:47 | First, we will start with
Contact, and hit Create. Let's see.
| | 02:50 | We just type right into the Tab Name field.
| | 02:54 | Financial, hit Create.
| | 02:57 | Notes, and then Logo.
| | 03:03 | Now, we've created all our Tab panels,
but before we leave this window, there
| | 03:06 | are some other settings to look at, as well.
| | 03:08 | For example, which one of these tabs is
going to always be in front whenever we
| | 03:12 | land on this layout or navigate to the layout?
| | 03:14 | Let's keep that at Contact for now,
since Contact is where some of the main
| | 03:17 | details are going to be located.
| | 03:19 | You can also determine whether or not
you're going to fully Justify to the Left
| | 03:23 | all of your tabs, or they
could be Center, Right, or Full;
| | 03:26 | we'll just keep it as a standard Left,
which will leave all the Tab panels
| | 03:29 | drawing from left to right.
| | 03:31 | The Appearance of the tab can
either be Rounded or Square.
| | 03:34 | We'll also leave that at Rounded,
since these are all pretty common.
| | 03:37 | And then finally we choose between the
Tab Widths, and whether or not they can
| | 03:40 | match the maximum Width
of any of the label words.
| | 03:43 | You see here that all our words
are pretty much the same Width.
| | 03:46 | So what we can choose to do here is
give it a Label Width, Label Width plus an
| | 03:51 | Additional Margin, Width of the Widest
Label or the Longest Word, and give it a
| | 03:57 | Minimum or a Fixed Width, which we can
put in number of pixels or choose inches
| | 04:00 | or centimeters, if we want to.
| | 04:01 | But we'll just choose Width of Widest Label.
| | 04:04 | Now when we hit OK, we see that we've
got all four of our Tab panels appearing,
| | 04:08 | and now we want to place
the Fields onto our Tab panel.
| | 04:11 | I am going to click inside the Tab
panel with my Pointer tool, and we're going
| | 04:15 | to go and hit Paste, and we see
our fields come back onscreen.
| | 04:19 | Some of them aren't going to
fit, but we will make this work.
| | 04:25 | So first, while we're working with
this, why don't we grab the CompanyLogo
| | 04:28 | label, hold down the Shift key, grab the
CompanyLogo field, hit Cut, go into the
| | 04:35 | Logo tab, and hit Paste.
| | 04:38 | Move those inside the center.
| | 04:40 | Go back to the Contacts.
| | 04:42 | Let's do the same with Notes.
| | 04:44 | Shift+Select Notes, hit Cut, go into the
Notes Pane, click inside, and hit Paste.
| | 04:53 | And let's give Notes a little bit more room.
| | 04:55 | As a matter of fact, we probably don't
need the field label anymore, since the
| | 04:57 | tab can work as a field label.
| | 04:59 | So let's hit Delete to get rid of that,
and with our Pointer tool, we will move
| | 05:03 | Motes up into the corner, grab the
bottom right-hand corner, and let Notes
| | 05:07 | occupy the entire area.
| | 05:09 | Now, back in Contact, we've
got two more fields down here.
| | 05:12 | Discount Rate, Shift+Selecting these
two field labels and fields, we will
| | 05:18 | cut again, click inside the Tab panel, and
hit Paste, position them right about here.
| | 05:29 | Now, back in Contact, we've got a
series of different fields that we can
| | 05:32 | reposition inside the Contact Detail layout.
| | 05:36 | One thing that might not be a bad idea
is to take DateCreated, move that down
| | 05:40 | into our Footer, RecordCreatedBy,
move that into the Footer, DateModified.
| | 05:49 | Maybe grab all of these by Drag+
Selecting, and if you recall, we've got a
| | 05:54 | Inspector option under the
Position tab and Arrange & Align.
| | 05:59 | We can choose the Align on
horizontal centers, and we see that those
| | 06:04 | automatically sync up.
| | 06:06 | So now we can take these other
fields, just using our Pointer tool,
| | 06:10 | Shift+Selecting where necessary, then we
can move everything into position using
| | 06:15 | some of the tools that we've already discussed.
| | 06:30 | And finally, just the Address field.
| | 06:32 | So here, we can put those right here, let's say.
| | 06:37 | So now you see, when you go into
Browse mode, you'll be asked to save your
| | 06:41 | changes, which we will do.
| | 06:43 | But now we've got the same
layout, but much more room.
| | 06:46 | We've got all of our contact information
here is in the default Tab panel, and when
| | 06:50 | we go into our Financial Tab, now
notice that the First and Last Name field
| | 06:55 | labels are showing up, even
though those are placed over here.
| | 06:57 | Well, this is an important part about
fitting objects inside of your Tab panel.
| | 07:01 | If you go back into Layout mode, you'll
notice that these field labels actually
| | 07:05 | extend off the edge of the tab.
| | 07:08 | So if something extends off the
edge of the tab, it's not going to be
| | 07:10 | contained within the tab.
| | 07:11 | So this is a very important note.
| | 07:13 | So we will Shift+Select these options
and then just drag their size smaller.
| | 07:17 | So now when we go back into Browse
mode, you'll see that the same thing is
| | 07:22 | happening for Web Sites, so we will do that.
| | 07:24 | So there's a little bit of finessing
that's necessary, and you see everything
| | 07:29 | else seems to be okay.
| | 07:30 | So we go back into Browse mode, hit Save,
and everything has got its own spot.
| | 07:38 | You can also modify the
appearance of Tab Control in several ways.
| | 07:41 | For example, in Layout mode, if you
double-click on one of the Tab panel
| | 07:44 | names, you can reorder these in any way you want,
by moving the handles around, if you would like.
| | 07:53 | You can also nest a Tab Control within
another Tab Control, which we will do
| | 07:57 | in a later exercise.
| | 08:00 | Just like any other layout object, you
can change the Color or Appearance by
| | 08:05 | using Fill options, Embossed, or
Drop Shadow, change the line Widths,
| | 08:09 | different things like that.
| | 08:10 | A couple of things to keep in mind
when moving and resizing controls.
| | 08:12 | When a Tab Control is moved, for example,
if we wanted to move this around, it's
| | 08:18 | going to move all of its
containing objects with it.
| | 08:22 | But if you make a Tab Control
smaller and the fields within it become
| | 08:25 | exposed, they will need to be resized in order
to still be contained within the Tab Control.
| | 08:30 | So if an object no longer fits within
a Resize Tab panel, much like we saw
| | 08:33 | with our First, Last, and Web Site
Field Labels, then it's going to pop out of
| | 08:37 | the Tab Control and become part of the layout,
thus appearing on every one of the Tab panels.
| | 08:41 | I will be making some of these same
changes on the other layouts in this
| | 08:44 | database, and if you would like to
get some extra practice, you can use the
| | 08:47 | 10_05 file and apply some of the Tab
Controls to the other layouts yourself.
| | 08:51 | The Tabbed User Interface is a
popular design feature in many applications
| | 08:55 | outside of FileMaker.
| | 08:56 | So if you choose to use Tab Features in
your own designs, your users should be
| | 09:00 | pretty familiar with how they should operate.
| | 09:02 | The Tab Control feature helps you
easily create tabs to organize your fields,
| | 09:06 | without having to ever create new layouts.
| | Collapse this transcript |
| Setting tab order| 00:00 | A lot of computer users don't like
having to take their hands off the keyboard
| | 00:04 | when doing data entry.
| | 00:05 | For example, one way that you can
enter data into certain fields is to click
| | 00:08 | into a field, make some changes, and then
take your mouse and click into another field.
| | 00:15 | But in most cases, users like to keep
their hands on the keyboard and just tab
| | 00:19 | from one field to another.
| | 00:21 | An important aspect of creating an
effective user interface is going to be how
| | 00:24 | you manage how users move throughout the layout.
| | 00:27 | That's really going to be a key
to its usefulness to your users.
| | 00:30 | The primary means for doing so is by
customizing something called the Tab Order
| | 00:34 | in order to create a smooth and
logical progression, by which your users can
| | 00:37 | then move from field to field, as
well as from field to non-field objects.
| | 00:42 | FileMaker creates a default Tab Order
for each layout, according to the physical
| | 00:45 | placement of the fields on the layout.
| | 00:47 | So, for example, the order in which
you've added the fields to the layout will
| | 00:50 | determine what your default order will be.
| | 00:52 | But that's not always going to be the
most logical way that your users want to
| | 00:55 | work with the fields.
| | 00:56 | So if we go into Layout mode and go
under the Layouts menu to Set Tab Order,
| | 01:04 | you'll see a window appear called Set Tab Order.
| | 01:07 | You'll also see that by each field and
layout object, we've got arrows with numbers.
| | 01:12 | And as you can imagine, this is the
order in which the tabs features will work.
| | 01:16 | And most of the time when you open up
the Set Tab Order, you are already going
| | 01:19 | to see numbers in these arrows.
| | 01:20 | However, this sequence might not be
the way that your users want to tab
| | 01:23 | through the fields, and also, there might be
fields that you don't want in your Tab Order.
| | 01:27 | So the best way to set a new Tab Order
is to go into your Set Tab Order window
| | 01:31 | and hit Clear All, and then you see
all the numbers are gone from the arrows.
| | 01:35 | And then now what you can do is pick
the order that you want to use by simply
| | 01:38 | clicking, in order, into the Arrow Fields;
| | 01:42 | you see here's 1, 2, 4, 5, 6, 7, and so on.
| | 01:52 | And now I am going to leave these
fields down below. Since users don't actually
| | 01:55 | enter any data into them,
| | 01:56 | we're going to leave those out of
the Tab Order, and also we don't want
| | 01:59 | users clicking into the Primary Key
field anyways, so we will exclude that
| | 02:03 | from the order as well.
| | 02:04 | You'll also notice that
number 2 is actually the Tab panel.
| | 02:10 | So we've got the ability to tab from
the CompanyName into the Tab panel, so
| | 02:14 | that things like buttons or even this
logo for that matter, we could have put
| | 02:18 | into the Tab Order, if that logo happened to
have a ScriptAction assigned to it, for example.
| | 02:22 | When we're done with setting our Tab
Order, we hit OK, and now we'll go back
| | 02:27 | in Browse mode, save our changes,
and we see we click into the CompanyName,
| | 02:32 | and now we are going to hit
the Tab key on the keyboard.
| | 02:34 | You see it tabs over to the Tab panel,
and now you'll notice I can go to
| | 02:39 | different panels, if I want, by hitting
the left and right arrows on my keyboard,
| | 02:43 | and if I hit the Spacebar key,
that will take me to that Tab panel.
| | 02:47 | So you're going to need to
instruct your users on how to use that.
| | 02:51 | But now, if I hit Tab again, it goes
into the fields in the order that we
| | 02:55 | originally set it up, and then when it
gets to the end, it starts all over again.
| | 02:58 | But you will notice now if you go into
Layout mode, and let's say we insert a
| | 03:04 | new field, which we can
do by saying Insert Field.
| | 03:06 | We'll just pick one of these for an
example, like Notes, for example, and if
| | 03:12 | we place Notes somewhere else in the
layout, and go into the Set Tab Order, we
| | 03:19 | will see that what its done is it's
automatically placed it at the end of the layout order.
| | 03:24 | But we could manually go in and insert it
in any one of these locations, if we want to.
| | 03:29 | So, for example, we could say this would be
7, and this could be 8, that type of thing.
| | 03:40 | So it will automatically add newly
assigned fields to the end of the Tab Order,
| | 03:44 | which makes it a lot more useful, but
then you can go in here and either Clear
| | 03:47 | All and Reset them, or just manually
change a couple of them if you want to swap
| | 03:51 | some of the fields out of the Tab Order.
| | 03:53 | I will be making these same changes on
other layouts, and you'll see those in
| | 03:56 | upcoming exercise files.
| | 03:58 | But if you want some more practice
on Tab Order, feel free to go into the
| | 04:00 | 10_06 exercise file and go into Product
Detail, or Invoice Detail to do the same thing.
| | 04:06 | The order in which users can tab
through fields can help make data entry a lot
| | 04:10 | more efficient, and using this Set
Tab Order gives you the control over how
| | 04:14 | that's going to work.
| | Collapse this transcript |
|
|
11. Finding DataUsing the basic find functions| 00:00 | One of the key requirements of any data
storage application is data retrieval.
| | 00:04 | FileMaker provides this
via its Find mode features.
| | 00:07 | Now we've been covering a couple
different modes throughout this title, and
| | 00:10 | those of course can be found under
the View menu. We've worked with Browse
| | 00:13 | mode, which is the default mode, allowing you
to enter data, edit data and just read data.
| | 00:18 | Then of course, Layout mode, which
helps us design our Layouts and make
| | 00:21 | modifications to existing designs, and
then there's Preview mode, which basically
| | 00:25 | allows you to see what your
prints are going to look like.
| | 00:27 | What we're going to focus on in this
chapter though is Find mode, and this is
| | 00:30 | the mode where you perform Find requests.
| | 00:33 | When you perform a Find request,
FileMaker Pro searches through all the
| | 00:36 | Records in a table, comparing the criteria
you specify with the data that's in the table.
| | 00:41 | Records with data matching the
criteria become the found set, which is the
| | 00:45 | subset of Records being browsed.
| | 00:46 | Records that don't match
the criteria are then omitted.
| | 00:49 | So nothing happens to the total
number of Records that are found in your
| | 00:53 | database when you're searching.
| | 00:54 | You're just getting any responses to
your search as part of something that's
| | 00:57 | called a Found Set, and the
concept of found set is going to be very
| | 01:00 | important moving forward.
| | 01:01 | Once you have a found set, you'll
work then with only those Records.
| | 01:04 | For example, found sets can affect
editing, sorting, printing, deleting,
| | 01:09 | exporting, saving snapshot links; those
types of things are all affected by a found set.
| | 01:14 | So let's open this Customer List Layout
in our Exercise File, and I'm already in
| | 01:18 | Find mode, but in case you're still in
Browse mode, there's a couple different
| | 01:21 | ways you can get into Find mode,
first of which of course is under the View
| | 01:24 | menu, choosing Find or choosing
Command+F, or Ctrl+F on Windows.
| | 01:30 | Also, down in the bottom left-hand
corner, you can choose and toggle between
| | 01:34 | modes through clicking on, in this case
it says Browse, so whatever the current
| | 01:38 | name of the mode, is you just click on
that and choose another one. Or you can
| | 01:42 | enter Find mode by going into your
Status toolbar and pressing the Find button.
| | 01:47 | The first thing you'll notice is that
everything onscreen goes blank, and this
| | 01:50 | should not alarm you, or your users;
all your data is still in the database.
| | 01:54 | What this is doing now is clearing out
all the fields, allowing you to type in
| | 01:57 | search criteria into them appropriately.
| | 01:59 | Once you're in Find mode, pick a field
that you want to add criteria, and type
| | 02:04 | values into those fields.
| | 02:06 | Then when you perform a Find, FileMaker
is going to search for any Records that
| | 02:09 | match the criteria from the field that
you just entered the data into, and this
| | 02:13 | set of Matching Records will
replace any previous found set.
| | 02:16 | So let's take a look at this.
| | 02:17 | So in Find mode, you'll also notice
that in addition to the fields being empty,
| | 02:23 | you've also got these little
magnifying glass icons in each field.
| | 02:26 | This is to further remind you and
your users that you're in Find mode.
| | 02:30 | This way users don't get confused in
thinking they're in Data Entry mode,
| | 02:33 | because of course when you hit New
Record in Browse mode it also presents you
| | 02:36 | with a blank Layout onscreen.
| | 02:39 | So now FileMaker Pro is waiting for
you to enter some criteria, and you'll
| | 02:42 | notice that your Status toolbar has
also changed to allow a Perform Find
| | 02:46 | and Cancel Find button.
| | 02:47 | Of course, if you hit Cancel Find,
it'll take you back to Browse mode. Perform
| | 02:50 | Find will initiate the Find based on
the request you've entered, but first you
| | 02:53 | have to enter some in.
| | 02:54 | For those of you that are familiar
with the Web, this sort of behavior might
| | 02:57 | initially throw you, because instead
of offering you a single search field,
| | 03:00 | like in Google for example, and then
having another page or a Layout that you
| | 03:04 | can see your found set or results
displayed, FileMaker simply allows you to
| | 03:09 | use the fields placed on any given Layout and
then perform searches based on those fields.
| | 03:13 | So you'll see when you're in Find mode
you can go to Customer Detail > Products,
| | 03:18 | whatever you want to do.
| | 03:19 | Any Layout that you've created in
FileMaker can be used to enter Find Requests,
| | 03:23 | which is actually a strength of FileMaker Pro.
| | 03:25 | So now once you're in Find mode,
let's do some practices here. Let's click
| | 03:28 | into the City field.
| | 03:30 | Let's type the word Los, and now we're
going to hit Perform Find, and you'll
| | 03:34 | notice that when we go back into Browse
mode, you'll see something here in the
| | 03:37 | upper left-hand corner on our Status
toolbar; we see that we've now got 4/1523.
| | 03:43 | This indicates that we've got 1523
Records in the database, and only 4 match the
| | 03:48 | criteria that we just entered.
| | 03:49 | So 4 are in our Found Set.
| | 03:51 | You see that we can navigate through
the 4 Records by using the book icon and
| | 03:56 | also this pie chart-looking icon here
indicates that our Found Set takes up
| | 04:00 | about this percentage of space in the
overall amount of Records in the database.
| | 04:04 | Now the important thing to note here
is just because I've created a Found Set
| | 04:07 | doesn't mean that all the other
Records in the database have disappeared.
| | 04:09 | As a matter of fact, I can see all of
the eecords that don't match any of the
| | 04:13 | search criteria by going under Records
and choosing Show Omitted Only, and now
| | 04:18 | you see that our Found Set has become
1,519 Records out of 1,523, and our pie
| | 04:25 | chart has changed so the light area,
which represents our Found set, is now
| | 04:29 | inverted from what we saw earlier.
| | 04:30 | At any given time, you can reset the
view by selecting this Show All button.
| | 04:35 | There's also a Show All option that you
see is currently grayed out now under your
| | 04:39 | Records menu, but it's grayed out
because all Records are showing.
| | 04:43 | So now you see our Found set has been reset.
| | 04:45 | Sometimes you may have more Records in
your Found Set than can be seen on one
| | 04:49 | screen at a time; in this case you may
just have to scroll through the List View
| | 04:52 | to be able to see all of them.
| | 04:53 | This is also a big reason why you
even have a List View in the first place,
| | 04:57 | because the more Records you can see
onscreen at any given time, the more of
| | 05:01 | your Found Set you'll be able to work with.
| | 05:03 | Now let's look at the way that
the Find is actually working.
| | 05:06 | Let's go back into Find mode.
| | 05:07 | You saw when I typed in "Los" into
the City field and hit Perform Find;
| | 05:12 | let's take a close look at
what's coming back as our results.
| | 05:16 | None of these contain just the value Los,
for starters. That's the first thing
| | 05:20 | that we're noticing here. And also,
even though the word Los is contained in
| | 05:24 | Record number 2, only the characters
Los, are contained in three out of the 4
| | 05:28 | Records in our Found Set.
| | 05:30 | So what it's doing is finding the Los
part inside of each of these Records,
| | 05:34 | and because what it's doing there
is doing a search based on the field's
| | 05:37 | Index. Click inside of one of these fields
and hit Command+I on Mac, or Ctrl+I on Windows.
| | 05:43 | You'll be able to see the Index.
| | 05:45 | A field index is something that's
created by FileMaker. Anytime you search
| | 05:49 | inside of a field, what it does is
goes and takes every single record in your
| | 05:53 | database, and it grabs every unique
value that appears inside that field and
| | 05:58 | adds it to an Index.
| | 06:00 | So, for example, if the city Acosta is
in here 50 times, FileMaker is only going
| | 06:04 | to add it to its index once, and it also
is going to note which records actually
| | 06:09 | have the value Acosta in those fields.
| | 06:11 | That way if I type in Acosta, for example,
it doesn't have to go check all 1500 Records.
| | 06:17 | It can just go check its Index, and its
Index will tell it which Records should
| | 06:20 | be part of the Found Set.
| | 06:21 | FileMaker does two different types of
Indexes: first a Value Index, which just
| | 06:26 | indexes all the characters up to the
first 100 characters in your field.
| | 06:30 | A Word Index is used in some other
types of functionality within FileMaker, and
| | 06:35 | that just breaks up the different words.
But in a search we're using a Value
| | 06:39 | Index, so Los just happens to be one
of the characters in the 100 characters
| | 06:43 | that it's indexing for any given field.
| | 06:45 | So that's how it's finding matches for us.
| | 06:48 | So let's do another search, for example.
We'll clear these out by going into
| | 06:51 | Find mode again, which gives us another
place to enter data, and we'll enter the
| | 06:55 | word Angel and hit Perform Find.
| | 06:57 | Now you'll notice here that we get Los
Angeles and Angels Camp, so what you're
| | 07:01 | seeing is we're getting that Value
Index again, the A-N-G-E-L is coming as part
| | 07:06 | of the second word in Los Angeles
and the first word in Angels Camp.
| | 07:09 | This is something to keep in mind when
you're working with FileMaker, or when
| | 07:12 | you're training your users, so make
sure to set these expectations with them, so
| | 07:15 | they're not surprised with the
results that they're getting.
| | 07:17 | These are the basic ways to find
data inside your FileMaker database.
| | 07:21 | Keep in mind that in addition to
FileMaker's ability to be able to create the
| | 07:24 | data storage mechanism and
provide a user interface,
| | 07:27 | it also does provide this very
powerful data retrieval tools, as well.
| | Collapse this transcript |
| Reviewing new requests in the Find mode| 00:00 | We've taken a look at searching inside
of one field by typing a value into the
| | 00:04 | field while you're in Find mode, but
what if you want to find multiple values
| | 00:08 | from the same field as part of one search?
| | 00:10 | Well, in those instances, you're going
to need to be familiar with something
| | 00:13 | called adding a Find Request,
| | 00:14 | we're going to cover in this movie.
| | 00:16 | So let's take a look at that, if you
open up the Exercise File, and we're going
| | 00:20 | to go to the Customer List Layout,
and you see that we've got a series of
| | 00:23 | records inside of the FileMaker database here,
and each one of them represents a customer.
| | 00:27 | So let's say my goal is I want to
create a found set of customers in California,
| | 00:31 | so I can print a report.
| | 00:32 | So in order to do that, I'll want to
enter Find mode by hitting the Find button,
| | 00:36 | and type CA into the State
field, and then hit Perform.
| | 00:40 | Now you can also perform a Find by
hitting the Enter button on your keyboard,
| | 00:43 | which is what you're going to do 99%
of the time as you get familiar with
| | 00:46 | FileMaker, but we'll hit the Perform
Find button. And we see here that we've got
| | 00:51 | 23 records out of our total of 1,523
records that match that criteria, and
| | 00:55 | therefore, we've created
a found set in FileMaker.
| | 00:58 | So I could easily export these out, or
print off this list, and it would just
| | 01:02 | be all my customers in California, but
what if someone has asked me to produce
| | 01:05 | a list or an export of all the California
and the Washington customers, in one list?
| | 01:12 | Certainly I could do two different
lists and print them out in separate pieces
| | 01:15 | of paper, but if I want to combine those,
I'll simply go into Find mode again,
| | 01:19 | type in CA. But now, you might have
noticed here that you've still got the book
| | 01:25 | Icon in the upper left-hand corner, and
of course, in Browse mode that helps us
| | 01:28 | navigate from record to record
within our found set. In Layout mode,
| | 01:32 | it helps us navigate from layout to
layout, but in Find mode, it's managing
| | 01:35 | something called Find Request, and you
also see that the New Record button has
| | 01:38 | been turned into a New Request.
| | 01:40 | So what does this New Request mean?
| | 01:42 | If I hit the New Request button,
you'll see another row has appeared.
| | 01:46 | What this allows me to do is now
enter another value into the State field,
| | 01:50 | because if I had just gone like this
and entered CA and WA into the same field
| | 01:55 | and performed a find, I'm going to get
no records matching that request, so this
| | 01:58 | isn't a way that you add multiple criteria.
| | 02:01 | You don't put like a comma to
limit a criteria in the same field.
| | 02:03 | You'll hit a New Request, and now I
can have either records that match the
| | 02:07 | California in the State field or
Records that match Washington, and those will
| | 02:12 | both be part of my found set.
| | 02:13 | So let's take a look at what happens
when we perform find, and sure enough we
| | 02:16 | see we have 56 Records, which are
a mixture of Washington State and
| | 02:21 | California State Records.
| | 02:22 | Alternatively if I go into Find mode
again and create a request with State
| | 02:27 | equals California, and now if I go into
the Last Name field and I type Hanks and
| | 02:33 | then hit Perform Find, FileMaker is
going to give me back every Record that has
| | 02:38 | the State of California and the Last
Name Hanks, and because I put both of those
| | 02:43 | criteria in the same find request, it's
actually just limiting my found set to
| | 02:47 | the two records where both of the
criteria matched on the same record.
| | 02:50 | If I did the same thing, back in Find
mode, and hit CA and add a New Request and
| | 02:56 | then type in Hanks, and now I perform
the Find by hitting the Enter, you see
| | 03:01 | that I've got a mix here.
| | 03:02 | I've got everybody from California,
but then I also have Hanks, including the
| | 03:06 | couple that are in California.
| | 03:07 | I also have Hanks from a
record from Wisconsin, as well.
| | 03:12 | So this was what's called an or search.
| | 03:14 | This means, give me anything with the
Last Name Hanks or State of California and
| | 03:18 | combine those together into my same found set.
| | 03:20 | Couple of notes here.
| | 03:21 | When you're in Find mode you can
continue to add New Requests, and then you can
| | 03:25 | do that in unlimited number of times.
| | 03:27 | However, you'll notice that after a
certain number of requests, 10 to be
| | 03:31 | specific, FileMaker pops up a very
helpful message that says you're in Find
| | 03:36 | mode and you appear to be entering new
record date, are you sure you want to
| | 03:38 | create a new find request?
| | 03:40 | This is very helpful, because Browse
mode and Find mode look the same, a lot
| | 03:43 | of times users might accidentally
enter Find mode and think that they're
| | 03:47 | entering data into records.
| | 03:49 | FileMaker only lets you get 10 Records
into it before it says, hey, by the way
| | 03:52 | you're in Find mode, because this
could be disastrous information if it lets
| | 03:55 | you create hundreds of these things and
then you realize when you Perform Find
| | 03:59 | you'll simply get no Records matching your
requests, and none of those Records will be entered.
| | 04:02 | But really, it's very rare that you'll
have this many find requests in a search
| | 04:07 | anyways, because if you combine the
'ands' and the 'ors' together, you're
| | 04:10 | going to really have to have a lot of
data in your database for you to even
| | 04:14 | get records that returned after you get 10
different Find Requests added, but sometimes you can.
| | 04:18 | You can have millions of
records in your FileMaker database.
| | 04:21 | Another thing I want to
show you while we're searching.
| | 04:23 | You've got this button
here called Matching Records.
| | 04:25 | Now by default, every time you go
into Find mode and perform a search, the
| | 04:29 | Include button is selected.
| | 04:31 | That means that in the returning found
set include any record that matches the
| | 04:35 | criteria that I'm entering below.
| | 04:37 | However, you'll notice that
there's an option here called Omit.
| | 04:40 | This means omit any record that
matches the criteria below from my
| | 04:43 | returning found set.
| | 04:44 | So here if I say California, and I
choose Omit, and hit Perform Find, we
| | 04:49 | see that now it's giving me all the
records in the database where State
| | 04:52 | does not equal California.
| | 04:53 | So depending on what you're looking for,
you can do it as an Include, or you can
| | 04:57 | do it as an Omit search.
| | 04:59 | You can also use this with New Requests.
So, for example, if we go into Find
| | 05:02 | mode, and let's say this time we enter
State California and we see on this one
| | 05:06 | request it says Include, but now under
New Request, I'm going to go in, and I'm
| | 05:10 | going to type Hanks, but this
time I'm going to change it to Omit.
| | 05:14 | Notice that in the original request it is
still Include, and on the second one it's Omit.
| | 05:19 | This means that the Include or
Omit option is Request-specific.
| | 05:24 | Now when I hit Perform Find, what I'm
actually getting in this case is only
| | 05:28 | the Records that match California, but
it's omitting anything that just equals Hanks.
| | 05:32 | So even though there was one Hanks
that wasn't in the State of California,
| | 05:36 | that's been omitted from my Found Set.
| | 05:37 | So you can see that combining the
Omits and the Includes within your Find
| | 05:41 | Request can also give you useful results.
| | 05:43 | So in addition to just doing some basic
Finds with the New Request or even Omit,
| | 05:47 | FileMaker allow you to create both 'and'
or 'or' searches when retrieving custom
| | 05:51 | found sets of data from
your FileMaker database tables.
| | Collapse this transcript |
| Establishing search operators| 00:00 | When you're searching for data in
FileMaker Pro, you don't always have to
| | 00:03 | specify the exact criterion;
| | 00:05 | for example, if I want to find all the
invoices in my example file here, that
| | 00:10 | were created between the year 2000 and
2010, I don't actually have to create 10
| | 00:14 | new find requests each with a different year.
| | 00:16 | For example, going into Find mode, I
won't necessarily have to put in 2,000, then
| | 00:23 | New Request, 2,001 and so on.
| | 00:26 | And by the way, you'll also notice
one example of this is I just put in the
| | 00:30 | year 2000 and FileMaker recognized it,
because I was in a date field, that will
| | 00:35 | automatically reformat it to put in
wildcard characters, and we'll get to those
| | 00:40 | here just in a moment, but what I can do instead
is use something that's called Search Operators.
| | 00:45 | So back in Find mode, you'll notice
in the Layout bar, next to the Matching
| | 00:49 | Records Include or Omit, that I've
got a draft on your called Operators.
| | 00:52 | We have a list of different characters that
FileMaker interprets when added in a search criteria.
| | 00:57 | For example, let me show you some of the
easy and more useful ones: find duplicates.
| | 01:02 | If you just simply put an
exclamation point into a field and nothing else
| | 01:07 | and then Perform your Find, you can then
find all the records that have the same value.
| | 01:11 | Of course, it's going to find
the original and the duplicate.
| | 01:13 | This is something that a lot of
users use to clean up their database.
| | 01:17 | So, for example, if I put an
exclamation point in the Invoice number field and
| | 01:21 | hit Perform, we want it to come up with
no records, because we would be little
| | 01:24 | worrisome if there were duplicate
invoice numbers in our database.
| | 01:27 | So this is a good way to stay on top of
the data that you have in your system,
| | 01:31 | but putting that in the Invoice Date
field like we had done before, in executing
| | 01:35 | our find, gives us 64 records.
| | 01:37 | What this actually tells us is that
it's really 32 records with a duplicate.
| | 01:41 | It's what that says. Or they
could have multiple duplicates.
| | 01:44 | It gives you the original and the
duplicate, which is very useful when you're
| | 01:47 | doing things like
scrubbing your data, for example.
| | 01:48 | You will also notice a very handy one
back in Find mode, the equal sign that's a
| | 01:54 | called match whole word.
| | 01:56 | What that really means is that if you
put in an equal sign ,it's going to find an
| | 01:59 | exact match for any value
that follows the equal sign.
| | 02:03 | So let me give you an example of that.
| | 02:04 | If I go into Ship Via, and I put it in
an equal sign, right now what I'm telling
| | 02:08 | FileMaker, because I haven't put
anything else in there, isn't that I wanted to
| | 02:12 | find every record with an
equal sign in the Ship Via field -
| | 02:15 | that it actually would not do - but
instead, I'm saying find any record where the
| | 02:20 | value in Ship Via is nothing.
| | 02:22 | Why is it nothing? bBcause so far that's
what I've got following the equal sign.
| | 02:26 | So if you just leave it this way, this
is the great way for you to find records
| | 02:29 | that have empty values in certain
fields, and that can be useful, again, when you
| | 02:33 | are trying to clean up your data.
| | 02:34 | So let me Perform Find here.
| | 02:37 | You see that I have got five records out of
my 146 that do not have a value in Ship Via.
| | 02:42 | That's what the equal sign allows us to do,
| | 02:45 | another excellent tool
for cleaning up your data.
| | 02:47 | And there are some more obvious ones,
| | 02:49 | for example, less than, greater than,
less than or equal to, those kind of things.
| | 02:54 | Those will work on
number fields and date fields.
| | 02:57 | Keep in mind that in those
cases, you still have ranges.
| | 02:59 | For example, I could put in Invoice
date less than 2009, for example, and
| | 03:07 | Perform Find, and it tells me that I
don't have any matching records, but that
| | 03:10 | works equally well in a Date
field as it does in a Number field.
| | 03:14 | But speaking of ranges, you will see there is
also a range option there, which is really just ...
| | 03:19 | So you will notice that you don't
even have to pick this dropdown menu.
| | 03:22 | This is really just more of a legend, or a guide.
| | 03:24 | You can simply just type these values in there.
| | 03:26 | So, for example, if I went in to the
Invoice Total field, which is a number
| | 03:31 | field, and I type in 1000...1500 and
hit Perform Find, you see I get seven
| | 03:39 | records, and all those records
have a value between 1000 and 1500.
| | 03:44 | This one is even very close. It's 1490.
| | 03:45 | In that case, it's giving me the range.
| | 03:48 | I can also go into Find, into an open
ended, 1000... range and hit Perform Find.
| | 03:56 | It tells me that 80 of these
records are either $1,000 or more.
| | 04:00 | And there are a lot of things to choose from.
| | 04:02 | Another one that's helpful is the zero or
more characters, which is that asterisk.
| | 04:05 | So let's say you are trying to find
any record that actually has a value in a
| | 04:09 | field. Just simply type and asterisk in
there and nothing else and perform a find,
| | 04:13 | and you will see now we get 141 out of
the 146. If you remember when we did the
| | 04:17 | equal sign, meaning anything that had
empty value or no value in Ship Via, we got
| | 04:22 | five, so this makes sense.
| | 04:24 | This is the inverse of that.
| | 04:25 | So you should really experiment with
these to get familiar with how they
| | 04:28 | work with your data.
| | 04:29 | I think that not only will you
find them useful, from a development
| | 04:32 | perspective, but if you train your
users on these, they will find them to be
| | 04:35 | useful, but one special thing
that you should be aware of, though.
| | 04:38 | If you switch over to the Customer
List layout, let's say I want to do a
| | 04:41 | search in the Email field, and what I
am looking for, let's say, are properly
| | 04:46 | formatted Emails, which we would use
this trick to say I want to search in this
| | 04:50 | field for the At symbol character, and
if I find records that don't have an At
| | 04:54 | symbol in there, then I know that I
don't have a real Email or a properly
| | 04:58 | formatted Email in this field.
| | 04:59 | Let's see what happens when I put the At
symbol in this field, and then we hit Perform.
| | 05:05 | You see I get No records matches criteria.
| | 05:07 | Now that might not actually be true,
because we could have some records in here
| | 05:12 | that do not have any values.
| | 05:14 | For example, if I go in and I take the At
symbol out of this first record. All right.
| | 05:19 | Now let's do that search again.
| | 05:21 | Let's say At symbol, and I want to
omit anything without the At symbol.
| | 05:24 | So when I hit Perform Find,
now it gives me everything.
| | 05:27 | Why is it giving me all
the At symbols and the not?
| | 05:29 | Well, the reason for that is because
FileMaker has the At symbol as one of
| | 05:34 | it's Search operators.
| | 05:35 | Unfortunately, they had this built-into
the program before Emails were even around.
| | 05:40 | So what this means is it's more of like a
wildcard character, which means any one character.
| | 05:45 | So if I am truly searching for an At
symbol, or an equal sign, or an exclamation
| | 05:49 | point, and I want it to be recognized
just as the character, what I have to do
| | 05:53 | there is wrap it in quotations.
| | 05:55 | And anytime something in quotations,
in this context, FileMaker will evaluate
| | 06:00 | this as just the character that you are
looking for, rather than the functions.
| | 06:04 | So now you see it performs properly.
| | 06:06 | I omitted anything that had an At
symbol in it, and sure enough, we see this
| | 06:11 | record here that matches that criteria.
| | 06:13 | How is this At symbol used?
| | 06:14 | Well that actually has
its own valuable use for us.
| | 06:17 | So, for example, if we go into Find
mode again, and under City, if I type in
| | 06:23 | L@s, and I Perform a Find, I am going to
get Las, and Las, but that's because we
| | 06:30 | put the wildcard in between L and the S,
so these are the correct values that
| | 06:33 | we are getting in return.
| | 06:34 | So in addition of doing multiple
requests, you can also insert different
| | 06:37 | Search operators to assists you in
locating data with minimal data entry in
| | 06:41 | the search requests themselves.
| | Collapse this transcript |
| Constraining or extending found sets| 00:00 | There are sometimes when you're
searching for data within FileMaker Pro that you
| | 00:03 | might want to start with a larger
found set and then drill down within that
| | 00:07 | found set, or expand that found
set based on additional criteria.
| | 00:11 | This type of technique is very useful
if you're administering a database and
| | 00:14 | you are troubleshooting, or you are just
trying to clean up or maintain the data integrity.
| | 00:18 | In these cases, you can use
functions that are called Constraining and
| | 00:22 | Extending found sets.
| | 00:23 | For example, I will go into Find
mode here, and I am going to do a search
| | 00:27 | for California in State.
| | 00:29 | You see that we've got 23 records in this case,
| | 00:31 | all these people in California, but how
many of them have the status of inactive?
| | 00:36 | Now keep in mind it's of course less
dramatic when we are dealing with record
| | 00:39 | sets of 23, but imagine if you
had 23,000 records in this case,
| | 00:43 | how difficult it would be to
visually see this information.
| | 00:46 | So now in this case, I am going to go
into Status, and remember now that I have
| | 00:49 | already done a find. I just did a
search for all the State of California
| | 00:54 | records, and what you may not be aware
of is that FileMaker is remembering what
| | 00:58 | the last find was that you've just done.
| | 01:00 | So, right now, as I'm putting in my next find
request, FileMaker knew what the last one was.
| | 01:05 | So now if I put Inactive in the
Status field and if I go under the Requests
| | 01:09 | menu, you'll notice that I've got some
additional options below Perform Find,
| | 01:13 | which is what we've been doing
in all of our movies thusfar.
| | 01:16 | If I choose Constrain Found
Set, let's see what happens.
| | 01:20 | You see I have got four records in my Found Set.
| | 01:21 | I put Inactive in there, but if I go
back into Find mode, you'll see I will get
| | 01:26 | more than four records;
| | 01:27 | I get 147 records if I search for it
this way. But what constrain does is it
| | 01:32 | instructs FileMaker to say, within the
Found Set we just did, I want to further
| | 01:37 | constrain those records based on the
criteria that I'm entering inside the field
| | 01:41 | or fields within the find request.
| | 01:42 | So you can do it the other way, as well.
| | 01:45 | So, for example, if I say find
California, Perform Find, enter Find mode again,
| | 01:51 | and this time inside the Status, I am
going to enter pending, but now, I am
| | 01:55 | going to choose Extend Found Sets.
| | 01:57 | So if you remember before what we
did under Constrain is that we took the
| | 02:00 | original Found Set and then said
within that Found Set, find everything with
| | 02:04 | the status of Inactive.
| | 02:05 | Now we are going to say take my
original Found Set of 23 records with the State
| | 02:09 | of California, and I want you to
extend it, so to add into that Found Set any
| | 02:14 | record that matches his criteria.
| | 02:15 | So in this case we are going to have all
the California and all the status pending.
| | 02:19 | So now let's say Extend Found Set, and
now you see we have 1,226 records, which
| | 02:23 | make up our California records, as you
see here, that doesn't have a status of
| | 02:27 | pending, but also all of the other
records that are not California that do have
| | 02:31 | a status of pending.
| | 02:32 | So these are ways that you can increase
the size of your original Found Set or
| | 02:36 | decrease the size of your original Found Set.
| | 02:38 | The real power of this, of course, comes
in when you have thousands of different
| | 02:41 | records, and you can't see the
results immediately onscreen.
| | 02:45 | This will allow you to be able to drill
up and drill down from certain criteria,
| | 02:48 | because keep in mind, you can keep
constraining and constraining and
| | 02:51 | constraining and constraining because
whatever your last Found Set is it's going
| | 02:55 | to reflect the last constrain you did.
| | 02:57 | So it's conceivable that if you are
trying to drill into some data and prove a
| | 03:00 | theory or look for trends in raw data,
that you can just keep modifying your
| | 03:04 | Found Set until you finally get a small
subset that's just the perfect amount of
| | 03:07 | information that you are looking for.
| | 03:09 | Working with varying groups of records
is always powerful, and you can easily
| | 03:12 | view trends in your data, search for
expectations or problems in the information
| | 03:16 | that you have entered, or even import
it into your solution, or quickly access
| | 03:19 | specific records, all using either
Constrain or Extending Found Sets.
| | Collapse this transcript |
| Finding records using date, time, or timestamp criteria| 00:00 | Another one of the benefits while
searching in Find mode is that the ability to
| | 00:03 | be able to search within date and time fields.
| | 00:06 | If you look inside of our exercise files,
you see that we have got a couple of
| | 00:08 | fields here, in the Invoice list, that
are date fields and some that are time.
| | 00:12 | So, for example, we have got Invoice date
and ship time timestamp and then the ship time.
| | 00:18 | In some of the more recent versions of
FileMaker, there has been a lot of new
| | 00:20 | improvements to date and time searching
capabilities, and they are actually kind of cool.
| | 00:24 | Each of the syntax that I will show
here applies only to fields that are set up
| | 00:28 | specifically as date, time or timestamp.
| | 00:30 | So the same types of techniques won't
work in number fields, or text fields
| | 00:33 | or anything like that.
| | 00:34 | So, first let's look at date fields.
| | 00:36 | You see that we have got several
different dates in our database.
| | 00:39 | If we hit Show All, we see all the
different dates: 2011, 2009, and so on.
| | 00:44 | They are all formatted as dates with
month, day, and year, and normally when you
| | 00:48 | search inside a FileMaker field, you
will be searching in the exact syntax
| | 00:51 | that's contained within the
field, because as with a date field,
| | 00:54 | I try to enter a value in a new record
| | 00:57 | in anything but this format, I
would get an error from FileMaker.
| | 01:00 | So normally you would probably
expect that same type of behavior when you
| | 01:03 | are searching in FileMaker, but
that's not the case, and it has some
| | 01:05 | interesting effects.
| | 01:06 | So let me give you an example.
| | 01:08 | Let's go in a Find mode and in the
Invoice Date, I am going to enter in a value
| | 01:12 | that's not formatted as a date.
| | 01:14 | As a matter of fact, I am just
going to try entering in 2010.
| | 01:17 | What this demonstrates is that by
typing in 2010, FileMaker recognizes that
| | 01:21 | it's a four digit year, and it
creates a wildcard search for you.
| | 01:25 | So we have got a wildcard character,
forward slash wildcard character, another
| | 01:29 | forward slash and then the year.
| | 01:30 | So really it's not searching on
2010 because, in fact, it does require
| | 01:34 | date formatted fields.
| | 01:35 | What it's doing is putting in
wildcard characters on your behalf.
| | 01:39 | So let's cancel this Find, go into another one
| | 01:42 | and this time let's type in 6/2010.
| | 01:46 | Now, in this case, what it will
do is it will give us 6/*/2010.
| | 01:52 | So the wildcard is going to be in the date.
| | 01:54 | So what we will probably get in this
case, if we hit Perform Find, is anything
| | 01:59 | that has the month of 6 and the year of 2010.
| | 02:02 | So in English, what that means is it's
giving us any day within June of 2010.
| | 02:07 | How about if we go into Find
mode and we just simply enter in 6?
| | 02:10 | Now, let's see who FileMaker handles it.
| | 02:12 | We are just hitting the New Request
because that allows us to see what happens,
| | 02:15 | because otherwise, FileMaker does it so quickly.
| | 02:17 | Well, if you are just enter in a single
digit, or let's say you are enter in 12
| | 02:20 | for example, it assumes that you are
looking for the month, and it also assumes
| | 02:25 | that you are looking for
the month in the current year.
| | 02:27 | So if I just go in and redo another Find,
and put 6 in there, what I am going to
| | 02:32 | get back are all of the records from 6 of 2010.
| | 02:36 | Now keep in mind that the exercises
that I am doing here involve current year,
| | 02:40 | and at the time of this recording, it's 2010.
| | 02:44 | So if you are looking at this with a
computer date of anything but 2010, you are
| | 02:47 | going to get different search
results that I am getting here.
| | 02:50 | In a previous movie, we talked about
Search Operators and using ranges, but we
| | 02:55 | can also use ranges with
these abbreviated date functions.
| | 02:58 | So, for example, by going here
and I type in 4/2010...6/2010,
| | 03:06 | now we are combining the wildcard
search format with search operators.
| | 03:11 | So in this case, what we are going to
get are any date between April of 2010,
| | 03:16 | including June 2010 and
of course, May in between.
| | 03:20 | So let's hit Perform Find, and sure
enough, you see we have got April, May, June
| | 03:24 | all peppered in there.
| | 03:25 | But one of the most interesting ways
to search in a date, timestamp or time
| | 03:29 | field involves not
entering in numeric values at all.
| | 03:33 | So if we go into Find mode, and I go
into a date field and I type in Friday,
| | 03:38 | you'd think this would kick it out
because it can't even reformat it - we do with
| | 03:42 | a little trick of looking in New Request -
all it does is change it to Fri, which
| | 03:46 | is something that's built-into FileMaker to
identify any date that was actually a Friday.
| | 03:51 | So let's go back and just do
one Friday and hit Perform Find.
| | 03:57 | Now without there being a field that's
says what day of the week any of these
| | 04:01 | invoices were written up,
| | 04:02 | FileMaker still knows that these 33 records
represent a date that was a Friday on a calendar.
| | 04:08 | So that could be very useful, if you
are interested in doing some trending or
| | 04:11 | digging through your data to try to
find out when the most popular day for
| | 04:14 | orders might be - something along those lines.
| | 04:16 | The same techniques are
true for time fields, as well.
| | 04:19 | So you see we have got a field called Ship Time.
| | 04:21 | If we go into Ship Time, and just type
in 3pm and do a Perform, we see that we
| | 04:27 | will get any record that was written up
in the 3 o'clock hour. Irrespective of
| | 04:31 | the date it was done, we do get
everything from 3:04, 3:17, 3:15.
| | 04:37 | You see you get it just there and also
these types of things can work with our ranges.
| | 04:41 | 3pm...6pm.
| | 04:44 | Now this is any record written up
within the hours of 3, 4, 5, or 6, and also
| | 04:49 | we can just put in pm.
| | 04:52 | So if you interested to see what kind
of ordering you get at night or in the
| | 04:55 | afternoon versus in the morning, you can
just simply enter pm and FileMaker will
| | 04:59 | go and find all of the records that
have time that was in the pm instead of am.
| | 05:04 | If you get familiar with the searching
syntax, it's not only going to help you,
| | 05:08 | but as you train your users, and
possibly as you start to work with scripts,
| | 05:12 | which we will cover later in this title,
| | 05:13 | the syntax can help you more
accurately find date, time, and timestamp date
| | 05:17 | within your database.
| | Collapse this transcript |
| Using Fast Match and Quick Find| 00:00 | FileMaker Pro 11 actually has two
different ways that you can create a found set
| | 00:04 | without even having to go into Find mode.
| | 00:05 | Both of these occur inside of Browse mode,
| | 00:08 | the first of which is a feature that
was released a couple of versions ago, and
| | 00:11 | it's called Fast Match.
| | 00:12 | Let me show you how that works.
| | 00:13 | Note that we are in Browse mode.
We can see all of our data,
| | 00:16 | but if I look at any field that has
data that I want to search on, I could copy
| | 00:21 | this value, go into Find mode, paste
the value, and execute a Find. Or if I hit
| | 00:28 | Show All to show all the records again,
I could right-click into the field that
| | 00:33 | has that value, or Ctrl+Click on a
Mac, and you'll see this option in the
| | 00:37 | contextual menu that appears,
that's called Find Matching Records.
| | 00:42 | I simply select that option.
| | 00:43 | I never leave Browse mode, but I
still end up creating the same found set.
| | 00:47 | So this can be useful for you if you
are just mining through some data and
| | 00:51 | you want to find some information inside your
database, without having to go into Browse mode.
| | 00:55 | Those types of searches are
based on the contextual menu.
| | 00:58 | Now the contextual menu is the menu
you find when you right-click, but in
| | 01:01 | addition to Find Matching Records, you
also see that we've got Constrain Found
| | 01:05 | Set and Extend Found Set, as well.
| | 01:07 | So, for example, I can find a record
that has California, say Find Matching
| | 01:13 | Records, and I could
constrain it by a city, if I'd like to.
| | 01:17 | So using the Find Matching Records in
Browse mode is called Fast Match, and
| | 01:20 | there are three Fast Match options:
| | 01:22 | There is Find Matching Records,
Constrain Found Set, and Extend Found Set, all
| | 01:26 | of which can be performed in Browse mode.
| | 01:28 | Another method for finding records
while in Browse mode is brand-new to
| | 01:32 | FileMaker 11, and it's called Quick Find.
| | 01:34 | You'll notice that in the upper right-
hand corner of your database, you will see
| | 01:38 | that there is a familiar
Quick Find data entry area.
| | 01:41 | This is the same type of thing that
you've seen in any other type of Apple
| | 01:44 | application, like iTunes for example,
and by simply typing a value in this
| | 01:48 | field and hitting Enter, you can do
searches on your data while still in Browse mode.
| | 01:52 | For example, I could type in
the value ca and hit Enter;
| | 01:55 | not only does it find records that match
the state CA, but it also finds records
| | 02:00 | that have CA in the first name,
possibly ca in the last name, even though they
| | 02:05 | don't have values inside the State field for ca.
| | 02:08 | So what's actually happening, in this
case, is that you can go into your layout
| | 02:12 | and configure which fields that you
want to be part of the Quick Find.
| | 02:15 | So if we go into Layout mode, you will
notice these green icons, little search
| | 02:20 | icons, on all the
different fields in this layout.
| | 02:22 | Well, if you select a field and open up
the Inspector and go into your Data tab,
| | 02:27 | you will see that you've got a check
box here for each field that says Include
| | 02:31 | field for Quick Find.
| | 02:32 | By default, every field that you put
on the layout has this option selected,
| | 02:36 | so you can go in and deselect these
options, so that they are not included in
| | 02:40 | your Quick Find search.
| | 02:42 | If a field is included, you will see
what's called a Quick Find badge, or this
| | 02:46 | little green magnifying glass appear.
| | 02:49 | Keep in mind though that if you turn
off Quick Find on the Customer List
| | 02:53 | layout, that field will still be on if you go
to any other layout that's based on customer.
| | 02:58 | So you'd have to go and turn it off
in all of the different fields in your
| | 03:00 | database in order for the setting to
be turned off in your entire database.
| | 03:04 | You can also turn off
Quick Find on a layout level.
| | 03:07 | For example, if we hit this little
pencil next to the Layout List, that will
| | 03:11 | invoke the Layout Setup, and you will
notice that there is a check box here in
| | 03:14 | the bottom of the Layout Setup
window that says Enable Quick Find.
| | 03:17 | And if I turn that off, you see
that all the green badges went gray.
| | 03:21 | That means that if I turn it back on,
they are configured to be included in
| | 03:24 | Quick Find, but that we've
turned if off for this layout.
| | 03:27 | And if you make any changes to the
default settings, you can hit the Reset Quick
| | 03:31 | Find to make sure that all of the
fields then have badges assigned to them.
| | 03:36 | To improve the performance of your
searches, you want to limit the Quick Search
| | 03:39 | fields to only fields that
contain data that you are searching for.
| | 03:42 | For example, a table of songs might
include the track number and artist's
| | 03:45 | name for each song.
| | 03:46 | You can include the artist's name
in the search but exclude the track
| | 03:49 | number, because it's not likely that
someone would search for all the songs
| | 03:52 | with the same track number.
| | 03:53 | Those types of things will make
your searches perform quicker.
| | 03:56 | There are also different colored badges.
| | 03:57 | You see the green ones, which
indicate that the Quick Find setting is
| | 04:00 | enabled for a field.
| | 04:01 | We also saw the gray ones, which indicate
the Include field for Quick Find option.
| | 04:06 | There is another badge, as well.
| | 04:07 | If we go under Invoice > Detail, you
see that we have these yellow badges.
| | 04:11 | These are what FileMaker determines
not so Quick Find fields because they may
| | 04:15 | be considered for removing from Quick
Find, because they are un-indexed or they
| | 04:19 | are related fields or they are values that will
take a long time for FileMaker to search upon.
| | 04:24 | So unless you really need to include
yellow badged fields in your Quick Find, you
| | 04:27 | might want to consider removing them
to make your finds go a lot quicker.
| | 04:31 | The idea here is that you might want to
train your users on the different ways
| | 04:34 | they can perform finds in Browse mode,
because these are great tools for drilling
| | 04:38 | down or drilling up in data
that you are working with onscreen.
| | Collapse this transcript |
| Working with saved finds| 00:00 | A third way to perform a Find in Browse
mode uses a feature called Saved Finds.
| | 00:05 | Saved Finds works through a new icon
that you can see on the Status toolbar.
| | 00:09 | However, if you do not see the icon on
your Status toolbar, you will want to go
| | 00:13 | under the View menu to Customize Status
toolbar and pick Saved Finds and drag it
| | 00:18 | to a location on your toolbar, and hit Done.
| | 00:21 | And if you click and hold down on the
icon or click on the arrow, you'll see
| | 00:24 | that there are various
different options that appear.
| | 00:26 | First, you can see something called
Recent Finds and then you see Saved Finds.
| | 00:31 | A Recent Find is a find that you've
performed during this database session,
| | 00:34 | meaning while you had this file open.
| | 00:37 | A Saved Find was a recent find that the
user has chosen to save for future reference.
| | 00:41 | So, for example, next time you open up
the file, that Saved Find will still be
| | 00:45 | there, unlike Recent Finds that
clear out after your session clears.
| | 00:48 | Sessions are specific to multiuser mode,
so when a file is being hosted on a
| | 00:52 | server, you get a session every
time that you log in to the server.
| | 00:56 | So, Recent Finds only exist for the
life of that session; Saved Finds exist any
| | 01:00 | time you use your user account to
log into the database, and that's an
| | 01:03 | important part here.
| | 01:05 | This feature is specific to a
user logged into a copy of FileMaker.
| | 01:09 | So when you take a Recent Find and save
it as a Saved Find, that's only going to
| | 01:14 | be available to you.
| | 01:15 | Others who log into their
database will not see your Saved Finds.
| | 01:19 | You should be aware of that as a
developer because you might think, Oh!
| | 01:22 | well I can create a bunch of Saved Finds
for people and then my users can use them.
| | 01:25 | Well, first of all, users can choose to
not even have Saved Finds icon on their
| | 01:30 | copy of FileMaker in the Status toolbar.
| | 01:32 | And secondly, you have no control
over what they do with their account.
| | 01:35 | If you have various different users all
sharing the same account, they will all
| | 01:39 | see the same Saved Finds every
time they log into the database.
| | 01:42 | So let's take a look at how this works.
| | 01:44 | If we go into Find mode and we click into
the State field, type wi, hit Perform Find,
| | 01:50 | now, under our Saved
Finds we see wi listed there.
| | 01:54 | Now, for example, if I want to go in,
and I want to say Save Current Find, you
| | 01:58 | see that I get a window here that
allows me to add a more descriptive name, or
| | 02:04 | even if I go and hit the Advanced
button we see a window that allows me to
| | 02:08 | modify the Find Request that I just made.
| | 02:11 | I can add additional find requests to it,
or modify the values that are inside of
| | 02:15 | this field and so on.
| | 02:16 | Now, if I have all records shown and
I go under Saved Finds and I simply
| | 02:20 | choose either a Saved one or a Recent Find,
I don't even have to go into into Find mode.
| | 02:25 | It just remembers that for me.
| | 02:26 | So the idea here is now you're able
to work with Finds in a manner that
| | 02:29 | you'd never have before.
| | 02:31 | But if you're working with a search that
might be rather complex, it's something
| | 02:34 | that you would normally make note of,
now you can just save it inside of the
| | 02:37 | FileMaker file for when your
account logs into that file next.
| | 02:40 | So, you can encourage your users,
when you're training them, say if there
| | 02:43 | are searches that you do every Monday
morning, or there's something that you do everyday,
| | 02:47 | like let me find how many
records we created today,
| | 02:50 | just have them put them in the Saved Finds,
and they won't ever have to leave Browse
| | 02:53 | mode to be able to perform those functions.
| | 02:55 | Remember, however, that Saved Finds are
specific to a single user in a database.
| | 02:59 | So developers can't access these lists, nor can
other users, besides the ones who set them up.
| | 03:04 | However, that's not a bug, but rather
features that prevent Saved Find confusion
| | 03:08 | between multiple users of
the same shared database.
| | 03:10 | Saved Finds are a feature inside
FileMaker that should really change the way
| | 03:14 | that you're searching for data
inside your FileMaker databases.
| | Collapse this transcript |
|
|
12. Sorting DataSorting with one criterion| 00:00 | In a majority of the movies so
far in this title, we've been working
| | 00:03 | with multiple records.
| | 00:04 | But you'll notice, as you open up each
file, that the records aren't in order that
| | 00:07 | really doesn't have any kind of relevance.
| | 00:09 | It's not in alphabetical order.
| | 00:11 | It's not by customer, not by year.
| | 00:13 | So what's happening is when you first
open up a FileMaker file and look at
| | 00:16 | multiple records, for example, in the
List view, it's going to give you those
| | 00:20 | records in the order in which
they were added to the database.
| | 00:23 | In cases of reporting, or printing, or
exporting or even just viewing data, that
| | 00:28 | 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.
| | 00:33 | You might be familiar with sorting from
other applications, but in FileMaker you
| | 00:37 | can sort in any layout and
by using a Sort dialog window.
| | 00:41 | There are a couple of different
ways to get to the Sort dialog.
| | 00:44 | First, if you go under the Records menu,
you'll notice that there's an option
| | 00:48 | called Sort Records, and it
also has quick keys next to it.
| | 00:51 | On Mac, it's Command+S, and on Windows
it's Ctrl+S. You'll also notice, in the
| | 00:56 | Status toolbar, that we've got
a default button called Sort.
| | 01:00 | Clicking on any one of these will
get you to the Sort Records dialog, and
| | 01:03 | inside the Sort Records dialog
you'll notice that there's always a sort
| | 01:07 | criterion in from the last sort.
| | 01:09 | If there hasn't been a recent
sort, the dialog will be empty.
| | 01:12 | But in the case of this file, you'll notice
that we've got criterion in here for AddressState.
| | 01:17 | This is helpful sometimes if you're
going back and re-sorting something that
| | 01:20 | you've done moments earlier.
| | 01:22 | Then this way you don't
have to do it again twice.
| | 01:23 | But in our case, we are going to
hit Clear All, so we can start fresh.
| | 01:27 | As you see, Clear All removes any fields
from the Sort Order window on the right.
| | 01:33 | But the window on the left gives you
access to all the different fields defined
| | 01:36 | within your table, so you can choose
them to be part of your Sort Order.
| | 01:39 | Keep in mind that whatever field or
fields you add to the Sort Order will only
| | 01:43 | sort the records in your current found set.
| | 01:45 | In this case, we've got all of
our records in our found set,
| | 01:48 | so all 1,523 records will be sorted.
| | 01:50 | But if I did a search, and it returned
20 records, only those 20 records would
| | 01:55 | have the sort order applied.
| | 01:56 | In the window on the left in the Sort dialog,
you'll notice that you've got a dropdown menu.
| | 02:01 | This dropdown menu has a
couple of different options on it.
| | 02:03 | First, it says Current Layout, which
is whatever layout you are currently on,
| | 02:06 | of course, and also the Current Table,
which is the table that the layout is based on.
| | 02:12 | In the list under Current Layout,
it only gives you the fields that are
| | 02:15 | defined on your layout.
| | 02:16 | This will make it particularly easy for
just end-users because then they don't
| | 02:20 | have to sort through all the
different fields defined in a Table.
| | 02:23 | But if you want to sort on something
that's not on the layout, you just pick
| | 02:27 | Current Table (Customers),
| | 02:28 | you'll see every field defined in the table,
regardless of whether it's placed in this layout.
| | 02:33 | You'll notice that you can also sort
by Related fields, but we'll talk about
| | 02:36 | that in the next movie.
| | 02:38 | Back up to our Current Layout, we
are going to choose AddressState.
| | 02:42 | Now, you can either double-click on
this to move it to the Sort Order window, or
| | 02:45 | select the Move button.
| | 02:47 | But you'll notice that in addition to
picking the field, you also see these
| | 02:50 | little bars that almost look like
cell phone reception bars, on the right.
| | 02:54 | Those represent either Ascending or
Descending order, and as you by default
| | 02:58 | Ascending order is going
to be your first option.
| | 03:01 | If you wish to change that, you can just
select the item in the Sort Order window
| | 03:05 | and choose Descending order;
you'll see those bars reversed.
| | 03:08 | We'll also talk about sorting by Custom
values, the third option, in another movie.
| | 03:12 | Let's see what happens when
we now hit the Sort button.
| | 03:15 | We'll see that all of the records in
our Found set, which are all the records
| | 03:19 | in our database, have been sorted now by the
State value, and they have been sorted alphabetically.
| | 03:24 | The reason for that is because the
field that we chose, State, is a text field,
| | 03:29 | and therefore it's sorted alphabetically.
| | 03:31 | If there was a number field, it
would sort numerically, date field
| | 03:34 | chronologically and so on.
| | 03:36 | The other thing you'll notice is the
very first two records were blank records.
| | 03:40 | FileMaker will always put the blank
records at the very top of a sort order.
| | 03:45 | So this could be a good way
for you to find empty values.
| | 03:47 | You can simply sort by the field that
you're looking for the empty values in,
| | 03:50 | and they'll appear on the top of your layout.
| | 03:52 | You should be aware that in order to
set expectations with your users, that the
| | 03:56 | blank records will always be on top.
| | 03:58 | And that's behavior that
you'd expect from FileMaker.
| | 04:00 | So, if you are creating reports or
instructing users on how to work with found
| | 04:03 | sets, keep in mind that the blank
records in the fields will always show up on
| | 04:06 | top, and this is something that you
not only want to take into account when
| | 04:09 | you're sorting, but also at the
same time it's good way to look for
| | 04:12 | inconsistencies in your data, or find
records that don't have any values in them.
| | 04:16 | Another thing that you should know is
that once your Sort Order is set, any
| | 04:19 | changes that you make to the field and
any of the records in your found set that
| | 04:24 | would impact the sort
order will automatically resort.
| | 04:27 | So, for example, if I go into this State
field and I say CA and I commit the record,
| | 04:34 | you see now that it's been removed from
the AA list, and you'll find it listed
| | 04:44 | under the States of California.
| | 04:46 | This is something that's called
resort, or automatic resort, in FileMaker.
| | 04:50 | This is something that, if you rely on it,
you can build it into your programming,
| | 04:53 | but also something good to let your
users know about, so that they have that
| | 04:56 | expectation when they are
working with found sets.
| | 04:59 | The last thing to note is the
active record before the sort.
| | 05:02 | Any active record will remain
the record after the sort, as well.
| | 05:06 | So, if you are on the first record in
your list, and now you decide that you are
| | 05:10 | going to sort by clearing this and
hitting City instead, you'll see Evelyne
| | 05:19 | Rutkin is still the active record,
even though the sort order has changed.
| | 05:24 | You'll notice that we are no longer at
the top of the list of our found set, like
| | 05:26 | we were before we did the sort.
| | 05:28 | We are actually towards the
bottom of the third of it.
| | 05:31 | That's because FileMaker wants to
keep the active record in focus.
| | 05:34 | So keep that in mind when you're
using sort orders against found sets.
| | 05:39 | You can also unsort by going under
the Records menu and choosing Unsort.
| | 05:44 | It doesn't have a corresponding quick
key towards it, but there is a script step
| | 05:48 | that allows you do that automatically.
| | 05:50 | So, keep this in mind when you're
training your users, or when you're working
| | 05:53 | with scripts as we'll discuss later in
this title. Understanding how to work
| | 05:57 | with sorts is going to help you
manipulate data inside of Found sets, so that it
| | 06:01 | can be more meaningful to you and your users.
| | Collapse this transcript |
| Sorting with related fields | 00:00 | When you're looking at data in a
layout inside of FileMaker, the layout that
| | 00:03 | you are looking at is always going to
be based on one table inside of your
| | 00:06 | FileMaker database.
| | 00:08 | So, that means that most of the
data that you're seeing on the screen
| | 00:10 | lives inside that table.
| | 00:12 | A lot of times this is referred
to as the context of the layout.
| | 00:16 | We discussed this in the Relationship
chapter. We'll also talk more about it
| | 00:19 | later on in the title, but one of the
things we'll discuss is how you can place
| | 00:22 | related fields on a layout.
| | 00:24 | Given that assumption, if you look at
the Invoice List Layout in Layout mode,
| | 00:28 | you see that we've got a
field for Contact First.
| | 00:35 | Although this layout is based on the
Invoice Table, Contact First is a field
| | 00:39 | that comes from the Customers table.
| | 00:41 | We will talk more about related fields
in the Using Relationships chapter, but
| | 00:45 | what I want to demonstrate here is that
when we have fields from two different
| | 00:48 | tables on a layout, when it comes to
sorting, we can pick fields from either
| | 00:51 | the Current Layout, the Current Table,
but also Related Tables, in order to
| | 00:55 | create our Sort Order.
| | 00:56 | So, let's go back into
Browse mode and then go into Sort.
| | 01:02 | You'll see that I already have a sort
value in the Sort Order, but I'm going to
| | 01:06 | click on that and Clear it.
| | 01:09 | And where I got that from
was in one of two places.
| | 01:12 | Since I have the related field on the
layout, I can choose Current Layout, and
| | 01:16 | then you'll see, towards the bottom, I
have a related field in my list, and that's
| | 01:20 | indicated by a table name::
| | 01:22 | and then the name of the field.
| | 01:24 | That's how you can tell a
related field from a native field.
| | 01:27 | So, I can simply double-click on this or
click it and hit Move and sort by that value.
| | 01:32 | But a related field doesn't need to be on
the layout in order to be able to sort by it.
| | 01:36 | So I could have all these invoices here,
and if I didn't have a customer first
| | 01:40 | name or a customer company name on
the layout, I could have easily just
| | 01:43 | clicked on this dropdown and gone to
the Customer Table and picked from any one
| | 01:48 | of these related values.
| | 01:49 | The field does not need to be on the
layout to be part of the Sort Order, and
| | 01:52 | that's true for non-related fields, as well.
| | 01:54 | But now let's go ahead and hit Sort.
| | 01:56 | We'll see now that all of our invoices are
sorted by a related Customer First Name field.
| | 02:03 | So that data doesn't even live inside
of the invoice records, but we're able to
| | 02:06 | use it as a Sort Order.
| | 02:08 | So what we are learning here is that you
can sort by any field, whether it's part
| | 02:12 | of your layout or whether it's just
part of the FileMaker file when you're
| | 02:16 | setting up your sort criteria.
| | Collapse this transcript |
| Sorting with multiple criteria| 00:00 | Often when you're working with FileMaker,
and you have a large sets of records,
| | 00:03 | you may just want to look
at them in a certain order.
| | 00:06 | This, of course, is where
Sorting comes in to play.
| | 00:08 | Sometimes when you're sorting, you may
have multiple, different criteria that
| | 00:11 | you need to sort by.
| | 00:12 | For example, you see here we've got
1,523 records, and if I sort them all by
| | 00:17 | State - first clearing out any previous
order I move state over and then hit Sort -
| | 00:26 | you see that we've got a lot of
duplicate matches within each state.
| | 00:30 | So what about if I want to see them by
State, and then within State I want to see
| | 00:34 | them sorted by City?
| | 00:36 | That's pretty easy to do.
| | 00:37 | Just go back into your Sort
dialog as you saw moment ago,
| | 00:41 | we can move another criterion.
| | 00:43 | So now when I hit Sort, it's not only
sorting within the State, as you see here,
| | 00:48 | here's all that records for ME, and
with each record for ME it's then sorting
| | 00:53 | alphabetically by City, as well.
| | 00:55 | You can continue to do this by
layering multiple values on top of each other
| | 00:59 | inside the sort order, but the order in
which they appear is pretty critical to
| | 01:03 | the way that it sorts.
| | 01:04 | So first it's going to sort by State,
and then only if they find matches within
| | 01:08 | records in the State field, it will
then sort those matched records by City.
| | 01:13 | You can add another level here if you
want, but the only time it's going to sort
| | 01:16 | is if the State values match in records,
the City values match in records, and
| | 01:20 | then it will kick into yet another sort value.
| | 01:23 | So in this case, we don't have a lot of
duplicate cities, so it won't make much
| | 01:26 | more sense to sort beyond just
two values, but you certainly can.
| | 01:30 | So in cases where you need to sort
within a sort group, just use multiple
| | 01:33 | criterion in your Sort dialog box.
| | Collapse this transcript |
| Sorting using custom values| 00:00 | Many times when you're looking at
records in a List View, you want to Sort them so
| | 00:04 | that you can see them in a certain order.
| | 00:05 | And as we looked at in previous movies,
you can see that by adding either a
| | 00:09 | single criteria or multiple criteria to
your sorts, much like you see here, then
| | 00:16 | you can Reorder them even at
different levels of reordering.
| | 00:20 | And what you'll notice is that, in any
case, that depending on which fields you
| | 00:22 | choose, you can either do them as
ascending or descending, and all of these have
| | 00:26 | different behaviors depending on the field type.
| | 00:28 | For example, of it's a number field,
we'll start at 1 or 0, and go all the way
| | 00:33 | up to whatever the last number is.
| | 00:34 | If it's alphabetical, it starts a-z.
If we go in descending, it goes that goes z-a,
| | 00:40 | and that I type of thing.
| | 00:41 | However, that standard type of
sorting might not always work in all cases.
| | 00:45 | So let's say, for example,
we cancel out of this window.
| | 00:49 | You see that we've got the Status field,
so we've got a few different Statuses in
| | 00:52 | here and if we click in to it and hit
Command+I on Mac or Ctrl+I on Windows,
| | 00:57 | we can see the field Index.
| | 00:59 | This gives us a non-
duplicated list of all the values here.
| | 01:01 | So we've got Active, Inactive and Pending.
| | 01:04 | So if we Sort this
alphabetically, it'll go in this order:
| | 01:07 | Active, Inactive and Pending.
| | 01:10 | But what if your organization would
like to look at your data in the order of
| | 01:13 | their Statuses are given, like
Active, Pending and then Inactive.
| | 01:16 | To address this, FileMaker does
allow you to Sort by custom values.
| | 01:20 | If we take a look at the Sort dialog,
you'll notice that when we choose a value,
| | 01:26 | in this case we choose Status and
move it over to our Sort Order field,
| | 01:30 | selecting it of course we can choose
Ascending or Descending, but there's this
| | 01:33 | third option here called,
Custom Order based on value list.
| | 01:37 | Now we'll be covering the concept
of Value Lists in a later chapter.
| | 01:41 | If you not familiar with them, what a
Value List is is something that you can
| | 01:43 | define inside your FileMaker
Database, that's exactly what it sounds like.
| | 01:47 | It's just a list of values
and has various different uses.
| | 01:50 | So if we're to set up a list of values
in the order we want them, for example
| | 01:55 | Active, Pending and Inactive, we
could then use them in our Sort Order, but
| | 01:59 | first we have to create this list of values.
| | 02:02 | If we going to our File menu
and choose Manage Value Lists,
| | 02:06 | this is where you create, manage all
your value lists, but we get into this more
| | 02:09 | in the Value Lists chapter. But for now
we just going to create a simple list by
| | 02:12 | hitting the New button and naming this
Status, and then in the window below we
| | 02:18 | can create a return delimited lists
in the Order that we want to Sort them:
| | 02:23 | Active, Pending, Inactive.
| | 02:30 | Now we hit OK and OK again, and
now when we go into Sort, we'll still
| | 02:36 | choose Status as the field that we
want to Sort on, but this time we choose
| | 02:39 | Custom Order Based on the Value List, and now
we'll choose the value list we just created.
| | 02:45 | And if we want to make modifications
while we are still in the Sort window, we
| | 02:48 | can invoke the Manage
Value this window here, as well.
| | 02:52 | But now we'll hit Sort, and we can see
we've got Active, Pending and Inactive.
| | 03:01 | What we learn here is that you're not
just constrained to using your Ascending
| | 03:04 | or Descending Sort order values when
Sorting records, but instead you can
| | 03:08 | create a Custom List of values and then
Sort based on the order of those values
| | 03:12 | in that list.
| | Collapse this transcript |
| Sorting using buttons| 00:00 | FileMaker Pro provides a special
interface for sorting your records.
| | 00:04 | That can be viewed by clicking on the Sort
icon in the toolbar, or through your Records menu.
| | 00:09 | Sometimes for your users, they may not be as
familiar with this Sort dialog box as you are,
| | 00:14 | so instead of providing training for
them so that you can view the records in
| | 00:16 | their desired format, what you can do
instead is put buttons onscreen for them
| | 00:21 | so that they can sort on values by
just clicking on certain layout objects.
| | 00:25 | That way they never have to be
bothered with the Sort dialog at all.
| | 00:28 | The most logical way to do this, if
you're looking at the List View, is to make
| | 00:32 | your column headers clickable.
| | 00:33 | For example, if we go into Layout mode,
you'll see that the field labels are
| | 00:40 | different layout objects
than the fields themselves.
| | 00:42 | The most logical way to do this, if you
are looking at a List View, is to make
| | 00:45 | your column headers clickable.
| | 00:47 | You can see that in Layout mode the
field label and the field itself are both
| | 00:51 | separate layout objects.
| | 00:53 | Later in this title will be a
discussion on the concept of scripts in greater
| | 00:56 | detail, but I'm going to introduce you
to the idea of attaching an action to a
| | 00:59 | layout object in this video.
| | 01:01 | If you look at our Customer List in
Layout mode, like we got here onscreen, you
| | 01:05 | see that our Header part
contains these various field labels.
| | 01:09 | A field label is a layout object, and in
FileMaker any layout object can act as a
| | 01:13 | button and can have a script
or script step assigned to it.
| | 01:17 | This means that when you're in Browse
mode and a user clicks on the layout
| | 01:20 | object, the assigned script, or
script step action, will execute.
| | 01:24 | One of those script steps is the Sort
Records action, and that's the action we
| | 01:28 | will focus on in this movie.
| | 01:29 | So, for example, let's say we click on
the State field label, and now if we go
| | 01:34 | into the Format menu, you see
an option called Button Setup.
| | 01:38 | That's only available when you've
actually selected a layout object.
| | 01:41 | You will notice in the Button
Setup window, we've got a list of
| | 01:45 | several different actions,
| | 01:47 | almost all the actions you can perform
manually within FileMaker, all available
| | 01:51 | to us to be able to assign to the Button.
| | 01:54 | You can also access the Button Setup
by right-clicking, or on Mac Ctrl+Click.
| | 01:59 | That will invoke the same window.
| | 02:02 | Now you'll notice, if we scroll down to
the section called Found Sets, you will
| | 02:08 | see that there's an option here for
Sort Records. Selecting this option shows
| | 02:11 | other options in the right
-hand side of the window;
| | 02:14 | the first of which is whether
or not to perform with dialog.
| | 02:17 | That simply means when a user clicks
on this, do you want to pop up the Sort
| | 02:20 | Order dialog window?
| | 02:22 | In this case, we don't want to
bother the user with that interface,
| | 02:24 | so we'll click the box.
| | 02:26 | Then when we hit the Specify button,
we're able to go in here, and we'll
| | 02:32 | double-click on the State to add sorting
by the State field. Then we hit OK, and
| | 02:39 | now we'll see when we go into
Browse mode, we'll Save that change.
| | 02:44 | And now as you hover over the field
label, you see that a little hand appears,
| | 02:48 | indicating that this is in fact a button.
| | 02:51 | So when we click on the button, we
see that the records are all sorted.
| | 02:55 | Now back in Layout mode, you'll see that
I've got two little arrows next to the City.
| | 03:01 | Each of these is an image
that I've placed on the layout.
| | 03:04 | Even images are layout objects
that we can assign a script to.
| | 03:07 | So I am going to right-click on this
first one and hit Button Setup, and I'm
| | 03:11 | going to scroll down to Sort
and choose Perform without dialog.
| | 03:20 | In this case, I'm going to say
City, Descending order, because you see
| | 03:30 | that's pointed down.
| | 03:31 | I hit OK on that one, then right-click
on the other arrow and choose Sort again,
| | 03:43 | Perform without dialog,
| | 03:44 | but this time City with Ascending order.
| | 03:52 | So now when I go back into Browse mode
and save my changes, I will see that when
| | 03:56 | I click on the Down arrow, it will
sort all the Cities in Descending order.
| | 04:01 | If I click the Up, it'll
sort them in Ascending order.
| | 04:06 | So this is a great way, if you apply
this to the rest of your layouts, to allow
| | 04:11 | your users to sort without them
having to work with the Sort dialog window.
| | Collapse this transcript |
|
|
13. Value ListsReviewing Field/Control styles| 00:00 | FileMaker Pro provides many tools in
Layout mode for configuring the behavior of
| | 00:05 | fields that make data entry
easier and more efficient.
| | 00:08 | Among these is something called the
Field/Control Style, which enables you to
| | 00:12 | define a value list for data entry and
then format a field to display the value
| | 00:17 | list as either a pop-up, Drop-down list,
series of check boxes or radio buttons.
| | 00:23 | And there are two primary benefits
of formatting fields in this way.
| | 00:27 | First, it allows for faster data entry by
users, and second, it leads to greater accuracy.
| | 00:32 | Anytime users manually enter data into
a field, you run the risk of misspelling
| | 00:36 | or inconsistent entry.
| | 00:38 | Providing a list of values to choose
from goes a long way towards ensuring
| | 00:41 | consistent data entry.
| | 00:43 | Users are generally accustomed to
working with data entry devices such as
| | 00:46 | check boxes and Drop-down lists from
all the other applications and Web
| | 00:50 | sites that they use.
| | 00:52 | In this movie we'll be discussing how
to set the Control Style for a field.
| | 00:57 | Typically you'll apply a Control Style to a
field that you already have added to a layout.
| | 01:02 | Either way, you have to do so in Layout mode.
| | 01:04 | So let's go into View > Layout mode, in our
Invoice Detail Layout in our exercise file.
| | 01:12 | To add a Field/Control Style, you'll
actually have to select the field on the layout.
| | 01:17 | It's also possible to add a Field
Control while adding the field to the layout
| | 01:21 | by using the Field/Control
tool in the Status toolbar.
| | 01:25 | This will allow you to add a field and
apply this Field/Control at the same time.
| | 01:28 | However, most likely you'll be adding
a field control to an existing field in
| | 01:32 | the layout, and in order to do so, you
need to first invoke the Inspector window.
| | 01:37 | Under the Inspector window,
you can choose the Data tab.
| | 01:40 | So let's choose the InvoiceDate field.
| | 01:44 | Once we have the InvoiceDate field
chosen, we're going to go under the Field
| | 01:48 | section, which I have currently
collapsed, but if I click on it, I open it up.
| | 01:52 | Now we see that we've got the Invoices::
InvoiceDate field chosen, and I can also
| | 01:58 | hit the Edit button to choose a
different field, if I'd like to.
| | 02:02 | But below the field that's chosen,
you see there's a Control Style.
| | 02:07 | There are several different Control
Styles you can choose from, but by default,
| | 02:10 | Edit box is chosen for any
new field placed on a layout.
| | 02:14 | Edit box simply means a field as it
would normally look, allowing users to click
| | 02:18 | inside the field and perform edits.
| | 02:20 | You'll see there are other options
available as well, for example, Drop-down list.
| | 02:25 | This style allows the user to
select an item from a value list, or to
| | 02:28 | manually enter a value.
| | 02:30 | So it gives them an option to either
choose or enter in their own custom value.
| | 02:35 | It's a good option when there are a
large number of values to choose from; then
| | 02:38 | the user may use the arrow keys to
type ahead or jump to the particular
| | 02:41 | sections of the list.
| | 02:43 | This list also includes a handy
vertical scroll bar when used, and then users can
| | 02:47 | Shift+Click to see multiple
values from the Drop-down list.
| | 02:51 | You also have a Pop-up menu which also
is like a Drop-down list of sorts, but in
| | 02:56 | this case a Pop-up menu is presented
that requires a user to make a selection
| | 03:00 | from the menu, and they cannot
overwrite it by clicking outside the field and
| | 03:04 | then typing in their own custom value.
| | 03:07 | This menu will take up as
much screen as it needs,
| | 03:09 | so Pop-up menus can be a bit awkward
with larger lists. But if you want to make
| | 03:13 | sure that a user picks only from your
list, you might want to use a Pop-up menu
| | 03:18 | instead of a Drop-down list.
| | 03:19 | Checkboxes are a style that presents a
value list as a set of check boxes that a
| | 03:24 | user can toggle on or off.
| | 03:26 | The selected items are then stored as a
return delimited list in your database
| | 03:30 | in the order that the items were selected.
| | 03:32 | This is a good option when you want
to allow your users to select multiple
| | 03:35 | options in the same field.
| | 03:37 | Radio buttons are similar to Checkboxes,
except that they are mutually exclusive.
| | 03:41 | Clicking on one Radio button causes the
previously selected radio button to be deselected;
| | 03:46 | therefore, only one value is
normally selected at a time.
| | 03:50 | This is something you'd use, for
example, if you wanted to have a value list
| | 03:53 | that's said Yes or No.
| | 03:54 | You don't want the user to check both,
which they could if there was a check box,
| | 03:58 | but instead you'd apply a radio button.
| | 04:00 | And the final one is what we're
going to use on the InvoiceDate.
| | 04:03 | It's called the Drop-down calendar.
| | 04:05 | This Control style allows users to
enter a date into a field using a small
| | 04:08 | Drop-down calendar, similar to the
ones that you might see online.
| | 04:12 | This option, however, does not
require a value list to be created.
| | 04:15 | So let's apply this one
under our InvoiceDate field.
| | 04:18 | Now that we have that's
selected, let's go into Browse mode.
| | 04:21 | Hit Save for our changes.
| | 04:23 | And now let's click into our InvoiceDate field.
| | 04:25 | Now you see the Drop-down calendar
appear, and you'll notice that the Drop-down
| | 04:30 | calendar will navigate to the date, if
there already is a value in the field, and
| | 04:34 | if there is no value in the field then
it will navigate to the current date.
| | 04:38 | But if we go back into Layout mode,
you'll notice when we select this field
| | 04:43 | that we've got some options when
we choose the Drop-down calendar.
| | 04:46 | For example, we can say Include
icon to show and hide calendar.
| | 04:50 | Let's see how that changes the
behavior when we go into Browse mode.
| | 04:54 | Now when we click into the field, the
Drop-down calendar doesn't pop-up, or if
| | 04:58 | you tab into the field or click
into it, you get the same behavior.
| | 05:01 | But if you click on the icon, it will appear.
| | 05:04 | So you might want to use this when
your users might only need to use the
| | 05:08 | calendar in some cases, and you have
it just there as an option for them.
| | 05:12 | You can turn off the icon if you
want every user to pick from a
| | 05:15 | Drop-down calendar.
| | 05:17 | This is just one example of how
each one of the Control styles may have
| | 05:20 | different types of functionality for
you to choose from, depending of course on
| | 05:23 | the type of data that
will be entered in the field.
| | 05:26 | In the upcoming series of movies, we're
going to create value lists and then use
| | 05:29 | all the other Field/Control
styles to apply those lists to a field.
| | 05:33 | Providing a list of Control Styles and
a list of values to choose from, in any
| | 05:37 | of these options, will go a long way
towards ensuring consistent data entry by
| | 05:42 | your users.
| | Collapse this transcript |
| Creating and applying static value lists| 00:01 | Several of the field control styles -
| | 00:03 | Drop-down list, Pop-up menu, Checkbox,
and Radio button set - require that
| | 00:08 | you specify a Value List first for
the values that will be presented to the
| | 00:12 | user using those styles.
| | 00:14 | Value Lists exist independently of
field control styles, but they are
| | 00:18 | closely affiliated.
| | 00:19 | A given Value List can be associated
with any number of fields in your file,
| | 00:24 | even on a number of
different fields in the same layout.
| | 00:27 | Value Lists are defined in the Manage
Value List dialog, which can be accessed
| | 00:30 | from the File > Manage > Value Lists.
| | 00:35 | And in this window, you see we've
already got one from our sorting chapter.
| | 00:39 | Here we'll select the New
button to create a new Value List.
| | 00:42 | You'll see, from the Edit Value List
window, that we've got three different
| | 00:46 | options for setting up a
Value List in FileMaker.
| | 00:48 | We're going to concentrate on the
option called Use custom values, and that's
| | 00:53 | commonly referred to as creating a
static Value List, because here you'll just
| | 00:56 | enter in some static values, of course,
and that will make up your Value List.
| | 01:00 | The rest of these options are more dynamic,
and we're going to cover those in a later movie.
| | 01:05 | In this example, we're going to create a
Value List for the Shipping Status field.
| | 01:09 | This field can contain
either one of these three values:
| | 01:12 | Pending, Processing, or Shipped.
| | 01:15 | So first let's name our Value List
something that will be easy for us to
| | 01:21 | retrieve later, Shipping Status, and
we'll type a return delimited text list
| | 01:31 | in the order we want these to be presented.
And we'll put Pending, Processing, and Shipped.
| | 01:39 | Now, when we're done, we'll hit OK, and
we'll see this list appear in our list
| | 01:44 | of Value Lists, and we'll also see a
preview of the values that we're assigned.
| | 01:49 | Now, we can dismiss this window by hitting OK.
| | 01:52 | If we go into Layout mode, let's
choose the Shipment Status field, and then
| | 01:57 | looking at our Inspector in the Data tab,
we can see that we've got the Invoice
| | 02:03 | Shipment Status field selected, but we
can also click on a Control style, and in
| | 02:08 | this case, we're going to choose Drop-down list.
| | 02:11 | Once you choose Drop-down list, it
requires that you choose a Value List.
| | 02:16 | Here we can click on the Drop-down and
choose Shipping Status, and you'll also
| | 02:21 | note that if you haven't yet created a
Value List, you can just hit the Pencil
| | 02:24 | icon, and it will pop up the
Manage Value List window for you.
| | 02:29 | The Drop-down list style that we
selected allows the user to select from an item
| | 02:33 | from the Value List, or to manually
enter a value if they don't want to choose
| | 02:36 | one of your options, and this list will
also include a handy vertical scrollbar,
| | 02:40 | so it's best used for very long Value Lists.
| | 02:43 | You'll notice the option to Include
arrow to show and hide list will affect the
| | 02:47 | display of the field, and determines
whether clicking into the field will
| | 02:50 | trigger the list to appear.
| | 02:51 | So let's look at it first
without this option selected.
| | 02:55 | We'll go into Browse mode and
hit Save to save our changes.
| | 02:59 | And now we notice that we can either
tab into a field or click into the field,
| | 03:06 | and you see by clicking into the
field, it invokes this Drop-down list.
| | 03:09 | But also notice that if I click outside
the field or click twice into the field,
| | 03:13 | I can still add my own value.
| | 03:16 | That's one of the features of a Drop-down list.
| | 03:18 | If I go back into Layout mode, select
the Shipment Status again, you see we have
| | 03:24 | two different options:
| | 03:25 | Include arrow to show and hide list,
and also I'm going to choose Allow
| | 03:29 | editing of value list.
| | 03:31 | Back in Browse mode, after we've saved
our changes, you'll notice now that by
| | 03:35 | just clicking or tabbing into the field,
it doesn't invoke the Drop-down list.
| | 03:39 | When the icon appears, the user will
have to click the icon, and now you'll see,
| | 03:44 | in addition to having our three
fields from the Value List that we chose,
| | 03:48 | there's also an Edit option.
| | 03:50 | When a user clicks on the Edit option,
a window pops up allowing them to edit
| | 03:54 | the Value List that was created.
| | 03:57 | You want to be careful when you select that.
| | 03:59 | Possibly you don't want users to add
values to the Value List, because what
| | 04:03 | you're trying to achieve is data entry
consistency, and they may make the same
| | 04:07 | mistakes when editing your Value List as
they would by just adding values to the field.
| | 04:10 | You'll probably only show the icon if
you want the Drop-down list to be an
| | 04:15 | option, or sort of a helper option of
different values, rather than a required
| | 04:19 | value to select from.
| | 04:20 | So let's go into Layout mode and
quickly add another type of a Value List.
| | 04:26 | Let's say, for example, we click on
the Taxable field, and we're going to go
| | 04:31 | into a Control style here, and
we're going to choose Radio button set.
| | 04:36 | But we don't yet have a Value List to
choose from, so we're going to click on
| | 04:39 | the Pencil icon and hit New, and we'll
call this one Yes No, and we'll just
| | 04:46 | choose Yes, Return, No, and hit OK,
and OK again, and now we see that that's
| | 04:53 | been applied to the Taxable field.
| | 04:55 | If we go into Browse mode, Save our
changes, we'll see now that a Radio button
| | 05:00 | has mutually exclusive options.
| | 05:02 | A user can either select Yes or No,
but not both at the same time.
| | 05:07 | By creating a Value List, you can
provide your users with the options to choose
| | 05:10 | from, rather than have them try to
figure out what data to enter into the field.
| | 05:14 | You'll want to use a static Value List
when the values you wish to present to
| | 05:17 | users will barely ever change.
| | Collapse this transcript |
| Creating and applying dynamic value lists| 00:00 | We discussed creating a static value
list containing a preset range of values,
| | 00:05 | but there's another way to populate the
values in a Value List, and it's called
| | 00:08 | creating a Dynamic Value List.
| | 00:10 | Dynamic Value Lists are
automatically created on the fly, based on data
| | 00:14 | that's already in a field.
| | 00:16 | This way the value in the field will
be automatically updated each time a new
| | 00:19 | record is added, or the chosen
field is updated in an existing record.
| | 00:23 | Then an alphabetized and de-duped list of
values will be available in the Value Lists;
| | 00:28 | these Value Lists use something that's
called a Field Index to create the lists.
| | 00:31 | For example, if you click into any
field in Browse mode and choose Command+I on
| | 00:36 | Mac, or Ctrl+I on Windows,
you can see a field's index.
| | 00:40 | So this way, even if you have
multiple records that all have the value of
| | 00:44 | Pending or Shipped, for example, the word
Pending will only show up once in your Value List.
| | 00:49 | So when you use this field's index
as your Value List, in the case of a
| | 00:54 | Dynamic Value List, you will only see these
values once, and you'll see them alphabetized.
| | 00:59 | Now, in the Invoice Detail Layout,
what you'll notice is that every record in
| | 01:03 | the Invoice Detail is the child
record from a Parent Customer.
| | 01:07 | If you'll recall from the Creating
Relationships chapter, a child related
| | 01:10 | record needs to have the Foreign Key field
populated with the key field from the Parent.
| | 01:16 | If you need a refresher, it's not a
bad idea to go watch those videos again.
| | 01:20 | So in each Invoice record, we would
like to show a dropdown of all of the
| | 01:24 | primary keys of the customers
stored in our Customers table.
| | 01:27 | This will allow a user to go into
the Invoice Detail Layout, create a new
| | 01:31 | record, but still associate this child
record with the parent by choosing the
| | 01:35 | right Customer ID and placing
that into the Foreign Key field.
| | 01:39 | In order to show a dropdown of all of
the primary key values from the Customer
| | 01:43 | table, we would need to
create a Dynamic Value List.
| | 01:47 | Value Lists are created in the Manage
Value Lists dialog, which can be accessed
| | 01:52 | under the File menu, to Manage, and Value Lists.
| | 01:57 | In this case, we'll hit the New button,
and we're going to name our Value List.
| | 02:02 | Let's call this one Customers.
| | 02:04 | Now, instead of choosing the default
Use Custom Values, which would create
| | 02:09 | a static value list, we are going to
choose the first option, Use values from field.
| | 02:13 | When we select it, we see a new
window appear called Specify fields for the
| | 02:18 | Value List "Customers".
| | 02:20 | Now, in this first window, you see this
dropdown will contain a list of tables.
| | 02:24 | Once we choose a table, we're going to
choose the field that we want to base our
| | 02:27 | dynamic value list on.
| | 02:29 | So in this case, since we want to
show a list of all customers' primary key
| | 02:33 | values, we'll select Customers.
| | 02:36 | But you see I can choose from any
one of the tables in the database.
| | 02:40 | Now we're going to choose the primary key field.
| | 02:43 | Let's see what that looks like
once we assign this to our field.
| | 02:47 | We'll hit OK, OK, OK again, and
in Layout mode, we will select the
| | 02:53 | fkCustomerID field, because this is a
local foreign key field defined inside
| | 02:58 | of the Invoice record, and it needs to
contain a primary key value from one of
| | 03:03 | the Customer records.
| | 03:05 | So when we select it, we see in our
Inspector, in the Data tab, that we do have
| | 03:10 | the fkCustomerID's field chosen, but now
we are going to select a pop-up menu, and
| | 03:18 | now we choose the Value List we
want to show, and we'll say Customers.
| | 03:22 | And you see the pop-up menu has the
option to allow entry of other values, but
| | 03:28 | that's not going to make sense for the
task that we are trying to perform here.
| | 03:31 | So now in Browse mode we hit Save to
commit our changes, and now we see, when we
| | 03:37 | click in the field, we get a list
which represents every primary key from all
| | 03:42 | the customers in our Customer table.
| | 03:44 | The problem is your users aren't going
to recognize a customer by their Customer
| | 03:48 | ID, so there's a way that we can
modify this Value List to make it more
| | 03:52 | intuitive to the users.
| | 03:53 | If we go under File, to Manage, to
Value Lists, and either double-click on, or
| | 04:00 | click and hit the Edit button on, the
Customer Value List we created earlier, we
| | 04:05 | hit Specify Field again, and now you'll
notice on the right-hand side, we have
| | 04:10 | the option to Also display
values from a second field.
| | 04:14 | What this allows us to do is not only
display all the Customer Ids, and by the
| | 04:19 | way, when a user selects one of
these options, the value in the left-hand
| | 04:22 | window, or in this case the primary
CustomerID key field, will actually be the
| | 04:27 | value that gets populated into the field.
| | 04:29 | However, if we want to give users sort
of a guide, we can pick another field
| | 04:34 | from that same table, let's say CompanyName,
and allow the user to see those as well.
| | 04:41 | We also have the option below to show
values only from the second field, or to
| | 04:47 | show the values from both fields
but then choose which one to sort by.
| | 04:51 | Since the users really don't need to
know the IDs, we'll just select show values
| | 04:54 | only from second field.
| | 04:56 | Now we hit OK, OK again, and then one
last OK, and now we see, inside of the
| | 05:02 | field, even though the value of the
field is actually the ID, what it's showing
| | 05:07 | us is the value of the second field.
| | 05:09 | Also, when the user clicks on the Value
List, all you are going to see are the
| | 05:13 | names of Customers, instead of the IDs.
| | 05:17 | In this case, you'll notice that our
list is a lot shorter, and that's because
| | 05:20 | there are only two records in our
Customer table that actually contain
| | 05:23 | Customer Name values.
| | 05:26 | So if we wanted to show all of the
customers, we want to make sure that for
| | 05:29 | every record that has a primary key
in it, it also has a customer name.
| | 05:34 | Now you'll notice by toggling between
the two choices, that the related fields
| | 05:39 | that we have on this layout change values.
| | 05:41 | We'll talk more about related fields
in the chapter on using relationships.
| | 05:46 | By formatting a field as a dropdown
menu based on a Dynamic Value List, you can
| | 05:51 | still allow users to enter new values,
but at the same time allow them to choose
| | 05:54 | from previously entered values.
| | 05:56 | The way that a new value could be
entered in this dropdown is by navigating over
| | 06:00 | to the Customer List and creating a new record,
| | 06:04 | making sure of course that the new
record you create has both the primary key
| | 06:07 | value and a company name.
| | Collapse this transcript |
|
|
14. Printing and SavingPreviewing pages and print options| 00:00 | One of the benefits of FileMaker Pro
is that you can print any layout that
| | 00:03 | you can view onscreen.
| | 00:05 | So this way you don't have to have any
special print layouts, but there are some
| | 00:08 | ways to approach printing that
can help you get better results.
| | 00:11 | If you use some of the tools that
FileMaker provides to you to visualize what
| | 00:14 | your layouts will look like when you
print them, you can then design your
| | 00:17 | layouts to look more like print layouts.
| | 00:19 | The first tool that you can
use is called Preview mode.
| | 00:22 | We've been talking about
the various different modes -
| | 00:24 | Browse, Find, Layout;
| | 00:26 | there's also a mode called Preview mode,
which can be invoked while in Browse
| | 00:29 | mode by hitting this Preview button.
| | 00:32 | I'll show you Preview mode in just a
second, but the first step that I want you
| | 00:35 | to take is to go into Layout mode, and
when in Layout mode, I wanted to bring to
| | 00:39 | your attention this little
dotted line here that we see.
| | 00:42 | This line is what the page edge is going to
look like while we're still in Layout mode.
| | 00:46 | The idea here is so that you can see
where you're printing will cut off and
| | 00:50 | therefore develop around it.
| | 00:51 | You also have a line in the bottom of
the screen where the height of your page
| | 00:55 | will end based on the
print driver you have selected.
| | 00:57 | If I were to print this, it would cut off
half of the Shipment Status field value.
| | 01:02 | It's also important though to
look at where these lines come from.
| | 01:05 | These lines are coming from the print
driver that I have selected on my computer.
| | 01:09 | Since all print drivers are different,
the size might fluctuate a little bit,
| | 01:12 | even if you've designed your
layouts based on the print driver you have
| | 01:16 | installed as a developer.
| | 01:17 | This isn't a platform issue,
so it's not a Mac or PC thing;
| | 01:20 | it's a driver issue.
| | 01:22 | So in a perfect world, you want to make
sure to include all of the print drivers
| | 01:25 | on your development machine that
will occur in your user's environment.
| | 01:29 | Generally, you can get an idea where
things may print and where they won't
| | 01:32 | print, because really they're all kind
of based on an 8.5 x 11 document, for the
| | 01:36 | most part, and that serves as a good guide.
| | 01:39 | Also, you'll notice, if we go under the
File menu and we go to Page Setup, and I
| | 01:43 | choose Landscape instead of Portrait,
you'll see that the line has moved.
| | 01:47 | Of course, in that case, the print edge will
change because we are printing in Landscape.
| | 01:52 | So it's important that you make sure,
before you design all your layouts, that you
| | 01:55 | choose Portrait or Landscape, so
you can design around those sizes.
| | 02:00 | Back in Browse mode. If you want to
see what something is going to look like
| | 02:04 | when you print it, you'll
press the Preview button.
| | 02:07 | Hitting this button enters you into
Preview mode, which can also be achieved by
| | 02:11 | going under the View menu.
| | 02:13 | When you switch to Preview mode, you see
the layout as it appears on the printed page.
| | 02:17 | You cannot enter or edit information
in fields while in Preview mode, nor can
| | 02:21 | you click any of the buttons that you
have onscreen, but it's just solely here
| | 02:24 | to preview what your
printed document will look like.
| | 02:27 | Also in Preview mode, you'll notice, in
the upper left-hand corner, that where we
| | 02:30 | normally have Record navigation or
Layout navigation or Found Set navigation, we
| | 02:35 | now have navigation between the number
of pages that will print based on the
| | 02:38 | current Found Set that you've chosen.
| | 02:40 | It's important to remember that anytime
you invoke a Print, a Save as Excel, or
| | 02:45 | Save as PDF from within Preview mode or
Browse mode, FileMaker will always print
| | 02:50 | the records in your current Found Set.
| | 02:52 | So this way Preview mode gives you an
idea how many printed pages it will take
| | 02:56 | to print your Found Set.
| | 02:57 | Variable information supplied by
FileMaker Pro, such as page numbers or the
| | 03:01 | current date like we use here, may not
be available in Browse mode, but will
| | 03:07 | definitely be available in Preview mode.
| | 03:09 | In the case of current date,
it's available in both.
| | 03:12 | You can also use Preview mode to
see things like Mailing Labels, which
| | 03:16 | have multiple columns.
| | 03:17 | Of course, in Browse mode they will
only show one record, but in Preview mode
| | 03:21 | you'll see all the
columns wrapped appropriately.
| | 03:23 | When you print a layout, which you
can do in many different ways, you can
| | 03:27 | either hit the Print button that's
only in the Status toolbar when you're in
| | 03:30 | Preview mode, or you can go under the
File menu and choose Print, or you can use
| | 03:35 | the Quick Key option, which on Mac is
Command+P and on Windows is Ctrl+P. Once
| | 03:41 | selected, you'll see the
Print dialog box appear.
| | 03:44 | Keep in mind that the Print dialog
box is going to look different on every
| | 03:47 | computer that has a
different print driver installed.
| | 03:50 | Some of the features are going to be
the same, but it will be organized in a
| | 03:53 | little bit different fashion.
| | 03:54 | Besides just selecting the printer you
want to use to print, you can also choose
| | 03:58 | the copies and number of
pages for your document.
| | 04:01 | And then you'll also notice that
you'll have a FileMaker Pro option.
| | 04:04 | It will be located in various different
places, depending on your print driver,
| | 04:08 | but once selected, it will allow you to
choose your starting page and then give
| | 04:12 | you three important printing options.
| | 04:14 | You can choose from the Records being
browsed, which means your current Found
| | 04:17 | Set, or you can choose Current record,
which means that no matter how many
| | 04:21 | records you have in your Found Set,
it's only going to print the active record,
| | 04:24 | or you can just choose a Blank version
of the current layout that you're on - no
| | 04:28 | records, but just the fields.
| | 04:30 | And a lot of times this might be
useful if you have a form or something like
| | 04:33 | that that you want to print and allow
people to fill out by hand, for example.
| | 04:37 | On both Mac and Windows, you can choose
from a variety of other settings common
| | 04:41 | to all application Print dialogs,
as you can see some of those here.
| | 04:44 | There are very few areas where FileMaker
performs differently in Mac or Windows,
| | 04:48 | but print setups are one of them.
| | 04:50 | For example, if you choose the Page
Setup icon in the toolbar, which is also
| | 04:56 | available under the File menu,
you'll see the Page Setup dialog appear.
| | 05:00 | Now I am working on a Macintosh
computer right now, so the dialog is actually
| | 05:04 | called Page Setup; however on
Windows, it's called the Print Setup.
| | 05:09 | Inside of a Mac and the Page Setup
dialog, you have the ability to choose the
| | 05:13 | scale of the document you'll print;
that is, for example, 100%, 75, 50, that
| | 05:18 | type of thing. But on Windows, only some,
but not all of the print drivers will
| | 05:23 | have the ability to scale
the document you want to print.
| | 05:25 | FileMaker Pro initially uses the
Windows default Printer and Paper options as
| | 05:30 | its default, but you can specify a
different default Printer and Paper options
| | 05:33 | when you print in FileMaker Pro.
| | 05:34 | The default Printer that you choose in
FileMaker Pro is an application setting.
| | 05:39 | So all files that you print in
FileMaker will print to this printer, unless you
| | 05:43 | choose a different one.
| | 05:44 | The Paper and Orientation options that
you choose in the Windows Print Setup are
| | 05:48 | going to be file-specific settings;
| | 05:50 | therefore, when you need to, you can
choose different Paper and Orientation
| | 05:53 | options for each
different FileMaker Pro database.
| | 05:56 | However, in the case of the Page
Setup dialog on a Mac, FileMaker Pro prints
| | 06:01 | to the Mac OS default printer, unless you
specify a different printer when you print.
| | 06:06 | For the most part, printing in FileMaker
Pro is similar to printing in any other
| | 06:10 | application; however, getting familiar
with some of the unique printing tools and
| | 06:13 | options in FileMaker Pro can help you
take all the guesswork out of the way your
| | 06:17 | layouts will look when they print.
| | Collapse this transcript |
| Printing in different views| 00:00 | When setting up layouts to print in
FileMaker, you really have two different
| | 00:03 | options on how you're going to print the data.
| | 00:05 | You can either print it as one
record at a time, or you can print it as
| | 00:08 | multiple records at a time.
| | 00:10 | FileMaker Pro automatically defaults
to printing all records in the current
| | 00:14 | found set when you're printing.
| | 00:15 | The most common way to print multiple
records at a time is through a List View.
| | 00:19 | If you recall, for each primary table in our
database, we've already set up a List View.
| | 00:23 | For example, you see I have got the
Product List View, where as you see in Layout
| | 00:29 | mode, we've created all the fields in
one row and made the body only the height
| | 00:33 | of the field's height.
| | 00:35 | But in addition to creating the layout
of the style, we also need to make sure
| | 00:39 | we've got the View as a list chosen.
| | 00:41 | So if you look at this list in Preview
mode, you see that all the records in our
| | 00:45 | Found Set will print. In this case,
we're getting multiple records on a printed
| | 00:49 | page at any given time.
| | 00:51 | The more records you can get
onscreen usually makes the more
| | 00:53 | efficient printing.
| | 00:55 | For example, if we go into Layout mode
and we select the body part, we'll notice
| | 01:00 | in our Inspector, under Position,
that the Height of the part is 18.
| | 01:04 | However, if we change that to 35 and hit
Enter, then go into Browse mode, saving
| | 01:11 | our changes, if you see in Preview mode,
you'll notice that the number of pages
| | 01:15 | it takes to print the same
amount of records is 3 pages.
| | 01:18 | But back in Layout mode, if we shrink up
the body to just above the height of the
| | 01:24 | field, in this case 18 because
our fields are 14 pixels high.
| | 01:31 | Now if we go back into Preview mode
saving our changes, you'll see that we only
| | 01:37 | have to print two pages
and just barely two pages.
| | 01:41 | Make sure you're designing these List
Views efficiently, so that when you print
| | 01:44 | them, it still uses little paper as
possible but get as many records on a printed
| | 01:48 | page as you possibly can.
| | 01:49 | Now let's navigate over to Browse mode
again and choose the Product Detail Layout.
| | 01:57 | So in cases where you want to create a
layout for just one record at a time,
| | 02:01 | you'll go under the View menu and
make sure that you've got View As a Form;
| | 02:05 | you can also choose that in your Layout toolbar,
and as I mentioned before in the View menu.
| | 02:10 | Now if you go onto Layout mode, you'll see
that the body is much larger in this case;
| | 02:14 | instead of 18 pixels high, it's 434 pixels.
| | 02:19 | The idea behind this is if you go into
Browse mode, this way only one record can
| | 02:23 | be seen onscreen at a time.
| | 02:25 | But you want to make sure that you are
viewing as a form; otherwise, if you go to
| | 02:28 | print this record, you'll get more than
one record fit onto one page, as you'll
| | 02:32 | see if I change it to Viewing As
a list - not the desired effect.
| | 02:37 | So since FileMaker allows you to print
any layout that you can view, you want
| | 02:41 | to make sure that you set these
layouts up, so that they are only showing one
| | 02:44 | record at a time if it's a Detail View, or
many records at a time if it's a List View;
| | 02:49 | this will have both when you're
browsing records, but also, additionally, when
| | 02:52 | you're printing them.
| | Collapse this transcript |
| Sliding objects| 00:00 | When you're considering allowing your
users to be able to print off layouts that
| | 00:03 | you've created in FileMaker, there is a
couple of things that you might want to
| | 00:06 | take into consideration.
| | 00:08 | First off, you know that you can print
any layout that you can see onscreen.
| | 00:11 | You can also prevent objects on a
layout from printing, and you can also remove
| | 00:16 | blank spaces between objects
on your layout when you print.
| | 00:19 | This way you might have graphic
objects, or buttons, or different things for
| | 00:22 | users to work with during data entry
in Browse mode, but you can remove those
| | 00:26 | when they are printing.
| | 00:27 | To do this, we're going to use
something called Sliding Invisibility.
| | 00:30 | You'll notice this option when we go
into View > Layout mode, and we'll see our
| | 00:36 | Inspector, and in the Position Tab,
you'll notice, on the bottom, the Sliding
| | 00:40 | Invisibility section.
| | 00:42 | You can set an object to be omitted
entirely from printing, which, for example,
| | 00:46 | allows you to put buttons or print
instructions on a layout that won't appear on
| | 00:49 | the actual printout.
| | 00:50 | Let's say, for example, we've got this
logo that we don't want to have printed
| | 00:55 | when we print this Product List View.
| | 00:57 | By simply selecting the logo or any
other layout objects, you go under the
| | 01:02 | Sliding Invisibility and choose
the very bottom, Hide when printing.
| | 01:08 | Now, when we go into Browse mode -
Save our changes - we see the logo here in
| | 01:14 | Browse mode, but when we go
into Preview, it's no longer there.
| | 01:17 | So you can put anything you want on a
layout, or you can take every layout
| | 01:21 | that's in your FileMaker database and
go and hide all the items in case your
| | 01:25 | users decide to print from that view.
| | 01:26 | This is going to allow you to get rid of
really busy objects that might normally
| | 01:30 | print if you haven't chosen this option.
| | 01:32 | Notice how the white space isn't
used efficiently from record to record.
| | 01:35 | Many times on the List View this could
be okay, but let's say we want the Cost
| | 01:38 | to butt right up against
the end of the Product Name.
| | 01:41 | So after every Product Name will be the Cost,
regardless of how long the Product Name is.
| | 01:47 | The problem is when we go into Layout
mode is that we can only choose the
| | 01:52 | positioning of the fields based on the
field names, not by the field values.
| | 01:56 | However, if we select all of these
fields and their field labels, by drag-
| | 02:02 | selecting, you'll notice in the Sliding
Invisibility, we have an option for Sliding Left.
| | 02:08 | Let's take a look at how that
option will affect us in Preview mode.
| | 02:11 | We go to Preview mode and hit Save,
and now we notice that all of the options
| | 02:16 | will slide left, as far left as they
can until they run into another value.
| | 02:21 | But that the space between the two
fields in Layout mode is still honored.
| | 02:24 | So this is a good way to dynamically line
up all of your values from left to right.
| | 02:29 | So now let's select all three of our fields.
| | 02:34 | I'm going to drag-select those three
fields, and while they're selected, I'm
| | 02:38 | going to choose the option under
Sliding Invisibility, called Sliding Left.
| | 02:43 | Now when we go back into Preview mode
and Save our changes, we see that the Cost
| | 02:48 | is butted right up
against the name of the product,
| | 02:50 | and also that the distance in our
Layout mode that we've given between the
| | 02:54 | Product Name and the
Cost is still being honored.
| | 02:57 | This way we can dynamically move
fields against each other, thus
| | 02:59 | preserving white space.
| | 03:03 | You should also be aware that if you
have records stacked top to bottom, for
| | 03:06 | example on a Detail View, you can
also use the Sliding Up selection to
| | 03:11 | eliminate white space top
to bottom in your layouts.
| | 03:14 | You'll use these options on the
Inspector tool if you want to prevent layout
| | 03:17 | objects from printing or control
white space on outputs from your FileMaker
| | 03:21 | system, so that you can create cleaner
and more professional-looking reports
| | 03:24 | and printouts.
| | Collapse this transcript |
| Printing merge letters| 00:00 | One very popular request from FileMaker
users is the ability to print letters.
| | 00:04 | And much like other applications,
like Word, for example, FileMaker Pro
| | 00:08 | supports Merge fields.
| | 00:10 | If you navigate over to the Customer
Welcome Letter, I'll show you an example of
| | 00:14 | how this Merge field technique works.
| | 00:17 | First, we'll need to go into Layout mode,
and we're going to take a look at this
| | 00:22 | layout and how it's set up.
| | 00:23 | You see this layout has a standard
Header/Footer part, but inside the Body we
| | 00:28 | just have one big text area, which was
created, initially, by choosing the Text
| | 00:33 | tool and just picking an area
onscreen and beginning to type.
| | 00:38 | You'll notice we've got a couple of
areas here where we've left blanks because
| | 00:41 | we want to actually show field data.
| | 00:44 | One way that we could do this is to
drag a field, which we can do by choosing
| | 00:48 | the Field tool and dragging the field
right next to the area that we want to
| | 00:53 | display the name, like so.
| | 00:58 | And certainly that could work;
| | 00:59 | as a matter of fact, if you look at it in
Browse mode you can see that a value can show up.
| | 01:03 | But what happens when we want to put
information in between other text, or
| | 01:08 | list data inside the Letter area and have it
expand and contract based on how long the data is?
| | 01:14 | Well, then these fields aren't going to work.
| | 01:16 | And plus, even in this case, they'd
be a little difficult to work with.
| | 01:19 | I'm going to go ahead and delete this
field here, and I'm going to click inside
| | 01:23 | the text area, and double-click on
it so I can put my cursor in there.
| | 01:29 | And instead, what I'm going to do, I'm
going to go into the Insert menu, and at
| | 01:34 | the very bottom you see there is
a section here for Merge Field.
| | 01:38 | When you select Insert > Merge Field,
you see the familiar Specify Field window
| | 01:43 | which allows you to pick a field from
any table that's related to the current
| | 01:46 | table that you're on.
| | 01:47 | When I hit OK we see now that the
entire name has been placed inside of the
| | 01:52 | text area, with double brackets on
each side of it, which is a common way to
| | 01:56 | denote Merge Field.
| | 01:58 | Going back into Browse mode, saving
our changes, we now see, as we move from
| | 02:06 | record to record, that the first name
Field data has been put inside of this, that
| | 02:12 | the data from the first name field
has been placed right next to Hello, and
| | 02:16 | what's nice is it dynamically moves
the position of the dash forward and
| | 02:21 | backward, depending on the
length of the data in the field.
| | 02:24 | Now what's nice about a Merge Field
is we can treat it just like it's text.
| | 02:30 | So, for example, if I wanted to select
this and add some formatting to it, I
| | 02:36 | would use the same formatting options
as I do for formatting any other kind
| | 02:40 | of text on the layout.
| | 02:41 | Let's take a look at a couple of other
areas where we can insert some Merge value.
| | 02:45 | Let's put in the CompanyName here
and get rid of some of these spaces.
| | 02:57 | And then down here, we're going to actually add
the address, since that's what it indicates here.
| | 03:02 | I want them to verify their shipping address.
| | 03:05 | So we're going to treat it just like
text, but we can say AddressStreet, and
| | 03:10 | I'll hit Return, Insert > Merge Field,
City, and now because it's like text,
| | 03:17 | very similar to the one we are
creating our label layouts and our envelope
| | 03:20 | layouts, I can put a comma and a space,
and I can insert another Merge Field
| | 03:26 | after that for State, put
another's couple of spaces and insert Zip.
| | 03:35 | Now when we go onto Browse mode and we
cycle through the different records, we
| | 03:41 | can see the addresses and the names update.
| | 03:43 | But we don't see anything
where we have the customer name.
| | 03:47 | So if we go into Customer List and Find
Matching Records, Show Omitted, it will
| | 03:58 | give us a found set of
records that have company names.
| | 04:01 | Now we can go back and
preview and see how those look.
| | 04:04 | Thank you for signing up, and then we've
got the name, and you'll notice that no
| | 04:08 | matter how long the name is, it's
actually wrapping the entire text from that
| | 04:13 | paragraph around to the next line,
which is a nice way to do this.
| | 04:20 | But also, we can apply some formatting,
so we choose the name here and hit Bold.
| | 04:26 | I can also maybe add other character
there and go into Browse mode, and you see
| | 04:33 | now we're able to create smart-looking,
professional letters with dynamic data
| | 04:39 | that's populated by a found set
that we created in our customer table.
| | 04:42 | So it's a good idea, when you're creating
letter layouts, that you always use Merge fields;
| | 04:47 | however, Merge fields can also be used
anywhere else in a layout that you want a
| | 04:50 | field value to be treated as text.
| | Collapse this transcript |
| Saving as a PDF or Excel file| 00:00 | FileMaker Pro has built-in
functionality for saving data as either Microsoft
| | 00:04 | Excel or Adobe PDF files.
| | 00:07 | You can see these options when you
go into Preview mode in any one of your
| | 00:09 | layouts, because we've got icons in the
Status toolbar for Save as Excel and Save as PDF.
| | 00:15 | You can also find these options while
you're in any layout, in any mode, under
| | 00:20 | the File menu, under Save/Send Records As.
| | 00:24 | The Save/Send Records As Excel
functionality makes it easy for a user to export
| | 00:28 | FileMaker Pro data from the current
layout and current found set, and work with
| | 00:32 | it in Excel's Spreadsheet.
| | 00:34 | Note also that FileMaker Pro 11
supports both the .xsl and .xslx formats
| | 00:40 | for Microsoft Excel.
| | 00:42 | So the Save as Excel option is
great for you if you want to share data
| | 00:45 | that's stored in your FileMaker
database with someone who doesn't have
| | 00:48 | access to the database;
| | 00:49 | however, it's not intended to be an
alternative to storing the data in your database.
| | 00:54 | You should never create an Excel
Spreadsheet and then make modifications to
| | 00:57 | the data, because you'll just end up
with data with different versions in
| | 01:01 | different locations.
| | 01:03 | So make sure this is only for
sharing subsets of data and not for
| | 01:06 | making modifications.
| | 01:07 | But in fact, if somebody contacts
you and says -- let's say, for example, an
| | 01:11 | accounting person says they want some
information that's stored in FileMaker.
| | 01:14 | This is an excellent tool for being able to
share that data, and it's really easy to do, too.
| | 01:18 | So if you are asked to do an Export
as Excel, you could of course go into
| | 01:22 | the File Export option and choose
Excel, which in that case it allows you to
| | 01:29 | pick various fields.
| | 01:31 | But when you're doing the Save As Excel,
it's a little bit easier to do, because
| | 01:34 | it's just a single button press.
| | 01:36 | But just remember that the layout
that you're on is going to give you the
| | 01:39 | fields that it'll Export.
| | 01:40 | So basically hitting Save As
Excel will give me these three fields,
| | 01:43 | the ProductID, Product Name and Cost,
and it will give me the number of records
| | 01:49 | that I currently have in my Found Set.
| | 01:50 | So if we look here, I
have all 40 records showing.
| | 01:54 | But if I were to create a subset
of those, that's what would Export.
| | 01:58 | So back in Preview mode, if I do want to
create the Save as Excel, all I have to
| | 02:02 | do out of Preview mode is hit the Save
as Excel button, but keep in mind that in
| | 02:05 | any mode you can go under the File menu
and choose Save/Send Records As Excel.
| | 02:13 | In the Save Records As Excel dialog
window, you'll choose the name of your
| | 02:17 | Excel file, as well as the location
where we're going to save it, and you can
| | 02:20 | choose which type of Excel Workbook you
want to create, and then you also have
| | 02:24 | an option to choose whether its going to be
the records being browsed or the current records.
| | 02:28 | Now remember, we had 40 records in
our found set, so that means if I
| | 02:32 | choose records being browsed, it's
going to give me all 40 records as part
| | 02:35 | of the spreadsheet Export.
| | 02:36 | If I choose Current Record, it's just
going to give me whatever the active
| | 02:40 | record was at the time
that I pressed Save As Excel.
| | 02:42 | So we'll keep it as Records being browsed.
| | 02:45 | You see we have a couple of options here.
| | 02:47 | Automatically open file, which I have
checked, will open up the file in Excel
| | 02:51 | for me to preview it.
| | 02:53 | I'll make any modifications if I need to,
but just to help me take a look at it
| | 02:56 | which I will do in this case, and also a
really handy option to Create an e-mail
| | 03:01 | with the spreadsheet as an attachment.
| | 03:02 | So like in the example before where
someone in an accounting department, for
| | 03:06 | example, has asked you to send
this information over to them.
| | 03:09 | Well, you're going to e-mail it anyway,
so why not just hit this button,which
| | 03:12 | will open up a outgoing e-mail on
your default mail program, with this
| | 03:16 | spreadsheet attached.
| | 03:17 | We'll just keep the Automatically
open file option open right now.
| | 03:20 | Then we hit the Save button.
| | 03:23 | You see now that the spreadsheet has been
saved to the location where we told it.
| | 03:26 | In this case we've actually got 41
records, and that's because of course, Excel
| | 03:32 | uses a row to use your column headers.
| | 03:35 | And you'll notice also that the column
headers inside the spreadsheet will be
| | 03:39 | the name of the field.
| | 03:41 | So sometimes you might want to open
this up and maybe just change these
| | 03:44 | around, so instead of the naming
convention that you used, you can make it to
| | 03:47 | say ID, for example.
| | 03:49 | And if you've ever use related fields,
you'll actually see the table name colon,
| | 03:53 | colon in the field names.
| | 03:54 | So that's definitely something you want to
clean up before you share this with anybody.
| | 03:58 | Just like with Excel, FileMaker allows you
to output your layouts as a PDF document.
| | 04:03 | It's actually quite easy to do. First just
navigate to the layout that you want to create.
| | 04:08 | Let's say we go to our Welcome Letter,
and instead of printing out a hardcopy
| | 04:13 | of the Welcome Letter, let's say this
time we want to just generate a PDF and
| | 04:18 | send it over to one of our customers.
| | 04:20 | So now that we've navigated to this
layout, we can take a look at what its
| | 04:24 | going to look like in Preview mode,
and of course, Preview shows us the
| | 04:27 | margins and the spacing for not only a
hardcopy output, but also what the PDF
| | 04:31 | is going to look like.
| | 04:32 | And we're in Preview mode now, so we
see we've got the Save as PDF button, but
| | 04:36 | of course, in any mode I can go under the File
menu, choose Save/Send Records As and choose PDF.
| | 04:41 | It will give me the same Save Records
As PDF option, and here just like with
| | 04:46 | Excel, name the PDF, pick the location
where you want it to be saved, and choose
| | 04:52 | whether or not you want the Records
being browsed, which is going to be all of
| | 04:55 | the records in the found set.
| | 04:56 | This time, though, we just want to
print the one active record that we're on.
| | 04:59 | So that's going to be the
Current record that we see onscreen.
| | 05:02 | Also, though, with a PDF you have
the option to choose a Blank record.
| | 05:06 | This means, for example, if you
have a form that you've created in your
| | 05:09 | database for data entry, you can print
off a PDF version of it with no data in
| | 05:13 | the records, or fields, and then have somebody
hand-fill that out and use that for data entry.
| | 05:17 | Just an option here that you have,
because of the PDF's write-in capabilities
| | 05:22 | in FileMaker Pro 11.
| | 05:24 | We'll choose Current record.
| | 05:25 | We also see by hitting the Options button that
| | 05:27 | you have all the regular Adobe output options,
| | 05:29 | so you can name the document something.
| | 05:32 | You can even put a password into the document.
| | 05:34 | These are all options that you might be
familiar with if you use Adobe Acrobat anyways.
| | 05:39 | And of course, you see in the bottom,
we've got the Automatically open file or
| | 05:42 | Create e-mail with this file as an
attachment, just like with Excel.
| | 05:46 | We'll open it up with whatever reader you
have, or open it up in an outgoing e-mail.
| | 05:51 | So let's hit OK, and let's hit Save.
| | 05:56 | And now you see the PDF on our desktop,
and you see the PDF option, which is a
| | 06:01 | nicely-formatted letter opening
up inside Preview on my computer.
| | 06:05 | So both of these are really great
tools for FileMaker, for sharing information
| | 06:08 | on the fly, as either Save As Excel or
Save As PDF, both of which will allow
| | 06:13 | you to save out in formats that you
can then share with those that don't have
| | 06:16 | access to FileMaker Pro.
| | Collapse this transcript |
|
|
15. Reports Building simple reports with summary fields| 00:00 | One of the most powerful and useful
capabilities of any database system is its
| | 00:04 | capacity to output, or report,
on the data that it's storing.
| | 00:09 | And if you look at this List View that
we have here, the Invoice List View in
| | 00:12 | our Exercise File, you see that
it's a list of 146 different Invoices.
| | 00:18 | Now certainly by creating different
found sets, we can create compelling report-
| | 00:22 | like Outputs in our database.
| | 00:24 | Now this is great; the information
looks just like it does when the user has
| | 00:27 | entered it into the system however, but
with one simple change we can turn this
| | 00:31 | List View into a Report.
| | 00:33 | So, for example, if we go into Layout
mode, you'll notice that this Layout has a
| | 00:38 | footer part on it, and by just
entering one special type of field into this
| | 00:42 | footer, I can make this List View a report.
| | 00:45 | The type of field I'm discussing is
called a Summary Field, and this is the only
| | 00:49 | type of field that we haven't
yet discussed in this title.
| | 00:52 | So let's take a moment to
define what a Summary Field is.
| | 00:55 | If you open File > Manage > Database,
you'll see that the very last option is
| | 01:02 | something called the Summary.
| | 01:04 | Unlike the other types of fields we've
already discussed - the Text, Number, Date,
| | 01:07 | Time, Timestamp, Container and
Calculation - the Summary Field is unique in that
| | 01:11 | it isn't a field that contains data,
but it's rather a field that aggregates
| | 01:15 | data across a found set.
| | 01:18 | The value in a Summary Field will be
different based on the Records in a
| | 01:21 | user's current found set.
| | 01:23 | So unlike a Text Fields, or any of these
other types of fields which will just
| | 01:27 | display the data for a specific Record,
a Summary Field is going to give us a
| | 01:31 | total value based on a found set of Records.
| | 01:36 | So let's create a Summary
Field to see one in action.
| | 01:38 | We're going to type into the Field Name,
we're going to call it TotalSummary,
| | 01:43 | and we're going to choose the Type
Summary, and we're going to hit Create.
| | 01:46 | Now you'll see the Option for the
Summary Field dialog box gives us some
| | 01:50 | interesting choices.
| | 01:51 | You see here we've got a bunch of
aggregate options, since what we're doing is
| | 01:56 | aggregating against a current found set.
| | 01:58 | We can do things like Total a series of
values across the Found Set, Average, Count,
| | 02:04 | provide Minimums, Maximums and so on.
| | 02:06 | So you'll see what we have here are
available fields, but you should note that
| | 02:10 | some of the fields are grayed
out, making them unavailable.
| | 02:13 | Depending on which aggregate option we
choose, we're going to have different
| | 02:17 | fields available to us.
| | 02:18 | So, for example, Total of allows us
to total Date or Number fields; most
| | 02:24 | commonly you're going to be using Number Fields.
| | 02:26 | Average only allows us to choose
Number Fields and Count allows us any field,
| | 02:31 | because what it's going to do is
literally count every record in the found set.
| | 02:35 | Minimum and Maximums work
on Numbers or Date fields.
| | 02:40 | In our case we're going to choose Total of,
and we're going to choose Invoice Total.
| | 02:45 | So what we're instructing this field to
do is to determine all of the records in
| | 02:49 | a current found set and then go into
the InvoiceTotal fields and all those
| | 02:54 | records in the found set and
provided a total of all the InvoiceTotals.
| | 02:59 | When we hit OK, we can
see these field in action.
| | 03:01 | Now you see that a field has been
added to the bottom of my layout.
| | 03:05 | Your preferences may be different.
| | 03:06 | If so, you can go under the Insert > Field
option and drop the TotalSummary on the layout.
| | 03:11 | What I'm going to do is I'm going to
Shift+Select both of these values, and I'm
| | 03:16 | going to drag them just under the InvoiceTotal.
| | 03:23 | I'm going to reset the size of my body part.
| | 03:25 | And while I've got the field selected,
since I'm already in Layout mode, I'm
| | 03:29 | also going to go into the
Data tab of the Inspector.
| | 03:32 | And I'm going to choose Currency,
| | 03:34 | because I happen to know that this field
is going to contain currency values.
| | 03:38 | We'll choose a fixed number of digits,
Currency dollars and thousands separator,
| | 03:45 | and then maybe make it just a tad bit longer.
| | 03:47 | So let's go into Browse mode and take a
look at how this works. Save our changes.
| | 03:51 | So now if you look at the value on the
bottom of the layout, it gives us $418,390.60.
| | 03:58 | What that is is the total of every
Invoice across the 146-record found set.
| | 04:04 | What if I went in and I chose only
Shipped records by using our fast match in
| | 04:09 | the contextual menu?
| | 04:11 | Now you see we only have 19 Records,
and our total has changed to $57,266.75.
| | 04:14 | So you can see here evidence that
every time we change our current found set,
| | 04:21 | this total will change.
| | 04:23 | So this is a great way to create a
very simple report, because now you can
| | 04:26 | feed it all sorts of different found
sets, and all the while it's going to give
| | 04:30 | you different totals.
| | 04:31 | So this simple List View has now
just changed into a simple report.
| | Collapse this transcript |
| 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.
| | 00:08 | This allows you to do things like,
aggregate, organize and otherwise just
| | 00:11 | manipulate data that users have already
entered into your system into reports
| | 00:15 | and outputs that give visibility
of data you wouldn't normally have.
| | 00:19 | The most powerful type of report in
FileMaker is something that's called
| | 00:22 | a sub-summary report.
| | 00:24 | In general, a sub-summary report is a
way to present a list of data that's
| | 00:28 | grouped by a certain variable.
| | 00:29 | Let me give you an example of
this inside of our Invoice List View.
| | 00:33 | A sub-summary report is based on a
Layout part that's called a sub-summary part.
| | 00:39 | Let's take a look in Layout mode, and
we'll see the layout that we currently
| | 00:44 | have has a Header, Body and Footer.
| | 00:46 | We can also see that by going
under the Layouts menu to Parts Setup.
| | 00:50 | But now I'm going to
introduce you to the summary parts.
| | 00:54 | First, we're going to hit the
Create button, and we see we've got our
| | 00:57 | Part Definition window.
| | 00:59 | We see that Header, Body and Footer are
already grayed out, because we already
| | 01:03 | have those parts in our layout,
and we can only have one of each.
| | 01:05 | But I want to introduce you to
the Sub-summary when sorted by part.
| | 01:11 | It's quite a mouthful of a name, but
it does contain a very specific and
| | 01:14 | important piece of information, and
that's the, when sorted by; we'll get
| | 01:17 | to that in a second.
| | 01:18 | What a aub-summary when sorted by part
allows you to do is group data based on a
| | 01:23 | certain break field, and the break
field is something that you're going to
| | 01:27 | introduce, and it's also
something you're going to be sorting by.
| | 01:30 | The way you introduce the break field
is by selecting the sub-summary Part and
| | 01:34 | then choose a field from
the window on the right.
| | 01:38 | So in plain English, what
this really means is Group by.
| | 01:42 | So we're choosing a Grouping Part, and
we need to choose the field by which
| | 01:46 | we're going to group.
| | 01:48 | So we've got 146 different invoices in
our Invoice Table. Maybe it might be more
| | 01:53 | helpful to look at these if
we group them by Customer name.
| | 01:55 | However, we don't have a Customer
name field defined in the Invoice Table,
| | 02:00 | because it's related to the Customer table.
| | 02:01 | So why don't we click here and choose
the related Customer Table and just simply
| | 02:06 | pick the CompanyName field?
| | 02:09 | So, FileMaker asked us what do we
want to group by? And we said we want to
| | 02:13 | group by CompanyName.
| | 02:14 | So now we hit OK, and we see we're
being asked where we want to print the Part.
| | 02:19 | In this case it's just really asking us,
do we want the Part to be above the
| | 02:23 | Body or below the Body? And in
this case we're saying Print Above.
| | 02:27 | So now let's hit Done and do a
little bit of cosmetic changes to our Layout.
| | 02:33 | First, let's get rid of the ContactName.
Select both of those holding down the
| | 02:39 | Shift Key and hit Delete. And now
let's move the Invoice number field over to
| | 02:45 | the right - just a little cosmetic
touch-up - and you'll notice now that we've got
| | 02:49 | this new part, the Sub-summary Part
and if you go into the bottom left-hand
| | 02:53 | corner here and toggle, to click to
display the Parts, you'll see that it gives
| | 02:58 | more description: Sub-summary when
sorted by Customer's CompanyName.
| | 03:03 | So what we want to do is place a
field here that's going to show up in our
| | 03:07 | layout that will represent each group.
| | 03:10 | In this case, we're just going to pull
in the break field, which we determined
| | 03:13 | was the related CompanyName.
| | 03:15 | So let's say Insert > Field > choose
Customers. We don't need a label on this
| | 03:21 | case, and we'll say CompanyName.
| | 03:23 | Insert > Field > Customers > CompanyName.
| | 03:24 | So let's drop that part in between the
Summary field, which we need to make sure
| | 03:28 | it's totally encased inside that
summary field, and now let's go back into
| | 03:33 | Browse mode and hit Save.
| | 03:37 | Nothing too spectacular yet,
because as a matter of fact, we haven't
| | 03:40 | changed anything inside the Layout,
by the looks of it, but there's one
| | 03:43 | little secret here.
| | 03:44 | If you remember, when we defined the Sub-
summary Part, there was also something
| | 03:48 | else in the name of the Part where
it said sub-summary when sorted by.
| | 03:52 | So let's see what happens
when we sort by that break field.
| | 03:56 | Of course, we remember the break field
was from the Customer Table, and it was
| | 04:01 | CompanyName, so let's see what
happens now in Browse mode when we hit Sort.
| | 04:06 | Now you see we've got the List View,
but the orders are grouped by each
| | 04:11 | customer, and if we do Show All and
Sort again, thus triggering the groups,
| | 04:19 | let's take a look at what
happens at the top of our list.
| | 04:22 | Now you see we've got a customer and
all their customers orders, the next
| | 04:26 | customer, all their orders,
so on and so on and so on.
| | 04:29 | If we go into Layout mode, we can
make just a couple of cosmetic changes.
| | 04:34 | For example, if we choose the Summary
Part, give it a little fill color, choose
| | 04:41 | the CompanyName, maybe make it bold and
also transparent, and you can see this
| | 04:48 | will really make our Layout pop.
| | 04:53 | Now we have a report that groups by
Customer, very clearly, and then gives us
| | 04:58 | all the individual invoices for each
one of those customers listed below, and
| | 05:02 | one more thing to really make this a
report. In Layout mode, remember the
| | 05:06 | TotalSummary field.
| | 05:07 | Well, here's something interesting.
| | 05:09 | If we go into Layouts > Parts Setup
> and hit Create, let's add another
| | 05:15 | Sub-summary Part when sorted by - that's
right, you guessed it - CompanyName, but
| | 05:22 | this time let's say Print Below.
| | 05:24 | So now you see it's created a
Sub-summary Part below the Body.
| | 05:29 | So now what we're going to do is Shift+
Select both the TotalSummary field label
| | 05:36 | and field, hit Copy, and
now we're going to paste.
| | 05:42 | So let's use our arrows to
move this just above the other.
| | 05:48 | Now it's the same field; we
just put it into sub-summary Part.
| | 05:51 | So what happens when we go into Browse mode now?
| | 05:56 | We'll notice that the same Summary
Part is now giving us a Total for each
| | 06:01 | customer and then moving on to the
next customer, and so on and so on, until
| | 06:06 | finally, at the bottom, it's
giving us a total of all customers.
| | 06:14 | So what's actually happening here is
that we're creating mini found sets
| | 06:18 | using sub-summary parts, and the
data within the found sets is being
| | 06:22 | summarized by a Summary field,
because of course Summary fields summarize
| | 06:26 | data within found sets.
| | 06:28 | So what a sub-summary part does is not
only group information, but create mini
| | 06:32 | found sets of that information
for us to use in our reports.
| | 06:36 | So in just a few minutes, you can take
any List View, add a couple of Summary
| | 06:40 | Parts to it in a Summary field and end
up giving yourself a group report, which
| | 06:44 | will allow you to aggregate, organize,
synthesize or even manipulate data that
| | 06:48 | other users may have already
entered into your database.
| | Collapse this transcript |
| Creating subsummary reports in Table view| 00:00 | In previous movies we've discussed
how in the New Quick Table View in
| | 00:05 | FileMaker Pro 11, you can add and manage
fields, and that you can also add and manage Records.
| | 00:09 | In this movie I want to show you
how we can add a part or at least the
| | 00:12 | functionality that's produced by a part.
| | 00:15 | Specifically speaking, we're talking
about Sub-summary Parts, similar to how we
| | 00:19 | added a Sub-summary Part in our
previous movie in order to create a report.
| | 00:23 | You can allow your users to go into any
Layout that's in Table View and create
| | 00:28 | a Sub-summary Report.
| | 00:30 | For example, here in Customer List, you
can see that we're in Table View, and now
| | 00:34 | we can decide on a field that we
want to use to group all our Records.
| | 00:38 | We see here that we've
got an AddressState field.
| | 00:41 | Let's say that we want to group all
our records by the address, and we've got
| | 00:45 | about 1523 records here and we
want to group them each by State.
| | 00:50 | So what I can do is hover over all the
different column headers, and as you see
| | 00:54 | as I hover over each, a little dropdown
arrow appears, but I'll choose the field
| | 00:59 | that we want to use as our break field,
or our grouping field, click on the arrow
| | 01:04 | on the dropdown, and now you see we
have various options here, most of which
| | 01:07 | we've talked about already, Sorting,
Field Types, Field Options. But if you look
| | 01:12 | here we've got the ability to Add a
Leading Group by AddressState, or Add a
| | 01:16 | Trailing Group by AddressState.
| | 01:18 | If you're familiar with reporting
inside of FileMaker Pro, you know that you can
| | 01:22 | set up a Part that's called the Sub-
summary Part, and when you create it you're
| | 01:25 | asked whether or not you wanted to
place it above or below the Body.
| | 01:29 | That's essentially what these two
options are: Do you want this new part to be
| | 01:34 | above or below the Body Parts?
| | 01:37 | So what we're going to do is we're going to
choose Add Trailing Group by AddressState.
| | 01:41 | So now you see what we get is a part
after each State that has a default gray
| | 01:49 | value, and also FileMaker has already
sorted all of our records by the break
| | 01:55 | field, which in this case is State.
| | 01:57 | So also you see when we right-
click into this area, we can change the
| | 02:03 | part color, and make it pop a little
bit more, and now we've got all of our
| | 02:07 | records grouped by State.
| | 02:09 | Let's say we want a subtotal by State.
| | 02:11 | Well, if you first look under File >
Manage > Database, we'll see that we don't
| | 02:16 | have any Sub-summary fields defined
inside the Customer Table. But if we go
| | 02:22 | back into the column header for AddressState,
you'll see we've got a couple other options.
| | 02:27 | So you see we've got this option
for creating Trailing Subtotals.
| | 02:32 | Now again, we don't have a Summary
field in this table, but we can choose
| | 02:36 | Trailing Subtotals, and either do a
Count or a Running Count, and the reason we
| | 02:40 | only have these options available to us is
because AddressState happens to be a Text field.
| | 02:45 | If it was a Number field, or even Date
field, we'd have some of these other
| | 02:48 | options like Total, Average,
Maximum and Minimum available to us.
| | 02:52 | Well, let's just choose Count for
right now, and now you see it's included a
| | 02:56 | count after each group. And in addition ,
what it's done, if you'd look under File
| | 03:06 | > Manage > Database, is now it's defined
a new Summary field for us based on the
| | 03:11 | Count of AddressState, like we
indicated here in Browse mode.
| | 03:14 | Not only can you create the report in
Browse mode in Table View, but you can
| | 03:18 | also create the supporting
fields in Browse Table View as well.
| | 03:21 | Creating Group Layouts in Table View helps you
turn simple Lists in Table View into reports.
| | 03:27 | With FileMaker Pro 11, you can now
easily create grouped Layouts on the fly,
| | 03:31 | using the New Quick Table View features.
| | Collapse this transcript |
|
|
16. Calculation EssentialsDefining calculations| 00:00 | So far in this title, we have been
talking about the three core areas of any
| | 00:03 | successful database application, and
they are building a proper architecture,
| | 00:08 | which we 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.
| | 00:15 | And then we've also touched on output
in the form of printing and exporting.
| | 00:19 | Output isn't just specific to
reporting, or being able to export data; Output
| | 00:23 | also means that you're putting
certain data into the system, and then it's
| | 00:26 | aggregating that data, and that's
the role of Calculation fields. And the
| | 00:30 | results of calculations
are also considered output.
| | 00:33 | A calculation allows you to
derive information from values of data.
| | 00:38 | If you're defining a Calculation field
in FileMaker, you're using either fields
| | 00:42 | or data that you're feeding into
the Calculation formula that will then
| | 00:45 | produce the desired result.
| | 00:47 | Calculations are also known as formulas, and
mathematicians often call them expressions.
| | 00:52 | But in FileMaker, you call
them a Calculation Formula.
| | 00:55 | Calculations will always return a result.
| | 00:57 | That's really what their job is.
| | 00:59 | So that means you have to feed some
information into a calculation. Then it'll
| | 01:02 | return some other value for you.
And the information that you are feeding into
| | 01:06 | the formula can either be static text,
or in most cases it's going to be in the
| | 01:11 | form of parameters that you designate as fields.
| | 01:13 | You are probably already familiar
with what calculation syntax might be.
| | 01:16 | For example, if we just created a
calculation that set the text values 2+2, that
| | 01:22 | calculation would always return the number 4.
| | 01:24 | Now, if we put a calculation field
together that had the word "Amount" plus the
| | 01:29 | word "Tax," that would return the sum of
two fields in a database that were also
| | 01:34 | named "Amount" and "Tax," if, of course,
those two fields have the same name.
| | 01:38 | And then as you flip from record to
record, the value in the Amount field will
| | 01:42 | change, and the value in the Tax field
will change, and so therefore the value
| | 01:46 | returned from your calculation will
also change from record to record.
| | 01:50 | Calculations are very important
because there are many different uses for
| | 01:53 | calculations in FileMaker Pro.
| | 01:55 | For example, the most obvious is that fields
can hold and display the results of a calculation.
| | 01:59 | But beyond that, if you remember when
we set up our fields, we could also
| | 02:03 | validate based on a calculation, and
then we could also do autoentries that were
| | 02:07 | based on calculations, where we would
assign initial values to a field based on a
| | 02:11 | calculation formula.
| | 02:13 | And you'll also see, when we get into
our movies on scripting, that we can use
| | 02:16 | calculations to help us
run scripts in a dynamic way.
| | 02:19 | So since calculations are so important
to the output of data in FileMaker, and
| | 02:23 | they are also used in so many other
areas, it's going to be very important for
| | 02:26 | us to understand and get to know
calculations and their functions.
| | Collapse this transcript |
| Exploring the Calculation dialog box| 00:00 | The first step in understanding
calculations in FileMaker is getting familiar
| | 00:04 | with the Calculation dialog window.
| | 00:06 | The Calculation dialog appears in a
wide variety of places within FileMaker
| | 00:10 | Pro, and it's really one of the primary
areas where actual programming comes into play.
| | 00:15 | So in this movie I am going to show you
the mechanics of the dialog, so later
| | 00:18 | you'll have the understanding
needed to write some initial formulas.
| | 00:22 | The most common place that we'll find
the Calculation dialog is under the Manage
| | 00:26 | > Database window. And if we create a
field, let's say we just call one Calc,
| | 00:35 | and choose the field type Calculation,
after hitting the Create button, we'll
| | 00:40 | see the Specify Calculation window.
| | 00:42 | So let's take a quick tour of this window,
| | 00:44 | so you'll know what all
the elements are onscreen.
| | 00:46 | The window in the upper left-hand corner
allows you to view fields from your database.
| | 00:51 | This is important because nearly every
calculation is going to use field data,
| | 00:55 | so from here you can choose fields from
the current table, as you see selected,
| | 01:00 | or from any other related tables.
| | 01:02 | You can also mix those fields
together within your formula.
| | 01:06 | Remember that you are just using
field names as placeholders, but when they are
| | 01:09 | evaluated, FileMaker Pro will put the
values in those fields and then evaluate
| | 01:13 | the values record by record.
| | 01:15 | So really what you're
picking are placeholders.
| | 01:18 | In addition to placeholder fields,
you can also choose from a wide variety
| | 01:21 | of operators, as well.
| | 01:23 | That's what all these items are in the middle.
| | 01:25 | Just to give you an idea what these are,
hitting just a button will place one of
| | 01:29 | these characters into your Calculation window.
| | 01:31 | And the ampersand in FileMaker allows
you to concatenate, or group, two different
| | 01:36 | fields or two different functions together.
| | 01:39 | So, for example, if we want to create
a simple formula, let's get rid of that
| | 01:43 | ampersand, double-click on one of our
fields, and if we wanted to have first
| | 01:49 | name and last name together to create a
full name value, we could take the field
| | 01:54 | name for first name, concatenate that,
and then we'll use our second button.
| | 01:58 | This button allows us to put literal
text, or in this case, by hitting our
| | 02:03 | Spacebar allows us to put a
space in between two fields.
| | 02:08 | But any time you're connecting a
field value and text values, you need to
| | 02:12 | include an ampersand in
the middle to connect them.
| | 02:14 | So the ampersand is used
to connect different values.
| | 02:18 | So this is an example of our first
Calculation formula that uses both the
| | 02:21 | ampersand and the quotes.
| | 02:24 | This next button inserts a Return character,
which is popular inside Text functions.
| | 02:29 | And on the right-hand side, you
see all the mathematical functions.
| | 02:32 | The top button is used for Division,
and the reason that we have a forward
| | 02:36 | slash inside of our formulas is because you
don't have a divided-by sign on your keyboard.
| | 02:41 | Below it, we have an asterisk, which
stands for a multiplier within FileMaker
| | 02:45 | Pro Calculations, and the reason
for that is because if we used an X,
| | 02:49 | FileMaker would be confused as to
whether or not that's actually the text for
| | 02:52 | an X or a Multiplier.
| | 02:55 | You also see operators that include
statements, like equals, meaning does this
| | 02:59 | field equal that field or not equals,
greater than, less than and so on.
| | 03:04 | And on the very right-hand
side is a very important window.
| | 03:06 | This is where we list all of the
Calculation functions that FileMaker can interpret.
| | 03:10 | We will be talking about these
functions in detail in the upcoming movies, but
| | 03:14 | this is where you can find each one.
| | 03:15 | You'll notice, as you select and double
-click on any one of these functions,
| | 03:20 | they'll appear down in your
Calculation writing area below.
| | 03:26 | Clearing those out, choosing another
one will drop not only the function into
| | 03:32 | our formula entry space, but it
gives you words in a certain format.
| | 03:36 | These words, like you see here,
field, are what are called parameters.
| | 03:42 | They act as placeholders for a field, or
a value that matches that type of data.
| | 03:46 | So FileMaker is giving us
instructions here to say if you're going to use
| | 03:49 | this Calculation function, you need
to put a field here. Or, for example,
| | 03:54 | here, if you're going to use this function,
you need to put a date field here, specifically.
| | 04:00 | Every function will have at least one
parameter, and you can see why FileMaker
| | 04:04 | warns you if you try to name a field
with the same name as a function, or as a
| | 04:08 | number or a character, because it can
get confused as to whether or not you
| | 04:11 | meant a field name or a
function that it evaluates.
| | 04:15 | Imagine if you had a field called
ampersand, forward slash, asterisk. That
| | 04:21 | might be very confusing for
FileMaker in the formula entry space.
| | 04:24 | The formula entry space is where
you're going to author all your
| | 04:27 | FileMaker formulas.
| | 04:28 | And the other pieces that you'll need
to be familiar with, on the bottom of the
| | 04:31 | Calculation dialog, are the result options.
| | 04:34 | So here, you'll say that a calculation
we'll need to results in either a Number,
| | 04:38 | Text, Date, Time, Timestamp or Container.
| | 04:41 | These are all different types of fields.
| | 04:44 | Even though the type of this field is
Calculation, its result has to be another
| | 04:48 | specific type, so that FileMaker knows
how to handle it while it's storing that
| | 04:51 | information in the database.
| | 04:54 | So given the wide range of uses for
calculation formulas within FileMaker Pro,
| | 04:58 | establishing a solid familiarity with
the Calculation dialog, as well as the
| | 05:02 | function parameters themselves, is
essential in becoming a professional
| | 05:05 | FileMaker developer.
| | Collapse this transcript |
| Using number functions| 00:00 | In this movie, I am going to introduce
you to a couple of the most useful and
| | 00:03 | common functions that FileMaker
offers for manipulating numeric data.
| | 00:08 | You will also gain some additional
experience using functions in the Calculation
| | 00:11 | dialog window, as well.
| | 00:12 | That Number functions are used to
manipulate and perform functions with numeric
| | 00:17 | data, and as a class, they are relatively
easy to learn because most of them only
| | 00:21 | have one or two parameters.
| | 00:22 | We'll talk again about what parameters are.
| | 00:25 | So this is a pretty good starting
point for learning calculation functions, as
| | 00:28 | they all just produce the numeric
results, and you may be familiar with some of
| | 00:31 | these due to some of their
mathematical properties anyways.
| | 00:34 | So let's open up our Exercise Files,
and we are going to navigate to the
| | 00:37 | Invoice Detail layout.
| | 00:39 | To get us warmed up, we are first
going to create a couple of mathematical
| | 00:42 | equations that actually have a numerical result.
| | 00:44 | They don't necessarily use numerical
functions, but we're going to talk about
| | 00:48 | results and numerical results in particular.
| | 00:51 | So first, we've got a Field.
| | 00:54 | If we go under File > Manage >
Database, and it's a field called Sales Tax.
| | 01:00 | Right now, it's a number field, but we
are going to change it to a calculation.
| | 01:03 | You can create calculations by
either creating a field and choosing the
| | 01:08 | Calculation as the type in the first
place, or you can change existing fields
| | 01:12 | over to Calculations, which isn't quite
as common, but for our purposes, that's
| | 01:15 | the example we are going to use.
| | 01:17 | So now I choose Calculation, and I
am going to hit Change, and FileMaker
| | 01:21 | just makes sure that I want to do
that, because if I had any data in the
| | 01:25 | Sales Tax field already, it's going
to now override that data since we are
| | 01:29 | creating a calculation.
| | 01:30 | Calculations don't actually store their own data;
| | 01:32 | they just take data from
other sources and produce results.
| | 01:35 | So I am going to hit OK, and here we see
the Specify Calculation dialog window.
| | 01:40 | Now, in this example, let's say the
Sales Tax amount, it's going to be a pretty
| | 01:43 | standard operation here.
| | 01:45 | It's going to be the result of the
InvoiceTotal multiplied by SalesTaxRate.
| | 01:50 | So that's a pretty
familiar mathematical operation.
| | 01:53 | It's going to involve a couple of
different fields, and remember, we pick fields
| | 01:56 | from the list here in the left-hand
side, and remember, they act as placeholders
| | 01:59 | for the data that's inside of
those fields within each record.
| | 02:03 | In order to get a field down into our
formula entry space, we will select one
| | 02:08 | from a list, and the first one we want to
select is InvoiceSubtotal, and we are going
| | 02:13 | to double-click on it.
| | 02:15 | Now, we see that that field has appeared
in the entry space, and what we want to
| | 02:18 | do is multiply
InvoiceSubtotal by a SalesTaxRate.
| | 02:22 | If you remember in our operators, we
have the mathematical operators here, and
| | 02:25 | the asterisk indicates a multiplier.
| | 02:28 | Now, you could type this in on your
keyboard, and after awhile, when you get
| | 02:30 | familiar with these
functions that's what you'll do.
| | 02:33 | Now all we need to do is bring in
the SalesTaxRate value, and we'll
| | 02:40 | double-click on that.
| | 02:41 | So this is a pretty simple
mathematical operation, but what we'll notice down
| | 02:44 | here below, is that for every calculation,
it's going to create a result. That's the key;
| | 02:50 | a calculation creates a result, and the
result is what your users will see, and
| | 02:54 | that's what gets displayed or printed
or exported in the FileMaker database.
| | 02:58 | But just like other fields, a
result has to have its own type.
| | 03:02 | So we want to make sure that this
result has a Number type because then we can
| | 03:06 | then use the results of the sales tax
calculation and yet another calculation, if we wanted to.
| | 03:11 | Now, we are going to hit OK, and we see
our Calculation underneath the Options
| | 03:15 | and Comments column.
| | 03:17 | Now, we hit OK, and we will see that we
have a Sales Tax Rate, and I wouldn't want
| | 03:24 | to live in this particular county, but
now you see the sales tax calculated, and
| | 03:29 | you'll see that it's different for each record
because we've got a Subtotal times a Tax Rate, boy!
| | 03:37 | Times are tough with
these tax rates, aren't they?
| | 03:40 | That's how we create a
calculation with a numeric result.
| | 03:43 | Now, another quick example here.
| | 03:45 | You'll notice that we've got
a field called Invoice Total.
| | 03:49 | Right now, there's no value inside the
Invoice Total, but we are going to use a
| | 03:52 | calculation to create this value.
| | 03:54 | So let's go into File > Manage >
Database, and select InvoiceTotal, and let's
| | 04:01 | change that to a calculation as well,
and we are going to do another quick
| | 04:04 | mathematical operation.
| | 04:05 | I'll hit OK, like we did in the last
example and in this case, we are just going
| | 04:09 | to do the same type of math;
| | 04:11 | any kind of total is going to be
Subtotal minus the InvoiceDiscount, plus the
| | 04:17 | SalesTax that we just created, plus Shipping Costs.
| | 04:23 | Pretty standard stuff, but here, I am
just going to show you a couple of the
| | 04:26 | mathematical operators and again,
the result is going to be Number.
| | 04:29 | We hit OK again, and now we see each
record; the important thing here is that
| | 04:33 | each record has its own value.
| | 04:36 | So the calculation has taking all the
numbers in these fields and performing the
| | 04:40 | mathematical operation per the
instructions that we just gave it.
| | 04:43 | Back in the Manage Databases window,
what I am going to do now is show you the
| | 04:47 | Calculation dialog and some of
the different numeric functions.
| | 04:50 | We are going to look at how each
one of them uses fields as parameters.
| | 04:54 | The field that we are going to use
is a field that's already created;
| | 04:57 | it's a Number field that I've
already created in the database here.
| | 05:00 | So if we go and create a new field,
called NumberCalc, let's make that a
| | 05:05 | Calculation field, and we'll hit Create,
| | 05:08 | you'll see that we've got an
empty Specify Calculation dialog.
| | 05:12 | The first thing I want to show you is
over on the right-hand side; this is where
| | 05:15 | all the functions live.
| | 05:16 | So if we click on this dropdown menu,
you see that they could be viewed by type,
| | 05:20 | or you see the different categories.
| | 05:21 | So we are going to focus on Number
functions, and you see in almost every case
| | 05:26 | of the number functions, they are all
one, single parameter which says Number,
| | 05:29 | which means put either a number or 90%
of the time, you are actually going to
| | 05:33 | put a field that's a field type of number.
| | 05:36 | A couple of them have two parameters,
but most of them just have the one.
| | 05:40 | Most of these number functions you
won't run in to unless there are specialty
| | 05:43 | circumstances, and some of them you
might be familiar with just from your own
| | 05:46 | experience with math.
| | 05:47 | But there are some that are pretty popular,
and I am going to show you a couple of those.
| | 05:50 | For example, we've got Round.
| | 05:51 | This is one of the mathematical
functions with two parameters in it, and when you
| | 05:55 | double-click on a function, it
puts it down into your entry area.
| | 05:59 | The other thing it does is it highlights
the parameters, because again, FileMaker
| | 06:02 | is reminding you you have
to put something in there;
| | 06:05 | it can't just run with these values on its own.
| | 06:08 | So, for example, we have a field
that also happens to be called Number.
| | 06:13 | We are going to double-click on
that to put it inside of our function.
| | 06:17 | Now, in the case of a Round function,
what it requires is a numerical value, or
| | 06:23 | a field that represents a numerical
value, and then the precision that that
| | 06:26 | needs to be rounded to.
| | 06:27 | So if we want to round it to two places,
for example, we would just put a number
| | 06:31 | 2 in here, select the word
"Precision," which is just an instruction or a
| | 06:35 | placeholder, keep our Calculation
result as Number, and let's hit OK.
| | 06:41 | So now you see we're back in our layout,
but if we go into Layout mode, we are
| | 06:44 | going to add our new field underneath
the NumberCalc, and one way we can do this
| | 06:49 | is hold down the Option key on Mac, or
Ctrl key on Windows, and then release, and
| | 06:57 | FileMaker will allow us to choose a new field.
| | 06:59 | So in this case, we'll choose the NumberCalc.
| | 07:02 | We'll go under Browse mode, saving our changes.
| | 07:04 | So now we see we have an original
value of 123.4567, but when we applied the
| | 07:10 | number with the precision of just
two decimal places, you see that it has
| | 07:15 | rounded it to 123.46.
| | 07:18 | There's another function that would
truncate this that would make it 123.45, but
| | 07:23 | in this case, we've asked it to round.
| | 07:24 | So it changes the 5 to a 6
based on the next value, which is a 6.
| | 07:29 | Let's take a look at that truncate.
| | 07:31 | If we go Manage Database > NumberCalc
to Options, we're going to change it
| | 07:37 | this time to another number function called
Truncate, and we'll do the same thing here.
| | 07:45 | Put the Number field in there, and of
course, we have to put the Precision.
| | 07:51 | We'll say 2, hit OK, hit OK,
and now we see a change, 123.45.
| | 07:59 | So looking back in the Manage Database,
you can see how creating a calculation
| | 08:04 | that has a function in it and then
applying that function to another field
| | 08:08 | that contains a number gives different
results depending on what function that you use.
| | 08:12 | So those are just a couple of quick
examples, but let me show you some others,
| | 08:15 | and some that you can see, for example,
in the NumberCalc are Floor because
| | 08:23 | there's Floor and there's Ceiling;
they are the opposites of each other.
| | 08:28 | Also, there's an Integer,
which is somewhat similar.
| | 08:30 | So if I choose Floor, what it's going
to do - let me put Number in there and hit
| | 08:35 | OK - is it's going to give
me the next lowest integer.
| | 08:39 | There's one called Ceiling that will
give you the next highest integer, and
| | 08:42 | then there's one called Integer, which is just
going to extract the integer from your number.
| | 08:45 | So there's a couple of
different ways that you can use those.
| | 08:48 | Now, in the case of the Integer function,
let's try creating the calculation in
| | 08:53 | a tad bit different way.
| | 08:54 | For example, let's go back in the
Manage Database, and again, we've got
| | 08:59 | our number functions.
| | 09:00 | Some of them are pretty advanced. Now,
certainly not within the scope of this
| | 09:03 | entire training to expose you to
every one of these Number functions, but I
| | 09:07 | would strongly recommend that you go
into the FileMaker Help, and just look
| | 09:10 | under Calculation functions where you
are going to find some very helpful tools,
| | 09:15 | as you see here, to allow you to get
familiar with FileMaker functions.
| | 09:21 | This is probably the best
guide that you can have.
| | 09:24 | It's called the Function
Reference, and here's a category list.
| | 09:27 | You see you can go through every
type of function that's available.
| | 09:34 | When you find one that you like, you can
just click on it and get a good description.
| | 09:40 | So that's a good "what's next?"
for some training for you here.
| | 09:43 | But back inside our exercise
File > Manage > Database,
| | 09:46 | we are going to use a
calculation in a different way.
| | 09:49 | This time we are going to choose the
number Field, and we are going to hit Options.
| | 09:53 | You'll see that we've got the Auto-
Enter tab selected, and we talked about this
| | 09:56 | in one of the early movies in this title.
| | 09:58 | But if you look down here, you'll
notice that we've got the Calculated value
| | 10:01 | autoentry option with the Specify button.
| | 10:04 | So let's hit this button right
there, and you see we get the same
| | 10:07 | Specify Calculation dialog.
| | 10:08 | In this case, we don't have to select
what the number is because it already
| | 10:12 | knows it needs to be a number
because this is a Number field.
| | 10:14 | So if you remember, in autoentry
calculations, we're giving FileMaker
| | 10:18 | instruction on what value to put into the
field whenever the record is first created.
| | 10:23 | With this trick I am going to show you,
this is a way that we can take the data
| | 10:26 | that the users have typed in and then
apply a function to it before it actually
| | 10:30 | gets committed to the database.
| | 10:32 | So let's say we only want
users to enter in raw integers.
| | 10:35 | We don't want any decimal places or anything;
| | 10:37 | we just simply want the
integer that they're entering.
| | 10:39 | So instead of training them, and
reminding them to do that; instead, what we can
| | 10:42 | do is pick a number function -
| | 10:46 | this one is just called Int or integer -
and then in this case, we're going to
| | 10:50 | reference ourselves here. We are the field;
| | 10:54 | we're going to reference ourselves.
| | 10:55 | So if you see here, we are doing
Int(number) and this is in the field Number.
| | 11:00 | So what that's going to do is say,
instead of it being a placeholder for a field
| | 11:04 | value, it's going to be a
placeholder for the field value before it gets
| | 11:07 | committed to the database.
| | 11:09 | So whatever the user types into this
field, we are going to then apply the
| | 11:12 | formula to it, and then it gets entered in.
| | 11:14 | There's one other option that we need
to check to make sure that that works.
| | 11:17 | You see there's a default check box here, Do
not replace existing value of field (if any).
| | 11:22 | Well, that means don't replace the
value in the field if the function is coming
| | 11:26 | from another field reference.
| | 11:28 | But in this case, we are referencing ourselves.
| | 11:29 | So essentially, what this is saying in
English is don't apply this formula to
| | 11:34 | the value that I'm typing into
the field when I create a record.
| | 11:37 | That's not what we want to do here;
| | 11:39 | we actually want it to apply the formula.
| | 11:41 | It's some strange language;
| | 11:43 | FileMaker does have a couple of
cryptic dialogs, but this one basically is,
| | 11:46 | do you want to apply the formula that we
just put in there against the value or not?
| | 11:50 | In this case, we're going to uncheck it
because we do want it to apply the formula.
| | 11:55 | So now we hit OK and we hit OK again
and now, if we go and create a new record,
| | 12:01 | we are going to type a value in here,
| | 12:04 | so you see we've got a value with some decimal
places, but we have yet to commit the record.
| | 12:11 | So I am going to click outside the
field to commit it, and now you see what
| | 12:14 | it's done is it's actually applied
our formula to the original field, and of
| | 12:18 | course our number calculation is referencing
that field, so it ends up with the same value.
| | 12:23 | So in this movie, we focused on a
couple of core number functions that are used
| | 12:26 | most frequently, or that
could be the most useful to you.
| | 12:29 | So it's best to become adept with these
functions without needing to refer to a
| | 12:33 | reference as a source.
| | 12:34 | So practice and apply these functions
as often as you can, for example, as an
| | 12:38 | autoenter data entry option.
| | Collapse this transcript |
| Using date and time functions| 00:00 | In this movie, I am going to introduce
you to some of the functions that allow
| | 00:03 | you to manipulate date,
time, and timestamp data.
| | 00:06 | The Date, Time, and Timestamp
functions are among some of the easier ones to
| | 00:10 | learn because the syntax are really simple.
| | 00:12 | These functions can fall
into one of two categories.
| | 00:15 | First of all, they could be
functions that are going to extract a bit of
| | 00:18 | information from a date or time, and
then there're those that actually construct
| | 00:22 | date, time, or timestamp from bits of
information that are going to be provided
| | 00:26 | inside your calculation.
| | 00:27 | Let me show you what those look like.
| | 00:29 | Again, back into the File > Manage >
Database, and you see here, we've got a
| | 00:34 | field that's currently DateCalc, but
we're going to change that to Calculation.
| | 00:40 | So we select field on the list, choose a new
field type of Calculation, and now hit Change.
| | 00:46 | After FileMaker warns us, we say
OK, and here we are again in the
| | 00:49 | Specify Calculation dialog.
| | 00:51 | Take a look at the Date functions
up in the upper right-hand corner.
| | 00:54 | You will see we've got a series of them.
| | 00:58 | They all really have a single parameter,
except for the construction ones where
| | 01:02 | we can pull YearNames or
the fiscal week of the year.
| | 01:06 | You'll see they break into the two categories,
| | 01:09 | if we just look at the date ones here.
These are all the functions that will
| | 01:13 | extract a piece of
information from a Date field.
| | 01:17 | This is the field that will
construct a date from three different fields.
| | 01:21 | So you see the parameters that we've
got here, or if we pull in a value that's
| | 01:25 | supposed to be for the month, one for day,
one for year, then that will create a
| | 01:30 | Date field and then of course, we'd
want that result to be date ,and then
| | 01:33 | FileMaker will store it and
handle it internally as a date value.
| | 01:38 | But the more common date
functions are the ones that you see above.
| | 01:41 | So, for example, let's try
the one that's called Day.
| | 01:46 | Double-clicking on the function, of
course, puts it into our entry area.
| | 01:49 | Now FileMaker is reminding us, we need to
replace the date parameter with a date field.
| | 01:55 | So let's choose InvoiceDate, because we
know that that field is the field type of Date.
| | 02:00 | Now, we are going to choose the
result, because before we finish our
| | 02:03 | calculations we need to determine
what result this output is going to be.
| | 02:06 | In this case, the output is going be a
Number, because what we're really looking
| | 02:10 | for is a numeric day.
| | 02:12 | So we choose Calculation result:
| | 02:13 | Number, we hit OK, we hit OK again.
| | 02:17 | Now, on our layout in Browse mode we
see we've got the DateCalc, which is right
| | 02:21 | next to the InvoiceDate.
| | 02:22 | What it's doing is
extracting the day from our date.
| | 02:25 | So we see we've got 3/16, we've got
7/7, it gives us a 7, we've got 20 in
| | 02:32 | this case and so on.
| | 02:33 | Now back into Manage > Database.
| | 02:36 | If we manipulate this calculation a bit,
instead of giving us a day either 1
| | 02:41 | through 31, we can choose
DayName as another option, InvoiceDate.
| | 02:49 | In this case, our calculations
result is going to be Text, because we are
| | 02:52 | looking for the name of the day, which
would be Sunday, Monday, Tuesday, and so on.
| | 02:57 | Hitting OK a couple of times.
| | 02:59 | Now we see that FileMaker is
evaluating the fields and determining what day
| | 03:03 | of the week that was.
| | 03:05 | This is a good example of how
some of the date functions pair up.
| | 03:11 | You'll see, in the Date functions
list, that we've got Day, DayName, Month,
| | 03:15 | MonthName, and we've got
WeekOfYear, which gives you a numeric value.
| | 03:20 | Year just pulls a numeric value for the
year, and YearName is actually something
| | 03:24 | that's used in Japanese versions of FileMaker.
| | 03:27 | Now when it comes to Time, see that
we've got a calculation already created here
| | 03:34 | called TimeCalc that's currently Text,
but let's make that a Calculation field.
| | 03:37 | Hit Change, dismiss the dialog and
quickly look at the Time functions.
| | 03:43 | These are very easy.
| | 03:44 | These will either do one of two things:
| | 03:45 | extract a numeric hour, a minute or
seconds from a Time field or construct a
| | 03:51 | time with three different parameters,
one representing hour, of course, then
| | 03:55 | minutes and seconds.
| | 03:57 | So real quick, what we'll do is we'll
pull the Hour. We have a field here called
| | 04:02 | TimeCreated that represents a time value,
| | 04:05 | so we are going to use that one.
| | 04:08 | Double-click on TimeCreated, and in
this case our Calculation result is a
| | 04:11 | Number, which is going to extract
the hour from our TimeCreated field.
| | 04:16 | So we'll just keep it a
Number, we hit OK, then OK.
| | 04:19 | Now we see for each one of the times,
it just gives us a numeric integer that
| | 04:23 | represents the hour in each
one of the TimeCreated times.
| | 04:28 | All of these have 10, which
represents the time created, 10:42 AM.
| | 04:32 | The Timestamp fields are
very similar to these two.
| | 04:34 | They just combine the two components
together that we saw in both Date and Time.
| | 04:40 | So this lesson we just focused on a
core number of Date and Time functions, and
| | 04:44 | as you see in the case of Time and
Timestamp functions, there's really only a
| | 04:47 | few of them to learn.
| | 04:49 | But in the case of date, these are
the ones that are the most useful,
| | 04:51 | so it's best to become adept at using
these functions without ever having to
| | 04:55 | need to refer to the functions as a source.
| | Collapse this transcript |
| Using text functions| 00:00 | The largest groups of calculation
functions in FileMaker Pro pertain to
| | 00:04 | investigating and manipulating text.
| | 00:07 | Unlike some groups of functions in
which only a few are used on a regular
| | 00:10 | basis, I'd say that nearly half of
these text functions are of primary
| | 00:14 | application and importance.
| | 00:16 | So in this movie, I'm going to
introduce you to the syntax of some of the
| | 00:19 | core text functions.
| | 00:20 | Let's get started right away by going
into File > Manage > Database, and you'll
| | 00:26 | see that we've got a field in
here that's called TextCalc.
| | 00:29 | It's already set up as a Calculation,
but let's hit Options and clear out our
| | 00:34 | Formula Entry window.
| | 00:36 | We can isolate the text functions in
the upper right-hand corner by selecting
| | 00:40 | Text Functions from the dropdown, and
here you'll see we have quite a few of
| | 00:44 | these functions at our disposal.
| | 00:47 | These really break into a couple of groups.
| | 00:49 | The first group is one that measures
text and provides back a numeric output.
| | 00:55 | So, for example, we've got one here
that's called Length, and you see it's just
| | 01:00 | got a single parameter.
| | 01:01 | So you see I've got Length and then of
course, the text parameter is highlighted.
| | 01:06 | So let's choose CompanyName because
we know that's a field that is a text
| | 01:11 | field, and now in the case of Length,
this is actually going to give me a
| | 01:14 | numeric value of the Length, or the
total number of characters of the data
| | 01:19 | inside the CompanyName field.
| | 01:20 | So we want this
Calculation result to be a Number.
| | 01:22 | So we're going to hit OK and OK again,
and now you see here we've got TextCalc
| | 01:29 | on our layout, and in Browse mode we
can see that it's dynamically evaluating
| | 01:36 | the different values.
| | 01:37 | We see up here is the CompanyName
and we see the number being calculated
| | 01:42 | differently for every record.
| | 01:43 | So it's important to understand that
when you're creating this Calc, it's just
| | 01:45 | evaluating the value inside the
fields that you're using as placeholders in your
| | 01:49 | formula and only doing so on the current record.
| | 01:53 | The other thing that's important to note
with length is that FileMaker considers
| | 01:57 | spaces a character.
| | 01:59 | So when you see something like 13
characters here, it's counting this comma and
| | 02:04 | the space and the period in front of Inc.
| | 02:07 | Keep that in mind when you're
setting your own expectations for what you
| | 02:10 | calculation's results will be.
| | 02:12 | So back in the TextCalc
dialog, hit Options again,
| | 02:17 | another one I want to show you is Word Count.
| | 02:19 | We'll go back to Text functions. So you
see here we've got Length will give us
| | 02:26 | the total number of characters and
likewise, we've got WordCount will give us
| | 02:33 | the total number of words in a string.
| | 02:35 | So let's try CompanyName again, and of
course, that's going to give us the number
| | 02:40 | because it's counting the number of words.
| | 02:42 | So let's hit OK, and if we go all the
way back to Record #1, you see we've got
| | 02:47 | one word there, but this is important here.
| | 02:50 | I wanted to show you this one;
| | 02:51 | we've got a Radley & Friends,
but how many words does it count?
| | 02:55 | Well, it counts two words there.
| | 02:57 | So in the case of words, it doesn't count
delimiters like ampersands and things like that.
| | 03:03 | Now, if you're doing word counts on
a Phone Number field, it will recognize
| | 03:07 | the fact that there's a number on each
side of one of these delimiters, in this
| | 03:11 | case, a dash, and it's going
to recognize this as numbers.
| | 03:15 | It does that for dates and phone numbers.
| | 03:17 | So in this case, if we put in
here, it would give us one word.
| | 03:21 | But because this is text, and it's
using an ampersand in this case, it's
| | 03:24 | considering that two words.
| | 03:26 | So a little something to keep in mind there on
how FileMaker treats those word delimiters.
| | 03:31 | So you see we've got a couple of
examples of functions that count either
| | 03:38 | characters or words, and I'm going to
show you another one that is pretty popular.
| | 03:43 | This one is called PatternCount.
| | 03:45 | So this one also counts, but
instead of counting words or counting
| | 03:49 | characters, what it's going to
count is a string of values that you're
| | 03:53 | putting into this parameter.
| | 03:55 | So first, we're going to pick, let's
say, CompanyName again, and now it says
| | 04:01 | here put in a search string parameter.
| | 04:03 | So what we're going to do is we have
to put in some kind of text that we're
| | 04:06 | going to look for within the
CompanyName, and it's going to count how many
| | 04:09 | times it sees that.
| | 04:10 | This type of calculation is used to
nest inside of other calculations, which
| | 04:14 | you might find useful as you get
into more intermediate or advanced
| | 04:17 | calculation writing.
| | 04:19 | But just to give you an idea, from an
accounting perspective, here we have a Search
| | 04:23 | string, and we're going to wrap this in
quotations because anytime you put any
| | 04:26 | text values in a calculation function,
you have to denote them as text by
| | 04:30 | wrapping them in a quotation.
| | 04:32 | Here I'm going to put R and leave it
as number, hit OK, and let's go back
| | 04:37 | into our values here.
| | 04:40 | So no letter R's, back in Browse
mode, and here you notice we have 2.
| | 04:46 | So one thing I wanted to point
out here is that we've got 2;
| | 04:49 | one of them is a capitalized R
and one of them is a lower case r.
| | 04:52 | It still counts R so as you can
see that particular function is
| | 04:55 | not case-sensitive.
| | 04:56 | There are some functions that are
case-sensitive; PatternCount is not.
| | 05:00 | So you want to take that into account
sometimes you might be just trying to
| | 05:03 | isolate specific case-sensitive
patterns, and then you would have to use
| | 05:06 | other functions for that.
| | 05:07 | Now, keep in mind we just put in an R
in this case, but what we could have done
| | 05:11 | is put in a whole word, for example,
So really it's whatever string you want
| | 05:19 | to put inside there.
| | 05:20 | Now you see we're finding that one
word in both of those occurrences.
| | 05:25 | Now there's another function you might
find useful, and we're going to use this
| | 05:28 | in another area where you see
a calculation dialog appear.
| | 05:32 | If we go into the CompanyName field,
notice here we've got the Calculation
| | 05:39 | Value option chosen. We hit Specify.
| | 05:41 | That's because we've got a
calculation in here, and this one is called trim,
| | 05:44 | which is just another one of the text
functions, and what trim's role is just to
| | 05:49 | take any leading spaces or trailing
spaces and trim them out and just leave
| | 05:53 | whatever text is left that's not spaces.
| | 05:55 | It doesn't leave anything in between
words or anything like that but just
| | 05:57 | leading or trailing. And because
we've got this set up as an Auto-Enter
| | 06:01 | calculation and also because we have
removed the check box from the default, Do
| | 06:05 | not replace existing value, and again,
that syntax is a little cryptic, but what
| | 06:10 | that means is do we want the formula
that we just put inside this dialog to be
| | 06:16 | applied to the values that we're
typing in the field, or do we not?
| | 06:20 | So in this case, we do,
so we leave it unchecked.
| | 06:23 | If we do not, then we check it.
| | 06:24 | What kind of functionality does that give us?
| | 06:27 | Well, if you go inside the
CompanyName field, see I've got my curser there,
| | 06:34 | if I put a bunch of spaces after it,
and the reason this might be useful is
| | 06:38 | because if you ever import data in
from another source, other non-FileMaker
| | 06:42 | database applications will have
minimum character length so you've got the
| | 06:45 | data, and then it'll add a bunch of
spaces on to the end of it and sometimes
| | 06:49 | even at the beginning.
| | 06:50 | And this might not really jive for
you the data inside your database.
| | 06:53 | So as you see here, I've added a bunch
of spaces, and now I'm going to commit
| | 06:56 | the record, but now when I click back in,
you notice that FileMaker's has shaved
| | 07:00 | all those spaces off the end.
| | 07:02 | So that's how the Trim function works,
but at the same time, it's a useful thing
| | 07:05 | to use inside the Auto-Enter Calc dialog.
| | 07:08 | And finally, I'm going to show you
him to show you a series of functions
| | 07:11 | inside the text family that deal
with extracting words or characters from
| | 07:17 | other text values, or fields.
| | 07:19 | If we first close the window and look, notice
that all of our records have a Full Name field.
| | 07:24 | This is kind of a common occurrence;
sometimes you might be importing in from
| | 07:27 | another source and a common mistake
that some developers, rather application
| | 07:31 | designers, make is that they don't break down
the data into the smallest bits of data possible.
| | 07:36 | So a lot of times people will just say, oh
name, okay, we're going to put full name.
| | 07:39 | The problem is you want to break that
it into First and Last Name because let's
| | 07:43 | say you were writing a letter
and you want it to say, Dear Joe.
| | 07:47 | Well unfortunately, you don't have any
data, and your database at this point, you
| | 07:50 | just have to call him Dear Joe
Smith, and that doesn't really work.
| | 07:53 | So what we're going to do is we're
going to come up with a couple calculations
| | 07:56 | that will extract the first word out of
the full name and put it into the First
| | 08:00 | Name field, and we're going to take the
second word out of the Full Name field
| | 08:03 | and put that into the Last Name.
| | 08:05 | Now I'm going to show you another area
where the Calculation dialog can be used,
| | 08:09 | and that is under the Records menu,
| | 08:11 | you see there's something
called Replace Field Contents.
| | 08:13 | Now this is a great tool to apply batch
updates to whatever fields you have in
| | 08:17 | your current found set.
| | 08:19 | You see here that we've got 1,523 records.
| | 08:22 | Well, before you choose any kind of
Replace Field Contents, you want to make
| | 08:26 | sure that you're choosing the fields first
that you want to apply these batch updates to.
| | 08:30 | So we click the First Name field, go
back under Records to Replace Field
| | 08:35 | Contents, and I could just have it
replaced the value from the record I'm
| | 08:39 | currently in, throughout all of the
different records in the Found set,
| | 08:43 | but we're going to fastforward down
here to the Replace with calculated
| | 08:46 | result, because we've got a Specify
button which of course invokes the
| | 08:50 | Specify Calculation Dialog.
| | 08:52 | So in this case, I want to show you
couple of functions real quick here.
| | 08:56 | You see this whole family of
Left, LeftValues, LeftWords.
| | 09:00 | You also have Middle, MiddleValues,
MiddleWords and then Right, RightValues and RightWords.
| | 09:06 | All nine of those together make up a
pretty huge chunk of all of the different
| | 09:09 | text functions, and if you understand how one of
them work, you'll understand how they all work.
| | 09:12 | So let's take a look at how Left would work.
| | 09:16 | So in the case of Left, you have two parameters.
| | 09:18 | Put in the field that's going to
have the text value, and then you tell
| | 09:23 | FileMaker how many characters
you want to extract from the Left.
| | 09:27 | So in this case, I could say
Customer Full Name and give me 1234.
| | 09:30 | The thing is I don't know how many
characters are going to be in this
| | 09:34 | person's name each time.
| | 09:35 | So in addition to have been able to
extract characters using Left, Middle or
| | 09:39 | Right, I've also got LeftWords,
which is perfect for our task here.
| | 09:45 | So I select Customer Full Name
and add that as my text parameter.
| | 09:49 | Then I tell it what number of words
I want to extract from the Left, and
| | 09:52 | then I'm going to say 1.
| | 09:54 | So we hit OK, and now what the Replace
Field Contents function will do, after I
| | 10:00 | hit the Replace button, is it's going to
go through every record in the Found set,
| | 10:03 | one at a time, and it's
going to perform this function.
| | 10:05 | So essentially what it's going to do is
extract the first name out of the Full
| | 10:07 | Name field and put it into the First Name field.
| | 10:10 | So let's hit Replace, let it do it
thing, and you see now every record in the
| | 10:14 | database has a First Name.
| | 10:17 | And similarly, we can do the same thing
to the Last Name field, but what we have
| | 10:23 | to do is make sure in the first record
of our Found set because that's where the
| | 10:25 | Replace Batch function is going to start.
| | 10:27 | We want to include them all.
| | 10:29 | So quickly we'll go in here, Text Functions,
and then this time, we're going to say it Right.
| | 10:35 | So in case of Right, we're just going to pull.
| | 10:40 | This would give us right number of characters.
| | 10:42 | Of course, we could count those out.
| | 10:44 | But we're going to instead use words
because then we don't have to worry about
| | 10:47 | how many characters, and we'll simply
say Full Name, number of words, and we're
| | 10:55 | just going to pull one for
the Last Name, so now we hit OK.
| | 10:58 | Hit Replace again, and now we see
all of our records have extracted both
| | 11:02 | first and last names.
| | 11:03 | So you see here you can use any
calculation function, but in these examples we
| | 11:07 | used text functions, in both the Auto-
Enter Calculation dialog and also under the
| | 11:11 | Replace Records using the replace
records with calculated results that also use
| | 11:16 | the Specify Calculation dialog.
| | 11:19 | So it'll be good to get familiar with
these functions because they're going to
| | 11:21 | be used in quite a few
areas within FileMaker Pro.
| | 11:24 | In this movie we focused on really the
core text functions, the ones that are
| | 11:27 | used most frequently.
| | 11:29 | But it's best to become adept at using
these functions without needing to refer
| | 11:32 | to the reference as a source.
| | 11:34 | So the more you can write these things free
flow or the more experience you get, the better.
| | 11:38 | So do your best to apply these
functions as often as you can throughout
| | 11:41 | your FileMaker solution.
| | Collapse this transcript |
| Using get functions| 00:00 | Get Functions are a rare breed of
function because they pull environmental
| | 00:04 | information, either about the session
that you're in, the application that you're
| | 00:07 | using, or information
from your operating system.
| | 00:10 | It can be really helpful if you need
to extract this type of information for
| | 00:13 | calculation fields, or even within your scripts.
| | 00:16 | Let's take a look at how this function works.
| | 00:18 | Go to File > Manage > Database, you
see we've got a GetCalc function.
| | 00:25 | We'll hit Options, and we'll clear out
the values that we see inside the field.
| | 00:28 | Now, let's take a look at the Get Functions.
| | 00:32 | See here, they're all grouped together,
and these are pretty easy to understand.
| | 00:34 | They only have one parameter, and
they'll pull information from your operating
| | 00:38 | system, or in this case from FileMaker,
so we've got some session-based ones
| | 00:43 | here I'll show you first.
| | 00:44 | First, Get (AccountName) will simply
extract the name of the user's account
| | 00:48 | that's logged into the FileMaker Pro database.
| | 00:50 | So, that's based on session, and we
can pull information from your computer,
| | 00:54 | for example, Get (CurrentDate)
will pull information from the operating
| | 00:58 | system and whatever your clock setting
is at that time. Same with some of these
| | 01:02 | that will do -- Get (GetCurrentHostTimeStamp)
will pull the timestamp from
| | 01:06 | the FileMaker Server that's hosting
the file. CurrentTime, CurrentTimeStamp,
| | 01:10 | same kind of thing there.
| | 01:12 | You could even get Paths, if you want.
| | 01:13 | You can get the path between your
copy of FileMaker Pro and your Documents
| | 01:18 | folder, which helps you when you're
creating locations to save things, for
| | 01:21 | example, If we look at one called
Get (FoundCount), that also pulls some
| | 01:27 | information from our session.
| | 01:29 | We'll use this one in our example and we'll
change it to numbers, since it's going to
| | 01:32 | give us a numerical value of how
many records are in our Found Set.
| | 01:36 | Also, this one will
take into account Storage Options.
| | 01:38 | You see this button over here. We
haven't talked about it yet, but every
| | 01:42 | calculation can either be stored or un-stored.
| | 01:45 | Really, what that means is once you
create the calculation, if you decide to
| | 01:49 | store the value, that means that at the
moment that you created the calculation,
| | 01:53 | it's going to evaluate whatever it is
that you've told it to evaluate, and it's
| | 01:57 | going to keep that result
in there, in perpetuity.
| | 02:00 | However, if you choose to not store
results, that means it's constantly in this
| | 02:05 | state of evaluation, and if any of the
factors that are inside the calculation
| | 02:09 | change, then it will change as well.
| | 02:12 | Most of the time you're going to
want to keep your functions not stored.
| | 02:16 | But if you want to use them in a
relationship, or as a key field, or if you want
| | 02:19 | to index them or something
like that, they can't be stored.
| | 02:22 | So, that's why you wouldn't normally
have every single one of them in there.
| | 02:24 | So, that's something to pay attention to.
| | 02:25 | So, if we hit OK, and OK, you see we've got
the GetCalc result appearing here in Browse mode.
| | 02:34 | We've got 1,523 records in our Found Set.
| | 02:36 | But let's modify our Found Set.
| | 02:38 | You see, now, we've got 26
records up here, and 26 records below.
| | 02:42 | Now, if this was a stored
calculation, then it would still say 1,523.
| | 02:45 | We'll do just another example
here, by modifying our GetCalc.
| | 02:51 | Let's go to Get Functions, and you
can see things we can do like Get
| | 03:00 | (LayoutName , Get (PrinterName),
different things like that, all sorts of
| | 03:06 | information that might be helpful for
you to use. Especially in scripts, if you
| | 03:10 | want to check some environmental factor
and determine which way you're going to
| | 03:13 | go with the script or an action from there,
that's where Get Functions come into play.
| | 03:17 | But let's just pull in ApplicationVersion.
| | 03:20 | This one is actually going to read what
version of FileMaker Pro we're using at the time.
| | 03:25 | You see, here it gives us Pro 11.0 Version 1.
| | 03:30 | So, if you ever need to pull
information about your FileMaker application,
| | 03:33 | anything within a session, the
components of FileMaker, your window
| | 03:37 | environment, layout, operating system stuff,
anything like that, these are great tools.
| | 03:42 | In this movie, we've been focusing on
the core Get Functions, but it's best
| | 03:45 | become familiar with these functions
without needing to have to keep referring
| | 03:48 | back to the function list as a source.
| | 03:51 | Get Functions are pretty easy, since
they've only got a single parameter, but
| | 03:54 | the more you get familiar with what
types of things you can extract using a Get
| | 03:57 | Function, the more useful
these will become to you.
| | Collapse this transcript |
| Using logic functions| 00:01 | In this movie, I'd like to focus on
some of the functions that are known
| | 00:03 | as logical functions.
| | 00:05 | The Logical Function group contains
some of the most interesting and powerful
| | 00:08 | functions available in FileMaker Pro.
And unlike some of the other categories of
| | 00:12 | functions that we've been reviewing,
in which several functions are often
| | 00:15 | similar in syntax and behavior, these
logical functions are a collection of
| | 00:19 | unique, and sometimes complex functions.
| | 00:22 | So they really break up into two
different kind of categories, and I'll show
| | 00:25 | you examples of both.
| | 00:27 | The first of these categories
within the logical functions are used for
| | 00:30 | performing conditional operations,
and they're extremely popular when used
| | 00:34 | either in calcs or in scripting.
| | 00:36 | So, let's take a look at
a couple of these first.
| | 00:39 | If we open up the File > Manage > Database window,
| | 00:45 | you see that we've got our Invoices
Table showing, and what we're going to do is
| | 00:48 | create a new field called Commission.
| | 00:51 | This is going to be a field that helps
us determine how much commission each
| | 00:55 | salesperson gets on a sale.
| | 00:57 | So, let's go into the Field Name, type
in the Field Name and choose Calculation,
| | 01:05 | and then hit Create.
| | 01:06 | Here we are in our Specify
Calculation dialog window.
| | 01:10 | Now the popular and useful logical
function I want to introduce you to is
| | 01:13 | called the If function.
| | 01:15 | You see that when we isolate all the
logical functions, there's not a whole heck
| | 01:19 | of a lot of them, but they're all pretty useful.
| | 01:22 | Let's focus on the one
right in the middle here, If.
| | 01:25 | So you see it's got a few different parameters.
| | 01:29 | The If is the most basic type of
logical function that there is, in that it just
| | 01:33 | says if this test is true, then do this
result, but if this test is false, then
| | 01:37 | do the other results.
| | 01:38 | For example, if we did a plain English
version of this, and we said something
| | 01:42 | like, if it's raining, which would be
our test there, then bring an umbrella -
| | 01:47 | so that would be true - or if it's
not raining, which would be false, then
| | 01:51 | don't bring an umbrella.
| | 01:52 | Our brain works in this way, and
that's why these functions are called logic,
| | 01:56 | because really an If where it looks at
a test and says if it's true or false is
| | 02:00 | really part of the definition of what logic is.
| | 02:03 | I'm going to show you an example, back in
this Commission field that we're working on.
| | 02:07 | So let's say that what we want to do
is create a field that conditionally
| | 02:10 | determines what the Commission rate on
an invoice would be for a salesperson.
| | 02:13 | Let's say that we're going to say one
commission price for a salesperson every
| | 02:17 | time they create an invoice
would be 5% on any order over $1,000.
| | 02:23 | So, you see this is where the
condition comes in. It's a test.
| | 02:25 | It says, if the InvoiceTotal is
greater than $1000, then you get 5%;
| | 02:31 | otherwise, you don't get anything.
| | 02:32 | So our test is whether or not the value
is over 1,000, and if that's true, then
| | 02:38 | we come up with a mathematical
formula that determines 5% of the total.
| | 02:43 | And if it's false, we just say nothing.
| | 02:45 | So in our parameters, what we do is we
enter in the test, which in this case is
| | 02:49 | going to be InvoiceTotal >
and we'll just type in 1,000.
| | 02:57 | So, that's our test.
| | 02:58 | Is the InvoiceTotal value greater than 1,000?
| | 03:00 | And the first result is the true,
really, should say resultTrue and resultFalse,
| | 03:04 | but if you can remember which
is which, it gets pretty easy.
| | 03:08 | So, inside resultOne, we don't have to
just put a field in here or a value, we
| | 03:12 | can put a whole mathematical formula.
| | 03:13 | So in this case, I'm going to say
InvoiceTotal*0.05, which of course, would give
| | 03:21 | us 5% of the overall total.
| | 03:23 | That's if the result is true.
| | 03:25 | What if the result is false?
| | 03:26 | Well, they get nothing.
| | 03:28 | And this result, of course, is going to
be, well, a number. We'll keep it as a
| | 03:32 | number, and we'll hit OK, and OK again.
| | 03:38 | Now, let's go into Layout mode, and
you see we've got the Commission field
| | 03:43 | that's been added to the layout.
| | 03:44 | I will hold down the Shift key
and select the field, and the label.
| | 03:48 | If yours did not appear at the bottom
of your layout, in your exercise file,
| | 03:53 | that's just because your
FileMaker Preferences are set differently.
| | 03:57 | So, you can go ahead and
insert the field, if you'd like.
| | 03:59 | But now that we've got the field on
our layout, and by the way, we know it's
| | 04:03 | Number field, so let's go into our
Inspector and choose Currency, just to make
| | 04:09 | this one a little bit easier to read.
| | 04:12 | So let's go back into Browse, Save our
changes and take a look at what we've got here.
| | 04:18 | So, we see we've got an invoice here
that is certainly over 1,000. It's 32,000.
| | 04:23 | So that means that it gives the 5% commission
for this salesperson of $1,611 and some change.
| | 04:30 | But you see that this order is less than
1,000, it's only $493, so the salesperson,
| | 04:35 | Marie, gets $0 commission.
| | 04:37 | You see that it's evaluated record by record.
| | 04:42 | So that's how we can apply a
condition to a certain field.
| | 04:45 | So, it's a very useful function in that regard.
| | 04:47 | Let's go back to the Calculation, and
I'm going to introduce you to something
| | 04:54 | that could be described as
a cousin of the If function.
| | 04:57 | It's probably used just as often as
the If function, and between those two
| | 05:01 | functions there, they're used more than
any other logical function in FileMaker,
| | 05:04 | and this one is called Case.
| | 05:08 | Now, let me back up a second.
| | 05:10 | Let's say that the
commission structure has now changed.
| | 05:14 | So instead of it being if it's over $1,000,
you get 5%, and if it's not, you get zero.
| | 05:19 | Let's say now there's several tiers to it.
| | 05:21 | For example, you just got a memo that
says the commission structure has changed.
| | 05:25 | In this case, rather than just being, if
it's above $1000 you get 5% or if it's
| | 05:29 | not then you get 0,
| | 05:31 | there's going to be some different tiers to it.
| | 05:32 | Now the problem here is though,
as you see, that we've got four
| | 05:36 | different evaluations.
| | 05:37 | It could be, if it's under $500, it's 5%.
| | 05:39 | If it's between $500-1199, it's 7.5%.
| | 05:44 | Well, now we've got multiple tests.
| | 05:46 | So, instead of an If function where
we just have the one test and then the
| | 05:49 | two results based on whether they're true or
false, now we have the problem of multiple tests.
| | 05:54 | So, the way that we rectify that is by
using the very powerful Case function
| | 06:00 | that you see here at the top
of the Logical Function list.
| | 06:04 | You see anytime there are parameters
inside the curly brackets, those are what
| | 06:08 | are called Optional Parameters.
| | 06:10 | So we're going to ignore
those for a second here.
| | 06:12 | Now, what you'll notice, in the Case
function, is we just have a test and a result.
| | 06:16 | But what's cool about the Case
function is you can have as many tests as you
| | 06:19 | want with their own corresponding results.
| | 06:22 | That's going to be perfect
for what we're doing here.
| | 06:24 | So let's apply that new tiered
structure to our Commission field, using Case.
| | 06:29 | The other thing I want to point out
to you is that you'll notice that I am
| | 06:34 | clicking and hitting the Return key,
and creating some white space for me in my
| | 06:40 | calculation entry area.
| | 06:42 | White space is ignored when FileMaker
evaluates your calculation, but it's very
| | 06:46 | helpful when you're programming these
functions to be able to see things in a
| | 06:49 | little bit more organized fashion.
| | 06:51 | So, let's put in our first test.
| | 06:52 | And based on the memo, it was whether or
not the InvoiceTotal was less than $500.
| | 07:01 | InvoiceTotal<500, and if the
InvoiceTotal<500, then what would be the result?
| | 07:09 | If it's true, then we're going to say
InvoiceTotal*0.05, which gives us 5% of the total.
| | 07:17 | Now, you notice we have the tests, and
then we have the first result, if it's true.
| | 07:21 | What if it's false?
| | 07:22 | Well, then what the Case statement
does is it moves on to the next test.
| | 07:28 | So, if it's true, it stops right here.
| | 07:31 | That's the first very important thing
to understand here is it's just got kind
| | 07:34 | of a cascading effect.
| | 07:35 | That means is a Case function will stop the
moment that it evaluates and finds a true result.
| | 07:41 | It doesn't bother going and
evaluating the rest, and we'll see how that's
| | 07:43 | significant here as well.
| | 07:45 | But to delimit the different tests,
we're going to put a semicolon in here,
| | 07:49 | which is a very common
delimiter in FileMaker functions.
| | 07:53 | Now, we could save ourselves some time by
copying and pasting these different tests.
| | 08:00 | So, the next one is if the
InvoiceTotal < 1,199, then it's InvoiceTotal*0.075.
| | 08:13 | Then we could do the next one.
| | 08:14 | Now notice what I've done here.
| | 08:15 | I'm doing less thans all the way
across the board, and so the reason is that
| | 08:20 | let's say something comes in at 700.
| | 08:23 | Well, 700 is not less than 500, so it
passes this test, but it is less than
| | 08:29 | 1,199, so it stops right here.
| | 08:31 | So, since I'm using less than in a
cascading fashion, which I'm going to have to
| | 08:35 | continue doing here on this next one,
then that means that any number will fall
| | 08:38 | within one of these tiers.
| | 08:40 | And if you do them in the right order,
then you'll get the right result.
| | 08:43 | But if I, for example, do
InvoiceTotal > 2,000, we'll look at these all
| | 08:52 | together here in a second. It's 0.1.
| | 08:57 | So now I'm missing one
more tier. I've got the <500.
| | 08:58 | It'd be 5%, between 501 and 1,199
would be 0.075, which is why we've got the
| | 09:07 | two less thans in the tier, but we've
got one more that we can add, which would
| | 09:12 | be if the InvoiceTotal is less than
2,000, that gives us 0.1, and if it's
| | 09:22 | greater than, it's 12%.
| | 09:24 | So now, well we've actually got our
ranges, 0-500, from 501-1,199, from
| | 09:33 | 1,200-2,000, and anything greater than 2,000.
| | 09:37 | So that's what having these in
a cascading fashion gives us.
| | 09:39 | Of course, that result is going to be
a Number, and we hit OK, and now we see
| | 09:46 | -- so the first record is over 2,000, so that's
12%, giving us a total of 2,684 and some change.
| | 09:53 | Next record is under 500, so that's 5%,
15.74, and you get the gist. Now, the next
| | 09:58 | record is over 1,199 but under 2,000, so
that makes it 10%, giving us $121.23.
| | 10:04 | So you see, it's evaluated differently
and conditionally, based on every record.
| | 10:10 | So those were just a couple examples of the
logical functions, but the most popular one.
| | 10:14 | So, if you're going to learn any of
them, learn the If function, and the Case
| | 10:17 | function, because you'll use those all
throughout your FileMaker Application.
| | 10:21 | Couple things just to remember that
we've noted here, that anytime you're
| | 10:24 | putting text inside your functions,
make sure you wrap them in quotations, and
| | 10:29 | you should always remember that you
don't always have to choose the function.
| | 10:32 | Sometimes it's a great way to get
familiar with the syntax by just typing it out
| | 10:35 | inside your f |
|
|