IntroductionWelcome| 00:04 | Hi! I am Cris Ippolite, and welcome to
FileMaker Pro 12 Essential Training.
| | 00:08 | FileMaker Pro is the leading desktop
database software popular for its ease
| | 00:12 | of use that's used by everyone from
Fortune 500 companies to individuals
| | 00:16 | who just want to be a little
bit more organized.
| | 00:18 | In FileMaker Pro 12 Essential Training,
we will be working with a bunch
| | 00:22 | of integrated data based around a database
that we will create from scratch.
| | 00:25 | We will start by taking a look at how
to manage the various types of fields
| | 00:29 | used to store your data, including how
to set up containers that can be used
| | 00:32 | for storing rich media.
| | 00:34 | Then we'll take a look at how to best
manage layouts to display your data,
| | 00:38 | first using the included themes and then
building a custom layout from scratch.
| | 00:43 | I will show you how to build
interesting and attractive reports,
| | 00:45 | including some summary reports and
charts, and we will take a close-up
| | 00:49 | look at how to set up relationships
between tables and then some of the
| | 00:52 | powerful advantages available to you
when working with relational databases.
| | 00:56 | And now, without further delay, it's time for us
to dive into FileMaker Pro 12 Essential Training.
| | 01:03 |
| | Collapse this transcript |
| Introducing the FileMaker family| 00:00 |
Before we get started with our
exercises, I'd like to take a moment
| | 00:02 |
to introduce you to the six different
products in the FileMaker 12 product family.
| | 00:07 |
First, there's FileMaker Pro 12.
| | 00:10 |
This is the product that we are going
to be using throughout this title,
| | 00:12 |
and it's the standard user version
of FileMaker Pro that allows you to
| | 00:15 |
create your own databases, modify
those databases, and basically do
| | 00:19 |
everything that we are going to
be talking about in this title.
| | 00:22 |
FileMaker Pro 12 Advanced has all the
functionality I described of FileMaker
| | 00:27 |
Pro 12, but it also has some
additional tools that developers will
| | 00:29 |
find useful like script debuggers or
the ability to create customized menus
| | 00:33 |
allowing you to create runtime
versions of FileMaker Pro applications
| | 00:37 |
in those types of
developer-type features.
| | 00:40 |
It costs a little bit more, but if
you want that extra functionality,
| | 00:43 |
and you're going to be maintaining
databases using FileMaker,
| | 00:46 |
FileMaker Pro Advanced might be
the right product for you to have.
| | 00:49 |
Then there are two different
kinds of FileMaker Server products.
| | 00:52 |
FileMaker Server 12 is an application
that gets installed on a dedicated
| | 00:56 |
server machine or up to three
different machines, and it's used
| | 01:00 |
to be able to share all of the different
files that you create in FileMaker
| | 01:03 |
to many different users
all at the same time.
| | 01:06 |
For example, you can have your
FileMaker Pro databases shared for up
| | 01:09 |
to 250 consecutive users who are all
using FileMaker Pro or FileMaker Pro
| | 01:14 |
Advanced, and then you have the
ability to even publish these same
| | 01:17 |
databases to the web using
either PHP or as raw XML data.
| | 01:22 |
All of that's built right
into FileMaker Server 12.
| | 01:25 |
Now if you'd like to be able to share
your databases from more than 250
| | 01:29 |
consecutive users or publisher
databases using a web technology that
| | 01:33 |
FileMaker has that's called Instant
Web Publishing--or even if you want
| | 01:36 |
FileMaker to be the host for any kind
of an ODBC database application,
| | 01:42 |
then you will need to purchase
another product which is called
| | 01:44 |
FileMaker Server Advanced.
| | 01:47 |
This is an upgrade to FileMaker 12
Server and has some additional costs,
| | 01:50 |
but it also contains all the
functionality that FileMaker server
| | 01:54 |
has, plus all this additional
functionality that you can buy
| | 01:56 |
with the upgrade.
| | 01:57 |
And then finally the newest products
in the FileMaker product line are
| | 02:01 |
a very exciting application for sharing
databases via an iPad or iPhone,
| | 02:05 |
and they're called FileMaker Go.
| | 02:07 |
These are apps that can be downloaded
for free on the iTunes store that will
| | 02:11 |
allow you to load databases locally on
your device, whether it's an iPhone or
| | 02:14 |
iPod touch or iPad, or you can even
connect to databases that are being
| | 02:19 |
hosted using FileMaker Server,
and you can connect to those using
| | 02:22 |
Wi-Fi connections or even
your 3G or 4G connections.
| | 02:26 |
So you'll see that we've got a product
for the FileMaker end-user, even
| | 02:29 |
the FileMaker developer, and then we
have a bunch of different options
| | 02:33 |
for deploying a database application,
whether it's just going to be
| | 02:35 |
on a network or even to point it out
to the web or even if the product
| | 02:39 |
that we are going to be using is
going to be deployed using one of
| | 02:42 |
the Apple devices, the iPhone,
the iPod touch, or the iPad.
| | 02:46 |
But the version of the product that we
are going to be using moving forward
| | 02:50 |
is FileMaker Pro 12.
| | 02:52 |
So let's take a look at FileMaker Pro 12 starting
off with the FileMaker Pro Quick Start Screen.
| | 02:58 |
| | Collapse this transcript |
| Touring the FileMaker Quick Start screen| 00:00 |
The first thing that you're going to see
on screen when you open up
| | 00:02 |
the FileMaker Pro application is what's
called the FileMaker Quick Start dialog.
| | 00:07 |
This is a dialog that you will see in
many other applications, and it gives
| | 00:09 |
you a starting point for different
ways to create databases, modify
| | 00:13 |
existing ones, or even some
additional training options.
| | 00:16 |
If you don't want to show this screen
next time you open up the application,
| | 00:20 |
you will notice in the bottom
left-hand corner there is a check box
| | 00:22 |
that says Show the screen
when FileMaker Pro opens.
| | 00:25 |
Now if you've checked this box and the
Quick Start screen no longer opens,
| | 00:28 |
and then you do want to invoke
the Quick Start dialog, all you need
| | 00:31 |
to do is go under the Help menu
and choose Quick Start Screen.
| | 00:35 |
Either way, you'll see that on this
dialog you've got some options over
| | 00:38 |
on the right-hand side for additional training.
| | 00:41 |
You can go to some of the FileMaker
video tutorials or hands-on tutorials
| | 00:45 |
or even the FileMaker
Forum that's available.
| | 00:47 |
These are all very helpful resources,
| | 00:48 |
and I recommend that when you have some
time that you go and check those out.
| | 00:51 |
Now on the left-hand side we've
got the ability to create databases,
| | 00:55 |
convert databases from existing data files, or
even create them using a new starter solution.
| | 01:00 |
These are all options that we are going
to explore in the upcoming movies.
| | 01:02 |
But in the middle of the screen
you will see that you can open up
| | 01:05 |
a database either from a recent or favorite
file or just using the Browse button.
| | 01:09 |
So for example, if I hit the Browse
button, I can then use my Open File
| | 01:14 |
dialog to navigate to wherever
I might have a file and hit Open.
| | 01:20 |
Once a file is open in FileMaker it
then becomes one of the recent files,
| | 01:24 |
and you'll see even we go back to the
Quick Start Screen that now it appears
| | 01:27 |
under the Recent Files options.
| | 01:30 |
If this is a file that I will be
working with quite a bit, I can go
| | 01:33 |
under the File menu to
the Open Favorite and select
| | 01:37 |
the Manage Favorites option.
| | 01:39 |
When I select Manage Favorites,
I can hit the Plus button,
| | 01:42 |
choose a file that I want to add to
my Favorites list, and hit Select.
| | 01:47 |
Now whenever you see the Quick Start
Screen, when you open up FileMaker you
| | 01:50 |
will see your recent files and then
whatever files you've added
| | 01:53 |
to the Favorite Files.
| | 01:55 |
By simply double-clicking on any one
of these files it will then open up
| | 01:58 |
that file for you in FileMaker Pro.
| | 02:00 |
Now if you'd like to clear files from
your Recents or Favorites, you will go
| | 02:04 |
under the File menu to Recents and choose
the option for Clear Recent Files.
| | 02:08 |
Also, under Favorites you can go to
Manage Favorites, select the file,
| | 02:13 |
and hit the Minus button which will then
clear the Favorites, and of course you
| | 02:17 |
will no longer see those listed under
the FileMaker Quick Start Screen.
| | 02:22 |
This Quick Start Screen will equally
address both new and experienced users.
| | 02:26 |
Brand-new users who aren't sure how to
get started will see all the different
| | 02:29 |
access to the help and tutorials that
are available to them and experienced
| | 02:33 |
users will have quick access to recent
and favorite files and the ability to
| | 02:37 |
customize their display in the window.
| | 02:41 |
| | Collapse this transcript |
| Explaining the new file format change| 00:00 |
Some of you watching this movie may
have worked with previous versions of
| | 00:03 |
FileMaker Pro, and if so you're probably
familiar with the file extension .fp7.
| | 00:08 |
This indicates the file format
of a FileMaker database.
| | 00:12 |
In FileMaker 12 the file format
has been updated.
| | 00:15 |
So what this means to you is that if
you have any old files that say .fp7
| | 00:20 |
at the end that you will notice this
dialog appears when you open up the file.
| | 00:23 |
What this is saying is that you will
need to update this file to the new
| | 00:26 |
FileMaker 12 file format, and
to do so is simply a matter
| | 00:30 |
of saying OK in this dialog.
| | 00:32 |
But what you might want to do is
rename the old original file so that
| | 00:36 |
you have an old copy
of it just in case.
| | 00:38 |
So you will also notice that after I
say OK, they asked me where I want
| | 00:42 |
to save the file and then as it's
converting, it opens up the new file
| | 00:47 |
which is now your old converted
file ready for use in FileMaker 12,
| | 00:52 |
but it's also created what's
called the Conversion.log.
| | 00:55 |
This is something that shows you all
the different things that it's done,
| | 00:58 |
converted different fields, and
updated some of the information to
| | 01:01 |
make it work just like it did
in older versions of FileMaker.
| | 01:04 |
If you want to look at more details,
you can go into the Conversion.log
| | 01:06 |
to learn more about this.
| | 01:08 |
So now you see that you've got your
original .fp7 file format file, and
| | 01:12 |
you'll note that the new extension for
files created using the FileMaker 12
| | 01:16 |
file format are .fmp12.
| | 01:20 |
Keep in mind that if you have older
versions of FileMaker, like FileMaker 11
| | 01:24 |
or 10 or anything earlier than that,
you won't be able to open up any
| | 01:28 |
file that has a .fmp12 extension.
| | 01:31 |
Those will require versions
12 or later of FileMaker Pro.
| | 01:35 |
The changing of file formats actually
means good things for the product line
| | 01:39 |
now and into the future, but just
remember to open the files in their
| | 01:42 |
appropriate version of FileMaker Pro.
| | 01:46 |
| | Collapse this transcript |
| Using the exercise files| 00:00 | If you're a Premium Member of the
lynda.com online training library,
| | 00:03 | or if you're watching this tutorial on
a DVD-ROM, then you'll have access
| | 00:07 | to the exercise files that I am
using throughout the title.
| | 00:09 | Now the way that the exercise files
are laid out is that they all come
| | 00:12 | in a folder called exercise files.
| | 00:14 | When you open that folder you'll see
that every chapter in the title has
| | 00:17 | its own subfolder, within each
chapter folder are folders
| | 00:21 | for each one of the movies.
| | 00:22 | So for example, if you're watching
a movie in chapter 1, movie number 4
| | 00:26 | you'll go to the 01_04 folder
and double-click on the exercise
| | 00:30 | with the similar name.
| | 00:32 | Each of the movies have its own
dedicated FileMaker file so that you
| | 00:35 | can start from any point in the title.
| | 00:37 | We are going to be creating an
invoicing database file from scratch.
| | 00:40 | So in the early chapters of the title
we will be building the file along
| | 00:43 | with each movie in the order that
a database should be built and in
| | 00:46 | the later movies in the title we will
be using that same file to add more
| | 00:50 | specific features and data to
the exercise files as they pertain
| | 00:53 | to each topic that we are talking about.
| | 00:55 | So if you're a Monthly subscriber or an
Annual subscriber to lynda.com, you
| | 00:59 | won't have access to the exercise
files, but you can easily follow along
| | 01:02 | from scratch or even
on your own files.
| | 01:05 | So let's go ahead and get started.
| | 01:08 |
| | Collapse this transcript |
|
|
1. Getting StartedWhat is a database?| 00:00 |
Before working with a database it's
important to first understand what
| | 00:04 |
a database actually is.
| | 00:06 |
By definition a database is
the collection of like information
| | 00:10 |
with common underlying attributes.
| | 00:13 |
You are actually already familiar
with the concept of a database,
| | 00:15 |
and you might not even know it.
| | 00:17 |
For example, you've probably seen
databases in the form of things like
| | 00:20 |
address books on your computer where
one record in the database equals
| | 00:23 |
one individual whose information you're
trying to store, and in this case
| | 00:27 |
the like information that you're
storing would be different individuals
| | 00:30 |
in a different context and the underlying
attributes are actually things like
| | 00:34 |
phone numbers, email, instant message,
address, and those types of things.
| | 00:39 |
Every one of the contacts will
all have information or potentially
| | 00:42 |
have information for those.
| | 00:43 |
So you want to create an area where you
can store all of that when necessary.
| | 00:47 |
You're probably also familiar with
databases from your web experiences.
| | 00:50 |
For example, lynda.com is a huge
database that stores all the different
| | 00:55 |
links to all the different movies you
might want to watch, and you can go on
| | 00:58 |
and search that database by telling it
what author you might be interested
| | 01:02 |
in or what type of application you're
interested in, and it will direct you
| | 01:05 |
to the location of those movies.
| | 01:07 |
The role of a database is twofold.
| | 01:09 |
First, the database physically stores
the data along with the database files
| | 01:14 |
so that all the data
lives together in one place.
| | 01:16 |
But in addition to storing the data,
it also contains information on how
| | 01:20 |
to identify the data within
the storage mechanism.
| | 01:23 |
A good example of this
is a spreadsheet.
| | 01:25 |
If we take a look at the spreadsheet
here you will see that this one stores
| | 01:29 |
information on individuals.
| | 01:31 |
You'll also notice that when you look
at the spreadsheet the information
| | 01:33 |
is organized into columns and
rows, each column represents
| | 01:37 |
a different attribute about one of these
individuals, each row represents
| | 01:41 |
a different iteration of the data
that we are sorting.
| | 01:44 |
So you see, for example, we have
columns for First, Name, Last Name,
| | 01:49 |
Start Date, Title, and Status,
and then in this second row we see
| | 01:53 |
that we've got a different piece of
information in each one of those cells
| | 01:55 |
wherever a row and a column intersect.
| | 01:59 |
But in FileMaker databases the rows
are actually represented as something
| | 02:02 |
called a record, and that's the
terminology that I am going to use
| | 02:05 |
throughout the rest of this title.
| | 02:06 |
So then a record is a grouping
of a bunch of different pieces
| | 02:09 |
of information or attributes that
all describe one instance of the
| | 02:13 |
information that's being managed.
| | 02:15 |
So that one instance in a spreadsheet
is represented as a row,
| | 02:19 |
and in FileMaker we call that a record.
| | 02:22 |
And in a spreadsheet an attribute
of one of these rows is represented
| | 02:27 |
as a column, but in FileMaker
we call these Fields.
| | 02:30 |
At any intersection we will see here
that Pamela has a last name of Dreyfus.
| | 02:37 |
So in that case in FileMaker database
we are going to be storing
| | 02:39 |
that information inside of a field.
| | 02:41 |
So hopefully a little background on
databases that you might already be
| | 02:44 |
familiar with will help you understand
the concepts that we are going
| | 02:47 |
to discuss as we move along in this title.
| | 02:49 |
| | Collapse this transcript |
| Comparing flat vs. relational databases| 00:00 | So what makes storing data in an application
like FileMaker different than just storing
| | 00:05 | your data in a spreadsheet? There are many
different ways that you can store data on
| | 00:08 | your computer, for example, in a spreadsheet
or word processing document, but those are
| | 00:12 | examples of what are called in database
circles a flat file. A database, on the other hand,
| | 00:18 | is a collection of data that are organized
into different tables. These tables provide
| | 00:23 | a systematic way of accessing, managing, and
updating data. A relational database is one
| | 00:29 | that contains multiple tables that relate
to each other through special key fields,
| | 00:33 | and we'll be talking about those later in
this title. And that flat file design puts
| | 00:37 | all the database information into one single
table or list, and it still has fields that
| | 00:41 | represent all the different parameters; however,
there are some issues with flat file storage.
| | 00:46 | Flat file may contain many fields, often with
duplicated data that are often prone to database
| | 00:50 | corruption or confusion. If at some point
you decide to merge data between two flat
| | 00:55 | files, you will need to copy and paste the
relevant information from one file to another.
| | 01:00 | Spreadsheets are a common example of these
types of flat files. They store data in different
| | 01:04 | worksheets and often these different worksheets
contain similar or redundant data. A relational
| | 01:08 | database, however, incorporates multiple tables
with methods for those tables to work together.
| | 01:14 | The relationships between the table data can
be collated, merged, and displayed in database
| | 01:18 | layouts, all representing the stored data
accurately. FileMaker Pro is an example of
| | 01:24 | a relational database system that can store
the data just as easily as a spreadsheet,
| | 01:28 | but it has many different advantages for data
entry and integrity over its flat file counterparts.
| | 01:33 | To better understand the advantages of a database,
let's imagine the needs of two small companies
| | 01:37 | that take customer orders for their products.
Company A uses a couple of spreadsheets, the
| | 01:42 | ones that you see here on screen. We've got a
spreadsheet that they store customer information
| | 01:48 | and a separate spreadsheet where they store
order information. When a customer places
| | 01:52 | an order with this company, a new record or
row will be created in the order table.
| | 01:57 | Because Company A only has one table of data, all
the information pertaining to that order must
| | 02:02 | be put into a single record, so the Customer
First, Name, Last Name, OrderDate, and so on.
| | 02:06 | This means that the customer's general
information--in this case their First and
| | 02:10 | Last Name--is stored in the same record as
the order information. If a customer places
| | 02:15 | more than one order, then their general
information will need to be reentered and thus duplicated
| | 02:20 | for each order that they place. The name
Pamela Dreyfus is not only stored in the Customer
| | 02:25 | spreadsheet, but also on every row that represents
an order that it was ordered by Pamela Dreyfus.
| | 02:32 | Whenever there is duplicate data like this,
many inconsistencies may arise when users
| | 02:36 | are trying to query the database or search
for this type of data. Additionally, change
| | 02:40 | of customer information, like, for example,
if Pamela Dreyfus changed her last name, would
| | 02:45 | require the Database Manager to find all the
different records in the spreadsheet and then
| | 02:49 | manually change the last names. But conversely,
Company B in our example is much better off
| | 02:55 | with a relational FileMaker database. As you
see here, I have a relational FileMaker database
| | 03:01 | that stores customer information much like a
spreadsheet does, but also order information.
| | 03:06 | But instead of having to duplicate the data
every time I create a new customer record,
| | 03:10 | instead what I am going to do is just pull in
or link to data that's stored in a different table.
| | 03:14 | Each of the customers has one and only
one record of general information stored in
| | 03:18 | a table that's called Customers. Each
customer record is identified by a unique customer
| | 03:24 | code, and that will serve as a relational key.
When a customer orders from Company B,
| | 03:29 | their name is chosen from a list that
corresponds this unique key with the name of the customer
| | 03:34 | and then pulls in all the related information.
This way, if the email address changes for
| | 03:40 | one company, all you have to do is change it
back in this one record, and it will propagate
| | 03:43 | throughout the system to all the different
related orders. This approach to entering
| | 03:47 | data solves problems of duplicate data and
also the problems that come with changing
| | 03:51 | customer information. The Database Manager
needs the only change the data once in the
| | 03:56 | customer record if someone decides to update
their information. In addition, since the
| | 04:00 | relationships between the tables follow the
business logic of an organization using the
| | 04:04 | database, it makes tasks like sharing, retrieving,
or even reporting on the data much more easier,
| | 04:09 | stable, and efficient, while minimizing data
integrity errors. We are going to see various
| | 04:14 | different examples of this as we go throughout
the title, but it's important to know the
| | 04:17 | advantages of having your data stored inside
a FileMaker database, because your data is
| | 04:22 | then going to be related within the
different related database tables.
| | Collapse this transcript |
| Reviewing how FileMaker works| 00:01 | We have talked about why you would want to use
a relational database to manage your database
| | 00:04 | over the other flat file options, but I'd like
to show you a couple of reasons why FileMaker
| | 00:09 | Pro is such a great application for
developing those relational databases.
| | 00:13 | First off, you can see here onscreen that we can store
information or application much like we do with the spreadsheet
| | 00:18 | or other applications. I've got information here
on Customers, but I can also store information
| | 00:23 | on Products or Invoices or whatever other
information fits our needs. But in addition,
| | 00:32 | we can easily create new records, as you see
here, by just simply hitting this New Record
| | 00:35 | button on the top of the screen, or delete
records very easily from our database.
| | 00:41 | We can even search for records by going into
a certain Find mode and entering in some type
| | 00:46 | of search criteria--in this case, the State
of California--and within about a second,
| | 00:51 | FileMaker is going to show me all the
different records that match that criteria that are
| | 00:55 | stored inside my database. This is something
that's usually very challenging to do inside
| | 00:59 | flat file options. What's nice about FileMaker
is that it's a true relational database, meaning
| | 01:04 | that we can store related values throughout
the different tables. For example, here I
| | 01:08 | am in the Customer Record, but if I click
over to the Invoices Record, I can create
| | 01:12 | a new invoice allowing me to store all sorts
of different information about this invoice,
| | 01:18 | but most importantly, I can choose to link
data from the Customer table to this new Invoice
| | 01:23 | Record. This means I don't have to create
duplicate information in all of these fields here.
| | 01:28 | I can manage all of my customer information
just in the Customer table, but I can still
| | 01:31 | use it in the context of invoices if I need to.
And the database can have many different tables.
| | 01:36 | You will see in this case we have got
Customers, we have also got Products and
| | 01:40 | Invoices, and we're able to create custom
layouts in FileMaker that allow us to do things
| | 01:44 | like print these different views that we see
in the form of labels or any customized design
| | 01:49 | that we would like. So what's key about this
is that all these different tables can fit
| | 01:53 | into one single FileMaker file, making the
management very easy so that you don't have
| | 01:57 | files spread around in all different
locations that are storing all this different info.
| | 02:01 | In addition, FileMaker has all sorts of FileMaker
specific kind of cool functionality in here as well.
| | 02:07 | For example, you'll see when I click
on this tab here that it automatically pulls
| | 02:11 | the data from my web site field and FileMaker
has the ability to actually display an interactive
| | 02:17 | web site right here on screen. This way, users
don't have to leave FileMaker and go to another
| | 02:21 | application to be able to search around on
the web. The same is true for the information
| | 02:24 | that's stored inside of Address fields, for example.
I can have that displayed in a dynamic Google Map.
| | 02:29 | I don't have to go and search inside
of Google to display this map, it'll
| | 02:33 | automatically pull that data from the fields
that are being stored here. So in addition
| | 02:37 | to storing the data, FileMaker can actually
do some pretty cool things with it as well.
| | 02:41 | And also, you're not just limited to storing
text or number data inside of FileMaker, you
| | 02:45 | will see that we've got all sorts of different
types of fields, text, numbers, dates times,
| | 02:49 | we'll cover all that in the appropriate
chapters coming up in this title. But one I wanted
| | 02:54 | to show you here is a special type of a
field that's called the container. You see here
| | 02:57 | that this field can store an image file or
other types of media. For example, I can insert
| | 03:04 | a QuickTime movie and not only can I insert
the movie, but I can play the movie, and I
| | 03:13 | can share this with other users that have
access to this database. But the true strength
| | 03:18 | of FileMaker is that it provides the
ability to create a database very easily.
| | 03:21 | It's probably one of the easiest database creation
environments out there, then it also works the same on
| | 03:26 | both Windows and Mac. So this means that FileMaker
Pro users on the same network can access the
| | 03:31 | same database file simultaneously despite
the type of operating system that they're using.
| | 03:36 | And with the advanced Security model
that comes with FileMaker, each user can get
| | 03:40 | their own account which will help identify
these users allowing up to 250 concurrent
| | 03:45 | users at the same time to access your database
through the network. In addition, users can
| | 03:50 | not only access and share your database
through their own network, but also through the web.
| | 03:55 | You can publish your FileMaker databases to
the web using several different technologies
| | 03:59 | that are compatible with FileMaker databases
like instant web publishing or PHP if you've
| | 04:03 | heard of those. You can also share your databases
with other applications that are called ODBC
| | 04:09 | compliant applications, which allows you to
integrate data from your FileMaker databases
| | 04:14 | with data from other non-FileMaker data sources.
And not only can you store the information
| | 04:18 | and share it with other FileMaker users, but
FileMaker allows you to do things like export
| | 04:23 | data out of your FileMaker database in
various different formats. This way, if your users
| | 04:28 | don't have FileMaker, they can still share
the data that you're storing in your database.
| | 04:33 | You can also use more conventional methods
to share your data like saving records as
| | 04:37 | an Excel spreadsheet or as a PDF. We are
going to cover all of these in this title but for
| | 04:42 | those of you that have never worked with
FileMaker before and were thinking okay, what is this
| | 04:46 | thing that we are talking about? You get the
idea that it's a database, but what you've
| | 04:49 | really got here in FileMaker is the ability
to create a fully functional and powerful
| | 04:53 | software application using FileMaker Pro
without having to know anything about databases or
| | 04:58 | computer science or anything like that. By
the time you are done with this title, I assure
| | 05:02 | you that you will be able to create a FileMaker
Pro database, deploy them, share them with
| | 05:06 | people, even understand their limitations
and then build reports in other ways that
| | 05:10 | you can share the data with non-FileMaker
users. So let's get going with learning
| | 05:14 | a little bit more about this
great database application.
| | Collapse this transcript |
| Touring essential preferences| 00:00 | The very first time you launch FileMaker and
before you start actually working with the
| | 00:04 | product, it's probably a good idea to get
familiar with the different preferences that
| | 00:07 | are available to you. You can open up your
Preferences under the FileMaker Pro menu if
| | 00:11 | you're a Mac user, or if you're a Windows
user you'll find it at the bottom of your Edit menu.
| | 00:16 | When you open up Preferences, you'll see
that we have got five different tabs to choose from.
| | 00:21 | And I am just going to go through
a couple of different areas in these settings
| | 00:24 | to show you some of the ones that you will
probably use more often than others, and we'll
| | 00:27 | skip over some of the ones that you may
never use at all. So first, in the General tab,
| | 00:31 | you will see that we've got a couple of
default settings already chosen for us.
| | 00:35 | The first one we'll talk about is how you can choose
how many recently opened files you can look
| | 00:39 | at when you go under the File menu or in your
Quick Start screen. When turned on, the default
| | 00:44 | is 10. So really, if you work with a ton of
different database files then you might want
| | 00:48 | to increase that a little bit so that way
you don't have to go digging around on your
| | 00:51 | computer to try to find where all these files
are stored. The next option, Use Manage Database
| | 00:56 | dialog to create files is helpful when you
get into the inner workings of the database,
| | 01:00 | it's not set by default, but I am going
to suggest that you turn that one on.
| | 01:04 | There are various different dialogs that you will encounter
when you're working in FileMaker Pro and sometimes
| | 01:08 | you may increase the size of these by pulling
down the corner of the windows or moving them
| | 01:13 | to different positions onscreen and FileMaker
is going to remember those sizes. And if you
| | 01:18 | want to reset them back to their default positions,
you can just come here and press the Reset button.
| | 01:22 | Once you confirm, it will then reset
all the dialogs to their original sizes.
| | 01:28 | The other thing that you see here is something
called the User Name. This is the username
| | 01:32 | that FileMaker uses to identify which copy of
FileMaker you are using to access the database.
| | 01:37 | We'll talk about this in later movies, but
you should also keep in mind that whatever
| | 01:40 | name is shown here is also going to be the
default name that gets put into the Account
| | 01:45 | field when you log in to FileMaker. So if
you find that you or different users of your
| | 01:49 | database are confused by having to eliminate
the name that shows up inside the Account
| | 01:53 | field, you can go into this option here and
put Other and type in what their account name
| | 01:58 | might be instead. Again, remember that a User
Name is specific to every copy of FileMaker
| | 02:03 | installed on a computer, whereas the Account
Name that we'll talk about in later chapters
| | 02:08 | is the user that's logged into the database.
Next, on the Layout's tab, there's one option
| | 02:14 | here in the middle that's checked by
default that's called Add newly defined fields to
| | 02:18 | the current layout. What this means is that
when you define a field in your Manage Fields
| | 02:22 | dialog window, FileMaker is going to automatically
drop that field on the layout that you currently
| | 02:27 | have on screen. It's probably a good idea
when you're in the middle of creating new
| | 02:31 | files, but if you're just maintaining files
and not doing a lot of defining fields, then
| | 02:35 | you probably want to turn this option off.
So I am going to say keep this one checked
| | 02:38 | for right now, but you will find that after
a very short period of time, you are going
| | 02:41 | to want to turn this one off as you move
forward. You can skip over Memory and Plug-Ins for
| | 02:46 | right now and under the Fonts tab, the most
useful setting here is the ability to specify
| | 02:51 | the default font. However, you can leave it
as the default Helvetica option. So just like
| | 02:56 | with many other software applications,
Preferences are something that you probably want to check
| | 02:59 | out the first couple of times you open the
application and then really you can just leave
| | 03:03 | them set as you start to
work with it moving forward.
| | Collapse this transcript |
| Exploring the interface| 00:00 | Once you have FileMaker installed and you've
done a quick review of the Preferences, it's
| | 00:04 | now time to start working with the application.
And the first step is going to be to look
| | 00:08 | at the interface and get a little bit familiar
with these different modes that FileMaker uses.
| | 00:12 | So first, the Status toolbar. FileMaker 12,
this gray area cross the top the screen
| | 00:17 | is referred to as the Status toolbar area.
If you look in the upper left-hand corner
| | 00:22 | of the Status toolbar, you'll see there is
a book icon and a number with the dial and
| | 00:25 | a little circle there. Those have different
roles depending on the different modes which
| | 00:29 | I'll be introducing you to in a second.
But in Browse mode, which by the way, is the
| | 00:33 | default mode, and you can see which modes
you are in--by the way--by going under the
| | 00:37 | View menu. Browse mode is the default. Anytime
you open up the database, it will go to Browse
| | 00:41 | mode. Browse mode allows you to add new records,
delete records and edit existing records as well.
| | 00:47 | In Browse mode, in the upper left-hand corner,
the number that you see here indicates
| | 00:52 | the number of records that are in the table
that any given layout is based off of where
| | 00:56 | in a layout right now in FileMaker it
happens to be based on the Contact table.
| | 01:02 | So this tells us that there's one record inside of
the Contact table. If there were more records
| | 01:07 | in this database, we could use the book icon
to navigate back and forth to them, and when
| | 01:11 | we talk about the concept of finding records
in the database, later on in this title, you'll
| | 01:16 | see that this number will split to show us
how many records are in a found set versus
| | 01:19 | how many overall are stored inside a table,
and we'll talk about that more in the Finding
| | 01:23 | Records chapter. Also in Browse mode, you
will notice that you have a series of buttons
| | 01:27 | across the top of the screen. All these buttons
also reflect functionality that can be found
| | 01:32 | in some of the menus. So for example, on the
Records menu, you see there's a New Record
| | 01:36 | which also has a corresponding shortcut key.
There is also Delete Record, and you will
| | 01:41 | see that those are also buttons in the Status
toolbar area. And you'll notice that if you
| | 01:45 | go under View to Customize toolbar, you have
the ability to add or remove the buttons that
| | 01:51 | you see in the toolbar and customize it for
your liking. You will notice that some of
| | 01:55 | the other buttons that you see onscreen here,
like for instance, Print. If I drag that up
| | 01:59 | into the toolbar area, you will see that it
will add that there, and I can say Done.
| | 02:02 | But also if I drag it and release it, you see
that little puff of smoke icon indicates that
| | 02:06 | it's been removed from the toolbar. It's the
same dragging and dropping that you will see
| | 02:10 | on both Mac and Windows, but the puff of
smoke animation is particular just to Mac OS X.
| | 02:15 | Now, if you want to just show icons or text
only or whatever it is you can see the different
| | 02:21 | ways that this will look under the Show icon.
You can also use a small size if necessary.
| | 02:27 | And keep in mind that any customizations
that you do, won't travel with the database for
| | 02:31 | all the different users, but they're really
specific just to your copy of FileMaker Pro.
| | 02:35 | In addition, you will see that there's a bar
below the Status area that's called the Layout
| | 02:40 | bar, and its main role as you see here is
to help you navigate from layout to layout.
| | 02:46 | If you click this dropdown, you'll see a list
of all the layouts that have been set up to
| | 02:50 | be visible to the user in this dropdown. So
here I can navigate from one layout to another
| | 02:55 | if I'd like to, and that plays different roles
in different modes as well and then each layout
| | 03:01 | has a different view option. You can see these
options also under the View menu right here.
| | 03:06 | You have three options, Form, List, and Table.
What we are looking at right now is a layout
| | 03:11 | viewing as a form which means that only one
record can be seen at a time. You will notice
| | 03:16 | that we can't scroll down to other records.
If we were to go and create one, we see that
| | 03:20 | only one record at a time is visible onscreen.
That's called viewing as a form, and that's
| | 03:25 | very customary when you're doing a detail
or a data entry layout, for example, the one
| | 03:29 | that you are seeing onscreen. The other
option is to view as a list which if we make this
| | 03:35 | layout view as a list, you'll see that we
can then scroll from record to record, but
| | 03:39 | the layout really wasn't designed to view
more than one record at a time, so really
| | 03:43 | something like the Contacts layout which this
one is a list, and we can tell that because
| | 03:49 | we see that it has more than one record onscreen
at a time. When you create a layout in FileMaker,
| | 03:54 | it's best to either choose it to be a Form
View or a List View so that there's no confusion
| | 03:59 | to your users about how they are supposed
to operate. The third option is Table View
| | 04:03 | which allows you to view your records onscreen
in a spreadsheet like view. We'll be talking
| | 04:08 | more about this in an upcoming movie. We'll
switch this back to List View. But the other
| | 04:12 | thing I wanted to share with you was under
the View menu, you see there are these four
| | 04:15 | things up on top. I talked about this idea
of a Browse mode, and this is a mode where
| | 04:20 | users are able to interface with your records,
add, edit records, delete, that type of thing.
| | 04:26 | But there are also three other modes that I
want to make you aware of. You can navigate
| | 04:29 | back and forth to them under the View menu
or using the quick keys, but also if you look
| | 04:33 | here, you'll notice that we've got this button
called Preview. When I click Preview, I've
| | 04:38 | now entered Preview mode and Preview mode
is set up inside FileMaker so that you can
| | 04:43 | see what your layouts will look like if you
were to print them. So you can see that there
| | 04:47 | are page margins added around the perimeter
of the document, and you can see where maybe
| | 04:51 | your layouts will cut off. This is intended
really just to be a print preview, but in
| | 04:56 | addition to being able to print and manipulate
some of the print settings, you can see here
| | 05:00 | you can do Page Setup, change things to a
different view to see if we get more room
| | 05:06 | and also changing print drivers, we have the
ability to do so here. Not only can you manipulate
| | 05:12 | the print settings, but also you could choose
to save this as Excel or save as PDF.
| | 05:17 | So in the case of saving a document as PDF, it's
going to create a digital PDF version of whatever
| | 05:22 | you're seeing onscreen with the same margins and
limitations that you are seeing in Preview mode.
| | 05:26 | Save as Excel is a little bit different
in that it's just going to save something
| | 05:30 | that looks similar to this layout in Table
View without all the formatting. So if we
| | 05:34 | get out of Preview mode here by hitting
Exit Preview, you will see we have got another
| | 05:38 | button over here on the far right that's
called Edit Layout. And when we click Edit Layout
| | 05:42 | what it does is it takes us into what's called
Layout mode which is one of the other modes,
| | 05:47 | and you'll notice that we've got all sorts of
tools onscreen, and that in the upper left-hand
| | 05:52 | corner, we see that that book icon and numbers
have now changed. When you're in Layout mode,
| | 05:57 | it's no longer showing you the number of
records in a table, but instead it's showing you the
| | 06:00 | number of layouts in the database. So you can
see you can use the book icon or the slider
| | 06:05 | to navigate to the different layouts, and
as you go from layout to layout you'll see
| | 06:09 | that you see sort of under the hood what's
going on here. You see that you have got fields
| | 06:14 | set up and placed on the layouts, you have
got all sorts of different layout objects
| | 06:17 | that are available to you, all of which
we'll be covering later on in the title.
| | 06:21 | But you'll also notice that you have got this thing
called the Inspector and the Inspector allows you
| | 06:25 | to manipulate the way things look and some
of the preferences for some of the objects
| | 06:29 | that you see onscreen. In addition, you
will notice that you have got additional tools
| | 06:32 | available to you in Layout mode. By default,
you have got the pointer which allows you
| | 06:36 | to select and move different elements around
onscreen, but you have also got a whole series
| | 06:40 | of other tools for drawing lines, shapes and
inserting various different layout tools all
| | 06:46 | of which we'll cover in the Layout chapters.
Layout mode isn't intended to be available
| | 06:51 | to all users. Using FileMaker's built-in security,
you can lock down Layout mode, so it's only
| | 06:56 | available to certain administrative users
if you like. But this is where you do all
| | 07:00 | the changes and build all of your layouts from
scratch if you'd like to or modify existing ones.
| | 07:04 | You'll also see in Layout mode that
there's another bar. In the Layout toolbar,
| | 07:09 | you see that you have got some additional
options here. If you hit this little Aa button,
| | 07:13 | you see that you get the Formatting bar which
is the third component of the Status toolbar area.
| | 07:17 | That allows you to choose different
things onscreen and manipulate their text
| | 07:22 | if you'd like to, the formatting, the size,
and even the alignment. And finally, if you
| | 07:27 | go into Find mode--I'll say don't save the
changes that I made--you will notice that
| | 07:33 | it's whatever layout that you're on. In this
particular case, it's the Contact Details,
| | 07:37 | and it's given us a blank screen, and what
it's really waiting for us to do is enter
| | 07:41 | in some information or search criteria. We'll
talk more about this when we get into finding
| | 07:47 | records, but basically this is a mode that's
dedicated to allowing you to be able to enter
| | 07:52 | search criteria and retrieve data in your
database, and you'll notice that after you
| | 07:56 | perform a search, it takes you back to Browse
mode. So Find mode is just a temporary mode.
| | 08:02 | So now that we are familiar with what everything
is called onscreen and where we can find them,
| | 08:06 | it's time to start using some of these
tools to create FileMaker databases.
| | Collapse this transcript |
|
|
2. Database Creation EssentialsCreating databases from templates| 00:00 | Once you become familiar with the FileMaker
application and how it's set up, there's a
| | 00:04 | couple different ways that you can start
creating databases. Of course, you can create them
| | 00:08 | by scratch, which we will be talking about
for the remainder of this title, but there
| | 00:11 | are also a couple different ways to get a
quicker start. You will notice when you first
| | 00:14 | open the FileMaker application that you have
got some options over here on the left that
| | 00:18 | allow you to either Create a New Database
and start from scratch or Convert Existing
| | 00:23 | Files or use that's called a Starter Solution.
You can select the Use a Starter Solution
| | 00:27 | from the Quick Start screen or when you are
already in FileMaker you can go under the
| | 00:31 | File menu and choose New From Starter Solution.
FileMaker updated its Starter Solution viewer
| | 00:37 | window in FileMaker 12, and it lists all the
different Starter Solutions that are available
| | 00:41 | to you, and you will see that they are also
grouped logically in sort of business units,
| | 00:45 | for instance, of the 16 here are the ones
that are General, ones that are related to
| | 00:48 | People & Assets, and so on. But if you're
looking at All Solutions, you can scroll through
| | 00:54 | these and they're pretty self-explanatory
for the most part. You'll see, for example,
| | 00:59 | if you choose the Contacts option and then
hit Choose, it's going to ask you where you
| | 01:04 | would like to save this. We will hit Save,
and now it opens up the Starter Solution.
| | 01:09 | So the first thing you will notice is that
there's really not much development that's
| | 01:12 | necessary, the layouts are already created.
If you take a peek into the Database you will
| | 01:18 | see that there's a contact Table and a series
of Fields. So a lot of this stuff is already
| | 01:22 | programmed for you, there are some routines
and Scripts already built-in. And it's ready
| | 01:27 | to start creating new data. You can hit New Record
and instantly start working with the Database.
| | 01:33 | But more importantly you should know
that in addition to being able to add
| | 01:35 | your own data to the Database, you can also go
into Layout mode and manipulate the database,
| | 01:40 | change some of the fields and the way things
look and really customize it for exactly how
| | 01:44 | you need it go look. So you don't have to
just settle on the way that they're built
| | 01:48 | already for you, the idea is you can tell
by their name is that these are intended to
| | 01:52 | get you started. And the Starter Solutions are
also a great way for you to see how different
| | 01:56 | functionality works. Like, for example, here
is something that's called Web Viewer, and
| | 02:00 | it displays the addresses that are listed
in these fields. And this is a great way for
| | 02:04 | you to see how these Web Viewers actually
work. But also you'll see that there are some
| | 02:08 | layouts that are pre-built. You will notice
that in each of the Starter Solutions they've
| | 02:12 | got iPad and iPhone layouts already created.
Each of these layouts conform to Apple's touch
| | 02:19 | screen guidelines, so making things like
buttons and some of the touch areas larger so that
| | 02:24 | they'll be ready to be viewed on any device
without any modification whatsoever. So in
| | 02:28 | addition to being able to work with the data
or add your own data you'll also be able to
| | 02:31 | view this information on the various
different Apple devices. One thing I should mention
| | 02:35 | about Starter Solutions is that if you happen
to be using a 30-day trial version of FileMaker,
| | 02:40 | keep in mind that that's just a 30-day trial
for the application. The Databases that you
| | 02:44 | create or the Starter Solutions that you create
and modify, they don't have a 30-day limit on them.
| | 02:48 | So feel free to go ahead and poke
through all the different Starter Solutions
| | 02:52 | in the Starter Solution Viewer and see if
there's maybe something that's already built
| | 02:56 | in here, and that'll let you get started as
quickly as possible. Starter Solutions are
| | 03:00 | a great way to get familiar with FileMaker
without having to do any programming.
| | 03:03 | So I encourage you to go ahead and take a look
at a couple of different ones, download them,
| | 03:06 | and play around and see
which one suits you best.
| | Collapse this transcript |
| Creating new databases in spreadsheet format| 00:00 | Certainly the easiest way to create a fully
functional database right of the box is by
| | 00:04 | using a Starter Solution, like we talked
about in the previous movie. But if you want to
| | 00:08 | create a FileMaker Database that already
contains data or if you've got data that's in another
| | 00:12 | file format and just want to start working
with it in FileMaker Pro, then the best way
| | 00:17 | to work with it is to convert an
existing file into a FileMaker Database.
| | 00:21 | There's a couple of different ways that you can get
this functionality. If you happen to have the
| | 00:24 | Quick Start Screen open you can click on
Convert an Existing File, but otherwise if you are
| | 00:28 | already in FileMaker you can simply go to
the File > Open option, and then you'll see
| | 00:34 | that on the bottom left-hand corner there
is the option here to show which types of files.
| | 00:39 | Of course, this is what the Mac option
looks like, the Windows option is similar,
| | 00:43 | they both have dropdowns. And you will see
that by default it's set to open up other
| | 00:46 | FileMaker Files, but you will also notice
that you can open up files that have formats
| | 00:50 | that are either tab, comma separated text
files, merged files, both different generations
| | 00:56 | of Excel documents and even import from other
sources, for example, like a Bento Data Source.
| | 01:02 | In this case we are going to choose an
Excel workbook, and now that we see that we are
| | 01:06 | able to choose the file that I have in our
exercise files which is a spreadsheet.
| | 01:10 | I hit Open, and now FileMaker recognizes that it's
a spreadsheet, and because it is it asks us
| | 01:16 | what we want to do with the first row of data.
It's common in spreadsheets that you would
| | 01:19 | use the first row of data as column headers.
So those are what FileMaker could easily use
| | 01:24 | to identify what the different columns are
and they are for attributes. And it can then
| | 01:28 | convert those in the field names. So we are
going to choose the Field names option because
| | 01:32 | that first row is a column header, and I hit
OK, and now it asks us where we want to save
| | 01:37 | the database, and as you see it creates a
FileMaker Database for us, it creates two
| | 01:43 | different layouts. One layout is the Detail
view that shows all the different fields that
| | 01:47 | were created in a sort of data entry
looking view for us that's set to View As a form.
| | 01:52 | And then the other option is the Table view
which should look familiar because this looks
| | 01:56 | just like the spreadsheet that we'd converted.
And also you'll notice that all of the records
| | 02:01 | came over from a spreadsheet, in this case
there were 653 records, and you'll also notice
| | 02:06 | if we go to File > Manage > Database that
it has created a table and all the fields
| | 02:11 | are defined and not only are they defined, but
whatever characteristics they had as a cell
| | 02:15 | in the spreadsheet have carried over into
the FileMaker Database. Once you've converted
| | 02:20 | your spreadsheets into a FileMaker Database,
of course, you can start building an entire
| | 02:23 | database around them, but some of the stuff
that you can do right on screen immediately
| | 02:28 | is manipulate some of the data that you see
here. From this layout I can actually start
| | 02:32 | adding new records. I can either do that from
the New Record button on the top of the screen,
| | 02:36 | or if you scroll all way down to the end
you'll notice that the very last row has the plus
| | 02:40 | button next to it. And by hitting that button, I
can go in and I can enter some test information.
| | 02:46 | Also, I can modify some of the fields that
are already on screen by hovering over the
| | 02:51 | Column header, and you'll notice that this
little arrow appears. The arrow let's me do
| | 02:55 | things like Sort the values by Ascending or
Descending or by a Custom list. And you'll
| | 03:00 | also notice that on the very bottom I have
the ability to change the Field Type, so if
| | 03:04 | this wasn't a text, I could change it to some
of the other field types. Also when I click
| | 03:09 | the Field Options it will pop-up the Field
Options that we are going to go through in
| | 03:13 | a later chapter, but all easily accessible
to you while you're still in Table view. I
| | 03:18 | can also actually add New Fields if I'd like
to, you will see there's a plus button here
| | 03:21 | in the column, pressing the plus button
gives me a blank column header, where I can add
| | 03:27 | the name of the field, and when I click
outside the screen, it's now saved that field to the
| | 03:32 | database, so it's helped me to find a field
without even having to go into the File menu.
| | 03:36 | And now when I select the dropdown, you'll
see that there is an option on very bottom
| | 03:40 | call Table view, which allows me to modify
some of the things that I am seeing on screen.
| | 03:45 | So here I could turn off the New Field I
created if I wanted to, or I could even move it in a
| | 03:50 | different order based on however it is that
want this to look. And here I can also add
| | 03:54 | a New Field. If I don't see a field in the
table, I can go down to Manage Database and
| | 03:59 | Add a New Field that way as well. If you're
used to working with spreadsheets or if you
| | 04:03 | have a spreadsheet that you have been using
all this time, you can open it up in FileMaker
| | 04:07 | Pro, which will of course convert it into a
FileMaker Database for you. It's the easiest
| | 04:10 | way to move from a spreadsheet into FileMaker
Pro, and from there you can then use a Quick
| | 04:15 | Table View, which should be familiar to you
if you're already working with spreadsheets.
| | 04:18 | And this allows you to add new fields to your
database and start creating your first FileMaker
| | 04:22 | Database from just experience that
you already have using a spreadsheet.
| | Collapse this transcript |
| Adding tables by importing| 00:00 | You see the database that I have got on screen
is actually a FileMaker Database, but we created
| | 00:04 | it by converting a spreadsheet. And what it's
done for us is not only bring in the 653 records
| | 00:10 | that were rows inside of our original spreadsheet,
but as you see when we go to File > Manage >
| | 00:15 | Database that it's brought in different
things called Fields. In FileMaker a column
| | 00:21 | or an attribute is represented as something
that's called a Field. So you see it's already
| | 00:25 | defined those fields for us, but you will
notice over here in this left-hand tab there
| | 00:29 | is something called Tables. A Table is
something that we are going to be talking about quite
| | 00:33 | a bit in the upcoming movie, but in short,
a table is part of the database, and it's
| | 00:37 | the part that stores different types of data.
A FileMaker Database can have unlimited amounts
| | 00:42 | of tables, so in this case what we have
gotten is Itinerary data. So since Itinerary data
| | 00:47 | can have its own attributes. It's got its
own Table so that we can define those Fields
| | 00:51 | within the table and then store the data independently.
But we also add new tables to the database,
| | 00:56 | we can do so by simply adding a Table Name
and hitting Create, but what I am going to
| | 01:00 | show you in this case is the way that you
can import in another data source that will
| | 01:05 | create a new table and allow us to work with
the data all in one Database file. I am going
| | 01:09 | to hit Cancel and go under File, to this
option here called Import Records. When I choose
| | 01:15 | the File Option you'll see that we can
navigate over to the exercise files 02_03.
| | 01:20 | Instead of a Spreadsheet this time I am going to
choose a text file. And that's another one of the
| | 01:26 | conversion formats that are compatible with
FileMaker. So I hit Open, this new file presents
| | 01:32 | an import field mapping. I am not actually
going to import data into an existing table,
| | 01:35 | we will cover that in later chapters. But
what I am going to do is use this tool to
| | 01:39 | create a new table. So here you see in the
option when I pull down the dropdown in the
| | 01:44 | upper right-hand corner I can choose the New
Table, and then in parenthesis it says Adventures.
| | 01:49 | It's getting that name from the name of
the text file that I'm importing from,
| | 01:52 | so that's what it's going to name our New Table.
So I say let's go ahead and Import, which will
| | 01:57 | also--by the way--add new records. So now
I say Import, and it told me that it's not
| | 02:01 | only created a New Table but that it's also
imported in the 11 records that were in the table.
| | 02:07 | So now you will notice when I go in to
File > Manage > Database, I've got two
| | 02:11 | tables: this one has various fields defined,
and you'll notice that these fields don't
| | 02:16 | necessarily have Names. So one of the things
that we can do if we would like, is Import
| | 02:21 | those again, this time saying Import > File >
Adventures, Open, and all we have to do
| | 02:31 | in this case is just say don't import the
first record. We will say New Table.
| | 02:36 | And then this time what it's doing is it is not
importing the first record in this text file which was
| | 02:39 | just blank, but instead what it's doing is
it's giving us actual names which are great
| | 02:44 | field names for our database. So now we say
Import we see we've got now just 10 records.
| | 02:50 | And a table was created, all the fields are
defined, and all the different data was brought
| | 02:54 | over for us. Now without actually having to
program anything, we've got two different
| | 02:58 | tables in our database, and we can even
start linking these things together so that they
| | 03:02 | can share data with each other. Adding tables
from various data sources is a fast and easy
| | 03:06 | way to get Tables, Fields, and Data
into your new FileMaker Database.
| | Collapse this transcript |
|
|
3. Creating TablesDetermining which tables your solutions will need| 00:00 | There are a couple of different methods that
you can use to create a FileMaker Pro database,
| | 00:04 | first of which would be to use some of the
Templates or Starter Solutions that we discussed
| | 00:07 | in the previous movie. And in that way you
can just go ahead make some modifications,
| | 00:11 | add some data, and you're ready to roll. But
the other option which is a lot more common
| | 00:14 | when using FileMaker is to create your databases
from scratch or to build all of the components
| | 00:19 | from the ground up. In order to build the
database from scratch, you need to first make
| | 00:22 | some decisions about what type of information
or data is going to be stored within those databases.
| | 00:27 | So the first thing that you are going
to have to determine is what types of
| | 00:30 | tables you are going to have to use in the
database. But let's back up for a second.
| | 00:33 | What is a Table? A Table is a container within
your database that stores data. And if you
| | 00:39 | remember, a database is like a big bucket
of information that can store all sorts of data.
| | 00:43 | That's one of its key roles is to actually
do the storing, but you can have different
| | 00:47 | types of data within one database. So in
that case you want to make sure that within the
| | 00:51 | database you've got the proper places to store
these different types of data. These locations
| | 00:56 | for storing data are what are called Tables.
And you will create one table for every entity.
| | 01:01 | Now an entity is a term that really just stands
for a single person, place, or thing, or really
| | 01:07 | it's something for which you can actually
store data. The best way to look at an entity
| | 01:11 | though is just, an entity is a group of information
for which you can store information, or its
| | 01:15 | information that can be described. So if you
have multiple different types of data that
| | 01:20 | you are going to store in the database, each one
of them needs to have its own little mini-bucket
| | 01:24 | to be stored. These smaller storage areas
are what we call Tables, and a database can
| | 01:28 | have an unlimited amount of them to find
within each FileMaker database. Each of the Tables
| | 01:32 | will represent an entity, so some examples of
what an entity might be would be, for example,
| | 01:37 | let's say you have a database and you want
to store customers and products and invoices in it.
| | 01:41 | Each of those are different types of
information, and let's say customer name.
| | 01:45 | That only describes a customer, it doesn't
describe a product. And a product skew number
| | 01:49 | only describes a product and not a customer.
So it looks like we can't define a field in
| | 01:53 | one table that would describe both of those things.
So the solution there is we know that we need
| | 01:57 | to have two different tables within our database,
one for customers and one for products.
| | 02:02 | But how do we determine which tables we are going
to need? Well, a very important note here
| | 02:05 | is that when you sit down at a computer and
open a FileMaker to start creating a New Database,
| | 02:09 | what you are actually doing is constructing
something. Like any other construction project
| | 02:13 | that you embark on--like let's say building a
home--your Database will proceed more smoothly
| | 02:18 | if you first begin with some type of plan. So
the very first part of any plan when you're
| | 02:21 | developing a database is to determine what
types of information you are going to storing
| | 02:26 | inside the database. So the first thing you
really want to do even before you open up
| | 02:29 | FileMaker Pro is to come up with a plan, what
type of data that you are going to be managing
| | 02:33 | in your system. And therefore that will
tell you what tables you are going to need.
| | 02:36 | So you are going to want to first take a few
minutes at the very least, look at the data
| | 02:40 | and literally sketch out what types of
information you plan to manage in the database.
| | 02:43 | So for example, I might be looking at the database
that I was just mentioning earlier and think,
| | 02:48 | okay, well, I've got customers, I have got
products, but then also I want customers to
| | 02:52 | buy products, so we might want to have another
invoices table. So these are discreet and
| | 02:57 | unique different types of data, there are
groups of data that I can track, and that
| | 03:01 | can be described in something that I want
to manage, but they are independent of each
| | 03:04 | other at the same time. So in this kind of
standard invoicing system where the customer
| | 03:09 | is ordering products and creating invoices
results, we can see that I've got a least
| | 03:13 | three different tables here. So I will start
off by sketching out Customers, Invoices, and
| | 03:17 | Products as my starting tables. So you see
that we have determined that we're going to
| | 03:21 | have different types of groups of information
in one single database file, Customers, Invoices,
| | 03:25 | and Products, but what we've really done is
created a list that tells us what tables we
| | 03:29 | are going to need to define
inside of our new FileMaker Database.
| | Collapse this transcript |
| Creating tables in the Managing Tables window| 00:00 | In the previous movie we determined that we
needed a Customer table, an Invoices table,
| | 00:05 | and a Products table in our new FileMaker
Database. So now in this movie we are going
| | 00:09 | to talk about how I'll actually add these
tables to our database. Creating a FileMaker
| | 00:13 | database from scratch can start in either the
location that you see in the upper left-hand
| | 00:16 | corner on your FileMaker Quick Start Screen,
or if you are already in FileMaker Pro you
| | 00:20 | can go to the File > New Database option.
And the first thing that you are going to
| | 00:24 | see is that FileMaker is asking you to name
your new database file. So we are just going
| | 00:27 | to leave it as a default name of Untitled,
save it to the Desktop. And you see that new
| | 00:32 | file has been created, and that FileMaker
opens up into Browse mode, allowing us to create
| | 00:37 | new fields. But what we are going to do go
on to the File menu to Manage > Database, and
| | 00:43 | this is really the area where you are going
to do all of your programming, creating tables
| | 00:46 | and fields and even relating these tables
together. But the first thing that we notice
| | 00:50 | is that it opens up to the Tables tab, and
we see that we already have one table listed.
| | 00:56 | Notice that FileMaker has adopted the name
that we gave to the file--in this case the
| | 01:00 | word Untitled--and has named the initial table that.
It's suppose to be a convenient helper tool
| | 01:05 | here for you, but really what you are going
to end up doing is going in and changing the
| | 01:08 | name of the table to something that
actually matches one of the entities that you have
| | 01:13 | determined in your previous exercise.
So here let's call this one Customers.
| | 01:17 | After I've selected the Table Name and changed it,
I can hit the word Change, and after hitting the
| | 01:22 | Change button I see that I've got the word
Customers now. So we've got three total tables
| | 01:26 | that we are going to add to our database.
The second of which is going to be the Invoice
| | 01:30 | table, and I just simply add the word Invoice,
hit the word Create, and now I have got two
| | 01:35 | tables. So we can keep doing this for every
table that we've got in our database, but
| | 01:39 | before I add a Products table--which is the
third one we determined we needed--I am going
| | 01:43 | to hit OK to close this window, and I am
going go under File > Import, and I am going to
| | 01:48 | hit File again. Now in this case I already
happen to have a Database setup that contains
| | 01:53 | all my products. So let's say on this new
project I want to bring all the information
| | 01:57 | together in one file, but instead of having
to create a table and define all the fields
| | 02:02 | and import all the data, since I have already
got it in another FileMaker file or some other
| | 02:05 | type of file, I am just going to import it
in as a new table. So I am going to a select
| | 02:09 | Products, hit Open and then instead of
importing data in, I am going to choose the table that
| | 02:15 | I want to import--which is Products--and then
I am going to choose the New Table Products
| | 02:20 | option, and we see here is all the different
fields that are going to created in my new database.
| | 02:23 | So now I hit Import, and it tells me
that the 41 records have been imported
| | 02:30 | in, as we see here, I can see the data in
the background, and there are no errors, and
| | 02:35 | it created a table called Products, so now
I go to File > Manage again, and I see now
| | 02:40 | that the three tables that we wanted to
define in our database based on the entities that
| | 02:44 | we had come up with earlier are now created,
and in the case of Products, I don't have
| | 02:48 | decreed any fields or add any records,
because I've imported all that information in when
| | 02:52 | I created the New Table. Now that we have
created the tables that we determined that
| | 02:56 | we needed based on our entity list, we can
then create different fields within these
| | 03:00 | tables, and since I have multiple tables
within the file, I can also create Relationships
| | 03:04 | between these tables. But the first thing
that we want to do to set up the foundation
| | 03:08 | is to determine the tables that we need and
define those within our FileMaker Database.
| | Collapse this transcript |
|
|
4. Creating RelationshipsUnderstanding relationship types| 00:00 | So far in the process for developing our new
FileMaker Database, we've talked about the
| | 00:04 | concept of tables. We know that these tables
are going to be independent little buckets
| | 00:09 | where we can store different groups of information.
And it's really important to understand the
| | 00:13 | different groups of information that we are
storing in our database and then more importantly,
| | 00:17 | to understand how those groups of information
relate to each other. And that's referred
| | 00:21 | to as the concept of relationships in Databases. I
am going to discuss the concepts of relationships
| | 00:26 | throughout this chapter and throughout the rest
of the title, but understand that relationships
| | 00:30 | can get complex pretty quickly. We are going
to keep it really simple here, and I'm going
| | 00:33 | to touch on all the points that you need to
be aware of, but I strongly recommend that
| | 00:37 | you go check out the title on lynda.com
online training library called Relational Database
| | 00:42 | Design with FileMaker Pro. In that title I
take all sorts of extra time to discuss these
| | 00:47 | concepts and dig a lot deeper than we are able
to do here. When we talk about Relationships
| | 00:51 | in Database terms, we are talking specifically
about how different tables are related to
| | 00:54 | each other and how the relationships between
those tables really define the data that's
| | 00:58 | stored inside the Database. So in order to
decide the data model for your Database system,
| | 01:04 | it's important to first determine what are
the possible kinds of connections that we
| | 01:07 | could have between our databases and then we
can choose from those types of connections
| | 01:11 | or relationships to determine which ones we
actually have. So in this movie we are going
| | 01:15 | to quickly review the different types of
relationships, and I'll give an explanation of each.
| | 01:19 | And to keep things simple, we are going to focus on
the three types of relationships that account
| | 01:22 | for all the situations that you will encounter
within your database. The first one, called
| | 01:26 | one-to-one relationship, is very rare. And
what it usually means is that you've mistakenly
| | 01:30 | created a second table for something that
should actually just be a field. So for example,
| | 01:35 | you see that I've got two boxes on screen,
and each box represents a potential table
| | 01:39 | in our database, so the one on the left, I
am storing all my customer information, and
| | 01:43 | on the one on the right, I have determined
that I want to store address information.
| | 01:46 | I've mistakenly determined that that might
be its own entity, but after evaluating the
| | 01:51 | relationship between a customer and addresses,
I realized that one customer can only have
| | 01:56 | one address. So in that case that's defined
as a one-to-one relationship. So we don't
| | 02:01 | need two separate tables to store all this
information, instead what we can do is define
| | 02:06 | all of the fields that we are going to put in
the address table into the original customer
| | 02:09 | table, and we are left with only one field.
So if you are going through this process and
| | 02:13 | evaluating the different relationships that
you've got, and you find out that you have
| | 02:16 | got a one-to-one, you will take a look at
and determine that this needs to be combined
| | 02:20 | together in one table, pick the one table
and then define all the fields in that one.
| | 02:24 | But the main relationships that you will
want to be familiar with are the ones that are
| | 02:27 | called one-to-many relationships. These indicate
that one parent table is related to many records
| | 02:33 | in a child table, this is terminology that I
am going to use throughout the discussions
| | 02:37 | on relationship, so if you look here on screen
we see the we've got a customer table again,
| | 02:41 | but this time we have got the invoices table.
And what we have determined is that one customer
| | 02:45 | can have many invoices, but that any one
invoice is only related to one customer.
| | 02:50 | So that's a prime example of a one-to-many where the
customer is the one and the invoices are the many.
| | 02:56 | You will notice the line and the hash mark
between the two boxes, that is when you're
| | 02:59 | sketching these things out, that's a customary
way to indicate the one on the single hash
| | 03:04 | side and the many on the double. Anytime you
have one-to-many, decide that's determined
| | 03:08 | the one, in this case customer is referred
to as the parent table and the table on the
| | 03:12 | side of the many is referred to as the child
table. And this vernacular is common in data
| | 03:17 | modeling, so I will be using that quite a bit
throughout this title. You may also encounter
| | 03:20 | relationships that are called many-to-many
relationships, and these ultimately need to
| | 03:24 | be eliminated. And the way that you eliminate
these is by creating a third table, but first
| | 03:29 | let's talk about why. You will notice that
we've got invoices and products now on screen,
| | 03:33 | and when we evaluate the relationship
between the two of these, we see that one invoice
| | 03:37 | could have many products on it, but at the
same time a product could have many invoices.
| | 03:41 | We see that that's displayed here with the
double hash, this is just a convention that
| | 03:44 | you can use when you're making note of these
things, but many-to-many relationships are
| | 03:49 | problematic, and I will go into talking about
that more in later chapters. Now the way that
| | 03:52 | you will know that you're done with data
modeling portion of your database is because you've
| | 03:56 | evaluated all the possible relationships
between your tables, and you've determined that all
| | 04:00 | that are left are the one-to-many relationships,
so no one-to-one relationships, no many-to-many
| | 04:05 | relationships, but they should
all be resolved as one-to-many.
| | Collapse this transcript |
| Diagramming relationships with ER diagrams| 00:00 | So far in the process of creating a database,
we've learned that we have to determine what
| | 00:04 | tables we are going to need in our database.
Then we understand that since we can potentially
| | 00:08 | have multiple tables in one database, we need
to evaluate what kind of relationships those
| | 00:12 | tables are going to have with each other.
Understanding now that there are three different
| | 00:16 | relationship types, say one-to-one, a one-to-many
and many-to-many, it's time to now create
| | 00:21 | a diagram of all the tables that we are going
to have and then how they're related to each other.
| | 00:25 | This will help us set up the relationships
inside the FileMaker Database when we are
| | 00:29 | ready to start creating the database. In this
movie I am going to expand on these techniques,
| | 00:33 | and we are going to learn a general method
for diagramming database systems, and it's
| | 00:36 | called the creating an Entity Relationship
Diagram, commonly referred to as an ERD.
| | 00:42 | ERD modeling breaks into three phases, first,
we develop a list of entities or tables that
| | 00:47 | belong in the data model. We then determine
in diagram the relationships between those
| | 00:52 | entities, which is what we are going to focus on
here, and we review the diagram for correctness
| | 00:56 | and consistency. This is the step where we
are going to eliminate things like one-to-one
| | 01:00 | relationships and many-to-many relationships.
In the example database that we've been talking
| | 01:04 | about thus far, we have the basic system
where we want to manage invoices. So each invoice
| | 01:09 | will belong to a customer, and that invoice
could have different products on it.
| | 01:13 | So we are going to focus on this as sort of our
sample database, not only in this movie, but
| | 01:17 | moving forward in the chapter. So the first
thing that we want to do is determine what
| | 01:21 | might be the possible tables. It's important
to organize the information into its own buckets,
| | 01:25 | and we can use this as a guide for creating
tables in their table relationships.
| | 01:29 | One thing that I like to do when looking for entities
in any kind of description like we have here
| | 01:33 | is to look for nouns. And if I do so, I can see
that I've got invoices, I have got customers,
| | 01:38 | and I've got products. And there might be
some other tables as well. So from this exercise
| | 01:43 | we've determined that we need a customer table,
an invoice table, and a products table.
| | 01:47 | So now I have my list which will ultimately become
tables that we are to find in the system.
| | 01:52 | However just identifying the potential tables
is only half the task. We must now determine
| | 01:56 | how these tables may be related to each
other before we can actually define them in the
| | 02:00 | FileMaker Database. Now that we have this
list we can start determining the relationships
| | 02:04 | between these tables, and we can really
begin anywhere. And this is also in the process
| | 02:08 | where we are going to want to create one of
these ERDs, or Entity Relationship Diagrams.
| | 02:12 | You don't need of custom software or anything
like that to do this, you can just get a pen
| | 02:15 | and paper, and then you can just kind of
sketch these down. Before we do this I want to show
| | 02:18 | you how tables or entities are represented on
an ERD. In ERD, it's customary to represent
| | 02:24 | your entities as a box with the entity name
inside of it. These will eventually become
| | 02:28 | the table names that you use in your database.
To visually represent the relationships between
| | 02:33 | two entities in your ERD, it's common to
draw a line between the two boxes with a double
| | 02:38 | hash on the side that acts as the child or
the many. Keep in mind in any relationship
| | 02:43 | we want them to be one-to-many relationships,
so the side that's the one is called parent,
| | 02:47 | and the side that's the many is called the
child. And when you draw a line between the
| | 02:51 | two boxes you can put a double hash on the
side that's the many, and that way visually
| | 02:54 | you can see which one of these two is the
child and which one is the parent.
| | 02:58 | Now remember, we already determined that we'll need at
least three tables in our database, and we can represent
| | 03:02 | these tables as boxes with the table name
inside of each. So now let's move on to exploring
| | 03:07 | the relationships between these entities in
our example system. When you're sketching
| | 03:11 | out your potential tables you need to start
asking yourself questions about how they relate
| | 03:15 | to each other. So let's take two of these
tables, and let's say customers and invoices,
| | 03:20 | and we can ask some questions about the relationship
that these have with each other to try to
| | 03:23 | determine what type of relationship they have.
Here are some questions we may ask about the
| | 03:28 | relationship between these two tables.
Can one customer have many invoices?
| | 03:32 | Well, sure, the answer there is yes. Can one invoice
also have many customers? Well, we determined that
| | 03:37 | anyone given invoice can only be for one customer,
so what we have is a one-to-many relationship
| | 03:42 | or one customer can have many invoices, but
one invoice belongs to only one customer.
| | 03:47 | This is what's called a one-to-many relationship.
But we are not done yet. We still have to
| | 03:51 | determine, do invoices have relationships,
to let's say products, which is the other
| | 03:55 | table in our list. So we can add the products onto
our ERD and then ask ourselves similar questions.
| | 04:01 | Can one product appear on many invoices?
Sure. Can one invoice also have
| | 04:06 | many products on it? Well, that happens to
be a yes as well. So in this case what we've
| | 04:10 | got is what's called a many-to-many relationship,
and if you remember, we need to eliminate
| | 04:15 | many-to-many relationships. Now the key to
resolving many-to-many relationships is to
| | 04:19 | add an additional entity in between the two
entities that you are trying to relate.
| | 04:23 | So in this case we've got products, and we have
got invoices, and we've said they cannot be
| | 04:27 | directly related to each other, because that's
a many-to-many. So if we had a third entity,
| | 04:31 | and we'll call it invoice line items, we can
then create one-to-many relationships from
| | 04:36 | each one of those parent tables to the
invoice line items. Now products and invoices are
| | 04:41 | actually still related, but they are related
through these two one-to-many relationships.
| | 04:47 | Anytime you evaluate relationships and determine
that you have got a many-to-many relationship,
| | 04:51 | you will just simply need to add a third
table and then create one-to-many relationships
| | 04:55 | from each of the parents into that new
child table. These tables are commonly referred
| | 04:58 | to as join tables. So why do we need this
third join table? It's easier to understand
| | 05:04 | if you ask yourself some questions about how
you would work with this data once it's in
| | 05:07 | the database, if you didn't have a third table?
For example, let's say you need a report of
| | 05:11 | all the products order during a time period.
Which table would use for that? Well, if one
| | 05:16 | product can be ordered many different times,
then we need to store many different records
| | 05:20 | that represent each product. So where would
we put that data? Well, we can't put in the
| | 05:24 | products table, because there's only one
record per product in that table. And if we start
| | 05:29 | duplicating products and doing things like that,
our data gets really messy and unreliable.
| | 05:33 | And if we talk about the different times a
product is ordered, can we put multiple products
| | 05:37 | into one invoice? Well, sure we could do that,
but we would have to define all these fields,
| | 05:41 | and it would be really complicated, and we
wouldn't have any reliable way to search or
| | 05:45 | retrieve on the data. So we have a problem
there, what we need is a table that has one
| | 05:50 | record for every time a product was ordered
on an invoice. And that just so happens that
| | 05:54 | that's exactly how we can define the
invoice line item table. In this case, one record
| | 05:59 | equals a product appearing on an invoice.
So this report that I proposed can be based
| | 06:04 | on invoice line item table, because it will
have many different records for each product
| | 06:08 | every time their product has appeared on an
invoice, exactly what we are looking for in
| | 06:11 | this particular report. And there are dozens
and dozens of conflicts that can be created
| | 06:15 | if you don't resolve a many-to-many relationship
before you start working with your database.
| | 06:19 | If you've got a small project, it might not
seem like you need to sketch things out ahead
| | 06:23 | of time, but I cannot emphasize enough how
important it is to make decisions on tables
| | 06:27 | and relationships before you start working
with the database. Because if you haven't
| | 06:31 | taken something into consideration, then
you'll end up having to pull out all sorts of wires
| | 06:34 | after you have already started working with
database, whereas now, it's just simple as
| | 06:38 | just sketching things out on a piece of paper
and erasing things and building a new model.
| | 06:42 | So after a little bit of what's called Data
modeling, we've determined not only what tables
| | 06:46 | we need to build in FileMaker, but also which
relationship they have with each other.
| | 06:50 | Now we can move out of our planning stage and move
more into the architecture stage in FileMaker,
| | 06:55 | where we will define those table relationships.
In upcoming movies in this chapter, we are
| | 06:59 | going to use a relationship graph inside of
FileMaker Pro to establish and then maintain
| | 07:04 | relationships in our
FileMaker Database Solution.
| | Collapse this transcript |
| Understanding key fields| 00:00 | After completing the Data modeling exercises,
we will have determined which tables we are
| | 00:04 | going to need in our FileMaker Database, as
well the relationships that we are going to
| | 00:08 | need between those tables. Now what we are
going to need is some way to be able to link
| | 00:12 | or hook the two tables together in a relationship.
In relational databases, you are going to
| | 00:17 | connect to related tables together using
special fields that are defined in each table, and
| | 00:21 | these fields are called keys. These keys will
act as the link between the two tables, thus
| | 00:26 | creating a relationship that FileMaker needs.
A key field is really just like any other
| | 00:31 | field that you would find in your database,
but unlike the other fields, these are going
| | 00:34 | to perform special functions. Key fields
come in two different types, and each key type has its
| | 00:39 | own function. There is the primary key which
gets defined in the parent table in a one-to-many
| | 00:44 | relationship, and something called a foreign
key, which is defined only in the child tables
| | 00:49 | in a one-to-many relationship. Let's take a
look at primary keys. A primary key field
| | 00:54 | gets defined in the table acting as the one in
the one-to-many, otherwise known as a parent.
| | 00:59 | And remember that there's always a parent
table in a relationship, and there's always
| | 01:02 | a child table, because our relationships are
always going to be one-to-many, there is always
| | 01:06 | a parent, always a child, just remember that.
So the rule to follow when determining which
| | 01:10 | tables will actually need a primary key field
defined is that we need to define a primary
| | 01:15 | key in every parent table. A primary key's
main purpose is to ensure the uniqueness of
| | 01:21 | each record in the table. So it must contain
a unique serialized value inside every record
| | 01:26 | and these fields should never be empty. So
this is really just a simple way for you to
| | 01:30 | uniquely identify every record in your
database and to make sure that there's no confusion
| | 01:34 | as to which record is actually the parent
of any related records from another table.
| | 01:38 | So you just needed to find which tables act as
parents and each one of them get a primary key.
| | 01:42 | Since any one relationship will be between
two tables, and we already determined that
| | 01:46 | there needs to be primary key field in each
parent, then there also needs to be a field
| | 01:51 | defined in the child table so that these two
related tables can be linked together.
| | 01:55 | The type of key field defined in the child
table is called a foreign key field.
| | 02:00 | It's going to be used to link a related child record
or records in a child table back to the parent
| | 02:05 | in the parent table. So for example, you see
that we've got two tables here, we have got
| | 02:09 | them represented by boxes. We have got a customer
on the left side and then invoices on the other.
| | 02:14 | So one customer can have many invoices.
We are going to define a field, and as you
| | 02:18 | see in gray here, the naming convention we
will use for the primary key field is customer
| | 02:21 | ID with the pk, indicating primary key. So
that's the field it's going to be the hook
| | 02:26 | on the parent site of the relationship, but
now we need a hook on the invoices side of
| | 02:31 | the relationship that will also tell us that
these records might be related within the tables.
| | 02:36 | So what we will end up doing is defining
something called the foreign key field.
| | 02:40 | And this will be how FileMaker will know that
any records are related from the two different tables.
| | 02:44 | A good rule to remember for foreign keys
is that every child table in a one-to-many
| | 02:48 | relationship must have a foreign key defined
in it. If you look at your ERD, you can see
| | 02:54 | which tables are child tables because they
will end up having a double hash touching them.
| | 02:58 | For example, the invoice line items
acts as the child to products and to invoices,
| | 03:03 | and the invoices table acts as the child to
customers. So in each of those tables we will
| | 03:08 | need a foreign key field defined, and it's
customary to name those foreign keys after
| | 03:12 | the parent. So for example, in the invoice
line items, you see that we've got a product
| | 03:16 | ID field with the fk for foreign key, and
that's going to help be the hook in the products
| | 03:22 | to invoice line items relationship. But notice,
since the invoice line items table actually
| | 03:27 | is the child in two different relationships,
we need two different foreign keys.
| | 03:32 | So you'll notice that there's relationship between
invoices and invoice line items or invoice line items
| | 03:36 | is also the child. So in that case we will need
an additional invoice ID fk as the foreign key.
| | 03:42 | So invoice line items, child in two relationships,
it gets two foreign key fields, but also the
| | 03:48 | invoices table is the child in the one-to-many
relationship between customers and invoices.
| | 03:53 | So therefore, we need to define a foreign
key field, customer ID fk for foreign key,
| | 03:58 | inside the invoices table. And since it only
acts as a child in one relationship, it only
| | 04:03 | needs one of those foreign keys. Understanding
the concept of keys in the role of the primary
| | 04:07 | and foreign key is critical to understanding
how to link your related databases together.
| | 04:12 | After you understand these two types of keys,
you can then move on to identifying which
| | 04:16 | of your tables need the
primary and foreign keys defined.
| | Collapse this transcript |
| Determining which key fields you need| 00:00 | So far in the process, we have discussed the
concept of tables and then defining keys inside
| | 00:05 | those tables so that you can create relationships.
Keys are critical to building relationships
| | 00:09 | in your FileMaker Database. So the next
step will be understanding which of the tables
| | 00:13 | that you have defined in your database will
need to have these key fields added.
| | 00:17 | So let's take a look at the tables that we have
been talking about so far in this title.
| | 00:21 | And we will determine what types of keys they might
need. Here is our entity relationship graph
| | 00:24 | where we've got the customers table, the
invoices table, the invoice line items, and products.
| | 00:30 | If you remember, the primary key decisions
are easy. Every table acting as a parent needs
| | 00:35 | a primary key. Let's look at which tables are
acting as a parent in one to many relationships.
| | 00:40 | We can see that customers is a parent to
invoices, so it will need its own primary key.
| | 00:45 | Invoices are acting as a parent to invoice line items,
so it's going to need its own primary key,
| | 00:50 | and products are also a parent to invoice
line items, so that table will need it's own
| | 00:54 | primary key. And we will notice that invoice
line items is not a parent in any relationship,
| | 00:59 | so it does not need a primary key fields at this
time. Now let's look at these same relationships
| | 01:04 | and determine which tables will require a
foreign key field. The rule that I like to
| | 01:08 | use is that every child table or a table acting
as a child in a one-to-many relationship will
| | 01:13 | require a foreign key field defined. And an
easy way to determine visually which tables
| | 01:17 | are acting as a child in a one-to-many is
to look for the double hash. You will see
| | 01:21 | this example on screen where one customer
can have many invoices. Notice that the double
| | 01:25 | hash mark is touching the invoices table,
that tells us that the invoice table is the
| | 01:30 | child table on this one-to-many relationship.
So therefore invoices will need a foreign
| | 01:34 | key field defined. So if we look at our ERD
again, we see that invoices has the double
| | 01:39 | hash touching it, therefore, it will need a
foreign key field defined. And then invoice
| | 01:43 | line items actually has two hashes touching
it, so that indicates to us that it acts as
| | 01:48 | a child in two different relationships and will
require two different foreign key fields defined.
| | 01:53 | But taking a closer look at the relationship
between invoice line items and invoices and
| | 01:57 | products, we see that since there are two
double hashes touching it, we will need a foreign
| | 02:01 | key that will link the invoices relationship
that we can call the invoice ID foreign key,
| | 02:06 | and also one from the products relationship
that we can call the products ID foreign key.
| | 02:11 | In final review, we can see that some tables
play different roles in different relationships.
| | 02:16 | Some are parent tables in one relationship,
and child tables in others. The way we keep
| | 02:19 | all these straight within our database is
by defining the proper primary keys for each
| | 02:23 | relationship the table is involved in. So
for example, customers act as only a parent
| | 02:28 | in one relationship, so they will get a primary
key field defined. We can call it customer ID (pk).
| | 02:33 | Invoices act as a parent in the invoice
line items relationship, but also act as a
| | 02:39 | child in the customer invoices relationship,
therefore it'll get an invoice ID primary
| | 02:45 | key field, but also gets a customer ID foreign
key. The invoice line items as we've discussed,
| | 02:50 | acts only as a child in two different
relationships so it will need two different foreign key
| | 02:55 | fields defined, one for each parent table.
Products acts only as a parent in the relationship
| | 02:59 | between products and invoice line items,
therefore, all we need to do is to find a product ID
| | 03:04 | primary key field. Determining which key
fields you will need in your database tables are
| | 03:08 | an important part of setting up
relationships within the database.
| | Collapse this transcript |
| Defining primary and foreign keys| 00:00 | So, so far in the process of creating a new
database, we have determined what tables we
| | 00:04 | need, we have determined the relationships
between those tables, and as a result, we
| | 00:08 | figured out which key fields that we need in
each table. A Key Field needs to be defined
| | 00:12 | inside each table and so that is what we are
going to do now at this stage. You are going
| | 00:16 | to define key fields in the same way that
you would define any other field, and you
| | 00:19 | do so by going under the File menu to Manage
and Database. You will notice on the left-hand
| | 00:26 | tab called Tables, we see all the different
tables added into our database. We have got
| | 00:31 | Customers, Invoices, and Products, and we
have added this new Joint table called Invoice
| | 00:35 | Line Item to resolve one of the many to
many relationships that we saw that we had.
| | 00:39 | So let's start first by defining primary keys.
If you remember, we determined that the Customer
| | 00:44 | table acts as a parent, the Invoice table
acts as a parent and the Products table acts
| | 00:49 | as a parent. So, each one of those three
tables will require a Primary key field defined.
| | 00:54 | I can select one of the tables and hit the
Fields tab, and we see that I have an empty
| | 00:58 | Fields list. So, the first Field that I am
going to define is the Primary Key Field for
| | 01:01 | the Customers table. I will do so by clicking
down next to the Field Name and entering my
| | 01:05 | cursor in here, I need to type in the Name
that will be using. There are various different
| | 01:09 | naming conventions you can use for primary
keys, and none of them are right or wrong.
| | 01:13 | But the convention that I personally like
to use is to add a prefix to the Field Name
| | 01:16 | that indicates what type of key it is. I like
to use the prefix pk to stand for Primary
| | 01:22 | Key, that way when I have got hundreds of
different fields in my list, I can easily
| | 01:26 | visually identify which one is the Primary Key.
And you would be surprised how often
| | 01:30 | you need to know that. The other thing that
I like to do to make it easy to find in the
| | 01:33 | list is to give it a "_" so that it shows up
in the top of the list when I sort my fields
| | 01:39 | alphabetically. As a matter of fact, I would
like to add another "_" because I also like
| | 01:43 | to use the "_" idea when I am defining Foreign
Keys. So this way the double "__" will show
| | 01:48 | up in the sort order in the Field list above
the single "_" for the Foreign Keys.
| | 01:53 | So let's say, __pkCustomerID. I like to use the name
of the entity or the name of the table and
| | 02:00 | then followed by ID, so my naming convention
would be __pk, name of table, and then ID.
| | 02:07 | So now I can just hit Create, and I see it
added to my Field list, but we are not done yet.
| | 02:11 | Remember that we need to make sure that
every primary key field is not only not empty,
| | 02:17 | but that it contains a unique value that no
other record in the table has. We can do so
| | 02:21 | by defining Field Options. We will talk about
Field Options in the Field chapter, but there
| | 02:25 | is one option that I want to show you here.
If you click on the Options button while you
| | 02:29 | have got the Primary Key Field selected, you
will notice that it pops up to the Auto-Enter tab.
| | 02:33 | Down here at the third one on the list,
you see there is one called Serial Number.
| | 02:37 | All you need to do is check that box and leave
everything else set as the defaults. The other
| | 02:41 | thing I would recommend doing is checking
this box here in the bottom. This will prohibit
| | 02:46 | any modifications of these values, or even
though you should not really be allowing users
| | 02:50 | to click inside a Primary Key Field anyways,
just in case there happens to be one on layout
| | 02:54 | somewhere down the road, users can't inadvertently
make a change. That would actually really
| | 02:58 | mess up all your related records. So, with
those two options checked, I will hit OK,
| | 03:03 | and now, I can move on to the Invoice table
and in this case, I will do the same thing
| | 03:08 | __pkInvoiceID, hit Create, hit Options,
check Serial Number, check Prohibit, same steps
| | 03:16 | we did in the previous task. And now, you
will notice that the third table, Products,
| | 03:21 | already has a __pkProductID set up, because
we imported that in from another table that
| | 03:26 | already had these Options configured. So now,
once we have added all our primary keys we
| | 03:30 | want to finish up by adding all our Foreign
Keys. Going back to the Table list, remember
| | 03:34 | that we only need to add foreign keys to the
tables that are acting as a child in a relationship
| | 03:38 | those happen to be Invoice, and InvoiceLineItems.
So let's start with Invoice, double-click on
| | 03:45 | it, takes us over to our Field tab, and the
naming convention is very similar here.
| | 03:48 | I am going to do a _fk and instead of naming
the foreign key after the table, that I am
| | 03:55 | defining the Field within, I would like to
name it after the table that is actually the
| | 03:59 | parent in the relationship. So in this case,
there is a relationship between Customers,
| | 04:04 | and Invoice, where Invoice acts as the child in that
relationship. So, I am going to call this CustomerID.
| | 04:08 | So _fkCustomerID tells me by looking
at it that there is a relationship
| | 04:15 | between Customers and Invoices, and this
is the Foreign Key Field. Now, I will hit
| | 04:19 | Create, and since a Foreign Key Field does not
have to be unique or automatically serialized,
| | 04:24 | we actually do not have any more Field Options to add,
except we do need to go into the InvoiceLineItem
| | 04:29 | and add two foreign key fields, one for Invoice
because it's the child in the Invoice to InvoiceLineItem
| | 04:37 | relationship, and then also one--you can see
I can save a couple keystrokes by modifying
| | 04:41 | this in Products--and I hit Create. Now we
have got all our Primary Key Fields and all
| | 04:47 | our Foreign Key Fields, and we have used a
naming convention that will help us link these
| | 04:50 | relationships together once we
get to the Relationship Graph.
| | Collapse this transcript |
| Creating relationships using the relationships graph and table occurrences| 00:00 | So here we are at the point of the process
where we were assuming that you have already
| | 00:03 | gone through your data modeling exercise to
determine the tables that you need and get
| | 00:07 | the relationship between those tables. And
then of course, we have already created those
| | 00:10 | tables in our database which we can see
under File > Manage and Database. We have got the
| | 00:15 | four tables, and each of those tables have
the primary key and foreign key fields defined.
| | 00:23 | If you click on the Relationships tab over
here on the right, you will see that we have
| | 00:26 | four boxes in what is called the Relationship
Graph. These are very similar to how you model
| | 00:31 | them in an Entity Relationship Diagram, but
what you are actually looking at on screen
| | 00:35 | here, what File Maker calls Table Occurrences. So
rather than actually being the tables themselves,
| | 00:40 | they are in occurrence of the table. Now, as
far as creating the initial Relationships,
| | 00:45 | they are going to look just like the ones
that we had in the Entity Relationship Diagram.
| | 00:49 | As you start to use more advance techniques
in File Maker, you will understand that at
| | 00:52 | some point you could have more than one
occurrence that is based on the same table.
| | 00:56 | But for right now, don't worry about any of
that stuff, that will come way down the road.
| | 00:59 | What we'll we need to concentrate on now is just
simply creating the relationships between the table
| | 01:04 | occurrences that we see in Relationship Graph.
And this part is going to actually be very
| | 01:08 | easy because we have already used a naming
convention for the primary and foreign keys
| | 01:12 | within each table. Before I show you how to
create a Relationship, I just wanted to show
| | 01:15 | you some of the tools that are available on
the bottom of the screen. Here is an area
| | 01:19 | where you can create new table occurrences
and relationships, which we will get to
| | 01:22 | later, you can move these around using your
Pointer tool, and once you have more than
| | 01:27 | one selected--let's say by holding down the
Shift key--you can do things like Arrange
| | 01:31 | them, left edges, or you can move them around
manually. I like to move them around so that
| | 01:35 | they match sort of what it looks like in my
Entity Relationship Diagram. So in that case,
| | 01:40 | it would look something like Customers, Invoices
and then I like to have the Join table represented
| | 01:45 | between the two tables that used to have a
many to many. I can also change the color
| | 01:50 | of different tables if I like, by selecting
the table and then using this ColorPicker.
| | 01:55 | Sometimes I like to identify all the tables
that are in my original Relationships by a
| | 02:00 | certain color, so you can select all of
them and change the color if you like.
| | 02:04 | You can also add little notes to yourself or to other
users that are working on the database with
| | 02:08 | you, by selecting the Text tool and dragging
and drawing a sticky onto the Relationship Graph.
| | 02:12 | There are some Zoom Options here that
allow you to see a different view, if all
| | 02:17 | your table occurrences do not fit all in one.
And you can print these as sort of a record
| | 02:21 | of the work that you have done, and you have
some ability to manipulate which ones show
| | 02:25 | up in certain pages over here in these buttons on
the right. But in order to create the relationships,
| | 02:30 | we want to first identify two different tables
that need to be related, in this case, we
| | 02:34 | will say one Customer can have many Invoices,
so we know that the Customers is the parent,
| | 02:37 | and Invoice is the child. So what I do with my
Pointer tool is I pick from all the different
| | 02:42 | fields that are listed here--and, by the way,
you will see an example of this over in the
| | 02:46 | Products table where we have tons of
different fields, and it is very easy for us to find
| | 02:50 | the key fields because we have used the underscore
prefix that helps us see the key fields on the top.
| | 02:55 | All these other tables do not have fields
defined, so it's easy to find the Primary Key.
| | 02:59 | But you can see how useful a naming convention
is over here. So I find my Primary Key Field
| | 03:04 | in the parent table, I click on it, and now
we see this little dumbbell appear under my
| | 03:08 | cursor, and I am holding down the Shift key,
and what I need to do is drag and drop this
| | 03:12 | onto whichever Field is the Foreign Key, and
that is why I like to use a naming convention
| | 03:16 | in the Foreign Key that adopts the name of the
parent table. That makes this decision very easy.
| | 03:21 | So here I drop it on the CustomerID.
Now you will notice that in the list of Fields,
| | 03:26 | a Field that has been chosen as a key either
primary or foreign, now gets italicized, remains
| | 03:32 | in the original field list but also then
gets added up to the top where you can see that
| | 03:36 | fields are isolated so that you can visually see
what the key fields are in any given Relationship.
| | 03:41 | You will also notice that there is a little
Crows foot on the many side of the Relationship.
| | 03:46 | Believe or not it is not actually File Maker
being intelligent enough to know which one
| | 03:50 | is the many but what it does know is that
on this side this Field has been defined to
| | 03:54 | contain a unique value, and when we set it
up as a primary key, and this field does not.
| | 03:58 | So, then it uses that little bit of
intelligence to assume that this is the many, and that
| | 04:02 | is the one. Let's do the same thing over here
again ProductID, easy to find, drop it down
| | 04:08 | the ProductID, now we see that ProductID is
italicized and the two fields that are used
| | 04:13 | in the Relationship have been isolated on
the top of the table occurrence box, and now
| | 04:18 | that just leaves us with one more choice to
make Invoice goes to its own foreign key.
| | 04:24 | And that is important. You can see now why
we need to have two different Foreign Keys,
| | 04:27 | because one will link Invoice and then one
will link Products. We can not recycle those
| | 04:31 | same ones together. Now, that we have got
the base Relationships set-up in our FileMaker
| | 04:36 | database, we can continue on to develop the
rest of its functionality. It's important
| | 04:40 | to get the architecture in place first
before you proceed with those other tasks. Later
| | 04:44 | on in the using Relationships Chapter, I will
show you various different ways that you can
| | 04:48 | use these relationships that you have set
up here already. A FileMaker database can
| | 04:51 | contain just one single table or be made up of
multiple tables that are all linked together
| | 04:56 | internally using FileMaker relationships, and
those relationships are all managed here in
| | 05:00 | the Relationships Graph. Now, that we have
concluded talking about Relationships and
| | 05:04 | FileMaker, I strongly recommend that you go
check out the title in the lynda.com online
| | 05:09 | training library called Relational Database
Design with FileMaker Pro. In this title I
| | 05:14 | go in to a two and a half-hour discussion
in great detail about Relationships, talking
| | 05:18 | about some of the same concept we have
reviewed, but I use all sorts of different examples to
| | 05:22 | help really drive some of these points home.
So, if you feel like you want to cover the
| | 05:25 | concepts of Relationship a little bit more,
definitely go check out that title as Relationships
| | 05:30 | in FileMaker in any database are
critical to the functionality of the system.
| | Collapse this transcript |
|
|
5. Working with FieldsDeciding what fields you will need| 00:00 | Like other databases, a FileMaker Pro database
is presented to the developer as a collection
| | 00:05 | of tables each containing a number of fields. If
you've worked with databases in other environments,
| | 00:10 | you maybe accustomed to the term columns instead
of fields. But in FileMaker Pro, these attributes
| | 00:15 | that describe a table are called fields.
A physical file can hold a limitless number
| | 00:21 | of tables, and each table can effectively
have a limitless number of fields defined.
| | 00:26 | You manage all of these in the File >
Manage Database window under the Fields option.
| | 00:31 | A field in FileMaker Pro may be viewed as a slot
that can hold information specific to a single
| | 00:36 | database record. The value that's stored in
a field should be thought of as an attribute
| | 00:41 | of the entity represented by the table it's
defined within. We can see some examples of
| | 00:45 | fields in the Products table. We'll notice
that there are various different fields already
| | 00:50 | defined because we imported these over from
another database. We'll see that there are
| | 00:53 | things like the Category of the product,
the Location of the product, Part Number, and
| | 00:58 | different things like that. We have determined
that these fields need to be defined in the
| | 01:02 | Products table because they're all attributes
of a product. We wouldn't, for example, put
| | 01:07 | the customer first name or customer email in
this table. Instead we've created a special
| | 01:12 | table just for customers and then we would
define those fields here. Fields do not always
| | 01:17 | require a value, but in many cases, the
fields could have a value for each record.
| | 01:22 | So for example, in Products we see there's a field
for a Picture, but not every product could
| | 01:26 | have a picture, but that's okay, we can
still have a record in the database representing
| | 01:29 | that product, we just wouldn't have any data
in the Image field. So when trying to determine
| | 01:34 | which fields need to be defined in each table, we
have to think about what some of the attributes
| | 01:39 | of a customer maybe and what might change
from customer to customer, for example, customer
| | 01:43 | name--of course, each customer will have their
own name--but you also want to make sure you
| | 01:47 | include only fields that are meaningful to
our users. These aren't decisions that we're
| | 01:51 | supposed to make as the database designer,
instead these are decisions that we want to
| | 01:55 | ask our user about and help them provide that
meaning for us. So let's say that after having
| | 01:59 | some appropriate discussions with our users,
we determined that the following fields need
| | 02:03 | to be added to our Customers table. Here
we've talked to the customer. They tell us that
| | 02:08 | yeah, for each customer we want customer name,
street address and some contact information,
| | 02:12 | maybe even the logo and some information about
when we added them to our system and if they
| | 02:17 | have been modified. Let's say, for example,
a field like discount rate is something that
| | 02:21 | throughout the discussions we have determined
could possibly be a field that we need, but
| | 02:24 | not every customer record will have data in
the field, but that's okay, we still need
| | 02:28 | to define it in the Customer table. Some
other examples here in the Invoice table.
| | 02:33 | We see we have got some similar fields that are
created by and modified by fields, but a lot of these
| | 02:37 | are going to be numeric values, like what
the total of the invoice is or dates when
| | 02:42 | the invoice is due. We also see things in
here, a good example of the invoice discount rate.
| | 02:47 | We still need a field for it, even though
some of the invoices might not even have
| | 02:50 | a discount applied. To review, what we've actually
done here is come up with a list of attributes
| | 02:55 | that are specific either to a customer or
an invoice. So in each case, what we've done
| | 02:59 | is asked our users what information describes
each entity in our tables and then what information
| | 03:04 | is specific only to that table. This will
give us our field list. It's really important
| | 03:09 | to break down your fields into the most granular
level possible. For example, in the Customer
| | 03:13 | table, you'll notice that we have a field
for street address, city, state, and zip.
| | 03:18 | It's represented as four different fields.
It could've just been easy enough for us to
| | 03:21 | do the common mistake of adding one field
that says address and try to put all that
| | 03:25 | information in there at once. But it is in
fact, a mistake. For example, what if we just
| | 03:30 | want to search any customers from a certain
state or do a ZIP code range search?
| | 03:34 | We don't have an isolated area where we could do that
if all the data is in one field. So just remember
| | 03:38 | when you're coming up with these field decisions
to break fields down into the smallest unit possible.
| | 03:43 | Another great example of this is in the name.
Instead of having a contact name,
| | 03:47 | what you see here is that we've got a contact
first and a contact last name. FileMaker databases
| | 03:52 | allow developers to create a field to store
information that describes value stored in
| | 03:56 | our tables. But when you make decision on
what fields you need, make sure to get your
| | 04:00 | users' input and then to break the data down into its
smallest parts before defining them in the database.
| | Collapse this transcript |
| Understanding field types| 00:00 | Once you have a list of fields that you want
to define inside the tables in your FileMaker
| | 00:04 | database, you want to first decide which types
of fields are going to be before you can define them.
| | 00:09 | If you look under the File > Manage
Database window, and you look under the
| | 00:14 | Products list, you'll see that not only do
we have all these fields defined, but notice
| | 00:17 | under this column that they all have a different
type, you see some are numbers, some are dates,
| | 00:22 | some are text, and so on. When you're
defining a field, not only are you picking a name,
| | 00:26 | but you'd also choose from this dropdown of
the different types that are available.
| | 00:30 | So, before you can actually define these, you
should assign each one of them a type and
| | 00:34 | then after you have both of those pieces of
information, you can go and define the fields
| | 00:37 | inside this dialog window. First, let's do an
overview of all the different field types available.
| | 00:42 | A text field is appropriate for any type
of data that can be stored as text
| | 00:46 | and does not need more specific handling.
It's also the most common type of field and
| | 00:51 | the default type if you're adding a field
for the first time in your FileMaker database.
| | 00:56 | Numbers and dates, for example, can be
stored in text field, but in doing so they lose
| | 01:00 | their numberness or their dateness and
can't be treated as such. A text field can hold
| | 01:04 | about 2 gigabytes of information which is
roughly the equivalent of about a billion
| | 01:08 | characters or 500,000 pages of English text.
However, I would severely caution you that
| | 01:13 | if you have a database where you actually
need to store 500,000 pages of English text
| | 01:18 | into one field, you might have other issues
going on there. A number field is a field
| | 01:23 | to use whenever data needs to be treated as a
number. So for example, if you need to sort
| | 01:27 | it in numerical order instead of alpha order or
use it in a mathematical calculation.
| | 01:32 | FileMaker Pro will not prevent the entry of non-numeric
data into a number field, for example, any
| | 01:37 | text characters that are entered into a number
field will be displayed, but they'll be ignored
| | 01:41 | in most database operations. FileMaker Pro
is able to store and retrieve any date in
| | 01:46 | a date range of 1/1/0001 all the way up to
12/31/4000, and of course, you do need to assume
| | 01:55 | that the dates entered into these fields are
formatted as month/date/year. FileMaker will
| | 02:00 | generate an error dialog if the user attempts
to enter a date not within the stated range
| | 02:05 | or not in an acceptable date format.
Internally--and this is interesting--FileMaker stores
| | 02:10 | a date value even though you type in a date
1/1/111 let's say, it won't store it as a date.
| | 02:16 | What FileMaker does is convert it to an integer.
And this integer actually represents
| | 02:20 | the number of days that have expired since
the first date in the date range 1/1/0001.
| | 02:25 | So you can type it in as 6/12/70 even though it
will display it as 6/12/70 behind the scenes,
| | 02:32 | FileMaker is actually determining what integer
it is and storing it as such. This is actually
| | 02:36 | quite useful because this helps you determine
dates that fall within a certain range because
| | 02:41 | they are converted to a number or what date
is later than another date because one number
| | 02:45 | is going to be greater than another, and so on.
FileMaker Pro stores time as a value that
| | 02:50 | represents either time of duration or specific
time of day, for example, on a 24-hour period
| | 02:55 | and much like a date field, internally,
FileMaker Pro stores the time value as an integer that
| | 03:00 | represents the duration of seconds that have
expired since midnight that day. So for example,
| | 03:05 | 10 a.m. today is stored internally
within FileMaker as the number 36,000.
| | 03:11 | That means that 36,000 seconds have expired
since the clock struck midnight today.
| | 03:16 | FileMaker Pro will generate an error dialog if a user
attempts to enter nonnumeric data into a time field.
| | 03:23 | Timestamp is actually a combination of a date
and a time with the space between them.
| | 03:27 | Timestamp is stored internally as a number of seconds
since midnight on 1/1/0001. So it's a great
| | 03:35 | deal of number of seconds, but this allows
you to have an integer where you can determine
| | 03:39 | the date and time combination of one field
being either later or before the date and
| | 03:44 | time combination of another. So what you get is
a single integer that's converted into seconds.
| | 03:49 | Now container, summary, and calculation fields
will all be explored in greater detail
| | 03:53 | later in this title. A container field is
a very versatile field type that can store
| | 03:57 | any type of binary data. We are going to cover
this later in the Container chapter. A calculation
| | 04:03 | field contains data that is computed based on
a formula defined by the database developer.
| | 04:08 | So in the case of a calculation field, you
are not actually typing any data into this field.
| | 04:12 | Instead it's displaying a result of whatever
the formula is that you've entered
| | 04:15 | in when you defined the calculation field. You
are going to learn more about using calculation
| | 04:20 | fields and the formulas in the chapter that's
dedicated to calculation fields later in this title.
| | 04:25 | A summary field is a special FileMaker Pro
type of field that also doesn't allow
| | 04:30 | you to type data into it, but instead shows
you aggregate values across a found set.
| | 04:34 | We are going to talk more about found sets when
we talk about finding records later in this
| | 04:39 | title, but then summary fields are also the
basis for an important area of FileMaker Pro
| | 04:43 | reporting, and that'll be covered in the
chapter on reports. Now once you are familiar with
| | 04:48 | each field type, you are going to want to
learn how to assign those types to the different
| | 04:52 | fields that you have created in your field
list. So here's an example of the fields that
| | 04:56 | we determined or needed in both the Company
table and the Invoice table. If we take a
| | 05:01 | quick look at them, we can determine which
one of these field types we could assign.
| | 05:05 | Most of them receive the Text field type because
that's usually going to be a default, but
| | 05:09 | things like Date Created will be handled as
a date. In the case of Date Modified, since
| | 05:14 | those occur more often than Date Created, we
might want to actually make that a timestamp
| | 05:18 | so that shows us not only the date that a
record was modified, but also the time of day.
| | 05:21 | Tax Rate, for example, is treated as
a number because we might want to use that
| | 05:26 | in a calculation or a formula later. So we
got to make sure that that one is in Text,
| | 05:30 | the same is true for Discount Rate. And the
Company Logo field is going to be an image
| | 05:34 | that we're embedding in each database record
so that we are going to make a Container field.
| | 05:38 | Now in the Invoice table, we have some of
the same decisions. We've got things like
| | 05:42 | Date Created and Date Modified doing the Date
and Timestamp decisions that we made earlier,
| | 05:47 | but a lot of these are calculations, and a
lot of these are numbers because we are going
| | 05:50 | to be doing a lot of math and coming up
with currency values. Once your field list has
| | 05:55 | been reviewed and each file type has been
assigned, you can now move on to defining
| | 05:59 | these fields within the tables
in your FileMaker database.
| | Collapse this transcript |
| Defining fields| 00:00 | In order to add fields to your database, you
must first determine what tables you'll have
| | 00:04 | and then what fields will describe those tables
and then finally, what types of fields each will be.
| | 00:10 | There are two ways that you can define
fields in FileMaker Pro. You can define fields
| | 00:14 | in quick view, like we are looking at here,
but we covered that in the Creating New Database
| | 00:19 | using a Spreadsheet Format video. So feel
free to review that movie for more instruction.
| | 00:23 | The second and more standard method of
defining fields is through the Manage Database dialog
| | 00:28 | which we get to under File > Manage and Database.
In addition to providing a central location
| | 00:33 | for creating and editing fields in any table,
the Manage Database dialog also provides tabs
| | 00:38 | for working with tables and relationships.
So it's a good place to add fields that you
| | 00:42 | have already listed out so you can do many
at once. In this movie, I'm actually going
| | 00:46 | to add all of the fields to the Invoice and
Customer tables, and I am going to use the
| | 00:50 | types that we discussed in previous movies.
But first, before I start defining fields,
| | 00:54 | I'll put a discussion here on field naming
because the first decision you need to make
| | 00:59 | before you even say what type of field it's
going to be is what you are going to name the field.
| | 01:02 | Many users employ naming conventions that
have the types of fields denoted, for
| | 01:07 | example, somewhere in it that says the text
or number field or even special prefixes that
| | 01:12 | can be added to the front of a field like
we've done here with our primary keys or even
| | 01:16 | our foreign keys that allow it to appear in
the top of a list when a field list is sorted
| | 01:21 | as you see here alphabetically. FileMaker
Pro is very accommodating when it comes to
| | 01:26 | naming tables and fields, but there are only
a handful of restrictions that you need to consider.
| | 01:30 | For example, watch as I try to name a
field just the number 6. When I hit the
| | 01:35 | Create button, a message pops up. Now this
isn't restricting me from actually naming
| | 01:39 | this field 6, but instead what it's indicating
to me is that there are some special characters,
| | 01:44 | numbers are included that should be avoided
when naming fields. For example, you can't
| | 01:49 | use the plus sign in the name of a field
because if you try to put that in the calculation
| | 01:52 | dialog, FileMaker is not going to know where
you're talking about a field or you are actually
| | 01:56 | putting in an operator telling it to add
something to the value in other field. And other things
| | 02:01 | like AND, OR, NOT, those types of things
really should not be used in names either.
| | 02:06 | And as you get more familiar with calculation functions,
you are going to want to avoid that terminology as well.
| | 02:11 | And another tip is that you should avoid
spaces in your field names because if
| | 02:15 | you ever want to publish your database to
the web, these field names will have to be
| | 02:19 | called out in these URL string,s and sometimes
URL strings can get confused if they encounter
| | 02:24 | a space, so it's a better idea to name
them all one word smashed together.
| | 02:30 | Just because certain characters are allowed in
a field in a table does not necessarily mean you
| | 02:33 | should use them. Should you ever need to share
data between your database and another application,
| | 02:38 | you may have difficulty because most other
applications have more naming restrictions
| | 02:42 | than FileMaker Pro might. For this reason,
the best practice is to use only alphanumeric
| | 02:47 | characters and table and field names. I'll hit
Cancel, and I'll navigate over to Customers.
| | 02:54 | So let's add the first couple field names.
In the Customers table, I am going to add
| | 02:58 | the CompanyName field, I am going to simply
type in CompanyName, and then I am going to
| | 03:04 | keep the Type as Text, and I am going to hit
the Create button, and now we see the field
| | 03:07 | added to my list. Once a field has been added,
you can now duplicate it or delete it from
| | 03:13 | the list or change the name by simply changing
the name and then hitting the Change button.
| | 03:19 | But you also see that once it's added to the
field list, you've got this Options button
| | 03:22 | over here on the right. We are going to cover
this in the next couple of movies. It's also
| | 03:26 | sometimes a good idea to add comments down
here below. This will help you out if you
| | 03:31 | feel that you want to see something about
the field when you review it in the list.
| | 03:34 | The comments will show up under Options or
Comments. I'll add a couple of them in the
| | 03:39 | Invoice table, but I'll leave these blank. I
also wanted to show you when I add the Address
| | 03:43 | fields that I am going to use a certain
naming convention. You'll notice that I am going
| | 03:47 | to say AddressStreet and hit Create, AddressCity,
and then finally, you'll see that I'm going
| | 03:57 | to add Zip. So the reason I'm doing these is
because you will see now that if I'm looking
| | 04:02 | for any of the address fields, you'll see
in my sorted field list that they all show
| | 04:06 | up as one clump. This way if I am looking
for anything related to an address, I just
| | 04:10 | look under A and under Address, and I can
see all those fields. Otherwise, this field
| | 04:14 | would show up under C, that under S, and this
under Z, and it would be very difficult for
| | 04:19 | me to find all of them in a normally alpha
sorted field list. We can apply the same logic
| | 04:23 | to ContactNameFirst, hit Create and then also
ContactNameLast. So I have added just a few
| | 04:34 | of the fields from our field list here, but
now I am going to switch over to the Invoice
| | 04:38 | table and add a couple of fields here, and
this brings me to a table where we see our
| | 04:42 | primary key and our foreign key fields already
defined. So just to show you how I can switch
| | 04:47 | between the different tables, I am going to add
a couple of fields here as well, DateCreated,
| | 04:52 | but this time I am going to choose a different
type from the list, I am going to hit Create,
| | 04:57 | and I can say DateModified, keep it as Date
and hit Create again, and I am going to add
| | 05:03 | some number fields here as well, InvoiceDiscount,
which I'll choose as a Number field, and I'll
| | 05:10 | hit Create, but I want to eventually turn
this into a calculation, so you'll notice
| | 05:14 | that I am going to put in the word calculation
into my Comments. I am going to do the same
| | 05:18 | for InvoiceSubtotal. You will notice that I
can modify one of the existing field names
| | 05:24 | and just hit Create, or what I can do is I
can hit Duplicate and then change the name.
| | 05:32 | When you duplicate a field, it will duplicate
the name, add the word copy to it, copy over
| | 05:36 | any comments, Type and Field options, so this
can be a pretty efficient way to define very
| | 05:40 | similar fields inside your database. But I've
added a couple of comments here that you will
| | 05:45 | see as you select each field, but if you click
on that field's header in the Options/Comments,
| | 05:50 | you'll notice that it toggles from whatever
the field options are to the comments that
| | 05:54 | I've put under each field name. Of course,
I'll go ahead and add all the different fields
| | 05:58 | from our field list to the exercise files,
but once you're done, you want to close this window.
| | 06:04 | But notice if you hit the Cancel button,
you get this message that says Discard ALL
| | 06:08 | changes made in this dialog? You definitely
don't want to do that because what that means
| | 06:12 | is that you're going to lose all the different fields
that you have defined during this little session.
| | 06:16 | So instead, you want to make sure that
you're always hitting the OK button,
| | 06:20 | and now notice also, on our layout, when we
look at this in Form View, we see that a series
| | 06:25 | of fields have been added to our layout. So
what happens is when you don't have a lot
| | 06:29 | of fields defined in your database, and you
go in and define a whole series of fields,
| | 06:33 | FileMaker is going to automatically put those
on the layout for you. But now that it's done
| | 06:37 | so for that first time, if we go back and
add more fields, it won't automatically add
| | 06:41 | them to our layout unless we've got Preferences
set up under Layouts to do so. That preference
| | 06:46 | is found under the FileMaker heading for
Mac users or under Edit for Windows users.
| | 06:52 | You select Preference and under Layouts, you can
see there's either an option checked for Add
| | 06:56 | newly defined fields to current layout or not.
Now is a good time to have them added
| | 07:00 | to your current layout, because you want to
have at least one layout that has all the
| | 07:03 | different fields on it for administrative
purposes, and we'll discuss more about working
| | 07:07 | with fields on layouts in later chapters.
So after you have determined your list of
| | 07:11 | fields, FileMaker provides a couple of different
ways to define these fields in the database.
| | 07:15 | You can then apply field naming conventions
as well as choose field types while you set
| | 07:19 | up these fields in your database.
| | Collapse this transcript |
| Using Auto Enter options in fields| 00:00 | When you're defining fields inside your
FileMaker databases, you have a couple of decisions
| | 00:04 | to make, the first of which is what type of
field you're going to be defining, and the
| | 00:08 | next would be any additional options that
may be necessary for that field.
| | 00:11 | Developers often design a database so that some
fields are automatically populated with data when
| | 00:16 | a new record is created. You'll manage all
the fields in your options under the File >
| | 00:20 | Manage > Database window, and you'll see
that when you select a certain field, for
| | 00:24 | example, here the pkCustomerID, you can see
in the Options column if it's already got
| | 00:29 | Options applied. If not, you can either double-
click on the field, or when the field is selected
| | 00:33 | hit the Options button, and you'll see the
Options for Field window appear. In the movie
| | 00:39 | for setting up key fields in our database,
we already used a Serial number option.
| | 00:43 | That's one of the Auto-Enter options available in
this dialog. FileMaker Pro has the capability
| | 00:48 | to insert a serial number into each field
every time a new record is created or committed
| | 00:53 | in the database. This is mainly of interest
for creating a primary key, as we've done
| | 00:57 | here, which is a value that uniquely
identifies every record in the database table.
| | 01:01 | A serial number for a field can start at any value
and end at any value. In the case of a primary
| | 01:07 | key, it doesn't matter, so we just leave those
at 1. But if you wanted to, you could for
| | 01:11 | example, put an alpha character in here.
FileMaker will ignore the alpha character and still
| | 01:16 | increment by one. Some developers like to
put those alpha prefixes in there so they
| | 01:20 | can identify which table certain records were
created within. FileMaker will always manage
| | 01:25 | the next number internally, and it will
never duplicate numbers. Therefore, it makes for
| | 01:29 | great primary keys because those keys will
have to be unique. This way you don't have
| | 01:34 | to worry about it as a developer, instead
FileMaker takes on that entire responsibility.
| | 01:38 | By default, a value that's automatically
entered into this field or any field that has these
| | 01:43 | options selected can be manually changed by
the user. For example, if we were to leave
| | 01:49 | the Serial number value as a default and
create a new record, the user could click into the
| | 01:54 | field and change that value. Unless of
course the Prohibit modification of value during
| | 01:59 | data entry check box is selected, but that
is not one of the default options.
| | 02:03 | But you should note that when the Prohibit modification
value is checked, that applies for all different
| | 02:09 | values that are added for a field that's
set up, not just one in particular.
| | 02:13 | What that leads us to understand is that you can only
select one value to enter into a field when
| | 02:18 | a record is created. You'll notice that when
I click on the Data field, the Serial number
| | 02:22 | field becomes unchecked. We'll select that
back to Serial number, hit Cancel, and let's
| | 02:27 | go to the DateCreated field and double-
click that on our list. In this field let's say
| | 02:32 | we want to automatically enter the current
date each time a record is created.
| | 02:36 | So instead of having the users have to enter
this value each time, we'll let FileMaker do it.
| | 02:40 | So when you select the Options button or double-click,
it goes automatically to the Auto-Enter tab.
| | 02:45 | You see the first two options in this tab,
they relate to Creation and Modification of data.
| | 02:51 | A field can automatically track information
about when a record was created or last modified,
| | 02:55 | within some limits, and by whom. Both
Creation and Modification options have the same set
| | 03:00 | of choices. You'll see when you pick a
dropdown, some have Date, Time, Timestamp, Name and
| | 03:05 | Account Name, but in the case of this field
only Date is available, the others are grayed out.
| | 03:10 | And the reason for that is because this
field was set up as a Date type. If it was
| | 03:14 | set up as Time, only Time would show, Timestamp
only Timestamp would show. But if it was set
| | 03:19 | up as a Text type, then all these options
would be available to us. So in this case,
| | 03:23 | let's check the box next to Creation and leave
it as Date and hit OK. And now let's go to
| | 03:29 | the RecordCreatedBy just below it and hit
the Options button, and here we're going to
| | 03:33 | check Creation again, but this time we are
going to pick from the dropdown, as we see
| | 03:37 | in this case all the options are available
to us because it's a Text field. We could
| | 03:42 | choose the Date, like we did earlier, or Time,
which would put in the current time at the
| | 03:47 | moment of the creation of the record. A Timestamp
would just be a combination of the date that
| | 03:51 | the record was created and the time it was
created, or Name, which is actually the name
| | 03:56 | that's stored in the Preference pane of each
user's copy of FileMaker, or it could be the
| | 04:01 | Account Name. Let's take a look at those for
a second. So I am just going to leave that
| | 04:04 | as Date for right now, and we'll hit OK and OK.
So if we go under Preferences, on Mac
| | 04:10 | it's found under the FileMaker Pro dialog,
on Windows it's found under Edit.
| | 04:14 | You'll see that there's a section under the General
Preferences that's called User Name, this is the name
| | 04:19 | that's assigned to this copy of FileMaker Pro.
So if I were to add an Auto-Enter option
| | 04:24 | to the field CreatedBy, I could say User
Name and what it would do is put the name
| | 04:29 | Cris Ippolite into that field each time a record
is created. Now, of course there could be
| | 04:34 | many users on a database at the same time
and they all have a different name in their
| | 04:37 | User Name, so those names would show up. But
many times this User Name is just adopting
| | 04:42 | the name of the computer, so this could be
more useful if you want to figure out from
| | 04:45 | which computer these records were created,
not from which user. The other option is to
| | 04:50 | use the Account Name. If you look under
File > Manage and Security, you'll see that you
| | 04:55 | can set up a series of Account Names allowing
users to identify themselves and have specific
| | 04:59 | access to the database. In that case, you
would assign them an Account Name, let's say,
| | 05:03 | for example, Test. And then if they log in
using that Account Name, it will then put
| | 05:09 | the word Test inside the RecordCreatedBy. So
I am going to go back into Manage > Database,
| | 05:16 | go to my RecordCreatedBy field, and I'm instead
going to choose Account Name. Now we see we've
| | 05:23 | got DateModified right below it, I am going
to select that field and hit Options.
| | 05:27 | And this time I am going to choose the
Modification Timestamp. And note that's the only value
| | 05:31 | that's available to us, because this of
course is a Timestamp field. Now, what FileMaker
| | 05:36 | will do here is actually change the Timestamp
value every time any of the other fields that
| | 05:40 | are defined in the table are modified. So
unlike everything else on this list, which
| | 05:44 | actually just adds value to the field when
a record is first created, the Modification
| | 05:49 | option will update values in the field
whenever any of the fields in the record are changed.
| | 05:54 | You can't pick which fields you want to have
trigger the Modification, so there are some
| | 05:58 | limitations to its usefulness. So let's
check that option and hit OK. And there are some
| | 06:02 | other options as well. So if we go to AddressState,
for example, we hit the Options button, and
| | 06:08 | you'll notice that we've got this option
here for Data. When checked, we can just simply
| | 06:12 | have this data appear inside of a field every
time a new record is created. So for example,
| | 06:17 | let's say that the majority of our customers
are in the state of California, that way we
| | 06:21 | could save the data entry folks a little bit
of typing by saying that the letters C-A will
| | 06:26 | appear in every new record. Now, keep in mind,
any Auto-Enter field can be modified after
| | 06:32 | it has been created, as long as the Prohibit
modification of value during data entry is
| | 06:36 | not selected. So I would leave this unselected
in a case like this, and when a user creates
| | 06:41 | a new record they will see the State value.
And if it happens to be one of the few that
| | 06:44 | are outside of the State of California, they
can just simply click in the field and change
| | 06:47 | the value. We can do the same thing in the
Invoices table, you'll see how quickly we
| | 06:52 | can do so, Date, Creation Date, CreatedBy,
AccountName, very easy to do these after you've
| | 07:02 | set these things up. And I am going to add
another one as well. Let's say we go to the
| | 07:07 | InvoiceDiscountRate, I'll hit Options on that.
This InvoiceDiscountRate is actually something
| | 07:13 | that's going to be driven by the customer.
So whichever customer is selected when you
| | 07:17 | create the invoice, they'll determine what
the InvoiceDiscountRate is. So what I am going
| | 07:21 | to choose is this option that's called Looked-
up value. When I check the box next to Looked-up
| | 07:26 | value, you see that I get this new dialog
that allows me to look up a field value from
| | 07:30 | another table. So in this case, well, remember
that each invoice has a parent customer record,
| | 07:35 | because those two tables are related, and
you would never create an invoice without
| | 07:38 | assigning it to a customer, so we can set
this up to pull the value from the selected
| | 07:42 | customer in the related customer table. So
let's choose Starting with table Invoices,
| | 07:47 | and we are going to Lookup from a related
table, and we'll say Customers. And Customers
| | 07:52 | happens to have a field that's called DiscountRate,
and so if we hit OK and OK again, now what
| | 07:58 | it's going to do each time we create an invoice
is it's going to go look at the Customer that's
| | 08:02 | been assigned to the Invoice, look at what
their DiscountRate is and put that value into
| | 08:05 | the field. When we get into a discussion on
calculations, we could also reference that
| | 08:11 | field in a calculation. But the thing is if
that value ever changes on the customer, whenever
| | 08:16 | it's a calculated field, it will dynamically
update any old records that have been created.
| | 08:21 | But if we do this as a lookup in an Auto-
Enter option, it will only go find that value at
| | 08:26 | the time the record was created, and even
if that value changes in the future, it will
| | 08:30 | never update that. So that's good for things
like discount rates or unit cost or different
| | 08:34 | things like that. That way if you change the
unit cost of a product, it doesn't go retroactively
| | 08:39 | update all the different historical order
item records in your database system.
| | 08:43 | So we'll leave all the other settings as defaults
and hit OK, and let's try this out by going into
| | 08:48 | Customers and hitting New Record. So we see that
the State has been populated, the DateCreated,
| | 08:54 | the RecordCreatedBy account and DateModified. And
we'll also see that if I go into the CustomerID
| | 09:00 | and try to delete it, I get a message that
says This cannot be performed because this
| | 09:03 | field is not modifiable, which is exactly
the instruction we gave it when we checked
| | 09:07 | the Prohibit modification of value during
data entry. Using the Auto-Enter field options,
| | 09:13 | developers can design a database so that some
fields are automatically populated with default
| | 09:17 | data when a user creates a new record in a
database. These are actually decisions that
| | 09:21 | you'll want to make when you're deciding what
fields you'll need when you're first creating
| | 09:24 | the database, because it won't retroactively
go back and assign those values to records
| | 09:28 | that have already been created
before you go and apply these options.
| | Collapse this transcript |
| Using field validation options | 00:00 | Any database system will strive to have
consistent data. Without data consistency it becomes
| | 00:05 | extremely difficult, if not impossible, to
derive meaningful and reliable information
| | 00:10 | about whatever a database is designed to
keep track of. To ensure that data entered into
| | 00:15 | your database is consistent and reliable
for business purposes, you must design checks
| | 00:19 | and restrictions on the way users are allowed
to enter or modify data in the system.
| | 00:24 | This is where Field Validation capabilities of
FileMaker Pro will come into play. Field Validation
| | 00:29 | allows you to test field data against
specific criteria and to warn the user if the field
| | 00:33 | does not pass muster in some way. For example,
if you go under the File > Manage > Database,
| | 00:39 | you'll see that you have various different
field options already applied under the Auto-Enter.
| | 00:44 | But for example, if we go to the Customer
AddressEmail field and hit the Options button,
| | 00:51 | notice that the next tab over from Auto-Enter
is the Validation tab. As you will learn in
| | 00:55 | this movie, if a user tries to commit a
record containing field data that violates one of
| | 00:59 | these rules, the user will receive a warning
and be prompted to change any nonconforming data.
| | 01:04 | This way you keep all of the data consistent
and reliable. FileMaker Pro developers can
| | 01:09 | choose from any of these options and they'll
automatically validate the field contents.
| | 01:14 | Let's say that our database will require that
every customer have an email address so they
| | 01:18 | can receive automatic emails on their order
status. Therefore, we need to make sure that
| | 01:22 | in this AddressEmail field that we've got
some validation selected to make sure that,
| | 01:27 | that value is not empty. So in the Validation
tab, we'll see that we can choose various
| | 01:31 | different options like the data type or whether
it's Not empty, Unique, or Existing, and some
| | 01:37 | of the Validated by calculation options, for
example, we are going to do in later chapters.
| | 01:42 | But let's just choose Not empty for right now.
And at the very top of the dialog you'll
| | 01:46 | notice when we're asking this to actually
validate the data. By default, it's set to
| | 01:51 | only validate during data entry, but it's
got this check box here to Allow the user
| | 01:55 | to override during data entry. Let's take a
look at what that looks like. So if we hit
| | 01:59 | OK, and I hit OK again, I hit a New Record,
and I try to do something else in the record
| | 02:06 | by clicking on it, and it tells me AddressEmail
is defined to require a value. But it also
| | 02:11 | says, do I want to allow this field to remain
empty and gives me the ability to revert it
| | 02:15 | back to whatever state it was before the
change was made, or I can just say Yes.
| | 02:20 | But what we really wanted to do is say No.
Now, it really depends actually what we want to do.
| | 02:24 | You can see that there's different levels of severity.
Here we can just sort of make a suggestion
| | 02:28 | that they don't leave it empty, but users
could just hit Yes and override that and then
| | 02:32 | of course leave the value empty if they've
chosen to do so. So here's our field that's empty.
| | 02:38 | Even though we've put in a restriction,
it still allows it to do so. But if we go
| | 02:42 | into the Database, double-click on this to
show our Validations options again, I can
| | 02:47 | instead not check the box that's by default
of course, that says Allow user to override
| | 02:52 | during data entry. Now when I hit OK and
then go to create a New Record, now you can see
| | 03:00 | that the message is a little bit different.
It says that the AddressEmail is defined to
| | 03:04 | require a value, and you must enter a value.
And if I hit OK, it just takes me right to
| | 03:09 | that field and doesn't let me do anything
unless I actually enter a value into the field,
| | 03:13 | which is as restrictive as it can get.
You'll notice, though, that that message might be
| | 03:19 | a little bit cryptic to your users, so one of
the things that you'll see in the Validation
| | 03:23 | options is the ability to create a custom
dialog message if the validation fails.
| | 03:28 | So here, for example, I can say Please enter
an email for this customer. Now when I hit
| | 03:35 | OK, and hit OK again--get rid of a couple
of these records by hitting Delete--say the
| | 03:41 | New Record, and I don't enter anything in
the email field, but now it gives me something
| | 03:46 | that's a little bit easier to understand to
my users, so now they know what they need to do.
| | 03:49 | I go type something in there so it's not
empty, and now it allows us to proceed.
| | 03:55 | So back in Manage > Database, under Email,
you'll notice that there's an Always and Only
| | 04:00 | during data entry option too. These of course
are the default settings, but if I switched
| | 04:05 | it over to Always, what that means is that
in other non-data entry ways that I'm adding
| | 04:10 | data to my database, it will also enforce this
validation. We haven't talked about importing
| | 04:15 | data into our databases yet at this point,
but later as you see when we talk about that,
| | 04:19 | any field that says Always in it will
enforce this restriction on the importing of data.
| | 04:25 | So what it really means in our case is if I
choose Always here, and I am trying to import
| | 04:30 | a bunch of new customer data in from some
other system, any customer data that does
| | 04:34 | not have an Email address populated or is
empty and doesn't pass the Not empty validation
| | 04:40 | will be omitted from the importing our database.
So you should only really select Always--which
| | 04:44 | again isn't the default--in the events where
you really want to strictly enforce one of
| | 04:49 | these validations. The other options you have
available to you are to choose Unique value,
| | 04:54 | so it can be both Not empty and Unique, or
Not empty and Existing. You can make sure
| | 05:00 | that a date or a number value comes in a certain
range, a Strict data type, meaning it has
| | 05:06 | to be certain type of data formatted into
the field in a certain way. And Minimum or
| | 05:11 | Maximum number of characters, and here under
Validated by calculation we'll look at some
| | 05:17 | examples when we discuss this further in the
calculation chapter. So FileMaker Field Validation
| | 05:23 | allows you to test field data against specific
criteria and then to warn a user if the field
| | 05:27 | value does not pass muster in someway. This
allows you to keep the data in your database
| | 05:32 | consistent and reliable
as it is being entered.
| | Collapse this transcript |
|
|
6. Working with Container FieldsUsing container fields in your database| 00:00 | Container fields are an important building
block for any FileMaker Pro database in which
| | 00:04 | you want to store and/or display more than
just text. With container fields, your database
| | 00:09 | solution can actually store and display digital
images or videos, play music and sounds, store
| | 00:15 | electronic documents like PDF, Excel, or
Word files. And really, a container field is so
| | 00:20 | versatile that it can store any sort of binary
data. Binary is just a generic term for data
| | 00:26 | that cannot be represented as text.
Container fields can hold up to 4 GB of binary data
| | 00:31 | in three broad classes, either as an image,
a QuickTime file--and when we say QuickTime
| | 00:37 | file we mean multimedia files that are supported
by QuickTime 7.5, and that's actually a pretty
| | 00:42 | broad range--or files of any type, and I
mentioned PDF, Excel, Word, those type of things, but
| | 00:47 | really anything that you can work with on your
computer, you can store inside of container fields.
| | 00:51 | So if you open up the Exercise File 06_01,
and if we go into Layout mode, it's
| | 00:57 | the first time we've worked with Layout mode
and all I am going to really do here is add
| | 01:00 | the container field to the layout so that
we can work with it a little bit, we'll get
| | 01:04 | to more of that in the upcoming chapters. But
you'll notice that all the different fields
| | 01:08 | that we see here in Layout mode, some of them
have text baselines and one of them doesn't.
| | 01:12 | That's because this one here is actually our
container fields. So what I am going to do
| | 01:15 | is I am going to Shift-select these two things,
and I am going to move it over into this white
| | 01:21 | space and move it around with my cursor,
and I am going to drag this into a large area
| | 01:28 | in the middle of our screen. This is our
container field that happens to be called CompanyLogo.
| | 01:31 | Now, if we go back into Browse and Save our
changes, you'll notice that if I click into
| | 01:37 | this field and try typing, it won't let me do
so. The only way to get data into a container
| | 01:43 | field is first by selecting it so it's focused,
and I've just selected the field, and we see
| | 01:47 | that it's got the dark edge around it, unlike
the edges here, if I click PhoneNumber, now
| | 01:53 | that gets the dark edges around it and
everything else has the dotted lines. But if I go under
| | 01:57 | the Insert menu while I've got the container
field selected, you see that I've got some
| | 02:01 | options for inserting some values. You see here
that we've got Picture, QuickTime, Sound, and File.
| | 02:07 | However, we do have options for Audio/Video
and PDF, but they're currently
| | 02:12 | grayed out, and I'll get to why that is in a
second. But first, let's look at how files
| | 02:16 | can be stored using the options that are
available to us now. So let's start by adding a picture,
| | 02:20 | and I am going to pick Picture and then
from our exercise files I am going to choose a
| | 02:27 | file that's called author.jpg and select
Insert. Now you can see the picture in the field.
| | 02:33 | Notice that when you navigate back and
forth from record to record that the picture
| | 02:38 | only appears in the record in which I embedded
it just like any other data that you put in a field.
| | 02:43 | If we click into the field and now hit
our Delete button, you'll see that it
| | 02:48 | removes the value, and that's how we can
control data inside of a container field.
| | 02:52 | There are actually a couple of different ways to
get data into your container. For example, in
| | 02:56 | FileMaker 12, drag and drop is supported. So
you'll notice if I make this window a little
| | 03:00 | bit smaller and reveal our Exercise Folders,
I can click on the author image and drag it
| | 03:05 | into the container, and it now populates that
database record with this image. You can also
| | 03:10 | control data in the field by right-clicking
the field or Ctrl-clicking on a Mac.
| | 03:14 | You see here I can cut the value if I want to get
rid of it, or I can insert another value into
| | 03:19 | the field if I'd like to, or I can extract
the data from inside this record by hitting
| | 03:25 | Export Field Contents. Of course, being able
to store any type of document in a container
| | 03:29 | field does no good unless you can get the
documents out again when you needed them,
| | 03:33 | and that's where Export Field Contents comes
into play. So when this file is shared, users
| | 03:38 | can export data out of a container field that
they didn't necessarily put in the first place.
| | 03:43 | It becomes a very nice file repository or
asset repository database in that regard.
| | 03:49 | So let's clear out this image and try working
with some other files. You see that over here
| | 03:53 | we've got a file called TextFile. I drag
that into the container. Now, in the case of a
| | 03:57 | text file or any non-image or non-video file,
first it's storing the document in the container,
| | 04:04 | like we've instructed it to, but what it's
doing is it's actually just showing us a preview
| | 04:08 | of the file type, in this case text and then
showing us the name of the file. We of course
| | 04:13 | still can do the Export Field Contents if we
want to, and we can control it by deleting
| | 04:19 | the value if we'd like. And we'll see when
we drag a PDF into the field, what it does
| | 04:25 | is it actually shows us an image representation
of the first page of the PDF. We can't necessarily
| | 04:30 | interact with this at least at the moment,
but it does give us a little bit of a preview
| | 04:35 | and of course allows us to still do the Export
Field Contents. Now, you'll notice that I've
| | 04:39 | been adding one field at a time to each container.
If you try to add more than one field--for
| | 04:44 | example, if I have an image and then if I
now try to add PDF--you see what it actually
| | 04:49 | does is replace the value that was in there
before. So there is only one file per container
| | 04:54 | field, but you can either do one of two things,
create more container fields if you need more
| | 04:58 | files stored for each record, or you can compress
or zip our package up multiple different files
| | 05:05 | into one single compressed file and then upload
that into your container field. So let's clear
| | 05:09 | out this file, and let me show you what it
looks like if I go into Insert, and I pick
| | 05:15 | QuickTime, and I am going to choose this
video called Paddling Out, and I am going to hit
| | 05:21 | Insert. And now you see what it does is it
gives us a Play button across the bottom,
| | 05:25 | this is the QuickTime engine kicking in here. If
for some reason you insert something, particularly
| | 05:29 | on Windows, and you get a cannot play file
error in the image here, what that means is
| | 05:34 | that you need to go and install QuickTime
player. QuickTime player is going to be installed
| | 05:38 | as part of the normal FileMaker installation,
but if you've chosen to dismiss that you'll
| | 05:42 | have to go and install that player onto your
computer so that you can actually interact
| | 05:46 | with this content. So here you'll
notice that I can click on it.
| | 05:55 | And we can control the video, we can watch the video,
and we can see it interact, and this is something
| | 05:59 | that of course can not only be shared with
other users, but each record could have its
| | 06:04 | own video if necessary. The same is true for
audio files. The audio files can be played
| | 06:09 | by QuickTime, we can control the volume,
and we'll get a Play button, but what it will
| | 06:13 | look like is just this strip without any of
the corresponding video. You will notice though
| | 06:18 | that in the Insert option we have no access
to Audio/Video, even though we were able to
| | 06:23 | add video in QuickTime. And no access to PDF,
even though we were able to add a PDF document
| | 06:28 | as a file. I am going to show you in the
next video how we can configure those and what
| | 06:32 | additional options that will give us. Another
thing that I wanted to show you, if we delete
| | 06:37 | one of these files in the container and right-
click in and say Insert a File, and we'll choose
| | 06:42 | text file, you'll notice over here on the
bottom left-hand side that we've got a couple
| | 06:46 | of options available to us. The first one I
want to show you is Store only as a reference
| | 06:49 | to the file. If I choose that, it still
embeds the file into the container field, but what
| | 06:56 | it's done is embedded only the path to where
the original file can be found. So right now
| | 07:01 | the original file can be found on my Desktop,
in the exercise files folder, in a subfolder
| | 07:07 | called 06_01. But the problem is if I move
that file and other users want to try to access
| | 07:14 | it, now I get this error that says this file
cannot be found. And the reason is because
| | 07:19 | FileMaker is simply storing the path,
and it's not storing the file itself.
| | 07:23 | Now, when I go back and put the file back
where the file can be found, we can see it.
| | 07:27 | So it's a great tool to be able to not have to embed
images, like, for example, if we had a very
| | 07:34 | large video let's say, it's about a gigabyte
in size, I could choose to store a reference,
| | 07:38 | but that path must be maintained at all times.
In upcoming videos I am going to show you
| | 07:42 | how you can set your container fields up so
that none of that matters. But keep in mind
| | 07:47 | in the meantime when you see those options
in the bottom-hand left corner, this is what
| | 07:50 | they're referring to. FileMaker container
fields are very special types of fields that
| | 07:54 | allow you to store media files and files
within your database record. FileMaker 12 has also
| | 07:59 | provided many different options
for managing these stored files.
| | Collapse this transcript |
| Working with container inspector options in Layout mode| 00:00 | FileMaker Pro allows users to store files
within container fields inside of database records.
| | 00:05 | But in FileMaker 12 some new options
have been added for managing those files.
| | 00:10 | For example, now you have the ability to specify
for each instance of a field on a layout whether
| | 00:15 | a container field is formatted to optimize
for static content, for example just images,
| | 00:20 | or for interactive content, for example,
movies, audio files, and even PDFs.
| | 00:26 | By default, a container field like the one we
see here in this layout is optimized for images.
| | 00:31 | And you can tell that because when you click on
the Insert menu or right-click and see the
| | 00:36 | Insert menu, you only have options for Picture,
QuickTime, Sound and File. Those are the options
| | 00:40 | available to you when a field is optimized
for images. When it's optimized for interactive
| | 00:46 | content, you'll see other options available.
So how do we manage these things?
| | 00:51 | Well, first you need to go into Layout mode.
Although we haven't covered Layout mode yet, there's
| | 00:56 | just a couple of different tools I want to
show you, and the rest we'll talk about in
| | 00:59 | the upcoming few chapters. But if you go
into Layout mode and you say View > Inspector or
| | 01:05 | Ctrl+I or Command+I, you see the Inspector
palette will appear on screen. And when I
| | 01:11 | select this object, the container object,
and select the Data tab, you'll see at the
| | 01:17 | bottom tab here--and I'll shrink these up
so that we can actually see the Data tab--
| | 01:21 | you see that we've got some options that are
specific actually to just the container.
| | 01:25 | You won't see these with other fields. For example,
if I select the AddressZip, you see that the
| | 01:30 | data formatting is grayed out. But back here
with the CompanyLogo, which is our container
| | 01:37 | field in the Customers Table, you see that
we have some options here on the top, first
| | 01:41 | of all, the Format. These are features that
you might recognize if you've worked with
| | 01:44 | previous versions of FileMaker. What this
does is allow you to pick whether or not you
| | 01:48 | want to crop the image to frame. And why don't
we take a look at what that looks like. Save
| | 01:53 | those changes, and I'm going to right-click,
and Insert a picture, and I'll pick author.
| | 02:02 | So here the image actually extends just a
tad bit outside of these lines. I'll go here
| | 02:08 | and make it a little bit smaller so you can
see how that works. So you see it's cropping
| | 02:14 | the sides off, which is of course what we
instructed it to do. Otherwise, we can say
| | 02:19 | reduce the image to fit and maintain original
proportions. Let's look at what it looks like
| | 02:24 | when it doesn't maintain original proportions.
Hit Save and you see that isn't a really desired
| | 02:29 | effect, but depending on what kind of
assets you are managing inside there, that might
| | 02:33 | just work for you. So we'll say enlarge image
to fit as well, but really the best setting,
| | 02:38 | the most dynamic one is reduce or enlarge
image to fit. And let's just take a look at
| | 02:43 | what that looks like. When we maintain proportions,
basically it has reduced it to fit the width
| | 02:48 | of this without distorting the image itself.
Of course you want to keep in mind the size
| | 02:54 | of your container field on the layout, depending
on what kind of files you might be storing in it.
| | 02:59 | Images, you might want to go with like a 4x3
type aspect ratio, similar to what I've got here.
| | 03:03 | You can also control Alignment, Left,
Right, Middle, Top, Bottom, Center,
| | 03:09 | for how the image appears inside a container.
Those are all options that are available in
| | 03:13 | previous versions, but now in FileMaker 12
you'll see these two options here, Optimize
| | 03:18 | for Images, which is the default setting for any
new container field, or Optimize for Interactive content.
| | 03:24 | If we select Interactive content, and
let's just choose Start playback automatically
| | 03:30 | and go into Browse mode. First thing we'll
notice--let's say we go in here, and we say
| | 03:34 | Insert--now we've got different options
available to us, Picture, Audio/Video, PDF and File,
| | 03:40 | now QuickTime and Sound are not available
to us. Of course we could use Audio/Video
| | 03:44 | as the option to insert, so let's choose a
Video, insert it into the image and what you're
| | 03:51 | going to see...is that we get a different
kind of a playback now this time.
| | 03:57 | You noticed before when it was just
inserting the QuickTime that we got the
| | 04:01 | QuickTime player, but now we are getting a
web player view, and what's actually happening
| | 04:06 | here is that we started playback automatically,
which was one of the options. If this file
| | 04:11 | is being hosted on a server, then when we
choose Interactive, this will allow the media
| | 04:16 | to be streamed. However, it must be stored
remotely on a server, and there's an option
| | 04:20 | just in case you can't get this to work, you
should pay attention to an option on the server
| | 04:24 | side that's called SSL or Secure Socket layers,
if for whatever reason you can't get it to
| | 04:28 | stream, you need to turn Secure Socket layers off.
But any hosted file with Automatic playback,
| | 04:34 | and Interactive option turned on in the
container will stream this content, which is great.
| | 04:39 | That means that we can have up to a 1 GB file
stored inside of a container, and yet it will
| | 04:44 | still playback instantly, it won't require
that you download the entire 1 GB to the record.
| | 04:50 | This is also great when you've got users that
are connecting to your database over the network
| | 04:54 | or wide area networks, or even through
FileMaker Go on the iPad or iPhone, you'll still be
| | 04:59 | able to interact with very large data files,
but you won't have to wait for those large
| | 05:04 | data files to download. Keep in mind that if
you turn Interactive content off, the limitation
| | 05:09 | of 1 GB actually grows to 4 GB--just something
to keep in mind. One thing you'll notice is
| | 05:15 | first if we delete this video--if you recall,
earlier in this movie we inserted a PDF as a file,
| | 05:22 | and we saw the icon and file name, and we
actually got an image that appeared in the
| | 05:26 | container field, have the first page of a
PDF, if we chose picture as the option.
| | 05:31 | So now we are actually going to choose PDF,
which is now available to us because we chose the
| | 05:35 | Allow interactive content. And when we choose
PDF and actually insert a PDF, we'll see now
| | 05:42 | that we get a fully interactive page document,
which goes into whatever reader or PDF reader
| | 05:51 | is installed on our web browser actually.
So I happen to be using a Mac now, so this
| | 05:56 | Mac has Adobe Reader installed. If you look
at a PDF in a web browser it will defer to
| | 06:01 | the same Adobe Reader user interface. And
the same is true for an Allow interactive
| | 06:06 | content container field. So you get a little bit
of secret as to what's going on behind the scenes,
| | 06:11 | it's actually going in and tapping into some
of the same tools that your web browser is using.
| | 06:16 | Some other Mac users might see a default
preview view, which is similar to Adobe, but
| | 06:22 | in either case, if you don't see either of
these, then that means that you don't have
| | 06:25 | one of the PDF viewing applications installed,
either on your computer or in your web browser.
| | 06:31 | For those of you that are working with Windows,
if you don't see a PDF option in your Insert
| | 06:35 | at all after you've selected Allow interactive
content that means you have to go install
| | 06:40 | one of these PDF readers. So you can go to
your Internet Explorer and install the Adobe
| | 06:44 | Acrobat Reader plug-in. So, the first thing
you'll notice is now instead of just showing
| | 06:48 | the one page, I can actually scroll through
all the different pages on the layout.
| | 06:53 | And in Layout mode, if I wanted to make this
even larger--let's say like this--then it allows
| | 07:02 | my user more area on the layout to be able
to interact with the document. So if you want
| | 07:07 | to have a special layout that's created that
is the full size of a document that way users
| | 07:12 | can completely interact with PDF files. And
you have all the other tools that are available
| | 07:16 | to you too, to be able to bookmark, look at
thumbnails, for example, and attach different
| | 07:22 | things to the file and search through the
files, it really becomes the best way to be
| | 07:28 | able to store and interact with PDF documents.
And the controls will also allow you to zoom
| | 07:33 | in and out. You'll see here that when you
right-click, you get all sorts of different
| | 07:37 | options that are consistent with the plug-
in itself. Allow interactive content becomes
| | 07:42 | the preferred setting when you are going to
store PDF files in a database records container
| | 07:46 | field, because it actually allows your users
to fully interact with the PDF without opening
| | 07:50 | it in other applications. Of course you might
want to make the container field much larger
| | 07:54 | to allow them to more easily read the document.
Interactive content also supports audio and
| | 07:59 | video as well, but in order to remove this
PDF, we have to go under Edit and then Clear,
| | 08:06 | unlike the Delete option that we had before.
You'll notice now when I go in and insert
| | 08:11 | the Audio/Video, much like we had done moments
ago, I get the same playback as we had earlier.
| | 08:18 | However, this setting requires slightly more
processing power than just the default Optimize
| | 08:23 | for images only. You might want to consider a
few instances when it may be better to leave
| | 08:27 | the Optimize for images setting in place. For
example, on list layouts, where it's unlikely
| | 08:33 | that a user will scroll through a PDF or even
play a video, you might want to just see the
| | 08:36 | little thumbnail view of it. You can optimize
performance by using image optimize container
| | 08:40 | fields there. When we talk about this concept
of portals where you're looking at--essentially
| | 08:45 | it's just a list of related data, the same
thing applies in that regard as well.
| | 08:50 | In any instance where you wish to limit the types
of files that users can insert to just Picture,
| | 08:55 | QuickTime, Sound, or another type of file,
you would then want to use Optimize for image
| | 08:59 | content only. And don't forget that when you
turn on Interactive, and you're actually hosting
| | 09:04 | this database on FileMaker server, this allows
the media to be streamed, makes it a lot easier
| | 09:09 | for those who are accessing it remotely
to be able to interact with the content.
| | 09:12 | So beyond actual interactive content, you'll notice
when you clear this out and go Insert and
| | 09:19 | then File, and you select something like a
document, like a text file, you notice that
| | 09:25 | you can still store the text document in there,
but you don't get any interactivity.
| | 09:29 | And this has to do with the type of file that's been
stored in here more so than the settings that
| | 09:33 | we selected. So you can see that you can
choose to either have your container field behave
| | 09:37 | like a field in FileMaker, or it can use web
browser tools so that it will allow additional
| | 09:42 | interactivity based on your content being stored,
for example, like in the PDFs or the video.
| | 09:48 | It's best to evaluate the type of file
that will be stored in the container field
| | 09:50 | and then pick the proper setting
when you are in Layout mode.
| | Collapse this transcript |
| Applying field options and using remote container storage| 00:00 | Container fields add a lot of interesting
functionality to your databases. But there
| | 00:04 | are a couple of things that you need to be
aware of before you start using them or really
| | 00:07 | before you start inserting files into them.
Here we have a Container field called CompanyLogo,
| | 00:13 | and it's defined inside of a table called
Customers in a file called Untitled_06_03.
| | 00:18 | One thing I want to show you is that if you
notice here over on the right-hand side, here
| | 00:22 | is the folder where this file resides, and
currently the file is 393K. What I would like
| | 00:28 | to do is insert in a picture, and you will see
the picture in the same folder is called author.
| | 00:34 | But that this file is 33 MB in size, so I am
going to insert that into the container field.
| | 00:40 | Then you will see that since it's such
a large file, takes a moment to display and
| | 00:45 | also that's going to have some impact on the
performance of the file. As we go from record
| | 00:49 | to record, you'll see that there's a quick
second there that it takes to actually load
| | 00:53 | this image, and that can be a real big
problem if you've got a lot of records with a lot
| | 00:58 | of large files in them. As a matter of fact,
if we go and close this file, the file size
| | 01:03 | will recalculate, and you will see here now
my file has increased not just the original
| | 01:08 | 393K, plus the 33 MB, but it's grown larger
than that, because it has got things like
| | 01:14 | indexing and cache size and memory that it's
accounting for. So this can be really inefficient
| | 01:19 | when it comes to embedding files into your
FileMaker Database. And even opening them
| | 01:25 | up or accessing them remotely as you can see
causes a delay. This can become almost catastrophic
| | 01:30 | if you're accessing it via things like
FileMaker Go using a 3G or 4G LT connection to connect
| | 01:37 | your FileMaker Server. So these are things
that you want to avoid. In older versions
| | 01:41 | of FileMaker, the option that you had was
to delete the image like I just have done
| | 01:47 | there, and I can say Insert Picture, and you
will notice that there is an option down here
| | 01:51 | Store only a reference to the file. I select
that image, I hit Insert, and now you'll notice
| | 01:58 | when I close the file, it's back to 393K. So
it's still showing the image in the record,
| | 02:05 | but it doesn't have all the overhead of
actually embedding that image in the record, you see
| | 02:09 | it redraws much quicker. But as I talked
about in the previous movie that has all sorts of
| | 02:13 | issues associated with it, because if I
remove this file, if I change the name of the file
| | 02:18 | or if other users who are accessing the
database don't have access to that exact path to where
| | 02:22 | that file is, then I can end up showing what
would be a broken image. As you'll see here
| | 02:27 | when I move the image to the Desktop and
navigate back. So that's a pretty common issue that
| | 02:34 | was happening inside a container fields. So
in FileMaker 12, we have got some new tools
| | 02:40 | and settings that allow us to manage this.
And those can be found actually under the
| | 02:44 | File > Manage > Database option and like we
talked about in previous movies, any field
| | 02:52 | that you have defined inside one of the tables
in your database has field options available to it.
| | 02:56 | When we select the CompanyLogo field and hit
the field Options there, we will notice
| | 03:01 | that under the Validation tab, we see that
there's one other difference here between
| | 03:06 | a container fields and the other type of field.
Any non-container field will have the option
| | 03:10 | here that says Maximum number of characters.
When it's container field though, we can check
| | 03:15 | this and we can put in, for example, a value
which represents kilobytes or K, so we will
| | 03:20 | say a 1000K--otherwise 1 MB--is the limit of
the file size that we are trying to insert
| | 03:25 | into this container. So let's say Insert > Picture,
and we will uncheck the Store only as a reference.
| | 03:31 | And I'll choose at 33 MB file, and you will
see that we get an error that's telling our
| | 03:36 | users that there is only a maximum file size of
a 1000K and do you want to allow this invalid
| | 03:41 | entry, and we will say No. So there's a way
to limit the size of the files that can be
| | 03:45 | entered into the container field. But what
we can do is use a new setting that's also
| | 03:50 | under Manage > Database, and if we go into
Options let's turn this off for right now,
| | 03:57 | and go over to the Storage tab. Another
thing that's only available in Container fields
| | 04:01 | is under the Storage you will see this section
here for Container. And we have got the ability
| | 04:06 | here to Store the data in the container externally.
This is a huge new improvement in FileMaker 12
| | 04:12 | and all versions after that. What this
allows you to do is check this box and by
| | 04:17 | checking the box FileMaker will do three things.
When I close this dialog, FileMaker will create
| | 04:22 | a subfolder in the same location as our
database, and we see over here, here's the location
| | 04:27 | of the database, so it's going to create
subfolder here. And then it will transfer the embedded
| | 04:32 | file, which is the author image it'll transfer
that file that's currently stored inside the
| | 04:36 | container field to that folder. And then it
will save the reference to that file within
| | 04:41 | the database record. So really what it's
doing is it's going to create in a new location
| | 04:44 | for the embedded file, and it's going to save
a very low impact path back in the container
| | 04:52 | field that says where it can find this. So
it's basically taking sort of the best of
| | 04:56 | both worlds, it's saying, I want to embed
it so that everybody can access it, and they
| | 05:00 | don't need to have a certain path in there,
but at the same time it's also taking what's
| | 05:04 | nice about storing as a reference, because
it's really just storing the path, but it's
| | 05:09 | also managing where this will go. You'll see
here that you have a couple of different options,
| | 05:14 | notice also that it always starts with the
database location, and so what it's going
| | 05:17 | to do is create a directory structure that
looks like this. Files and then Untitled_06_03/,
| | 05:25 | now after that point we have some options
here, we can choose the default, which is
| | 05:29 | called Secure storage, and if we go and hit
Secure storage and hit OK, we see this message
| | 05:35 | pop-up, basically what this is telling us is
that it is identified that we have changed
| | 05:41 | the settings on a container field, and that
container field that we are changing settings
| | 05:45 | on, happens to have a record that has a file
inside of the container. So it's asking us
| | 05:51 | now if we would like to transfer the files.
Now I can choose to close this and not transfer,
| | 05:56 | but it will ask me to transfer this next time
I go in and make any modifications to that field.
| | 06:01 | But I am going to say Yes, I am going
to go ahead and transfer this and watch what
| | 06:05 | happens. Not only does it give us the summary
where it says these were completed, but hit
| | 06:09 | OK, but we see that a Files folder was
created in the same location as the database.
| | 06:15 | And now keep in mind this is important, this
database that I'm working on here in this movie is
| | 06:20 | not hosted on a server. This feature that
I'm talking to you about really is best used
| | 06:25 | when you have a file that's hosted on FileMaker
server, but as you see, that's not necessarily
| | 06:30 | needed in order to see the functionality.
But let's look at what this path looks like.
| | 06:34 | So inside the Files directory we have a
folder that's called Untitled_06_03 which is the
| | 06:39 | name of the database. And the reason for that
is because I could have let's say 10 different
| | 06:43 | databases here, all in the same directory,
and so that means that in the Files directory,
| | 06:49 | FileMaker then has the option to create a
subdirectory for each different file name,
| | 06:53 | which is great! So beneath that we don't have
any files, so let's go back to the database,
| | 06:58 | and now Insert a Picture and choose author
and hit Insert. And now we see what's happened
| | 07:04 | is it's created a subdirectory called Secure,
which was the default setting. And then below
| | 07:08 | it is an intentionally cryptic path that eventually
will lead to the file. Now this is what the
| | 07:13 | meaning of Secure actually is. It will take the
file, remove it from the embedded container.
| | 07:19 | So you see right there what I did is I uploaded
a file to the container, and it's just simply
| | 07:24 | passed through the container to this location
and then the database record stores what location
| | 07:29 | it is internally, not visible to the user,
but stores that internally so that it knows
| | 07:33 | how to display the image. That's the Secure
option, but there's another option, if we
| | 07:38 | go back into Manage > Database, you see here
it says External (Secure) go into Options,
| | 07:42 | and we are going choose Open Storage instead.
If you are not concerned about masking the
| | 07:47 | path of the original file, then you can choose
Open Storage, and it's a lot easier to read.
| | 07:52 | We will hit OK here, and now it says do you
want to transfer the files, and we're going
| | 07:57 | to Transfer the files. But now you see me
have a Status Completed, Transferred 1.
| | 08:03 | So now you see what we have here is another directory,
so instead, this time it's the Files folder,
| | 08:09 | a directory with the name of the database
and then it creates a directory for every
| | 08:13 | table in the database, so this happens to
be the customer table, and below that is a
| | 08:18 | another subdirectory that represents the
name of the field. So this of course is because
| | 08:23 | the Untitled_06_03 file could have multiple
tables, each with their own container fields,
| | 08:30 | so this directory structure or path here
really allows FileMaker to have an unlimited amount
| | 08:35 | of tables, unlimited amount of container fields
within each table and then certainly an unlimited
| | 08:40 | amount of files within those same locations.
So it's really up to you depending on how
| | 08:44 | secure you want this path to be, and you can
choose whichever option it is that you care
| | 08:49 | to choose, but the big upside here is that I
can still use FileMaker to upload or insert
| | 08:56 | very large sized files, but if I have these
remote storage options or external storage
| | 09:02 | options available, then it's going to just use
FileMakers to pass-through, thus not impacting
| | 09:08 | the overall size of my file, still allowing
me to manage and view very large file sets,
| | 09:13 | but doing so in this remote storage directory
structure. And even though we're using remote
| | 09:18 | storage, we still have some of the same things
available to us as we have only embedded the file.
| | 09:22 | For example, if I right-click here,
I can still Export Field Contents, but now
| | 09:26 | what FileMaker is doing is it's going in
finding the location of the file and allowing the
| | 09:31 | user to create a copy of it even if it's
stored remotely. This also allows us to be able to
| | 09:36 | quickly move through records and redraw files,
even though the file size is very large.
| | 09:40 | Because what FileMaker is actually doing showing
a thumbnail. The same is true for other types
| | 09:45 | of media, we remove the image, and we go
under Insert, this time we will choose File, and
| | 09:52 | we will select a file, insert that into the
container, and now when we go and look into
| | 10:01 | our subdirectory, we see that it still has
the CompanyLogo field. But now instead of
| | 10:05 | the image, it has inserted the PDF. So FileMaker
does some housekeeping on the back end as well.
| | 10:11 | So we need to delete images from containers,
it deletes them from that subdirectory, as
| | 10:17 | we'll see here. And when you replace with
new ones, it goes and adds those as well.
| | 10:21 | Now if for some reason you have two records
that have the exact same image or file stored
| | 10:27 | in them, FileMaker will only create one copy. So
it has the intelligence to be able to identify
| | 10:31 | whether or not you already have a file with
the exact same makeup, somewhere stored within
| | 10:36 | your subdirectory structure. So that way it
can really help mitigate the size of your
| | 10:40 | backup files over on the remote server. So
couple of important things to note here, first,
| | 10:44 | I would like to press upon you that you really
should be using this option when you're hosting
| | 10:49 | the database on FileMaker Server. That way
then you don't have to worry about the files
| | 10:55 | being stored in the same location, they can
be secured on another location somewhere,
| | 11:00 | and it's a lot easier for users to be able
to download the data when it's being hosted
| | 11:04 | over on a server. Also you get thumbnails that
are created and all sorts of other benefits.
| | 11:10 | Another thing to mention is that this is an
optional approach for managing data inside
| | 11:14 | of containers, if any of your users are
sharing the database using FileMaker Go, FileMaker
| | 11:19 | Go of course, allows you to access your databases
over the iPad or iPhone using FileMaker Go app.
| | 11:26 | So this means that you can see files
and even export the contents of those files
| | 11:30 | onto the devices without actually having
the impact of pushing a lot of that data over
| | 11:35 | WiFi of even worse, 3G or 4G connections.
So really this is just optimal if you are
| | 11:40 | going to be sharing any kind of database files
onto FileMaker Go through those connections,
| | 11:46 | you definitely want to go with the remote
container. Now let's say you want to make
| | 11:49 | a copy of this file, we will Insert a Picture,
there we go, and we see that it's now created
| | 11:58 | this directory structure. Now let's say we
want to copy the file, well, now we have this
| | 12:01 | challenge because the file and the images that
are stored with in the file are now separate.
| | 12:05 | Well, there is a new option in FileMaker 12
that allows you to sort of recompile all the
| | 12:10 | different images into the container fields
to make it more portable. If I go under File
| | 12:16 | to Save a Copy As, you'll see that in the
dropdown I have got this one option here
| | 12:20 | called self-contained copy, which makes a
single file. We will save this to our Desktop,
| | 12:27 | and now we hit Save. And now let's go back
to the Desktop, and we see the file here,
| | 12:33 | and if we check out the size of the file we
see that the file is 778K, but when we open
| | 12:38 | up the file, here's the copy. We see that
we have got the logo embedded, and we will
| | 12:45 | notice that under Manage Database that the
Remote Container options have been automatically
| | 12:50 | turned off. So if you want to make files
embedded back into the container fields so that you
| | 12:56 | can move data and all the corresponding files,
then you will just make sure that you are
| | 13:00 | choosing the option for File > Save a Copy As,
and the new option in FileMaker 12 called
| | 13:07 | self-contained copy, just one single file.
So you can see how this new remote storage
| | 13:12 | option will allow you to use container
fields to store files of any size, without having
| | 13:17 | any negative impact on the size or performance
of your database. And you can do this whether
| | 13:21 | they are accessed locally or more
optimally posted through FileMaker Server.
| | Collapse this transcript |
|
|
7. Working with RecordsCreating and duplicating records| 00:00 | So far in this title, we've discussed how
to work with FileMaker to set up tables and
| | 00:04 | fields inside of a FileMaker database so that
you can store data. Now we are going to turn
| | 00:09 | the discussion to actually working with the
data within those tables. In this chapter,
| | 00:13 | we're going to be discussing working with
records, starting first with creating and
| | 00:17 | duplicating records. So, if you pull up the
Exercise File Untitled 07_01, you'll notice
| | 00:22 | that it has two records of data in it. We
can see that in the upper left-hand corner
| | 00:27 | because we see the number 2. I can use the
Book Icon to navigate between the first record,
| | 00:33 | and the second record created in the database.
A record in the database is an instance of
| | 00:37 | whatever it is that we're storing inside the
database table. So for example, since we are
| | 00:42 | in the Customer Table, this number 2
indicates that we've got two different customers.
| | 00:47 | If you're familiar with spreadsheets, a record is
the same thing as a row inside of a spreadsheet.
| | 00:51 | There are different ways that we can add
records to the database, and the most common are going
| | 00:56 | to be under the Records menu where you'll see
the New Record option. This also corresponds
| | 01:01 | with the quick key on Mac which is Command+N and
on Windows, it's Ctrl+N, and it also corresponds
| | 01:07 | with this button that you see here in the
Status toolbar. You should also be aware if
| | 01:12 | you happen to be looking at your Layout in
Table View--which can be accessed by hitting
| | 01:18 | this icon or even changing under the View
menu to view as a Table--you'll also notice
| | 01:22 | that you have a Plus button here, and by
simply clicking the Plus button, it will create a
| | 01:26 | new record. It gives us the same exact
results as if we had gone under the Records menu or
| | 01:31 | used the New Record button. We've created
the new record, and you'll notice for a moment
| | 01:35 | everything on the screen goes blank except
for these fields that we had set up with Field
| | 01:40 | Options for Auto Entry. Now, it's important
that your users understand that when they
| | 01:44 | hit a New Record button, that all the other
fields will go blank, they should understand
| | 01:48 | that they haven't actually deleted anything,
but what they've done is created an area to
| | 01:52 | enter in new data. Of course, the pkCustomerID,
AddressState, DateCreated, RecordCreatedBy,
| | 01:58 | and DateModified all have values that were
set up in the Auto Enter options of those fields.
| | 02:04 | Notice that when you click inside any one
of these fields that a dotted highlight
| | 02:09 | appears for all the different fields on the
record, the one that's been clicked into actually
| | 02:14 | has a solid highlight. This helps you visually
understand the focus of your cursor, and also
| | 02:20 | what field you're interacting with. So, if I
start typing some text, I know exactly which
| | 02:25 | field that will be typed into. This makes
it easier to guide you as you're adding new
| | 02:29 | information into the fields, and in this new
record, you see here we've got the third record
| | 02:34 | we can go through and add data to all the fields.
And as long as they don't have a validation
| | 02:39 | of not empty, then we can skip some if we
want to, but we're welcome to of course add
| | 02:43 | data into every field that we see on screen.
Another thing that's important to understand
| | 02:47 | for both you and the users of your database
is that by just typing into a field like I'm
| | 02:52 | doing here, that doesn't automatically save
the data that I've just entered to the database.
| | 02:59 | You'll notice that there's no File > Save
option like you see in most other applications.
| | 03:04 | But FileMaker does save data to the back end
database, and it does so through what's called
| | 03:10 | committing a record. There are several
different actions that allow you to commit a record
| | 03:15 | inside of a FileMaker database. Let's take
a look at what those are. Any one of these
| | 03:19 | actions will automatically save the data that
you've entered into the record, so you don't
| | 03:23 | have to actually worry about remembering to
save data in the record because a lot of these
| | 03:27 | things are happening pretty naturally
throughout your interaction with the database.
| | 03:31 | So, first of all, clicking outside any field area
will commit or save the data that you've entered
| | 03:36 | into a field. Pressing the Enter key, switching
modes from let's say Browse mode to Find mode,
| | 03:42 | or even switching Layouts let's say from Customer
Details to Customer List, if you create a
| | 03:46 | new record or even if you close the file. So
really, you can't get into a scenario where
| | 03:51 | you've added data into a field, and it
doesn't ultimately get saved, but you just have to
| | 03:54 | know, for reasons that we'll explore later
on in this title that there might be a split
| | 03:58 | second of time in between when you add the
data, and when it actually gets saved to the
| | 04:02 | database. So, in the case of the data that
I entered into CompanyName, all I have to
| | 04:07 | do is click outside the field, and now technically,
this data has been saved or committed to the
| | 04:12 | back end database table. Another way to add
records to the database is through what's
| | 04:16 | called duplicating a record. So, if you have
a record that already exists, and let's say
| | 04:21 | it has a lot of data in the fields that might
be similar to the one that you wish to create,
| | 04:25 | a lot of times it's easier to just duplicate
the record. So first, what you want to do
| | 04:29 | is find the record that you wish to duplicate,
and you can go either under Records and hit
| | 04:35 | Duplicate, or select Command or Ctrl+D or
you can even go ahead and add another one
| | 04:40 | of these buttons through customizing your
toolbar onto your Status toolbar. But in this
| | 04:45 | case, we're going to say Duplicate Record.
We see now we have four records, and if we
| | 04:52 | do a test here and duplicate this again, for
example, you notice that both the last one
| | 04:57 | I created and the previous one all have the
same information in there. So I make it easier
| | 05:02 | to do some data entry. Now, I can just go in
and make whatever small changes there might
| | 05:06 | be in the new duplicated record, and it saves
my users a lot of typing. This has been a
| | 05:11 | brief overview of how you create records in
your database or how you add data to be stored
| | 05:15 | inside the database itself. This of course
is a pretty important component because if
| | 05:20 | you have a database that doesn't have any
data in it, it's not quite as useful as one
| | 05:24 | that contains a great deal of data.
| | Collapse this transcript |
| Editing and locking records| 00:00 | Once you've added records to your FileMaker
database or if you already have records in
| | 00:04 | the database, then you have the ability to
edit the data that's stored in those fields.
| | 00:09 | You can control whether or not users or
even certain users can edit values inside your
| | 00:12 | database through the Manage > Security option.
This is we can go and set up different accounts
| | 00:19 | and then assign different privilege sets to
those accounts. One of the privileges that
| | 00:22 | you can either add or remove is the ability
to edit any records inside specific tables
| | 00:28 | or inside certain fields. Also, in Layout
mode, you'll notice that when you select a
| | 00:32 | field, and you look at the Inspector, under
the Behavior tab found under the Data tab,
| | 00:39 | by default, you the ability to enter a field
in either Browse mode or Find mode.
| | 00:43 | But you can as a developer turn off the ability for
users to click inside that field. This can
| | 00:49 | be a good idea for things like your Primary
Keys. So you'll notice when I go in to browse,
| | 00:55 | save my changes. Now I can't click inside
that field it also shows that it's not an
| | 00:59 | active field and the rest of the fields are
selected as well. But assuming that you've
| | 01:03 | allowed users to make edits to the data
that's stored in your database, then all they'll
| | 01:07 | need to do is click into one of the fields,
and you'll see that it puts the border around
| | 01:12 | the field, of course, and that means it's
active for editing. You also see that the
| | 01:15 | cursor is blinking at the location where you
can start the edit, here I am selecting the
| | 01:19 | field contents, and I am hitting the Delete
button, and you see that data has been removed.
| | 01:24 | Once I've made the change, now I can click
outside the fields, this is one, of course,
| | 01:28 | many actions that we now commit that change
or save the change to the back end database.
| | 01:33 | So you can instruct your users that they
don't have to hit File Save or anything like that
| | 01:37 | to save the data that they have just changed.
You'll notice when you inside a text field,
| | 01:40 | like for Instance Notes, I can add some text
and before I commit, you will see that I have
| | 01:46 | an Undo Typing option under the Edit menu. I
can say Undo Typing, and then it will then
| | 01:52 | take me back to where I was before. But if I
go in and add or edit some text and then commit
| | 01:57 | the record, you'll notice that the Undo Typing
option is no longer available. So Undo is
| | 02:02 | only available before committing the data
to the database. So as long as you've given
| | 02:06 | users access to these fields and allow them
to be of the make edits based on the account
| | 02:10 | that they logged into database with, you can make
edits. There is actually one other circumstance
| | 02:15 | that I would like bring to your attention
where users may not be able to edit a field,
| | 02:19 | and that's if a record is locked by another
user. Let me show you an example of this,
| | 02:24 | you see here that I'm on Record number 4, and I'm
currently making a change let's say, to Notes.
| | 02:30 | So now actively editing, and let's say
another user in all sort of emulate the
| | 02:36 | experience of another user by opening up a
new window. FileMaker allows you to create
| | 02:40 | new windows and in this case, the new
window takes me to the same layout, same record,
| | 02:45 | and it'll treat me as if I'm a different user.
So let's say I go into this field, and now
| | 02:50 | I'm trying to make and edit as well. Well,
first of all, I want you to note that the
| | 02:53 | change that user 1 has made has not yet
reflected because they have not committed the Record.
| | 02:58 | So user 2 goes in and they try to change it,
and now they get a message says Record cannot
| | 03:02 | be modified in this window since it's already
been modified in a different window. Now when
| | 03:06 | your files actually being shared on a network,
you're going to get more information in this
| | 03:10 | message, and it's going to tell you that a
user--and it will give you the username that
| | 03:14 | they use to login to the database--is actively
editing this record. And this is called Record
| | 03:19 | Locking, and it prevents confusion while
updating records in your FileMaker database.
| | 03:23 | It's not a bug or anything to work around in FileMaker.
It's actually there by design because this
| | 03:27 | way if two users are trying to edit the same
record, if it didn't have Record Locking then
| | 03:32 | really only one of them would be aware
of the changes that have been saved.
| | 03:35 | The only thing that gets saved is whoever changed
it last, but at that same time, both users think
| | 03:40 | that they just went and updated the database.
So this is definitely something you want to
| | 03:44 | take into consideration when training your
users on updating records in your FileMaker
| | 03:47 | database while it's being hosted. Not only
can you add records to a FileMaker database,
| | 03:52 | but FileMaker also allows you easy ways to
make these edits to existing data.
| | 03:56 | It's just important that you understand that when
changes are saved to the database, you're done so
| | 04:00 | through committing a record and also that
FileMaker prevents multiple users from editing
| | 04:04 | the same record at once using
its feature called Record Locking.
| | Collapse this transcript |
| Deleting records and backing up files| 00:00 | A FileMaker database's main purpose is to
be able to store data, and you can add data,
| | 00:06 | duplicate data, edit existing data and just
like you can do those functions, deleting
| | 00:10 | records out of your FileMaker database is
also pretty easy to do. Actually, it may be
| | 00:14 | a little bit too easy. I am going to show
you how to delete data out of your FileMaker
| | 00:18 | database and then talk to about some ways
that you might want to protect your database
| | 00:21 | against accidental deletions. First, just
like creating and duplicating records, you
| | 00:26 | can delete a record by either going under
the Records menu and selecting Delete Record
| | 00:30 | or using the corresponding quick key which
is either Command+E or Ctrl+E. You can also
| | 00:35 | use the Delete Record button that you see
on screen. The only thing that's different
| | 00:39 | about deleting a record as opposed to adding
a new record, you'll see when I hit Delete
| | 00:45 | Record, I at least get a message that pops
up that says would you like to permanently
| | 00:48 | delete this entire record, thus reminding me
that there's no way to retrieve the record
| | 00:52 | once it's been deleted and also not making
the default button the delete button, but
| | 00:58 | instead, by default, allowing me to dismiss
this and therefore, not deleting the record.
| | 01:02 | So you see here that I've got four records in
the database. When I go to hit Delete Record
| | 01:06 | and actually tell it to delete, you notice
now that I've got three. So it's purged that
| | 01:10 | one record that I had active, and it deletes
it from the database. However, if I didn't
| | 01:16 | intend to delete the database, you'll notice
that I can't undo the deletion of that record.
| | 01:21 | Just like when you create a record or edit
a record in a FileMaker database, deleting
| | 01:25 | a record is final. You should also be aware--
and so should your users--under the Records
| | 01:30 | menu is an option called Delete All Records,
and you'll notice, when selected a message
| | 01:35 | comes up that says Permanently delete ALL 3
records, and where's it getting that three
| | 01:39 | records from? Well, you'll notice up here
that there're three records in the table,
| | 01:43 | and I happen to have all records showing.
So whatever records are in what's called the
| | 01:47 | Found Set--we'll talk more about this when
we talk about finding records--but whatever
| | 01:51 | records are in the Found Set or if all
records are showing, those are the ones that will
| | 01:55 | be deleted if the users go ahead and select
the Delete All button. This however, does
| | 02:00 | not have a corresponding quick key, which is
good. If users happen to select Delete All
| | 02:05 | of the Delete Record, which is a common
enough mistake if you are using the menu, they'll
| | 02:09 | know that it's the wrong one because they'll
see the actual number of records in the Found
| | 02:13 | Set quoted here. So make sure that users
understand that that could be a real problem.
| | 02:17 | And since the database is just a storage container,
you might imagine the bad repercussions when
| | 02:22 | it's completely emptied out. Then it's just
a shell without any of the data. Since we
| | 02:27 | are discussing what happens when somebody
accidentally delete your database, it's probably
| | 02:31 | a good time to talk you but backing up your
data. There's a couple if ways to back up
| | 02:34 | your database. First, if you're hosting your
database on FileMaker server, which you should
| | 02:39 | be doing, then you should consult the FileMaker
Server Help on how to set up a backup schedule.
| | 02:44 | It's very easy to do, you just click a couple
of buttons and in that way, if someone happens
| | 02:48 | to delete all your data or if you have file
corruption and can't access your data, you
| | 02:52 | can always revert to a recent backup. If you
do not host your database on server, I strongly
| | 02:57 | recommend that you create copies of your database
and store them outside wherever you're having
| | 03:01 | the database hosted, and you can do so by going
under the File menu, going to Save a Copy As.
| | 03:06 | What I recommend doing is saving as
a compacted file and saving to a different
| | 03:11 | location than this computer. So if you have
like an iDisk or a remote disk option, you
| | 03:16 | can save to those remote locations. You can
also save to thumb drives or any kind of removable
| | 03:20 | drives. This way if you do experience catastrophic
data loss or corruption, then you can always
| | 03:26 | revert to your backup. So it's really
important since the data is usually the lifeblood of
| | 03:30 | any organization, and you must have some sort
of backup plan in place. It's really a very
| | 03:35 | responsible way to approach this. When you
are working with databases, everyone is bound
| | 03:39 | to make some mistakes so FileMaker allows you
the ability to intentionally delete records
| | 03:43 | so that you can correct your mistakes, and
therefore maintain the integrity of your database.
| | Collapse this transcript |
|
|
8. Importing and ExportingImporting data| 00:00 | So far in the exercises throughout this title,
we have been working with creating record
| | 00:04 | data in our FileMaker Databases, but doing
so one record at a time. The true value of
| | 00:09 | a database is to store and manage a lot of
data, and it becomes more and more valuable
| | 00:13 | with the larger amount of data that you have.
The best way to get large amounts of data
| | 00:18 | into your database is to do something that's
called Importing. Earlier in the title we
| | 00:22 | already discussed creating a database from a
spreadsheet, and even importing the spreadsheet
| | 00:26 | into your database as a new table. But in this
movie we are going to discuss just importing
| | 00:30 | data into an existing table in your database.
This will allow us work with very large datasets
| | 00:35 | in some of the upcoming movies. Let's first
look at Products. This one is interesting,
| | 00:39 | because in a previous movie we had imported
the Products table as a new table. As a result
| | 00:44 | this not only created a table for us, but
because we imported as a new table, it also
| | 00:48 | had brought in all the fields from our source.
Each field had been defined as if they were
| | 00:53 | in our original table. However, we see now
that we have a table with no records created
| | 00:58 | in it, and we can tell that because in the
upper left-hand corner, we see a zero here
| | 01:02 | when we are on a Layout that's based on the
Products table. So in order to bring in the
| | 01:07 | data here, we are going to want to use the
Import function. FileMaker Pro allows you
| | 01:11 | to exchange information with other applications
by exporting data from other file formats
| | 01:16 | and then importing data into FileMaker Pro.
So we are going to assume that we already
| | 01:20 | have exported data from another data source,
most data applications will allow you to create
| | 01:25 | data exports, so this is actually very common
function. Inside the Exercise folder we have
| | 01:30 | a file called Products.csv, we can assume that
that was created from some other non-FileMaker
| | 01:36 | source and exported out as a .csv file. So
what we want to do in order to be able to
| | 01:41 | import data into FileMaker is first go to
a layout that's based on the table that we
| | 01:45 | want to populate with this new data. So in
this case, we are going to import in product
| | 01:49 | data, so we go to the Layout called
Products where we see we have no records.
| | 01:54 | Once we've established that context in that layout,
we go to File and then Import and choose File.
| | 02:00 | You will notice that under the Show option,
you can see all the different file formats
| | 02:05 | that are compatible with FileMaker import.
The most common of course are .csv, .txt or
| | 02:11 | one of the two Excel options. But you can
see that you have some other options available
| | 02:15 | to you as well. If FileMaker Pro does not
support the format of a particular application
| | 02:20 | that you are trying to get data out of, you
may still be able to convert the data that
| | 02:23 | comes out of that application into a supported
format by opening it up in something else.
| | 02:29 | For example, a FileMaker Pro does not
import Microsoft access files directly, however,
| | 02:35 | you can export data from Microsoft Access
into a format that FileMaker Pro does support,
| | 02:40 | like a txt file or csv file, then you can
import that file into FileMaker.
| | 02:45 | So although I can't import directly from Access,
I can dump data out of Access and then FileMaker
| | 02:50 | can import that data, so you really achieve
the same goal. So the first step is to choose
| | 02:54 | the source of the import, so here we are
going to say All Available. I am going to go into
| | 02:59 | the exercise files in 08_01, and I am going
to choose Products.csv. And once I hit Open,
| | 03:06 | we are going to be prompted with the Import
Field Mapping window. If we open up this window
| | 03:12 | a little bit, what we are actually looking
at here is on the left-hand side this is all
| | 03:16 | the columns that we see or the fields in
the file where we are importing the data, the
| | 03:22 | Products.csv file. And over on the right-hand
side is the Products table in FileMaker.
| | 03:27 | The actual table has nothing to do with which
fields are on the Layout that we see in the background.
| | 03:30 | The purpose of selecting layout was
just so that we could provide context
| | 03:35 | for which table it is that we want to import
data into. So what we have to do here is tell
| | 03:41 | FileMaker to take the data from one of the
fields on the left, and as you see indicated
| | 03:45 | by the arrow, put it into one of the fields
on the right. So we'd see we need to move
| | 03:50 | these things around and kind of line them up
a little bit. You will see that I can move
| | 03:53 | fields only on the right-hand side, so on
the FileMaker tableside, up or down by using
| | 03:58 | these handles. So here if I click down on
Product Name and move it up, I see that I've
| | 04:02 | lined up Product Name, now I can lineup Category
and Cost, Date created. So what we want make
| | 04:10 | sure that we are doing was make sure that
all the data that we see on the left-hand
| | 04:14 | side had the proper home over on the new
database. So any ones that you don't want to import
| | 04:20 | over, you can just check these arrows here
and they will not be part of the import so
| | 04:24 | that's really what the arrows indicate is do
you want to actually migrate the data over.
| | 04:29 | Sometimes depending on your source file it
takes a little bit extra time to go through
| | 04:32 | the field mapping, but once you do it once,
then the next time you do it, and you point
| | 04:36 | to the same source file, you are Mapping
options will be restored, so it's kind of a do it
| | 04:40 | once and not have to do it a bunch of times
in the future. In some cases you'll notice
| | 04:44 | that some of the fields are grayed out on
the FileMaker side. This means that they're
| | 04:48 | either a calculation field, which of course
you cannot put data into a calculation field,
| | 04:52 | calculation fields only display the result.
And also container fields, if you're bringing
| | 04:57 | it in from a non-FileMaker source, you can
import container fields from FileMaker, import
| | 05:02 | source into FileMaker target, but you can't
import data into containers that's coming
| | 05:07 | from something, for example, like a csv. One
thing is let's say you have a field in your
| | 05:12 | source, and you want to bring that over but
you don't have a field in your current table
| | 05:17 | to be able to import it into, so you can
access the Manage > Database section here and then
| | 05:23 | go and create the fields on the fly, hit OK.
And now what I can do is I can line up the
| | 05:29 | field I just created, which will usually end up
on the bottom with the fields on the left-hand
| | 05:34 | side of the Window coming in from the data
source that I am importing into FileMaker.
| | 05:38 | Once I've got everything lined up or turned
on and off, and I've told FileMaker exactly
| | 05:42 | what data I want and where I want it to go,
then I hit the Import button. Before it actually
| | 05:47 | does the import, you're presented with the
Import option screen and really have one thing
| | 05:51 | to choose here. You want to say whether or
not you are going to Perform auto-enter options
| | 05:56 | while importing. If you recall when you go
and you setup new fields in FileMaker, you
| | 06:01 | can setup Field options that allow data to
be put into certain records each time a new
| | 06:06 | record is created. You can check the box
here to allow all those auto-entry instructions
| | 06:11 | to be performed on every record that gets
imported into the database, or you can uncheck
| | 06:16 | it and leave it off. Keep in mind that if
you turn it off, then you won't have things
| | 06:21 | like Date Created and Date Modified updated,
because unfortunately, FileMaker is going
| | 06:25 | to see today's date as the date that all the
records were created or modified. But it also
| | 06:30 | might not allow you to update things like
pkProductID serial numbers, for example.
| | 06:35 | We will go ahead and turn it on just so
we can see what will happen, say Import.
| | 06:40 | And now what we see on screen is that FileMaker
gives us an Import Summary view. Basically what
| | 06:45 | it tells us is that a total number of 31 records
have been imported and none of them have been skipped.
| | 06:50 | The only thing that could make records skipped
is that if we were in Manage Database,
| | 06:57 | and let's say we have a field just here Cost,
under Validation if we said, for example,
| | 07:03 | that the data that's coming in has some
sort of requirement and the requirement is set
| | 07:08 | to Always, which means that if any of the
records from the data source that we are importing
| | 07:12 | in violate any of these rules, they
will be skipped as part of the import.
| | 07:16 | That's the difference between Always and Only
during data entry. And now we've only brought in
| | 07:21 | 31 records, and there are some more Product
records that we want to bring in, so this
| | 07:24 | gives me an opportunity to show you another
example of importing. We go File > Import,
| | 07:30 | and this time I am going to choose All Available, so
I can choose a FileMaker file called Products_Plants.
| | 07:37 | I hit Open, and one of the nice things about
importing in from another FileMaker file is
| | 07:42 | that you'll see here under Arrange by, instead
of the last order that I set up when I imported
| | 07:46 | from csv, I can choose matching names. That
saves us a whole heck of a lot of steps, because
| | 07:52 | now it lines up all the fields on the import
source with all the fields in the products
| | 07:57 | table, and allows us to hit the Import button,
thus importing all of the data right into our database.
| | 08:03 | So now we see that we've got a total
of 41 records in our database.
| | 08:08 | One important thing to know about when you bring
in data from an import is if you look in the
| | 08:13 | upper left-hand corner here, every time you do an
import, you'll see that you have a number/another
| | 08:18 | number. So what this tells me is that I've
got 10 records found or these 10 records are
| | 08:23 | being isolated away from the entire number of
records that are stored in the table, which are 41.
| | 08:29 | The reason that they're isolated is if I
make a mistake during import, I can just
| | 08:33 | go in here and hit Delete found Records,
which will delete only the 10 that were found and
| | 08:38 | in that case allow me to do my import again,
matching names, to Import, perform, and I
| | 08:48 | can hit Show All and only then will they be
mixed in with the general population.
| | 08:51 | So sometimes it's nice to have sort of a moment to
isolate these records from the rest of records in
| | 08:55 | the table, in case you need to delete them
or perform some action against them.
| | 09:00 | The true advantage of a database is to store and
manage lots of data. Best way to get a large amount
| | 09:04 | of data into your database is to
import it from another data source.
| | Collapse this transcript |
| Importing records to refresh data| 00:00 | In the previous movie we discussed how to
import data from other data sources into your
| | 00:04 | FileMaker tables. You can also import data
into tables repeatedly using the same data
| | 00:09 | source in order to update certain fields in
your target table. When I refer to target
| | 00:13 | table, we are talking about the table
that you are trying to import data into.
| | 00:17 | In this exercise, we are going to do the same initial
steps of the data import, but this time let's
| | 00:21 | start with the Customers table as our target.
Remember the first thing that you want to
| | 00:25 | do is choose the layout that's based on the table
that you want to populate with the imported data.
| | 00:29 | Let's first delete these three records
of sample data before we proceed, we can do
| | 00:33 | so by going under Records to Delete All Records,
and we see here it asks us if we want to Permanently
| | 00:39 | delete ALL 3 records, and we say yes, Delete
All. So now we will go under the File menu
| | 00:43 | and choose Import and then File. And in our
exercise files, you see there is spreadsheet
| | 00:49 | here called customers.xlsx. XLSX files, or
Excel current generation files, happen to be
| | 00:55 | one of the supported import formats. Now we
hit Open, and we can see that we have a series
| | 01:01 | of field on the left and a series of field
on the right. The ones on the left represent
| | 01:05 | the data that's coming in from the spreadsheet
and the ones in the right are the actual field
| | 01:09 | names as defined in our Customers table. So
if we do some lining up, all the fields in
| | 01:14 | the Excel spreadsheet to the proper fields
in our customers table. Now I am going to
| | 01:19 | proceed to hit the Import button and
FileMaker asks me if I want to Perform the auto-enter
| | 01:24 | options while importing. I will go ahead and
say yes, and we import, and we see that in
| | 01:29 | just a matter of a second, 1524 records have
been added to my database. But we will notice
| | 01:35 | out of these 1524 records, that the first
record that got imported was actually just
| | 01:39 | the column headers or the field names. So
I could easily just delete this record if
| | 01:44 | I'd like, but what I am going to do instead
is Delete All the Records, and Import these back in.
| | 01:48 | So we are going to do the same import,
point to the same file, but this time, when
| | 01:54 | we do the import we are going to select this
option here in the bottom left-hand corner
| | 01:57 | that says don't import first record which
contains field names. So we do the Import,
| | 02:02 | and you see now that we get 1523 records and
the first record in the list doesn't represent
| | 02:08 | the fieldnames or column headers. So this
is just like the import that we did in the
| | 02:12 | last movie, but now let's say that the individual
who gave us the spreadsheet has now made some
| | 02:18 | changes to the spreadsheet. We take a look at
it. We notice that they've made some changes
| | 02:22 | with the first name in the Cris Ippolite
record and added a middle name in this Boo Radley
| | 02:28 | record and then we also see that they have
added a new record that doesn't exist in the
| | 02:32 | original 1523. So they were not mentioning
to us that there were going to be updates,
| | 02:38 | so now we have to figure out some way that
we can identify all the records that have
| | 02:41 | changed in the source file and only update
those records because we could have a conflict
| | 02:46 | here if we have been making updates in our
FileMaker database and adding records in FileMaker
| | 02:50 | database, and so on. So we don't have the
luxury any more of just deleting all the records,
| | 02:53 | what are we going to do is we are actually going
to go into the File menu to import records again.
| | 02:58 | This time we are going to point to the
updated spreadsheet, and we are going
| | 03:02 | to use the matching names update, so it
syncs up all our names for us but I want to bring
| | 03:08 | your attention down here in the bottom left-
hand corner to the Import Action. By default in
| | 03:13 | the last few imports that we have done,
we have had it set to Add New Records.
| | 03:17 | But this option here called Update matching records
in found set, allows us to pick a field that
| | 03:24 | is going to be a unique identifier. So we
don't have keys involved in this particular
| | 03:28 | import, and many times you don't so what you
want to end up doing is finding a field that
| | 03:33 | will be unique both in the spreadsheet data,
and in the customer data, so one that actually
| | 03:38 | fits that here is this Address Email field.
If we click on the arrow in between the two
| | 03:43 | Address Email fields, you will see that it
changes to a double arrow and looking at our
| | 03:47 | Field mapping legend down below, that indicates
that we are going to match records based on this field.
| | 03:52 | What it means is anytime you find a record
in the spreadsheet that has the same
| | 03:57 | email data as the record in FileMaker, then
update any fields that may have changed, and
| | 04:03 | we can go through each one of these records
and turn off some of the fields that we don't
| | 04:07 | want to have update if we would like, these
could be ones that we've updated in the FileMaker
| | 04:12 | database, and we don't want those to be touched.
So really you go through and either select
| | 04:17 | a double arrow for the match field or combination
of match fields or you have the dash that
| | 04:22 | means that you're not going be updating any
data or you have the arrow which means that
| | 04:27 | you're going to update the data in FileMaker
with the new updated fields in the spreadsheet.
| | 04:32 | So the key here though also is that we've
learned from our source of the data that they
| | 04:37 | may have added new records of database. So
we see this option here that only appears
| | 04:41 | when we choose Update matching records in
found set, and it's called Add remaining data
| | 04:45 | as new records. So now by configuring the
import like we've done here, what it's going
| | 04:51 | to do is find any records that have been updated
in the spreadsheet, update those in FileMaker
| | 04:57 | and then add any records that don't exist
in the FileMaker database. So let's go ahead
| | 05:00 | and do the Import, and we do the Import, and
now we see that we have 1526 records, I hit
| | 05:07 | OK and sure enough, we see that the update
has been made to the first name on the
| | 05:12 | Cris Ippolite record, and we see that the middle
name has been added to the record here in
| | 05:19 | the Contact first and then also if we do a
search, we will see that this record has been
| | 05:26 | added, and that of course was the record
that was new inside the spreadsheet. So we see
| | 05:31 | this change reflected, that change reflected,
and this new record added. This process could
| | 05:35 | be very useful if, for example, you have a
copy of your database on your desktop computer
| | 05:39 | and another copy on your laptop, you can then
update the file in your office with the changes
| | 05:44 | you made on the road or you can just select
some of the fields to update while leaving
| | 05:48 | most of the records and fields that you did
not select untouched in your database.
| | 05:53 | In short, this is an excellent way to do a one-way
sync from one data source into your FileMaker database.
| | Collapse this transcript |
| Exporting data| 00:00 | FileMaker Pro offers many sophisticated
ways that you can connect a FileMaker database
| | 00:05 | to a non-FileMaker data source. However,
sometimes you might just want to share bits and pieces
| | 00:10 | of your data without a direct connection to the
sources. In these cases, you can use FileMaker's
| | 00:15 | ability to export data out of your
FileMaker database in order to be able to share it.
| | 00:19 | This also works if you just want to share
data with people who don't have FileMaker Pro.
| | 00:23 | There's a couple ways that you can export
data, for example, you can go under the File
| | 00:27 | menu, and you see we have got the Export
Records option here. What we can do is choose the
| | 00:33 | location of whatever file it is that we want
to export, and you will see under the Type
| | 00:37 | dropdown, there are various different
Export file formats to choose from, and you will
| | 00:42 | want to check with the recipient of this
data to see which file format they prefer, and
| | 00:47 | if they're trying import that data into one
of their non-FileMaker data sources, you might
| | 00:51 | want to see what some of the compatible file
formats are. For example, you can choose Tab-Separated
| | 00:56 | Text or Comma-Separated Text, those are
commonly referred to as TXT files or CSV files, both
| | 01:03 | of these are file formats that can be imported
into nearly any database solution or any solution
| | 01:07 | that stores data at all. You have got DBF,
Merge files, even an HTML Table which can
| | 01:13 | be opened up in a browser or can be in
embedded inside HTML of existing web site if you just
| | 01:18 | want to share some of your data, if the data
of course is static and doesn't change that
| | 01:22 | often or as Raw XML which can be imported
into many other applications and some web
| | 01:28 | applications also, and also you see here
the original Excel generation extension. xls,
| | 01:35 | and then you've got the new latest generation
.xlsx. That's the option we are going to choose
| | 01:40 | for this experiment. So you also notice
below here that after we Save this we can either
| | 01:45 | open it up in its native application--which
I will choose to do--or if we are going to
| | 01:49 | send this to somebody anyways, I can check
this and it will automatically create an email
| | 01:53 | in whatever my default mail application might
be and then send this file as an attachment.
| | 01:58 | But for now let's just say Export, and we
will save to the Desktop. Now because we have
| | 02:04 | to choose Excel as the Export Option, this
additional window pops up that we don't see
| | 02:09 | if we've chosen other formats. This one is the
Excel Options where we can name the Worksheet,
| | 02:13 | Title, Subject, or Author. We will skip those
for right now. Now we are presented with the
| | 02:18 | Specify Field Order for Export dialog. On
the left-hand side, we see all the different
| | 02:23 | fields that are available in the layout that
we are on, so you see we are on a layout based
| | 02:28 | on the Customer Table. We can also see
all of the fields in the Customer Table.
| | 02:33 | So if we happen to have layout that only has
four or five of the customers fields on it, we
| | 02:36 | will see those in the current layout dropdown, but if
we want to see all of them we can choose Current Table.
| | 02:42 | This is basically a list of all the
fields that we have at our disposal
| | 02:45 | to export. So let's say we want to select
a series of them let's say the individual
| | 02:50 | who needs this data is going to use it for
a mail-merge. We will hold down the Shift
| | 02:54 | key and select all the different address
fields and hit Move, and we see those appear in the
| | 02:58 | Field export order box in the right, and we
will also say CompanyName which I can double-click
| | 03:03 | on, and you see we have got this little
handles here that allow us to move and reorder the
| | 03:08 | different fields for export. Finally, let's
say we double-click on PhoneNumber and add
| | 03:13 | that to the bottom of the list. So now I can
hit the Export button and FileMaker is just
| | 03:18 | exported the data, and its exported it in the
form of a spreadsheet, and we've instructed
| | 03:25 | it to automatically open up the spreadsheet,
and we see that the spreadsheet has exported
| | 03:30 | out all the columns that we chose with all
the data in the order that we chose. Now one
| | 03:35 | thing that you will have to be aware of is
that the column headers that get created in
| | 03:39 | your Export are actually the names of the
fields. You can see the naming conventions
| | 03:43 | that I used, where I didn't put any spaces
in here. But keep in mind the recipient or
| | 03:48 | even yourself can go and make those say
whatever they like, and the other thing to notice is
| | 03:53 | that the number of rows here--1524, including
the column headers--and that actually matches
| | 03:59 | what's called the found set in our database
so one way that I can show you that this can
| | 04:05 | be modified is if you don't want to share
all of your data--let's say, for example, I
| | 04:10 | go in and isolate all the records that have
the address state of AK, and you see here
| | 04:16 | now that's giving me 26 records out of the
1523. So now when I go to Export--I am going
| | 04:25 | to replace the original one, I am going to
keep these fields but I am going to export
| | 04:29 | them all out--and now when we open it up,
you see that only 26 of those records were
| | 04:33 | exported. So the idea here is that you can
pick and choose which data it is that you
| | 04:36 | want to export by doing where are called foundsets,
and then you can pick the different file formats
| | 04:41 | as well. You can export as many times as you'd
like in whatever way that you choose without
| | 04:45 | any risk of changing or deleting the data in
your original FileMaker file. Unlike importing
| | 04:51 | or each time you import, you are adding more
records to the database, this time you are
| | 04:54 | just making copies of data that already exists
in FileMaker without tampering with the original
| | 04:59 | data in any way. The importing and exporting
features can serve as valuable time-saving
| | 05:04 | functions especially when you're working with large sets
of data or have users without access to FileMaker Pro.
| | Collapse this transcript |
|
|
9. Creating LayoutsIntroducing layouts | 00:00 | FileMaker Pro developers spend a significant
amount of time working with layouts, and that's
| | 00:05 | because FileMaker layouts is the primary way
for presenting and organizing data in FileMaker.
| | 00:10 | Layouts serve as both user interfaces
and areas for design and development.
| | 00:15 | In this chapter, we are going to learn how to work
efficiently and effectively with layouts,
| | 00:18 | which is an essential skill for any FileMaker
developer. Now first, when we just start talking
| | 00:22 | about layouts, you'll need to know that layouts
come in various shapes and forms and can
| | 00:26 | be rather simple or extremely detailed. It
all depends on the needs of the particular
| | 00:31 | database system, and the aesthetic sense
and design skills of their creator.
| | 00:34 | Generally speaking, a FileMaker system has a few types
of standard layouts. One which we call a Form,
| | 00:41 | which is named after been able to view as a
Form View, this is seen as a detailed view,
| | 00:48 | generally used for adding records or data
entry or modifying data or just looking at
| | 00:52 | as much data on a single record on screen
as you can at time. We generally create at
| | 00:58 | least one of those for each primary table,
which allows of course for data entry and editing.
| | 01:03 | A List View, which would use the List View
option as well is actually designed
| | 01:09 | in a completely different way to have a
much smaller body. This is where you will pick
| | 01:13 | and choose certain fields and these are
generally used for doing searches, much like you see
| | 01:18 | on the web, when you do a search in the
search screen and then it comes back with matching
| | 01:22 | records, you only see a handful of columns,
and they are compared to all the overall fields
| | 01:26 | that are available. It's also very common
to create at lease one List View for each
| | 01:30 | primary table in the FileMaker Database. The
other type of very common layout in FileMaker
| | 01:34 | is reports. FileMaker has all sorts of sophisticated
reports functionality, which we will be covering
| | 01:41 | in an upcoming chapter. But those are a common
area for creating layouts in FileMaker.
| | 01:46 | Layouts are the primary user interface and data display
mechanisms in a FileMaker Pro database system.
| | 01:52 | Each individual data entry screen, list view
or report is going to be a separate layout.
| | 01:58 | You might need only a handful of layouts in
one application--as a matter of fact right
| | 02:01 | now this one has only got four. And it's got
all the default layouts, meaning every time
| | 02:06 | you create a table, FileMaker goes ahead and
creates one Layout for each one of those tables.
| | 02:12 | Keep in mind that there's no practical limit
to the number of layouts that you can create
| | 02:15 | in a database file. It really just depends on
what you need to accomplish with your database.
| | 02:20 | In our exercise files, we're going to
create a detailed layout for each primary table,
| | 02:24 | Customers, Products, and Invoices. And then
List Views for each of those tables and then
| | 02:28 | later some reporting in the reporting section.
Before we create any layouts though, I first
| | 02:33 | want to get you acquainted with layout mode.
Of course, we go from mode to mode under the
| | 02:38 | View menu. So I'll go to View > Layout mode.
As you learned in an earlier chapter, Layout
| | 02:44 | mode is one of the four modes available in
FileMaker Pro, provides you with all the tools
| | 02:49 | you need to add or modify layouts. Keep in
mind that you can restrict a user's ability
| | 02:54 | to access layout mode by changing the settings
in his or her privilege set. You want to see
| | 02:58 | the help system for security for more information
on how to do so. As a FileMaker developer,
| | 03:03 | you are going to spend a great deal of time
switching back and forth between Browse and
| | 03:07 | Layout mode. So learning how to change modes
quickly is quite useful. There are four ways
| | 03:11 | to get in and out of layout mode. Of course,
the first of which is under the View menu.
| | 03:16 | The second of which is going to be using the
shortcut keys, either the Command+L, or Ctrl+L.
| | 03:23 | Also, you'll notice that you can exit the
layout and enter layout mode by hitting the
| | 03:28 | Edit Layout or Exit Layout button on the
far right-hand side and then also on the very
| | 03:32 | bottom of your screen you see that there is a
dropdown that allows you to toggle between modes.
| | 03:37 | The most common is likely using the
Quick Keys on your keyboard. For Mac users
| | 03:42 | Command+L, and for Windows Ctrl+L. As you
see here, in our layout dropdown in Layout
| | 03:47 | mode, FileMaker has created four layouts for
us, one for each of the tables that have been
| | 03:53 | created, under File > Manage > Database. Here
you see we've got the four Tables, and if
| | 03:59 | you go over to our Relationship graph,
you'll see each one of the four tables, of course
| | 04:03 | linked with all the relationships is represented
on this graph. One important thing that you
| | 04:07 | will need to understand moving forward is
that anytime you create a layout, you have
| | 04:11 | to figure out which one of your tables that
layout is can be based off of. This concept
| | 04:16 | is called the context of a layout and becomes
vitally important as we move into more intermediate
| | 04:20 | topics, but for right now, you'll understand
that the first decision that you have to make
| | 04:24 | when create a layout is to pick the table
that it's based off of. In the following movies
| | 04:29 | we'll explore how to create List Layouts for
each of our primary tables, as well as mailing
| | 04:34 | envelope layouts, for mailing things to our
customers. Because layouts are the primary
| | 04:38 | way of presenting and organizing data in
FileMaker Pro, and layout serve as both interfaces and
| | 04:44 | areas for design and development, we are going
to spend a lot of time working with layouts,
| | 04:48 | and you are going to want to be
familiar with the concept of the layout.
| | Collapse this transcript |
| Working with themes in new layouts| 00:01 | In the upcoming movies in this chapter, we're
going to be looking at creating new layouts
| | 00:04 | in the database using FileMaker's Layout
Assistant. One of the options we'll see when we build
| | 00:09 | those layouts is the ability to select something
called the theme. So before we go onto building
| | 00:14 | layouts, I wanted to take a moment and first
talk about themes. You can use FileMaker Pro
| | 00:18 | themes to enhance the appearance of the layout
or report, or give all your layouts a consistent look.
| | 00:23 | A theme affects the characteristics
of a layout, including the Background Color,
| | 00:27 | Field Borders and Fill, and text attributes
in and outside of fields. You'll see here,
| | 00:32 | I've got an example of one of the Starter
Solutions called Personnel Records.
| | 00:35 | In all the Starter Solutions that ship with FileMaker,
have a theme applied. You'll notice that some
| | 00:41 | of the aspects of the theme, for example,
are the color of the fonts, rounded corners,
| | 00:46 | different icons that ship with it,
background colors and patterns, and even some of the
| | 00:51 | styles that are used for the tab controls
that you see on screen. And within each one
| | 00:56 | of these Starter Solutions, they've applied
the theme to all layouts inside the database.
| | 01:03 | A theme doesn't control the placement or
behavior of fields or objects in a Layout mode, just
| | 01:07 | the way that they look. You have the option
to apply a theme to a new layout using the
| | 01:13 | new layout report assistant, which we're
going to do in the next couple of movies, and you
| | 01:17 | can change the theme of an existing layout
in Layout mode, which I'll demonstrate in
| | 01:20 | the final movie in this chapter. But you can
see when you're in Layout mode, there's an
| | 01:25 | option under the Layouts menu for Changing
Theme. This will tell you which theme you
| | 01:31 | have chosen at the time, give you a preview,
and also shows you a preview of all the different
| | 01:36 | themes that are available. FileMaker has
all these brand-new themes that are all based
| | 01:41 | on cascading style sheets. If you don't want to
apply a theme, you can pick Classic. Otherwise,
| | 01:47 | you can sort of tour through all the different
themes and see if anything fits your liking.
| | 01:53 | What I would recommend is that you only use
themes on new layouts, since modifying existing
| | 01:58 | layouts after you apply a theme can be kind
of an arduous task. But each one of the themes
| | 02:03 | has different things like different value
list, drop downs, round or square corners,
| | 02:08 | different colors of the text, different background
colors, all these things ship with the theme itself.
| | 02:13 | There are a couple of things that you
might want to keep in mind though if you're
| | 02:15 | interested in using themes. First, you must
apply themes across every layout in your database,
| | 02:21 | you cannot apply a theme across all layouts
at once. So that means if you've got a couple
| | 02:25 | different layouts, like you have got
Personnel Details, I'll need to go in and apply the
| | 02:30 | theme to this layout and then I'd have to
go to the next layout, Personnel, go in and
| | 02:35 | apply the same theme there. But as you can see
I can do that, and it gives me this consistent
| | 02:40 | look and feel. That's also best to pick a
theme before you start your database and then
| | 02:44 | stick with that same theme each time you create
a new layout. Again, going back retroactively
| | 02:49 | can create some additional work for you that
might not be necessary. You can also change
| | 02:53 | a theme later on as you see here under the
Layouts menu, but many times you may have
| | 02:58 | to make little tweaks as you apply themes
and any customizations that you make to themes
| | 03:02 | could be lost when you change to another theme.
Object attributes, even if they're part of
| | 03:07 | a theme, like for exampl, this text, can
still be modified using the Inspector, and
| | 03:12 | we'll go into all the different tools that are
available in the Inspector in the next chapter.
| | 03:16 | You may also notice that there are some
themes that have the word touch after
| | 03:21 | them, for example, Ocean Touch. These are
themes that are intended to be used for iPad,
| | 03:27 | iTouch, and Iphone devices. So they're consistent
with their parent themes, but they have larger
| | 03:32 | buttons and fields to account for finger
interaction on each one of the devices that I have mentioned.
| | 03:37 | There are even some layouts in each Starter
Solution as you see here in Personnel files
| | 03:41 | that already have these themes applied. So
this is a good way for you to get familiar
| | 03:47 | with some of the options that you available
to you in each theme. It's a good idea to
| | 03:50 | get familiar with some of the themes before
you start building your layouts, so you can
| | 03:53 | make these theme decisions as you create each
layout in your solution. Themes are optional,
| | 03:57 | and there's certainly not required. In the
exercises and the rest of this title, we're
| | 04:01 | going to use the Default Themes so that I
can better demonstrate how to use FileMaker
| | 04:05 | layout tools to build your layout elements
without the constraints of a theme.
| | 04:09 | But in the real world you may want to consider
using themes when you create new layouts so that
| | 04:13 | way you don't have to spend a lot of time
working with the layout tools in order to
| | 04:16 | create a very professional and crisp looking
database. FileMaker 12 has introduced this
| | 04:21 | new concept of these cascading style sheets
based themes. So this is something that if
| | 04:26 | you've used versions of FileMaker in the past,
you may have ignored themes. But now it's
| | 04:30 | a really good time to get reacquainted with
them. You don't have to be a designer to have
| | 04:34 | a crisp, clean and consistent look in
layout your FileMaker database solution.
| | 04:38 | Instead you can simply use one of the professionally
designed themes that ship with the product.
| | 04:42 | Keep in mind that the best practice is to
use themes on new layouts and use FileMaker
| | 04:47 | layout tools on existing ones.
| | Collapse this transcript |
| Using the Layout Assistant to create List views| 00:00 | There are many uses for a List View inside
of FileMaker databases. Perhaps you want to
| | 00:05 | look at all of your different customer
records, let's say all in one layout or you want to
| | 00:10 | create a report. Maybe you just want to display the
same data with a different look or functionality.
| | 00:15 | Whatever the need, you'll end up creating
a new layout. You can create an unlimited
| | 00:20 | amount of layouts based on each table in
your database, so don't think that you have to
| | 00:23 | just stick to one. Let's begin first by
creating a List View of the Customer Layout.
| | 00:29 | Right now, we already have a layout that we're going
to call the Customer Detail Layout, and this
| | 00:34 | is a Form View that has every customer
field on it with all sorts of spacing, and this
| | 00:39 | is something that can be used for data entry
or editing existing data. But the reason that
| | 00:44 | we would want to create a List View for each
table on our database is so that we can see
| | 00:49 | potentially multiple records on screen at a
time instead of just one. So the way that
| | 00:53 | we add new layouts is first by going into
Layout mode. We'll go into Layout mode under
| | 00:58 | the View menu, and we're going to invoke the
Layout Report Assistant by clicking on the
| | 01:05 | Layouts menu and choosing New Layout/Report.
The first screen of the New Layout/Report
| | 01:09 | assistant asks us to make a couple of quick
decisions. First and really quite frankly
| | 01:14 | the most important one is to pick the table
that the layout is going to be based off of.
| | 01:19 | And again, I just want to remind you that
any layout needs to be based off of one of
| | 01:25 | the table occurrences on your relationship
graph. So I can create layouts based on Customer
| | 01:30 | Table, Invoice Table, Products Table or even
Invoice Line Items. That is what we call the
| | 01:35 | context of a layout. So keep in mind that at
any given time a user is on only one layout
| | 01:40 | at a time, which means that any user could
be in the context of any one of these tables.
| | 01:45 | We'll explore this concept further as we move
along, but for now, we just need to pick one
| | 01:50 | of the tables we're going to choose Customers,
because as I mentioned before we're going
| | 01:53 | to a create a List View of Customer records.
The next option that we have is to Name the
| | 01:57 | layout, I'll name it Customer List, and we
can choose to see it in the dropdown menu
| | 02:03 | when we're in Browse mode, and all we've to
do to make that happen is to keep the check
| | 02:07 | box selected. Now we go under Layout Type,
and I choose List view, and we see a little
| | 02:12 | bit of a preview over here on the right-hand
side. There is a bunch of different options
| | 02:16 | though that we've got here, and I'll just
quickly review with you what each one of these
| | 02:19 | may be. A Standard Form is going to show one
record at a time, and that's used for detail
| | 02:24 | views, Table View is the spreadsheet type
view where multiple records can be seen on
| | 02:28 | screen at a time. List View, the one that we
selected here, also shows multiple records
| | 02:33 | on screen at a time but doesn't have that
spreadsheet looking view or constraint.
| | 02:37 | A Report is like a List View, but it groups
by certain data. We're going to cover these
| | 02:41 | extensively in the Reporting Chapter. You
can also pick a Blank Layout if you just want
| | 02:45 | to use all the FileMaker Layout tools to
create something from Scratch. Then later we'll be
| | 02:50 | talking about Labels and Envelopes. These are
used for the purpose of sending out mailers
| | 02:54 | of course to any of the contacts that you
might have in your database. So let's go and
| | 02:58 | select List View and hit the Next button,
and now we're asked to move any of the fields
| | 03:05 | that we want to see on this List View over
to the window on the right. Generally, List
| | 03:09 | views do not need to be as comprehensive as
detail views, so you want to put only fields
| | 03:13 | on this layout that will help you distinguish
one record from another, but still enough
| | 03:16 | for them to make the layout meaningful. So
we'll pick AddressCity, AddressState, CompanyName,
| | 03:24 | ContactFirst, ContactLast, PhoneNumber, and
AddressEmail. And then of course we can move
| | 03:32 | these in a different order if we would like
to, we'll keep them in the order that we've
| | 03:35 | got here, but I could for instance, move
AddressEmail up here if I would like. Now we hit Next,
| | 03:43 | and here we'll choose the Field by which you
want to order or sort the records in a list.
| | 03:47 | So we're going to see multiple records on
screen at a time, and we want to know in which
| | 03:52 | order they are going to be presented. So
let's choose ContactNameLast, and we'll make it
| | 03:57 | sort in Ascending order. Then you can pick
a theme for your layout. In this example,
| | 04:02 | we're just going to stick with the Classic
theme so that we can create our own design
| | 04:06 | as we move ahead. But you can always browse
all the different themes that shipped with
| | 04:09 | FileMaker 12 and see which one might fit with
your design aesthetic the best. I'll go back
| | 04:14 | to Classic and again just another note, this
is the area where you should choose one of
| | 04:19 | the many themes to apply to this layout. As
a general rule for consistency, you'd also
| | 04:23 | want to choose the same theme on all the different
layouts. So I'm choosing Classic here, and
| | 04:28 | I'm going to apply that to the rest of the
layouts that I create in this database, but
| | 04:31 | if you chose Cool, for example, I strongly
suggest that you choose those for all new
| | 04:35 | layouts moving forward. Now we'll hit Next, and
it takes us to the Header and Footer Options.
| | 04:42 | For example, you could pick in the Top center,
Page Numbers, and that type of thing.
| | 04:46 | We'll pick Page Numbers for the Bottom and then now
finally, FileMaker asks us to create something
| | 04:52 | called a script. We're going to cover scripts
later in this title, but scripts are a stored
| | 04:57 | series of events, and in this case what FileMaker
can do is create a script that takes you into
| | 05:03 | Browse mode or sorts by a certain selected
field, that type of thing. In this case, we're
| | 05:07 | going to say not to create a script and
just proceed on to the final view, and in this
| | 05:11 | case, it asks us whether or not we want to
View it in Browse mode or Layout mode, so
| | 05:15 | let's go ahead and finish up, we'll View it
in Browse mode. So now you can see that we've
| | 05:19 | got all 1523 records in a List View, we've
got information on the Header that tells us
| | 05:25 | what it is that we're looking at, and we can
scroll through these different records and
| | 05:29 | see all the different data that we've got.
This makes a great layout for being able to
| | 05:33 | do searches and looking at isolated Found
Sets of data, and then if we need to we can
| | 05:38 | select one of these items and still navigate
over to the Customers Table, which keeps our
| | 05:43 | Found Set, and that's because both layouts are
based on the same table or have the same context.
| | 05:48 | And we can move back and forth from
the Form View to the List View if we like.
| | 05:53 | You'll notice that the List View not only
has a very short height here, but it's also
| | 05:59 | set to View as a List, which are a combination
of those things are really what are creating
| | 06:03 | a List View for us. In the next exercise file,
I'll have already created the Products List,
| | 06:08 | and Invoice List Layouts in the same manner.
You can do the same as additional practice
| | 06:12 | if you would like. Because Layouts are the
primary way that users will interact with
| | 06:16 | your data, the Layout Assistant is a great way
to quickly create new layouts in your database.
| | Collapse this transcript |
| Using the Layout Assistant to create labels and envelopes| 00:00 | In the previous movie, we looked at using
the layout assistant to create a list view.
| | 00:05 | You can also use the layout assistant to quickly
create some specialized layouts, like layouts
| | 00:09 | for a mailing labels or envelopes. FileMaker
has label and envelope sizes built right into
| | 00:13 | the assistant to make creating layouts like
this very easy. In this movie we'll create
| | 00:18 | Customer Mailing Labels and Envelopes using
this assistant. Let's begin by starting with
| | 00:23 | our customers table and creating a new customer
labels layout. First, we'll enter Layout mode
| | 00:29 | and then we'll click the New Layout/Report button,
which will invoke the same New Layout/Report
| | 00:37 | assistant as we get when you click on the
Layouts menu. So now of course we need to
| | 00:41 | choose the ever-important context of our layout.
We are going to choose the Customers table,
| | 00:46 | because that's the data that we want see in
this layout. Next, we want to give this Layout
| | 00:50 | a Name. So we'll call it Customer Mailing
Labels. Then we'll choose whether or not this
| | 00:55 | layout will appear in the layout dropdown
list in Browse mode for users with full access
| | 00:59 | privileges. We'll say yes, keeping this
checked as it is. Next we need to choose what kind
| | 01:04 | of layout we'll be creating. This option will
be easy, since we want to create Labels.
| | 01:08 | We'll see all the way down on the bottom we have
the ability to create Label layouts, and we'll
| | 01:13 | see the preview change in the right-hand side.
Now we hit Next, and we see that FileMaker
| | 01:19 | has an entire series of Avery labels and
DYMO labels all built into the FileMaker
| | 01:26 | Layout Assistant. So if you went and
purchased some labels already, like the ever-popular
| | 01:31 | Avery 5160, you just choose the number that
corresponds to either your Avery or DYMO labels,
| | 01:37 | and you can hit Next. But before we proceed,
I should let you know that you can create
| | 01:40 | Custom Layouts if you'd like, using different
specialized page margins and Heights and Widths
| | 01:46 | of the actual label itself. So now once we've
chosen the Label Style, we have to pick the
| | 01:51 | fields that are going to appear on each label.
Label Layouts are unique in that there will
| | 01:56 | likely be three columns of records on any
one page. So really we don't need to pick
| | 02:00 | that many fields, because we don't have that
much space to work with on the layout. You'll
| | 02:05 | see what I mean when we're done, plus of course,
these are mailing labels, so they only really
| | 02:09 | need to contain the address and the company name
of the customer. So let's pick the CompanyName,
| | 02:16 | and you see that it's creating merge fields.
This is an entire text area with the merge,
| | 02:20 | so we need to hit the Return button to start
a new line. And then StreetAddress, start a
| | 02:26 | new line, AddressCity--let's put a comma in
there and then a space--AddressState, space
| | 02:36 | and then AddressZip. So you see that we put
Returns where they're needed, and we can even
| | 02:41 | put different texts like a comma, for example,
whenever those are needed as well.
| | 02:47 | Then I can get fancy here if I'd like too. I can go
in here and add another Return line and type
| | 02:52 | in some text, put a little space in there
and say ContactFirst, space, ContactLast.
| | 03:02 | And we're going to copy the fields in the
Label contents for use later. So I'll just
| | 03:05 | select them and hit Copy, and they'll be saved
to my clipboard. But now let's hit Next.
| | 03:11 | And finally, we'll choose whether or not we
want to see our new layout in Preview modes.
| | 03:16 | We can see the data and how it's going to print
or in Layout mode. So let's take a look at
| | 03:20 | it in Preview mode, and now we see we've
created is Mailing Labels that print in four columns,
| | 03:26 | and it's got all the spacing built in so
that all you need to do is print these off and
| | 03:30 | stuff your printer with the Avery 5160 labels.
You can pick any one of the Avery labels that
| | 03:35 | you see in the wizard, and it makes printing
labels extremely easy. One of the things that
| | 03:39 | I'll mention to you is when you're in Layout
mode, you can go in and add formatting by
| | 03:47 | clicking on the Format bar here. This reveals
different Fonts that you can choose, different Sizes.
| | 03:53 | For example, I can just go in here
and select the CompanyName field and make
| | 03:57 | that bold, or I can make the Attention field
italic. When I go back into Browse mode and
| | 04:05 | Save my changes, I can see what these look
like on screen. Now if I go into Preview mode,
| | 04:12 | I can see that the contacts that actually
have a Company Name, have that in bold, and
| | 04:16 | in every case the values that are inside the
Attention line are in italic. And you'll notice
| | 04:21 | that we weren't presented with choosing a theme
when we were creating the Mailing Labels,
| | 04:26 | and that's because FileMaker actually recommends
that you use the classic theme for all printable layouts.
| | 04:32 | That way we are now printing all these
extra colors and formats and different
| | 04:35 | images that are embedded into the background of
layouts. Therefore they'll select the classic
| | 04:40 | theme by default on all Mailing Labels, and
Envelope Layouts. Now we're going to very
| | 04:45 | quickly create some Customer Envelopes Layouts.
First, let's go into Layout mode, and we'll
| | 04:53 | hit New Layout Report. We'll keep it on Customers,
because that's going to be the context, we
| | 04:58 | actually want to see customer data printed
out on these envelopes. And we'll add Customer
| | 05:04 | Envelopes is the name. And go all the way
to the bottom and choose Envelope.
| | 05:09 | I'll hit Next. Now we want to choose the fields that
are going to be on each envelope. We are going
| | 05:13 | to pick CompanyName, StreetAddress, City, State,
and Zip. We can either do so by double-clicking
| | 05:18 | on the field list or selecting the field and
pressing the Add field button. If you haven't
| | 05:23 | cleared your clipboard since the last example,
you can simply Paste. And you see that that
| | 05:28 | value will show up here, and saved us a bunch
of clicking. Now we can hit Next, and let's
| | 05:34 | say, look at our layout in Layout mode. And
you see what FileMaker has done is that it's
| | 05:38 | made the header large enough in the body,
which we'll talk about in the next chapter,
| | 05:42 | large enough so that when you feed an envelope--
a standard number 11 sized envelope into your
| | 05:48 | printer--it'll print the Contact Name and
all the fields that you've chosen, in the
| | 05:52 | appropriate location. And you can see what
this will look like when we go into Preview mode.
| | 05:57 | In the same way I talked about in the
previous version, you can double-click on
| | 06:00 | these and treat them as text, by applying
different format into each line if you'd like.
| | 06:08 | Now because layouts are the primary way
that users interact with your data, the Layout
| | 06:11 | Assistant is a great way to quickly create
new specialized layouts that use columns or
| | 06:15 | specific templates, like envelopes or labels.
| | Collapse this transcript |
| Applying themes to existing layouts| 00:00 | FileMaker 12 has an entirely new set of themes.
They are not only available when you're creating
| | 00:05 | new layouts, but they can also be applied to
existing layouts, and in this video, we're
| | 00:10 | going to look at some of the considerations
that you should take into account when applying
| | 00:13 | a theme to a layout that already has some
design style. For example, we're looking at
| | 00:19 | a file that we've got on screen here, it's
Invoices_09_05 in the exercise files.
| | 00:24 | But this file is actually an old Starter Solution
from the previous versions of FileMaker before
| | 00:29 | 12. So it already has some style applied to
it, and we're going to see what happens when
| | 00:34 | we change the theme to one of the new FileMaker 12
themes. So let's say we want to apply a
| | 00:39 | new theme to this database. First, in order
to make any changes to the layout, we have
| | 00:43 | to go into Layout mode, and now that we're
in Layout mode, we're going to go under the
| | 00:47 | Layouts menu, and choose Change Theme. It
tells us that we've got the Classic theme
| | 00:53 | chosen and really what that means is we don't
yet have any themes chosen. Now, you can change
| | 00:59 | the theme for the layout by choosing Change
Theme and then let's look through some of
| | 01:03 | the options that we've got, how about Cool
Gray? It looks nice and subtle, and it's got
| | 01:09 | some color schemes in there and some
rounded fields and looks very attractive.
| | 01:14 | So let's hit OK, and let's go into Browse mode and
hit Save, and we see that our theme translated
| | 01:22 | reasonably well actually, mostly because the
previous layout was designed using specific
| | 01:28 | field sizes in the older Starter Solution.
Now, changing themes is not going to cause
| | 01:32 | objects to reflow on the designed surface.
It's simply going to apply new appearance
| | 01:36 | attributes according to the new theme style
sheet. So really what we've done is we've
| | 01:40 | chosen a new set of instructions that are
going to apply design elements to the layout.
| | 01:45 | Changing theme really performs two actions,
first, it actually changes the layout's theme,
| | 01:50 | and second, it reverts all the objects into
theme defaults. These types of objects are
| | 01:55 | things like fields that gives a certain
height of the field and rounded corners and Tabs,
| | 02:00 | for example, get bold text and a certain font
that's applied. However, we do see that some
| | 02:06 | things have changed a bit, it may require
that they be built from scratch. Notice the
| | 02:10 | buttons on the top of the screen are still
buttons as we can see by the hand over mouse
| | 02:15 | button, but in the previous version of the
layout, they were made using layout tools
| | 02:19 | that are now not specifically referenced in
the new theme style sheet. So for example,
| | 02:23 | if we look in Layout mode, we notice that these
buttons are applied to the top of the screen.
| | 02:29 | Now, this particular theme that we've
chosen Cool Gray apparently doesn't have any
| | 02:34 | instructions on how to handle buttons,
because we see that the button sizes have changed,
| | 02:40 | they're not aligned like the way that they
were before, and we've got bold text in one
| | 02:45 | button, and the regular text in others. So
really what happened here is not that anything
| | 02:49 | changed, but just that there weren't any
instructions to be able to convert this into something
| | 02:53 | that was consistent with the rest of the
theme on the layout. New themes have these things
| | 02:57 | called Cascading Style Sheets that have basically
a list of instructions on how to handle objects,
| | 03:03 | and this just simply didn't have any
instructions on how to handle these objects.
| | 03:07 | User may need to adjust the layout in order to accommodate
the new theme. Like, for example, you'll see
| | 03:11 | that some of these fields are just a smidge
too short, because now, even though the data
| | 03:17 | is the same height, because we've got these
rounded corners, that style requires that
| | 03:22 | the field be a couple extra pixels higher
or lower than the text that it contains.
| | 03:27 | You also notice that the text up here at the
top of the screen has been changed from White
| | 03:32 | to a Cool Gray, which of course is part of
the Cool Gray theme. But since the background
| | 03:38 | is a black color, we might need to change
this to let's say, for example, a white text
| | 03:45 | to give it more contrast. This of course is
because the theme has specific instructions
| | 03:49 | on how to handle text colors used in parts
on the top of the screen, and it didn't take
| | 03:53 | into account that there would be a black background.
Now, you'll also notice something kind of
| | 03:58 | interesting, there's this question mark here.
If we look in Browse mode, you'll see that
| | 04:04 | this question mark used to be a completely
full circle with a question mark icon in the middle.
| | 04:10 | Little tiny things like that are things
that you're going to want to look out for,
| | 04:13 | because really what happened here is that
there was an image, and the image was of a
| | 04:17 | question mark, and you'll see--just ungroup
this here. So now the image is just a square,
| | 04:25 | but in this theme, the instructions that
FileMaker's theme gives to the layout objects is that
| | 04:29 | if there's any circles, make them transparent.
But unfortunately, we needed this circle to
| | 04:34 | have a gray background in order for it to
appear as though--there you go--that you had
| | 04:40 | a proper fill. So that's something that's
going to have to be modified as well. Now
| | 04:44 | let's look at a database that was built
from scratch. This is the Untitled_09_05 file.
| | 04:53 | This is something where all the elements were
built using layout tools, and let's try converting
| | 04:58 | this into a new theme. We'll go into Layout
mode, and let's pick a Change Theme under
| | 05:06 | the Layouts, and will pick Onyx, pretty
dramatic looking layout theme, and we'll hit OK.
| | 05:13 | The first thing that we see is that the header
text color changed to the same color.
| | 05:17 | The Company Name was in green before,
and the Customers Layout text was in black.
| | 05:23 | Now, they're both the same color, and that's because
both of these pieces of text end up in the header.
| | 05:28 | So the theme basically has instructions on
what to do with text that's in the header,
| | 05:32 | and it gives it all one color. You also see
that the graphic that we placed in the header
| | 05:36 | now kind of sticks out because there's the
sliced image that's being used in the Onyx
| | 05:41 | header theme and our image isn't consistent
with that anymore. So, we're going to have
| | 05:46 | to maybe make that transparent, and make
some adjustments there. And you'll also notice
| | 05:50 | that the customer layout text is no longer
contained within the background color, and
| | 05:55 | that's because you'll notice that in the
themes, when you go in to Browse mode, you'll see
| | 06:01 | that FileMaker gives a little bit of relief
around the edge. You will see this little
| | 06:05 | kind of gray contrast around the edge of
the theme. And as a result, anything that was
| | 06:09 | too close to the edge of the layout is now
going to look like it's bleeding into that
| | 06:13 | relief area. Those are things that you're
going to have to take into account, and of
| | 06:17 | course it's as easy as moving some of these
elements down. Same is true for the Add New button.
| | 06:23 | There are instructions within each theme
on how to handle buttons and give them
| | 06:26 | kind of a gradient look and a stylized look
and a different size and some different text.
| | 06:31 | So in that case, this one got so much larger
that it grew over the edge of our Tab Control
| | 06:37 | feature here. You'll also notice that we had
a series of tabs and these actually converted
| | 06:41 | rather nicely, Onyx has some specific tab
design that highlights the chosen tab, makes
| | 06:47 | them square and sort of flush within a square
background and then changes the text and some
| | 06:52 | of the text styling when it's selected as
active. But the biggest item of course is
| | 06:57 | the Size of the fields or the Height of the
fields. Because of the rounded ends on this
| | 07:01 | theme, the Height of the fields need to be
adjusted for the text to be seen. Most themes
| | 07:05 | will need a Height of 20 pixels to clearly
see the text in a rounded field. The layout
| | 07:10 | that we had prior to this had fields at a
standard 17 pixel Height. So even though we
| | 07:16 | were using standards before, it still wasn't
high enough in order to be able to accommodate
| | 07:20 | these new rounded ends. So, if all this
seems like too much work, you can always go back
| | 07:24 | to Layout mode and choose the Layouts >
Change Theme and send it back to Classic.
| | 07:31 | But you'll notice that much of the old formatting was
lost when FileMaker converted the theme, because
| | 07:36 | what's really happening here is it was stripping
out a lot of the components that we had originally
| | 07:41 | added to our layout and then applying new
instructions with the new theme, so all it
| | 07:45 | was able to do was remove those instructions
from the old theme and then some of the stuff
| | 07:49 | that was stripped out is no longer available
to us now. So, keep the following things in
| | 07:53 | mind. When you change a layout's theme,
FileMaker Pro applies the attributes of the new theme
| | 07:57 | to all objects on the layout except for the
following. The Font and Font Size remain in
| | 08:02 | the original layout, or theme--which we saw
when our font sizes were too big for the Onyx
| | 08:07 | theme--buttons created prior to FileMaker
12 retain their original formatting, but you
| | 08:13 | might need to resize them and other layout parts
in order to fit all the objects on appropriately.
| | 08:18 | If you want the layouts to look similar to
layouts created with the versions earlier
| | 08:22 | than FileMaker Pro 12, that's where you're
going to want to use the underneath the Basic
| | 08:27 | section, there's this one single Classic theme.
If you've created a layout to be used with
| | 08:32 | FileMaker Go, just simply choose one of the
layouts that have the word Touch after it.
| | 08:37 | Those layouts will all conform to Apple's
touch standards. And then finally, an important
| | 08:43 | one, if you apply a theme to a layout, it's
not going to apply the theme to all the layouts
| | 08:49 | in your database in sort of a master theme way,
and you really wouldn't want it to without
| | 08:52 | some type of editor. But instead, if you apply
a new theme to one layout, you should probably
| | 08:57 | do it to all the layouts in your database
and make any adjustments as necessary.
| | 09:01 | Themes are optional, they're not required, and in
the exercises in the rest of this title, we're
| | 09:05 | going to use the Classic theme, because I
want to show you how you can use FileMaker
| | 09:09 | Layout tools to build your layout elements
without the constraints of a theme.
| | 09:13 | But in the real world, you may want to consider using
themes only when you're starting from scratch.
| | 09:19 | Applying themes is meant to make creating
layouts easier and faster. However, changing
| | 09:24 | themes can actually be rather destructive
to original layouts. So really the reason
| | 09:29 | behind this movie is to suggest that you
consider themes only when you're starting
| | 09:32 | creating layouts from scratch.
| | Collapse this transcript |
|
|
10. Working with LayoutsUsing the Layout Setup dialog | 00:00 | In the previous chapter we discussed
creating layouts in your FileMaker databases.
| | 00:04 | Once layouts are created, you have various ways
to configure them. This chapter is going to
| | 00:08 | discuss the different options available for
modifying and managing existing layouts.
| | 00:13 | So first, let's look at this Customer layout
that we have here but inside Layout mode.
| | 00:18 | Although we specify the name and context as
part of the layout creation process, we could
| | 00:22 | edit this information and actually a lot of
other things at any time in the future using
| | 00:26 | the Layout Setup dialog. This dialog can be
accessed by either clicking the Layout Setup
| | 00:32 | icon which is this little pencil next to the
Layout dropdown, or under the Layout menu,
| | 00:37 | we can choose Layout Setup. Either way, it
takes us to this dialog. Let me show you some
| | 00:41 | of the options that we see on this dialog.
First, we see that there's a tab called General
| | 00:45 | and under General it shows us what the name of
the layout is and whether or not this layout
| | 00:50 | can be included in our dropdown menus in
Browse mode. It also shows us the all too important
| | 00:55 | context or the table that this layout is based
off of. While it's possible to change a layout's
| | 01:00 | context after it's already created, in practice,
you'll find that it can be cumbersome to do
| | 01:04 | so because you'll need to change the
context for all the fields that are on the layout
| | 01:08 | as well. So be sure to specify the correct
table when you're initially setting up the
| | 01:12 | layout to avoid the need to do this. In
addition to the layout's name and context, there are
| | 01:17 | several other attributes and behaviors that
are controlled by settings in the Layout dialog,
| | 01:22 | you'll see three of them here. By default,
the Save record changes automatically option
| | 01:26 | is selected. This makes it so that any
changes that your users make in Browse mode will be
| | 01:31 | saved when they leave the record. Now if I
uncheck this box, we can kind of see what this
| | 01:35 | see what this behavior will act like. So we
go back into Browse mode, save our changes,
| | 01:40 | and if I go into Notes, and I type Notes,
now when I commit the record, you see that
| | 01:45 | I get this message that says do I want to save
the changes to this record. Now interestingly
| | 01:50 | enough, this is a behavior that's common in
other applications. Anytime somebody changes
| | 01:55 | something, the user is prompted to save. So
maybe you have users that are more comfortable
| | 01:59 | with seeing this, but anyone who is working
with FileMaker might find this message a bit
| | 02:03 | obtrusive because they're assuming any change
they make will be saved. So you can control
| | 02:08 | that in the Layout Setup dialog. We'll change
it back to the default, and you see this option
| | 02:14 | here for showing field frames when a record
is active. That's that behavior that we see
| | 02:19 | in Browse mode where when you click into one
of the fields, all the other fields get this
| | 02:24 | dotted line around them and the one
that's active actually gets a solid line.
| | 02:28 | You can enable or disable the display of field frames
in the layout in this view. But be aware that
| | 02:34 | if you disable the field frames in Find mode,
the field indicators will also be disabled.
| | 02:39 | And what that means there is when you go into
Find mode you see that you've got these little
| | 02:44 | magnifying glasses. That indicates that the
user is in Find mode so that they don't think
| | 02:48 | that they're creating new records in Browse
mode, for example. And Show field frames when
| | 02:53 | record is active is off by default on all
new non-classic themed layouts. So although
| | 03:00 | it's on, on this one that I've created, it's
turned off in all the new themes in FileMaker 12.
| | 03:06 | Now this new option, Delineate fields on
current record only--kind of a mouthful--it's
| | 03:11 | something that's brand new in FileMaker 12.
But this option is going to be off by default
| | 03:15 | for form layouts but will be enabled for list
and report layouts created using Layout Assistant.
| | 03:21 | If we go over to a List View--let's say Customer
List--when this option is on, meaning checked,
| | 03:28 | that means that field borders, backgrounds,
and other kind of formatting will not render
| | 03:33 | on any other row than the currently selected
row in the List View. So for example, the
| | 03:38 | icon for pop-ups, dropdowns, and calendars
are also considered part of the field border,
| | 03:43 | and those will be hidden as well. Let's move
over the Product List view, and now we see
| | 03:49 | that I've got a bunch of fields here, and
all I've done is I've Shift-selected these
| | 03:54 | fields. You see over here in the far right
corner, I've applied this yellow fill background.
| | 03:58 | So what does that look like if we go into
Browse mode? Interestingly enough, that formatting
| | 04:03 | is only being applied to records that I'm
selecting. The reason that's happening is
| | 04:08 | because I've got the Delineate fields on
current record only option selected, and if I turn
| | 04:13 | that off, you'll see what the difference is.
Now every one of the records in the List View
| | 04:19 | has this option applied. This really gives
you an opportunity to give sort of a selected
| | 04:24 | row highlight effect that does work a lot
better with this particular type of formatting.
| | 04:30 | Again, you'll see this back in Browse mode.
And then notice what happens when we go into
| | 04:34 | Preview mode. In Preview mode there is no
currently selected item, so then that means
| | 04:38 | that you don't have to worry about these
formats being applied in just some strange fashion
| | 04:43 | to just one of the rows when you're trying
to print or save something as PDF.
| | 04:47 | Back in Layout mode, in the Layout Setup dialog
you'll see that the next option down here in the
| | 04:52 | bottom enables fields for Quick Find. Now
we're going to talk about that when we get
| | 04:57 | into finding records in FileMaker so we'll
skip that and move on to the Views.
| | 05:01 | I talked about before that any layout can be set
up to be viewed in Form, List, or Table View--that
| | 05:07 | of course is in Browse mode. You can manage
these by clicking on any one of these views,
| | 05:13 | and--by the way--you'll see that the
Delineate options are not in effect for Table View.
| | 05:18 | That shows the formatting on each one of the
rows. But sometimes you create a List View
| | 05:23 | and you don't ever want it to be viewed as
a form, for example. So what you can do in
| | 05:28 | Layout mode, go into Views and then turn off
any other options besides the one that you've
| | 05:35 | designated. Then of course, you can designate
that as default. And after you save your changes,
| | 05:40 | you'll see now that users cannot circumvent
those options, and they're grayed out in the
| | 05:44 | dropdown menu as well. If you look at the
views for Table View, you see that you can
| | 05:50 | do things like Include header and footer parts
or do a Horizontal or Vertical Grid. You can
| | 05:56 | turn off the ability for users to resize column
headers as well. You do have to pick at least
| | 06:02 | one of these views, and then you can set
that one as the default. So for example, if we
| | 06:07 | go back into our Customer Detail view, save
the original changes, and we can go in here
| | 06:14 | and say let's just make that Form View and
make the Default view the Form View.
| | 06:19 | On the Printing tab, you can access settings for
fixed page margins or columnar printing.
| | 06:24 | These are really only applicable with the label-
based layouts that actually have columns.
| | 06:29 | And then finally, the last tab is a pretty important
one called Script Triggers, but we're going
| | 06:32 | to cover that in detail when we get to the
chapter on scripts. The Layout Setup dialog
| | 06:37 | allows you to modify many of the settings
for existing layouts and set defaults based
| | 06:41 | on the type of layout you designed so that
users can view the data in a way that you
| | 06:45 | intended, without being able to accidentally
make changes to the layout while they're working
| | 06:49 | on it in Browse mode.
| | Collapse this transcript |
| Understanding layout parts| 00:00 | When you're working with layouts in FileMaker,
you're going to notice that they're divided
| | 00:04 | up into several different parts. Go into Layout
mode, and if you take a look at the Customers
| | 00:09 | layout you'll see that we've got this one
section up here that's called the Header and
| | 00:13 | then in-between the Header and what's called
the Footer--which is on the bottom--we have
| | 00:17 | this area that's called the Body. In this
movie, I'm going to describe the different
| | 00:21 | roles of these parts and how you can manipulate
the parts that are currently already on your layout.
| | 00:25 | First of all, you should know that each
layout must have at least one part, and
| | 00:30 | layout parts can contain fields, layout objects,
buttons, text, and any other type of object
| | 00:35 | that you want to throw on there. The dotted
horizontal lines that you see here mark the
| | 00:39 | division between the layout parts, and the
part label appears at the left end of the
| | 00:44 | divided line. Also notice on the very bottom
of your layout there is an option here that
| | 00:49 | says Click to display part labels horizontally
or vertically, and that allows us to toggle
| | 00:56 | the part names, and you see we just get an
abbreviation. This gives us a little bit of
| | 00:59 | better idea of what space each one of these
parts occupies. We'll keep it clicked there
| | 01:03 | for right now. Layout parts are really
broken into two different groups, groups that are
| | 01:08 | called Non-Summary Parts and then groups that
are called Summary Parts. We're going to take
| | 01:13 | a look at the Non-summary parts in this movie.
First, you should know that under the Layout
| | 01:17 | menu you can go to an option that's called
Part Setup. This allows us to see the parts
| | 01:23 | that are already applied to our layout, and
you'll notice that if you hit Create you'll
| | 01:27 | see all the different parts that are available.
Of course, there's three different parts that
| | 01:31 | are grayed out here, Header, Body, and Footer,
and that's because we already have a Header,
| | 01:35 | Body, and Footer on this layout. But notice
that we've got an option for Title Header.
| | 01:40 | And the Title Header if we selected it,
appears above the Header, and anything that we put
| | 01:45 | in the Title Header will only show up on the
top of the very first printed page.
| | 01:50 | The same is true for a Title Footer but at the end
of any printed pages. You'll notice that if
| | 01:56 | you add a body part, you can simply select
it here in this view and hit Delete if you'd
| | 02:00 | like to. When it comes to Title Headers and
Title Footers, though, you should remember
| | 02:04 | that should really never ever put data in
them, because in the case of a Title Header
| | 02:08 | if you put a field like CompanyName in there,
it's actually only going to print the data
| | 02:14 | from the very first record in your found set. So
if you're printing a list of like 10 different
| | 02:18 | companies and you happened to slip the
company name into the Title Header, it's only going
| | 02:22 | to show the value from the first one, and
the same works in sort of the opposite fashion
| | 02:25 | for the Title Footer. So they're really not
meant for putting any data in either the Title
| | 02:29 | Header or Footer. Conversely, anything you
put inside this header will appear on the
| | 02:33 | top of every page, and you can include field
values if you'd like to. You'll use this for
| | 02:38 | titles or common headings on a column or a
report. You might even put column names here,
| | 02:43 | but you can only have one header on a
layout as well, and that's why you see it grayed
| | 02:47 | out when we try to add new parts. We're going
to skip over the Grand Summary, Summary, and
| | 02:53 | Trailing Grand Summary parts and leave that
for our discussion on reports. So what that
| | 02:57 | leaves us with is the Body. You can have only
one body part inside of your layouts and each
| | 03:02 | object that you put in the body--including
fields or text objects--will appear once for
| | 03:06 | every record in your found set. So the difference
between a Customer form layout and let's say
| | 03:14 | a Customer List layout is actually just the
height of the body part. You'll notice here
| | 03:19 | that the body part is only the height of these
fields, and in this case the body part is the
| | 03:25 | height of the entire layout area. So that's
why when we are in Customer List and looking
| | 03:31 | at that in Browse mode, that we actually see
many different records on screen at a time,
| | 03:35 | because basically the body part is only that
high, and we've set it to view as a list so
| | 03:39 | that it keeps showing different iterations
of the body for every record in the found set.
| | 03:43 | Back in Layout mode, there are different
ways that you can add new parts to your layout.
| | 03:48 | Like let's say we want to add a footer here.
We've already talked about going into the
| | 03:51 | Part Setup and hitting the Create button,
but there's also a tool up here in the Status
| | 03:56 | toolbar area when we're in Layout mode.
That's called Part tool, and it allows me to drag
| | 04:00 | a part--in this case, we'll say after the
Browse--and I can choose Footer in this case
| | 04:05 | and just hit OK. Of course, then I can manipulate
the size of the part by just clicking on the
| | 04:11 | horizontal gray lines, and you can also change
the arrangement of parts using the Part Setup.
| | 04:17 | I can move Body up and down or Header around,
and we'll see more of this when we get into
| | 04:21 | the Layout Summary parts. However, any
layout part that has a lock next to it means it
| | 04:26 | cannot be moved up or down, so header
always has to be on top, footer always has to be
| | 04:31 | on bottom, same with the Title Header and
Title Footer. When we close the Part Setup
| | 04:35 | dialog, you'll notice a couple of vertical
lines here in the layout. First of all, we've
| | 04:39 | got this dotted vertical line, and this indicates
the printable edge. You'll also see this when
| | 04:45 | we go into Preview mode. It's the edge where
the print margins will cut off anything that
| | 04:51 | you see on the layouts. So this is sort of
a guide for you to be able to make changes
| | 04:56 | and be able to view how things are going to
look when they print. So the idea is if you
| | 05:00 | wanted to print this layout you probably
want to move all the printable area to the left
| | 05:04 | of that dotted line. I can manipulate this
by choosing a different page setup, so for
| | 05:09 | example, if I wanted to print at landscape,
we see that the printable edge moves much
| | 05:13 | further over to the right, and it probably
makes more sense for me to squeeze up all
| | 05:16 | these fields to fit them in if I print at
landscape. The other edge that you see here
| | 05:21 | is new in FileMaker 12, and this is what's
referred to as the layout's explicit width.
| | 05:26 | You can place objects in the gray area to
the right of the layout, and this lets you
| | 05:30 | store objects with the layout, yet prevent
them from appearing in Browse, Find, or Preview
| | 05:34 | modes. So if you want to, put like Developer
fields or little things that you're experimenting
| | 05:38 | over on the right-hand side. For example,
if we go over to Customer, you see that I
| | 05:42 | can move this layout edge around if I'd like to,
and I can take a Notes field, for example,
| | 05:48 | and place it over into the gray area. You
see that it gets a little bit faded when it's
| | 05:52 | over in the gray area, and I can make these
invisible by placing them there. If I go into
| | 05:57 | Browse mode now and hit Save, you'll notice
that the Notes field is no longer there.
| | 06:02 | I also can't see it in Preview mode, and I also
can't see it in Find mode, but in Layout mode
| | 06:07 | it's still there. Once you decide where you
want to place a field and make it visible,
| | 06:11 | you can just simply select it, and in this
case the Field label, drag it back into the
| | 06:15 | Body, and now it will be visible in Browse
mode. Having an understanding of the different
| | 06:19 | parts that are available to you will help
you when you're planning and creating your
| | 06:23 | different layouts. You can control the vertical
parts using Part Setup and the two horizontal
| | 06:28 | sections using the Layout Width guide.
| | Collapse this transcript |
| Previewing the new Inspector | 00:00 | One of the things that you're going to want
to become familiar with when you start working
| | 00:03 | with modifying layouts is something that's
called the Inspector tool. This can be used
| | 00:07 | to view and modify the settings for all the
different objects in Layout mode. You go into
| | 00:12 | Layout mode--if you don't see a floating
palette or the Inspector anywhere, you can
| | 00:16 | go into View and choose Inspector or simply
hit Command+I on your keyboard or Ctrl+I on
| | 00:22 | Windows. You'll see that each Inspector has
three different tabs, the Position Tab, Appearance
| | 00:28 | Tab, and the Data Tab. Each one of them focuses
on a different aspect of formatting, and you
| | 00:33 | can mouse over the different options on
each tab to see a description of what they do.
| | 00:37 | Once opened, the Inspector window will stay
open each time you access Layout mode.
| | 00:42 | For example, when I go into Browse, we see that
it disappears; when I go into Layout mode
| | 00:47 | it's back in the same position where I left
it. Many of the controls in the Inspector
| | 00:50 | are available in different menu dropdowns
but they've all been consolidated into
| | 00:55 | this one palette so that when you're in
Layout mode you don't have to drop menus down or
| | 01:00 | lose the position of selected objects, for
example. Many other applications that you
| | 01:05 | might have used follow the same palette concept.
FileMaker now makes it easy to see nearly
| | 01:09 | all of your object controls all in one place.
We're going to use the Inspector in several
| | 01:14 | movies throughout the rest of this title,
but should you be wondering where many other
| | 01:17 | controls from the previous versions of FileMaker
have gone, first always look in the Inspector.
| | Collapse this transcript |
| Exploring layout tools and the Status Area in Layout mode| 00:00 | Once you've created layouts in FileMaker Database,
you're going to want to start modifying them
| | 00:04 | and make them more attractive and useful to
users. You want to first make yourself familiar
| | 00:08 | with the tools that you have available, once
you're in Layout mode, before you start planning
| | 00:12 | any of those changes. We go into Layout mode,
you see that the Status tool bar across the
| | 00:17 | top of the screen--here we'll get rid of Inspector--
has changed from what it looks like in Browse
| | 00:22 | mode or even any the other modes for that
matter. You will see in the upper left-hand
| | 00:26 | corner where we had Record Navigation tools,
those have now given way to Layout Navigation tools.
| | 00:31 | So the book icon allows us to navigate
from layout to layout. You can see the total
| | 00:36 | number of layouts that we have, and you'll
even see that we can navigate each one of
| | 00:40 | those layouts by clicking on the dropdown
menu when in Layout mode as well. To see this
| | 00:45 | button which allows you to create new layouts
using Layout Assistant, it's the same thing
| | 00:50 | that happens when you do Ctrl+N or Command+N
in Layout mode or choose the New Layout/Report option.
| | 00:56 | By default, you'll notice that you have
this thing called the Selection Tool
| | 00:59 | Active, this allows you to choose different
things on screen, move things around if you
| | 01:04 | so desire, and even click on some of layout
tool options that you've got available to you.
| | 01:09 | And you'll notice that when you select something--
for example, this picture here--you'll
| | 01:14 | know that it's selected because it's got
eight different selection knobs highlighted.
| | 01:19 | When these knobs are visible, they can be used
for horizontal and vertical resizing.
| | 01:24 | You'll notice by selecting one of these options,
it gets highlighted. I can easily change the
| | 01:27 | height of something, and here I can change
the width. And if I choose one of the corners,
| | 01:32 | I can change the height and width and
constrain proportions at the same time.
| | 01:37 | You'll also notice that when you select multiple items--
I'm holding down the Shift key to do so--you'll
| | 01:43 | see that all the items look like one selected
object. You see you still have eight selection
| | 01:47 | knobs, this allows you to make changes to
the entire group as a whole, whether you're
| | 01:52 | constraining width, changing the height,
all the different options that can be applied
| | 01:58 | to all selected objects at once. Next on
the toolbar, you'll see that we've got this T.
| | 02:03 | That makes your cursor a little cross-hair
that allows you to type different things on screen.
| | 02:07 | We will go over to the Customers layout,
and I'll typing here the text, Customers Layout,
| | 02:15 | and now it turns back into my selector tool,
which allows me to move it around.
| | 02:18 | You can see that it's selected by the eight
selection knobs. I can use this tool to modify Field
| | 02:23 | Labels if I'd like to, or select different
text areas and apply different formatting to it.
| | 02:28 | You will see that I've got the Formatting
bar here underneath the Status tool bar,
| | 02:32 | I can select some of the text with my
selection tool and apply some formatting to it.
| | 02:38 | Here I'll click into some of the Field Labels and
add some spacing to make our fields easier
| | 02:43 | to read for the users just simply double-clicking
and adding spaces, and I can do all that through
| | 02:49 | the T-bar and Selection tool combinations.
The next four items are Shape Drawing tools.
| | 02:54 | So we've got a Line Drawing tool which of
course allows us to draw lines on our layouts
| | 02:59 | and different combinations of lines if we'd like.
Just undid that. And also pretty self-explanatory,
| | 03:04 | the ability to drop box, rounded corners or
oval shapes. Next, you'll see that there are
| | 03:10 | a series of eight different buttons that allow
you to add different layout objects to the layouts.
| | 03:14 | The first is the Field Control tool,
which allows you to add different input types
| | 03:19 | to your fields, and we'll be covering this
in a later movie. This is the button tool,
| | 03:23 | which allows us to create buttons that can
have Scripts or ScriptActions assigned to them.
| | 03:28 | We'll talk about this when we get into
the Scripting Chapter. Then there's the Tab
| | 03:32 | Control tool, the Tab Control allows you to
add Tab Control so that you can recycle certain
| | 03:37 | space on screen. We are going to cover that
in a movie dedicated to the Tab Control later.
| | 03:42 | Same is true for adding these things called
Portals, Charts, and even a Web Viewer.
| | 03:47 | The last two items on the edge are for Adding
fields, the same thing that you can do if
| | 03:52 | you do Insert field, for example. And then
over here is adding parts, like we discussed
| | 03:57 | in the previous movie, the same thing you
can do if you say, for example, Insert Part.
| | 04:01 | Finally, you should beware of the Format Painter.
If you want to apply the same types of formats
| | 04:06 | like coloring your fonts or font size for
example, you can select an item that already
| | 04:11 | has that font assigned to it. I'll select
the Customers Layout, 12pt Helvatica Font
| | 04:16 | with bold. I'll choose my Format Painter and
then choose anything else I'd like to apply
| | 04:22 | that same formatting to. This is the same type
of Format Painter that you're used to in other
| | 04:26 | applications. Here are a couple of tips that
might be useful when you're in Layout mode
| | 04:30 | using some of these tools. If you want to
select multiple objects at a time, you can
| | 04:34 | actually hold down your mouse and drag, and
you see that it's allowed me to group all
| | 04:39 | these fields together. For example, if I
choose all the Address fields, I can treat them all
| | 04:45 | as one single address object. Also, if I
have a field on screen that let's say has some
| | 04:50 | formatting applied to it, and I want to copy
that same formatting for a new field, what
| | 04:55 | I can do is select the field and then drag
it while I'm holding down the Option key on
| | 04:59 | Mac or the Ctrl key on Windows, and what it
does is allows me to check a new field but
| | 05:06 | it applies that same original formatting
to the new field that I have created.
| | 05:10 | You'll find that to be very handy as you're going
to create new layouts. It's best to understand
| | 05:14 | the tools that you have at your disposal
before you continue making any layout changes.
| | Collapse this transcript |
| Managing layouts and layout folders| 00:00 | Any single FileMaker Pro database could have
dozens or even hundreds of layouts.
| | 00:05 | Therefore, it's going to be useful to organize layouts
in such a way that both you and your users
| | 00:10 | can easily find what you're looking for. The
feature in FileMaker Pro that helps you accomplish
| | 00:14 | this is what's called the Manage Layouts dialog.
You can access this under the File > Manage >
| | 00:20 | Layouts, and you see the Manage Layouts
dialog appear. You can also access this when
| | 00:25 | you're in Layout mode by clicking on the
Layout dropdown and choosing the Manage Layouts on
| | 00:30 | the top. You'll notice that in either case,
once it's open it's treated as a separate
| | 00:35 | window under your Window toggle screen. So
at any given time you can get right back to
| | 00:40 | it, however you see that you don't need to
be in Layout mode to be able to manage the
| | 00:44 | Layouts window. The Manage Layouts dialog
window allows you to organize and manage layouts
| | 00:49 | in a number of different ways. The check
box that you see at the beginning of each row
| | 00:53 | indicates whether or not this layout will be
included in the Layout menu while in Browse
| | 00:57 | and Preview modes. This is useful for hiding
any developer or utility layouts that should
| | 01:02 | not be directly accessed by any users. So
you can see if unchecked, for example, we'll
| | 01:08 | go over here, navigate off those, and now we
see that we don't have access to the Customers
| | 01:13 | layout anymore. If we go back to Manage Layouts
and simply check that, we'll see that now it
| | 01:18 | appears to our users. Keep in mind that if
you get into the more intermediate level of
| | 01:24 | working with security and accounts inside
FileMaker databases, that you'll find that
| | 01:28 | you can restrict the layouts that are seen
in that list based on different user groups,
| | 01:33 | but this is one way that you can turn them
either on and off for your general audience.
| | 01:37 | However, if you do turn something off, you
should keep in mind that you'll always be
| | 01:41 | able to see it in the Layout mode dropdown
menu, otherwise it would be hidden for good.
| | 01:47 | Notice also in the window that you've got
these double arrows, and anytime you see these
| | 01:51 | in a FileMaker dialog, this means that you
can move things around and reorder them on a list.
| | 01:57 | As you see here, I'm moving all of
my Customer layouts or all the layouts that
| | 02:03 | are based in the Customer table, all in the
same location, and I'll my product ones, so
| | 02:08 | everything is now kind of organized and
grouped together. At the top of the Manage Layouts,
| | 02:12 | you'll see that there's two filtering tools.
One of them is a very familiar Apple like
| | 02:17 | filtering tool that allows you to type in a
value like let's say Customer and then it
| | 02:22 | narrows down your list. Doesn't seem that
dramatic but I promise you that as your layouts
| | 02:26 | grow you're going to have hundreds and
hundreds of these at some point, and that filter is
| | 02:29 | going to be a savior for you. The buttons
at the bottom are useful for creating, for
| | 02:35 | example, a new layout, a new layout folder, or
even a separator. You can also select items
| | 02:42 | and edit them if you'd like to. What that
does is bring up a Layout Setup dialog or
| | 02:47 | you can duplicate an existing layout or
delete one that you have selected as well.
| | 02:52 | Also, if you want to navigate to one you can choose
one of these and hit the Open button, and
| | 02:56 | that will create a new window and navigate
you to that selected layout. But back under
| | 03:01 | this New button, you'll notice that in
current versions of FileMaker you have the ability
| | 03:05 | to organize layouts into folders. Let me
create a new folder here, and I will show you how
| | 03:09 | this works. I'm going to name the folder
Customers, and now it becomes another item on the list
| | 03:16 | that can be turned on or off, and I'll move
this to the top of the list, and the way that
| | 03:21 | I actually add something to a folder is by
clicking and dragging and then releasing it
| | 03:26 | in an indented fashion. You'll notice if you
look very closely there's a little blue sort
| | 03:32 | of thread, a needle hole there, and if I make
sure that it's indented rather than over at
| | 03:37 | this edge, it will end up inside the folder, and
that gives a pretty interesting organizational
| | 03:43 | aesthetic for our users. When we're in Browse
mode we can just choose Customers, and there's
| | 03:47 | all the different customer related layouts.
It's a very handy tool. Now actually if I
| | 03:52 | go and turn off the folder but not any of
the layouts that are inside of the folder
| | 03:56 | you'll notice that it goes back to its
normal view. Of course, the opposite is true if I
| | 04:02 | turn on only the folder and none of the
layouts within it all the users are going to see is
| | 04:05 | the folder itself. But I'll quickly create
a folder for the Products and put products
| | 04:13 | ones in there, and you'll notice that
inadvertently I've added that folder to the Customers folder.
| | 04:20 | You can see that it was indented, and I could
do that on purpose if I'd like to by saying
| | 04:24 | Reports, and I'll add that underneath the
Customers folder and then drop these in there,
| | 04:34 | and let's just take a look at what that looks
like in Browse mode. There is the Customers
| | 04:38 | and then the Reports. I might need to
manage that little bit better. There we go.
| | 04:45 | Same is true for Products, we've got Product Lists,
and we'll add one last one for Invoices, drop
| | 04:54 | three invoices in there, and now we're all
set. So this is a great way to clean up the
| | 05:00 | headache of having tons and tons of layouts.
Again, we've only got 20 or so layouts in
| | 05:04 | the sample files but I assure you that you'll
end up having hundreds and even if you just
| | 05:08 | want to create these folders to organize the
layouts even when you're in Layout mode in
| | 05:13 | your development environment, it's also
going to be a great help. And you'll notice that
| | 05:17 | now when we get these folders created this
other filtering item on the left-hand side
| | 05:21 | allows us to just isolate only scripts
based on the folder that they're in.
| | 05:25 | This again could become very useful when you've got dozens
and dozens of folders even inside your Manage Layouts.
| | 05:32 | With the number of layouts in your
solutions constantly growing, it's a good
| | 05:36 | idea to come up with a strategy for managing
the layouts into folders. The new Manage Layouts
| | 05:41 | window allows you one place to make these changes
and any other changes that your layouts require.
| | Collapse this transcript |
|
|
11. Formatting Layout ObjectsUsing guides and arranging, aligning, grouping, and locking layout objects| 00:00 | In FileMaker Pro, layout objects are the
building blocks of layouts. Everything you place on
| | 00:06 | a layout be it a field, an image, a portal,
or a label is considered an object, and all
| | 00:11 | objects have particular attributes that you
can manipulate. Keep in mind in order to do
| | 00:15 | any changes to any layout objects, you have
to first be in Layout mode, as you see here.
| | 00:21 | And once in Layout mode, you can group any
combination of objects so that you can edit
| | 00:26 | or move them together, or you can even change
what's called the stacking order of objects
| | 00:30 | to get different effects when object overlap.
The grouping tools can be found in your Inspector
| | 00:35 | under the Positions tab. And if you can't
see the Inspector when you're in Layout mode,
| | 00:39 | what you need to do is first go to View, and
Inspector, and you'll see that it has a corresponding
| | 00:44 | quick key, so you can just do Command+I or Ctrl+I.
Of course, this Inspector will always be available
| | 00:49 | once you open it until you close it, but
it's not seen in other modes like Browse mode.
| | 00:54 | So let's talk about grouping layout objects
together. For example, we see we've got this
| | 00:59 | series of fields here in the bottom right-
hand corner of our layout. And if I select all
| | 01:04 | of the items, which of course we can do in a
couple different ways, I can hold down the
| | 01:07 | Shift key and select multiple items, then
release Shift, or what's more common is I
| | 01:12 | can grab them by drag-selecting, I click down
on my mouse, and I use my Pointer tool, and
| | 01:18 | I drag, and you see that anything that this
area is touching becomes selected. Now right
| | 01:23 | now, these are a series of independent objects,
for example, we have four different fields
| | 01:27 | and then four different field labels. But
if I go over here to the Position tab in our
| | 01:32 | Inspector, you'll see under Arrange & Align,
we've got a whole series of different tools
| | 01:38 | I'm going to show you in this video. But the
one I want to show you is Group. Notice what
| | 01:41 | happens when I hit the Group button. Now when I
select the object, it's treated as one single
| | 01:48 | object, so you see I can move it around and
put to into certain positions. And if I wanted
| | 01:53 | to, I could even resize them and they all
resize proportionate to the resizing action
| | 01:58 | that I'm doing on screen. Now if at some point,
I want to address these items individually
| | 02:04 | again, don't worry, the grouping isn't
permanent. We just select the group and then I can go
| | 02:09 | into the Inspector under the Position tab
again and hit the Ungroup button. Now you
| | 02:13 | see each of these things becomes an independent
object that I can, for example, apply different
| | 02:18 | formatting to if I need to. In addition, the
Inspector also allows us to do some alignment work.
| | 02:24 | You can see here in the Customer Detail
layout in our exercise file that we've got
| | 02:28 | all sorts of different fields on the screen,
but they're all over the place. They're different
| | 02:31 | widths, they're not aligned properly. Of course,
this is something that we could do manually
| | 02:36 | by selecting different objects and using
the Arrow keys on our keyboard, but FileMaker
| | 02:40 | has all sorts of automated tools here that
allow us to do alignments a lot more easily.
| | 02:45 | It's easy to visually see the alignment, but
if you want a precise view of the invisible
| | 02:49 | edges of an object on the layout,
you can use something called the guide.
| | 02:53 | Guides are not turned on by default, so I'm going to
show you how to turn those on. If you go under
| | 02:57 | the View menu, you'll see there's this
option here for Guides, and I'm going to say Show
| | 03:01 | Guides. So now what you see is we've got
these vertical and horizontal pink lines on our
| | 03:07 | layout, and what we can do is actually manipulate
them, and let's say we'll line up the vertical
| | 03:13 | line here, and we can line up the horizontal
line that way. Now what we can do is we can
| | 03:19 | actually move these objects until we see it
overlap the line. These lines are generally
| | 03:24 | used when you're first designing the layout,
and then you can hide them again after your
| | 03:28 | alignment is set. And notice that a guide
is either vertical or horizontal, but never both.
| | 03:33 | They're intended to allow you to create
a access point for aligning everything up
| | 03:38 | vertically and horizontally in your layout.
You can also add more than one guide at a
| | 03:42 | time if you've got different groups of objects
that you want to line up. In order to do that,
| | 03:46 | you need to first show rulers. You'll notice
here that there's an option under the View
| | 03:50 | menu called Rulers. And then we have the rulers
visible, you click on to the ruler area, and
| | 03:56 | you can now drag down more guides, and I'll
do that here as well. And you see they come
| | 04:02 | in different colors, which makes it helpful
for you to see where one axis ends and the
| | 04:05 | other axis begins. You can have any number
of different guides on screen at once if you like.
| | 04:10 | Conversely, to remove these guides,
you just drag it back to the ruler just like
| | 04:15 | we did when we put it on the layout in the
first place, and then you no longer see the
| | 04:24 | guides on the screen. Keep in mind that each
guide can be made local to a layout or global
| | 04:29 | across all the layouts. So to apply this
guide to all layouts, I'll click on the Guide and
| | 04:34 | do a right-click, and you see I have this
option here for Sharing Guides with All Layouts.
| | 04:39 | So if I select that option, you'll see now
that even if I go to Product Detail, you'll
| | 04:46 | still see the Guide there. If I want to
remove the guide, I can really go in here and of
| | 04:53 | course, I can lock it so that it can't be
moved until I unlock it again. But I can also
| | 04:57 | remove it by right-clicking on it in this
same manner, and you'll see that it has removed
| | 05:02 | it from the Product Detail screen as well.
Now if you prefer to sort of visually move
| | 05:10 | these things around, you'll notice that
when I click on the Company Name field, do you
| | 05:14 | see all these blue lines that are appearing?
This is actually what's called dynamic guides.
| | 05:19 | And if you don't see these in your version
of FileMaker, then you'll want to go under
| | 05:23 | the View menu and choose Dynamic Guides right here.
Dynamic Guides provide on the fly confirmation
| | 05:29 | for aligning, positioning, or resizing objects
on the layout through a combination of visual
| | 05:33 | feedback as well as optional snapping behavior.
The result that you see on screen can allow
| | 05:38 | you really to have a much more rapid precise
layout object manipulation experience here
| | 05:44 | when you're in Layout mode. And you'll
notice that the guides show relative distance to
| | 05:48 | the objects that are near them and other
objects on the layout. Like, for example, here I've
| | 05:53 | selected this field and the blue line in the
middle is telling me that it lines up in the
| | 05:58 | center of all the other fields on the layout,
and you'll notice that I also get an X and
| | 06:02 | Y coordinate here in a little tooltip that
pops up. And you'll notice, when I move this
| | 06:08 | around, you can see that it's telling me that
the distance from the height of certain fields
| | 06:12 | to the bottom of other fields is also
presented on screen, so I can sort of make sure that
| | 06:17 | things are in the middle or have even
distribution of fields or objects on screen. So the Dynamic
| | 06:22 | Guides will appear when an edge aligns with
the edge of another object as you see there,
| | 06:28 | and also if an edge aligns with a guide--
we're going to have a guide on screen.
| | 06:33 | It tells me the relationship to the guide as well.
You'll notice that each one of the text fields
| | 06:39 | has this little dotted line in there which
is a text baseline. It'll also tell me when
| | 06:43 | the text baselines line up as you see here. And
then of course, the centerline, when objects
| | 06:51 | of the same size are lined up in the center.
Now if you'd prefer to do something a little
| | 06:56 | bit more automatically, you can also line
groups of objects with other tools that are
| | 07:00 | found in the Inspector. So for example, let's
say I select, and I'm holding down the Shift
| | 07:05 | key to select all these objects on the left,
these are all field labels, and they should
| | 07:18 | correspond with all the fields that are on
screen, but also they should have a relationship
| | 07:22 | to each other. So what I can do is select
all those items. You can see we have this
| | 07:25 | series of tools here, and if you just hover
over them, you get some feedback as to what
| | 07:29 | they are, you see that this one is Align left
edges, center, and so on. We're going to pick
| | 07:33 | Align right edges, and now you see all the
different field labels have now aligned on
| | 07:38 | an invisible guide here on the right-hand
side. I can do the same thing with the fields.
| | 07:44 | I'll select all of them, but actually look
that we've got this First name here.
| | 07:50 | So why don't we line up the First name using our
dynamic guides? And we can see now it lines
| | 07:57 | up at the center, and we'll release it right
there, so using a combination of these tools,
| | 08:02 | and we'll do the same with fields. I'll
quickly Shift-select all of these field objects and
| | 08:09 | apply left edges, and now you see that those
all line up as well. You'll notice that sometimes
| | 08:15 | we might need to align things horizontally.
For example, here I've got the AddressZip
| | 08:20 | field, and I've got the Field label, I'll
select both of those items and instead I'll
| | 08:24 | line them across the center. I can move them
up using the Arrows on my keyboard. The other
| | 08:29 | thing you'll notice is that some of the fields
have different widths. So I can choose let's
| | 08:34 | say, the CompanywebSite field, and I can
choose the EmailAddress field, and we notice that
| | 08:38 | they're different lengths, and I'm going to
go over here to the Resize tools that you
| | 08:43 | see in the Inspector, and I've got a couple
of options here. I can resize to the smallest
| | 08:47 | width or the largest Width or the Height,
and so on. I'm going to resize to the smallest
| | 08:51 | Width, and you see that now they're pixel-
perfect and in full alignment. All the tools I've
| | 08:56 | shown you apply to different objects as well,
not just field objects. Let me show you an
| | 09:01 | example of that. We'll move the Inspector
over here to the right, move our layout width
| | 09:07 | over to the right a tad as well, we'll go up
here to our tools, and I'm going to choose
| | 09:11 | the Rounded Rectangle tool. And you'll notice
once it's selected that my Pointer tool becomes
| | 09:16 | a Crosshair, allowing me to draw space on
screen, and I'm going to draw an oval so it fully
| | 09:21 | surrounds all the items that you see on the
screen, and now I release, and you see that
| | 09:26 | we've got this new object on screen as well.
And this object then when I move it around
| | 09:32 | can also use the dynamic guides. You see
those lining up to the edges in the center.
| | 09:37 | But now I'm going to show you a little bit of a
trick here. Now that I've got this Rectangle
| | 09:40 | tool here on screen, extend it up to the full
edge of the body part, now I'm going to do
| | 09:45 | the Square Drawing tool, and I'm actually
going to draw it using the dynamic guides
| | 09:50 | so that it lines up just perfectly with the
edges of my Oval tool. So now I've got two
| | 09:58 | of these objects, and I can also determine
whether or not I actually have them at the
| | 10:01 | same width. So for example, if I choose the
Rounded Corner tool, we go over here to the
| | 10:06 | Inspector in the Position section, and it
shows me that the Width is exactly 657 points,
| | 10:11 | Height 431. But if I select the rectangle, I
see it's also 657 points. So if it wasn't,
| | 10:18 | I could go in here, and I could just
manually update the data. So this is a good way to
| | 10:22 | get precision alignments on the different
objects as well. And of course, I could select
| | 10:26 | both objects and align the left edges if I
needed to, and now I know that they're perfectly
| | 10:32 | snug the relationship to each other. Now
I'm going to select the item in the back, and
| | 10:38 | I'm going to change its color. You'll notice
over here in the Formatting toolbar over on
| | 10:43 | the right-hand side I have this item here
where I can change the fill. I am going to
| | 10:47 | go in and select a different color. You see
that the Rectangle tool has turned green.
| | 10:54 | Now I'm going to select the Box tool or the
rectangle in front of it, and I'm going to
| | 10:58 | make that fill gray. So now it gives this
sort of a background effect on the layout
| | 11:06 | and what I'm going to do is I'm going to
select both objects, and I'm going to group them
| | 11:10 | using the Inspector tool like we did before.
And now there's something else that I wanted
| | 11:14 | to tell you about layouts. You'll notice that
when I drew these objects, they are in front
| | 11:18 | of all the other field objects on the screen.
So on any layout in FileMaker, there's something
| | 11:23 | that's called a Z-order. It's actually the
order from front to back in the way that the
| | 11:27 | user is actually viewing it. So right now,
these grouped objects are in front of all
| | 11:31 | the other objects, but I can move them to
the back if I'd like to. You'll notice I've
| | 11:34 | got some tools down here in the Inspector.
These will allow me to send something to back,
| | 11:39 | bring it to front, or change one layer at a
time. So I'm going to send this entire grouped
| | 11:44 | object to the back, and now we see that it
provides a nice little background for us giving
| | 11:48 | it more of a nice customized layout look.
And now that I'm done with the background
| | 11:52 | shapes, I can actually lock them. You'll
notice over here in the Inspect, or we've got the
| | 11:55 | ability to lock certain items, and you can
tell when objects are locked on screen when
| | 11:59 | you select them, because instead of having
the eight handles, they have these eight Xs,
| | 12:03 | and when I try to move these things around,
you see that it won't allow me to move them.
| | 12:07 | Of course, I can unlock them in any time and
then move them around to the desired location.
| | 12:11 | But since I've actually got them in a nice
spot, I'm going to lock it. And the reason
| | 12:16 | I would do that is because if I'm trying to
move other objects around in front of it,
| | 12:20 | and I accidentally grab this I might inadvertently
move the item that I didn't intend to.
| | 12:24 | So it's a good idea to lock them when you're
going around and doing some precision updating to
| | 12:28 | your layouts. Another thing I wanted to
show you is that if you grab multiple items on
| | 12:31 | the layout and one of them happens to be
locked--let's say we select CompanyName and lock it,
| | 12:37 | and then I'm going to Shift-select and choose
DateCreated--you'll notice that the CompanyName
| | 12:43 | is no longer selected. It's not part of this
group. So in order to be able to address things
| | 12:52 | as a group with other objects, you're going
to have to unlock them. So I go in here to
| | 12:56 | the Position tool, unlock, and now I can Shift-
select it and make it part of a group. Then if you're
| | 13:02 | messing around with your layouts, and you
find that you've made some mistakes and want
| | 13:06 | to kind of go back to where you started, you
should know that in FileMaker, only in Layout
| | 13:09 | mode, you have the ability to undo, which is
Command+Z or Ctrl+Z. And you can do multiples
| | 13:15 | of those. So you see here, I can go back as
far as I'd like to. And then when you're ready
| | 13:20 | to save the changes that you've made on your
layout, you can either move back into Browse
| | 13:24 | mode where you'll be prompted to save, or
you can just choose the Ctrl+S or Command+S
| | 13:32 | options depending on whether or not you're
on Windows or Mac, and that'll allow you to
| | 13:35 | save the changes. You'll notice here that
we also have that in the Layouts dropdown
| | 13:39 | menu. Getting familiar with some of these
tools are going to really help you when you
| | 13:43 | want to fine-tune the layouts that you've
created in your new FileMaker database.
| | Collapse this transcript |
| Applying Screen Stencils| 00:00 | One of the big benefits of working with
FileMaker Pro over any other database is that you can
| | 00:04 | deploy FileMaker databases on various devices
like the iPad, iPhone, or iTouch using FileMaker Go.
| | 00:11 | Each of these devices has different screen
sizes, and you should really design your layouts
| | 00:15 | to fit the device. Keep it in mind that I
could access the same database either on my
| | 00:21 | Desktop, on the web, or on any one of the devices
that I just mentioned. Sometimes it's a good
| | 00:26 | idea to either make sure all your layouts
conform to whatever device or design specialized
| | 00:30 | layouts for each device. Now sometimes even
users on Desktops could have different screens
| | 00:35 | with various screen resolutions, it doesn't
really matter the size of the screen, but
| | 00:39 | rather the resolution of the screen. So some
folks might have to scroll around a little
| | 00:42 | bit more. So it's a good idea to take all
those different users into account when you're
| | 00:46 | designing your layouts. One of the things
that you can use in Layout mode to help you
| | 00:51 | better visualize what those different
screens are going to look like is something that's
| | 00:55 | called a Screen Stencil, this is a new
feature in FileMaker 12, and if you go into Layout
| | 01:00 | mode, and you'll notice in the Layout Bar,
right here you've got this dropdown menu,
| | 01:05 | you'll notice when I'd select it, it gives
us all the most common Desktop, iPhone, and
| | 01:09 | iPad sizes. So I can choose from the 640x480,
1024x768, all the different common screen resolutions.
| | 01:17 | Again, doesn't matter what the
user's monitor size is it's all about what
| | 01:20 | the resolution is. So that's something that
you're going to want find out when you sort
| | 01:23 | of pull all the different potential users
of your database. And then of course we've
| | 01:27 | got one for each of the devices, we've got an
iPhone portrait and iPhone landscape, because
| | 01:31 | of course users can turn those screens, and
you want to make sure that the layout fits
| | 01:35 | in either one of those cases. Now when you
select a Stencil, let's say for example the
| | 01:39 | Desktop, 1024x768, you'll notice that there
is this orange box around the layout, and
| | 01:47 | you'll see that I have plenty more room to
be able to fit this in the 1024x768, and if
| | 01:52 | I select it again, it'll disappear, and you'll
also notice with some of these devices I can
| | 01:57 | put both of them on screen at a time if I'd
like, so I can say the iPhone in portrait
| | 02:02 | view, see the orange area there and also
iPhone in landscape, so I've got two of them.
| | 02:08 | So it kind of tells me that this area where
they intersect is where both views can be seen,
| | 02:14 | or I could just design it for one or the other.
If I open another database, for example, if
| | 02:18 | I go in here to the exercise files and open
up 11_02b and then go into Layout mode, you'll
| | 02:24 | notice that these stencils persist even in
the second file. So, really this should be
| | 02:28 | thought of as an application setting rather
than a setting that's specific to one database.
| | 02:33 | So as a result, if you're working in a shared
file, your stencils aren't displayed to other
| | 02:37 | users, because it's specific only to your
copy of FileMaker. So, if another designer
| | 02:41 | opens up the database, they're not going to
see the stencils that you put on there, but
| | 02:44 | if you open up a different database you're
going to see your stencils again. So, if you
| | 02:48 | want to turn the stencils off, you just go
in here and select the items again.
| | 02:55 | Now if you want to choose a custom size, you have
some kind of device or something that requires
| | 02:58 | one of the sizes that you don't see here,
you just go to Custom Size and then a window
| | 03:02 | pops up that allows you to put in the points
dimension, so you have 500 points by 500 points
| | 03:08 | as the default, but you can manipulate this
anyway that you want, and you'll see that
| | 03:12 | that custom size will pop up on screen, and
of course that can be removed as well.
| | 03:19 | Now you can actually select every one of the
stencils at one time if you'd like to, so every one
| | 03:23 | of the default stencils that you see here
can be selected and placed on your layouts
| | 03:27 | at the same time. However, when it comes to
custom sizes, you can only have one custom
| | 03:31 | size at a time, so for example, if go on to
the 500x500, and I go in here to Custom Size
| | 03:37 | again, and I say 200 and hit OK, it's actually
going to change the size of the custom stencil,
| | 03:44 | and then you see I've only got one custom
size available to me, even though I can couple
| | 03:47 | that with all the other stencils if I need to.
Stencils are a great way to help you visualize
| | 03:52 | the estimated viewing area of the device's
display, thus allowing you to accurately
| | 03:57 | create layouts for deployment on any screen resolutions
for even iPhone, iPod touch, and iPad devices.
| | Collapse this transcript |
| Placing and formatting objects, parts, graphics, and image fills| 00:00 | In addition to adding layout objects or text
or fields, you can also add images, and images
| | 00:05 | then don't need to be contained within a
container field if you want to add them to your layout.
| | 00:10 | These types of graphics can be used to add
aesthetic to your layouts or personalize layouts
| | 00:14 | in your database. Now if you look in your
exercise file, you see that I have here on
| | 00:18 | the right, we've got a series of different
files. We've got the file Untitled_11_03,
| | 00:22 | which I have open right now, I also have
another FileMaker file called Graphics and then two
| | 00:27 | logo files with different sizes that we're
going to be using later on in this movie.
| | 00:30 | I am going to open up the Graphics file. This
file is just simply a file that is put together
| | 00:38 | here because I've got some graphics on the
layout. These images that you see here are
| | 00:43 | graphics that are royalty-free graphics
examples that come from the FileMaker Graphics Pack,
| | 00:48 | which is free to use when you join what's
called the FileMaker TechNet. You can see
| | 00:53 | the filemaker.com site for more information
on joining TechNet and then please note the
| | 00:57 | terms and conditions on the bottom of this
layout. You'll see that these graphics are
| | 01:01 | all graphics that are simply pasted onto the
layout, I can select them independently of
| | 01:05 | each other, and I can copy them to my Clipboard
and paste them onto other files. So for example,
| | 01:11 | let me grab this Email icon, I am going to
go ahead and Copy it, and now I am going to
| | 01:16 | toggle over to my other file, the 11_03, and
in Layout mode I'll go to right about here
| | 01:23 | in the layout, and I am going to Paste the
object, and there you see the object kind
| | 01:29 | of floating around, and you see it also
uses Dynamic Guide, so I can position it right
| | 01:36 | to the center of the AddressEmail field, if
I'd like to. And let's do the same for the
| | 01:41 | Globe field for the web site address. Go under
Graphics, select the Globe, Copy, back here--
| | 01:52 | and I can actually do a right-click, too, if
I wanted to--Paste, move it around to the
| | 01:56 | web site, and move it to the center. Now
you'll notice that these objects are a little bit
| | 02:02 | larger than the field, so if I invoke the
Inspector here, what I can do is select the
| | 02:09 | Email field, and I can go over here and see
that that's a height of 14 points.
| | 02:13 | So what I can do is select this object and make it
14 points high as well. You see that that
| | 02:22 | distorts the image a little bit, so I can
just move it around and then now I can drop
| | 02:26 | that in line with the field, and we see we've
got CompanywebSite, I can also make that 14,
| | 02:35 | and I'll just make it 14x14 right away. And
I could do the same thing here, I can move
| | 02:40 | this around, and now I see that my Dynamic
Guides tell me that it's in line with the
| | 02:45 | Email icon, as well as the center of the CompanywebSite
field, and now they fit a little bit better
| | 02:49 | into our layout. Now let's say that we want
to add a graphic that's going to serve as
| | 02:54 | a logo onto our layout. Let's say we want to
put it up here in the header. The first thing
| | 02:58 | that we'll need to do is make the header a
little bit larger to fit, so if I go and load
| | 03:03 | the light gray line here that separates the
body part from the header, I can drag it down,
| | 03:08 | and let's say we'll make it about this size.
If I want to be a little more precise about
| | 03:13 | it, I can select the Header, and you'll notice
here that it says there is a Height in points
| | 03:17 | here for the part object. You notice also
that we can use different units of measure.
| | 03:25 | I am going to say 55 points, and now the
Header is 55 points high, so we can do that with
| | 03:34 | some precision as well, and I can take the
entire content, Drag-select all of them, move
| | 03:41 | it up to the edge of the Header, and you'll
notice that only certain objects are moving,
| | 03:45 | and that's because the background objects are
locked, so I can do Undo. Select everything,
| | 03:54 | unlock, and then move them up to the Header,
right up to that line. Okay, so now we have
| | 04:01 | enough room to actually fit our logo, and
since we are going to put in the upper corner,
| | 04:04 | we see that the Header part Label is kind
of in the way. I can go all the way down to
| | 04:07 | the bottom-left corner of the screen and
click this icon here that will display the part
| | 04:14 | Labels Horizontally instead. And by the way,
not only can we change the height of the Header
| | 04:19 | as its own object by using the Inspector,
but also if I go over to the Appearance Tab,
| | 04:25 | you'll see that I can change the color of
it if I'd like to. So we see here, we've got
| | 04:28 | a Fill of a solid color, I can click here,
and use the Color Wheel to give it its own
| | 04:33 | color if I'd like to, or I can switch back to
just the white background if I like. So I
| | 04:40 | can add all sorts of different things to the
Header part if I'd like to. But in this example
| | 04:44 | we're just going to add a white background
logo, so we'll just keep the background of
| | 04:48 | the Header white as well. So now let's go
under Insert, and you'll see there is this
| | 04:53 | option right in the middle of the menu, called
Picture, I'll say Insert > Picture, and I'll
| | 04:59 | go and I'll grab the logo that's 50x40 and
hit Insert. Now I see I've got this nice little
| | 05:06 | logo graphic, and it also uses the Dynamic
Guide, so I can line it up to the left edge
| | 05:12 | of the rest of the items in our background
object that we created. And you'll notice
| | 05:16 | something when we added this if I delete it
again, I'll do this one more time where you
| | 05:20 | can Insert the Picture, and you'll notice
that you have the option to Store this only
| | 05:24 | as a reference to the file, but the problem
is if the relationship of the database to
| | 05:28 | the file that you are embedding ever changes,
that's going to show up as a broken link.
| | 05:31 | So my advice is to make sure that first of
all the images that you are going to add to
| | 05:35 | your layouts are optimized and they are not a
ridiculous size. Just use the same principles
| | 05:41 | as one would do for adding images to a web
page, pretty low resolution about 72 dpi.
| | 05:46 | I'll select this object and not choose the
Store only as a reference to the file, and
| | 05:52 | in that way this file is actually embedded
and lives on this specific layout.
| | 05:56 | And once you have the image on the layout, it's going
to act just like any other object on the layout.
| | 06:01 | Now we notice that when we go back into
Browse mode, save our changes, that if we change
| | 06:07 | the size of the window the object stay
anchored in the upper-left corner of our layout.
| | 06:16 | Sometimes however, we can do what's called Resizing
Objects in Layout mode, we'll go back to Layout mode
| | 06:21 | here, and for example, I could select one
of these objects, and you'll notice in the
| | 06:25 | Inspector, in the Position Tab, you see this
thing called Autosizing in the middle.
| | 06:30 | You see by default that any object that you select
is going to be anchored to the top and left,
| | 06:34 | that's what keeps it in the upper left-hand
corner here. All these objects are anchored
| | 06:38 | to the top and the left. But for example,
if I pick the background object and then I
| | 06:42 | instead now say I am going to anchor to the
top and then left and right, what this means
| | 06:47 | now is that it's going to stretch left to
right as I move the window. Let's actually
| | 06:51 | see what that looks like. So now as users
move the window, you'll see that it'll stretch
| | 06:59 | and expand all the way to the layout width,
but as I move over to the left it will never
| | 07:05 | get smaller than it is in Layout mode, and
that can be useful. It's something that you've
| | 07:12 | got to be careful with, but definitely
something that you should know as part of your toolset
| | 07:16 | here--we'll select that background and actually
turn that one off for right now. But the same
| | 07:20 | can be true for images in the Header. For
example, let's get rid of that logo, and I've
| | 07:26 | got another logo that I am going to place
let's go into here, Insert > Picture, and
| | 07:29 | we'll use the larger of the two, so I can
place that here, and I can select it, and
| | 07:36 | I can do resizing if I'd like to. Let's see
how that works in Browse mode. Now unfortunately,
| | 07:43 | in this case as we resize the layout this
logo stretches a bit, you can see that it
| | 07:48 | gets distorted. Let's say we don't mind if
the text itself actually stretches, but instead
| | 07:55 | we don't want to distort the logo on the left-
hand side. Well, in FileMaker 12, we've got some
| | 07:59 | new tools that allow us to work with images
and pick which parts will resize and which
| | 08:04 | parts will remain static. It's also in the
Inspector in the Appearance Tab, you'll see
| | 08:10 | here in the Graphic section, we've got this
option here in the Fill dropdown, where we
| | 08:13 | can choose Image if we'd like to. Now we've
already got the image there, but let's say
| | 08:18 | instead of having the image placed on top of
it, we choose the Header, and like earlier
| | 08:25 | where we did a solid color, this time I am
going to choose the image that we selected.
| | 08:29 | I am going to say Insert. And now you see
that by default it showed up as a Tile, we've
| | 08:34 | got some other options here though, we can
Scale to Fit, Original Size. If I do Original
| | 08:38 | Size, it places it here in the center, and
I can say Scale to Fit as well and then in
| | 08:48 | Layout mode we see that it actually moves
around a little bit, so it might not be the
| | 08:54 | optimal effect, but just knowing that these
tools are available to you, it will help you
| | 08:57 | when you are planning out your layout designs.
But another thing that we can do here is to
| | 09:03 | do what's called Slicing. So here you notice
that when we go into Slice this is a concept
| | 09:08 | that's common in the web, but you'll see
that we've got these red lines that are movable
| | 09:14 | if I click them with my Selector tool and
what it's doing here is I am telling it that
| | 09:18 | anything to the left of the red line won't
stretch, and anything to the right of the
| | 09:24 | red line will, and it goes up and down as
well too, so I'll move these just above the
| | 09:29 | height of all the elements there and then
now let's look how that behaves a little bit
| | 09:32 | differently when we are in Browse mode. So
now we see that even though it's resizing
| | 09:36 | on the top, you'll notice that it anchors
the layout part of the graphic so that it
| | 09:41 | doesn't move and doesn't distort. And you
can create your customized graphics that will
| | 09:46 | fit a little bit better. A lot of times if
you have a graphic that's a solid color--
| | 09:49 | let's say you've got a solid color with the logo
on the left-hand side, in that case what you
| | 09:54 | would do, select the part, and then you would
just let the solid color stretch but leave
| | 10:00 | the logo untouched on the left-hand side if
you'd like to. Of course, you can also just
| | 10:07 | say None and go back and Insert this Picture,
make it a little bit easier for you
| | 10:13 | so you don't have to worry about some of
those resizing. We'll go back and we'll change
| | 10:17 | that to Solid Color and make it white, there
we go. So I'll be making these same changes
| | 10:23 | to the other layouts in the exercise files, so
you'll see some of them in upcoming exercises,
| | 10:27 | but you can do the same for extra practice
if you wish. Images are a great way to add
| | 10:32 | some style or identification to your FileMaker
Layouts. If you find yourself working with
| | 10:37 | graphics, make sure to use the tools that
I've just described, to get the desired look
| | 10:39 | and feel on each of your layouts.
| | Collapse this transcript |
| Applying gradients| 00:00 | The use of gradients are a common design
technique that can add a professional style to your
| | 00:04 | layouts by blending colors together smoothly.
FileMaker 12 now allows you to apply gradients
| | 00:10 | to objects selected in Layout mode. For example,
if we go into Layout mode and select our Header
| | 00:16 | part, once selected under the Inspector in
the Appearance Tab, you'll see in this section
| | 00:21 | called Graphic that we can use the dropdown
to select Gradient. Gradients of course, can
| | 00:27 | be applied to any Layout object. We just
happened to be selecting a layout part object for this
| | 00:31 | example. And now you will see with this element
here in the middle that on the very far left-hand
| | 00:37 | side it is going to be one color and the
very far right-hand side is going to be another,
| | 00:40 | and those are the colors that are going to
be blended together. So, right now it's just
| | 00:43 | two shades of gray, so let's go in here and
select a color for the left-hand side and
| | 00:49 | select another color for the right, we
will just blend this color into white.
| | 00:54 | And now you see that it gives us a nice gradient
which actually is a north to south or up and
| | 00:59 | down vertical gradient. But also if I want
to work on it on an angle, you notice that
| | 01:03 | we've got this Angle tool here. So actually
if I select the wheel, what I am doing is
| | 01:09 | moving it around at an angle. So what I am
doing is controlling the angle on which the
| | 01:12 | gradient appears, and I can do that more
precisely if I want to by selecting the degrees in
| | 01:18 | which the angle is going to be displayed. So
you have a lot of control over the gradients,
| | 01:22 | of course you can move the Color Stop Widgets
here, you can drag these along the gradient
| | 01:26 | to specify the position where the gradient
actually begins, and that's true for both sides.
| | 01:31 | Anything between a Color Stop Widget
that I have moved right here in the very far
| | 01:36 | left end of the gradient will be a solid color.
So you'll notice I can do the Solid color
| | 01:40 | all the way across if I wanted to. The same
is true on the right-hand side. The Gradient
| | 01:46 | Type of course can be either Solid or Radial,
depending on which one of these you choose,
| | 01:53 | and this will reverse the direction of the
gradient. So for instance, we've got green
| | 01:56 | on top and on the bottom I can just swap
those out, to turn those around if I'd like to.
| | 02:02 | This Angle Widget, however, is only available
for those who work on Mac. The Angle Widget
| | 02:06 | will not be available on Windows, users must
use the Edit box here with a numerical stepper
| | 02:13 | arrows as well if they want to change that
gradient. If you like the look of gradients,
| | 02:17 | you can use the tools I demonstrated here in
this movie to help you apply these to parts,
| | 02:22 | fields, or any other object
while in Layout mode.
| | Collapse this transcript |
| Formatting fields and applying field attributes| 00:00 | When you place fields on a layout in FileMaker,
you don't have to settle for just the standard
| | 00:07 | view that you get, like, for example, here
we've got a transparent field where we can
| | 00:11 | see the gray background. You've full control
over how these objects look, and you can format them.
| | 00:16 | For example, if I choose the CompanyLogo
field here in the middle. Of course, you can
| | 00:21 | see it is selected because I've got the eight
handles that are showing. You'll notice over
| | 00:26 | here in the Inspector under Appearance, under
the Graphic section you see that I can apply
| | 00:30 | Gradients like we did in the previous movie,
and Images as well in the previous movie,
| | 00:33 | but here if I go to Solid Color, I can actually
pick different background colors if I would
| | 00:40 | like to. But we can also control the borderlines
here. For example, here the next section where
| | 00:46 | it says, Line we've got None, and if I show
Solid lines, we'll see what that looks like
| | 00:52 | in Browse mode. You can see now that this
field has lines around it, giving it a sharp
| | 00:57 | edge and then also the background color is
white. So it gives us a little bit of contrast,
| | 01:01 | but I can also change the style of lines if I
would like to, I can select Dashed or Dotted
| | 01:07 | lines, and I can also control how thick they
look. So I can go all the way up to like 5
| | 01:13 | or 6 point. And the same is true with the
other lines but here there it's a little more
| | 01:19 | dramatic because I'm using Dashed, and I can
change the color of the line as well.
| | 01:24 | You'll notice when these lines are solid that we've
got sharp corners. Well, one of the things
| | 01:28 | we can do is select an object, and then you'll
notice here we've got this Corner radius tool.
| | 01:35 | If I change this to 20, we see that it gives
us a nice, kind of professional looking Corner radius.
| | 01:43 | The other thing that I can do, actually,
is apply the radius to only certain objects.
| | 01:47 | So for example, I could apply the radius to
only certain corners. So here in this tool
| | 01:51 | on to the right what I've done is I've deselected
the bottom, so now it gives me straight corners
| | 01:56 | on the bottom and rounded on the top. Now
this is an interesting feature that's best
| | 02:00 | used, for example, if you select two different
field objects, and let's move them right now
| | 02:07 | next to each other. So here we've got a full
rectangle, what I'm going to do on this top
| | 02:12 | one is I'm going to say 10-degree radius,
hit Enter, and instead of applying to the whole
| | 02:21 | field, which of course, we could leave it
there--but by the way, if you do that, notice
| | 02:24 | that you've to change the points on the
text within the field. So you might have to do
| | 02:29 | some adjustments. What I'm going to do here
is I'm going to uncheck the bottom Radius
| | 02:34 | there, and then I'm going to select the one
below it, I'm also going to apply 10-degree
| | 02:39 | radius, but I'm going to deselect the ones on
the top. So now what you get is the ability
| | 02:45 | to make two objects kind of merge together
into one, and this is an effect that you see
| | 02:49 | in a lot of the starter solutions that FileMaker
ships with the product. So these are tools
| | 02:53 | that you can get familiar with in order to
be able to add to a different look and feel
| | 02:57 | to the objects that you have in your layouts.
But you see that the data on the fields is
| | 03:02 | going to be a little bit cut off. So one of
the things that we can do to control that
| | 03:06 | is go into the Appearance tab in the Inspector,
and you see that we've got these tools available
| | 03:10 | to us. If I go in here and change the point
size and hit Enter, we see that it will fit
| | 03:15 | a little bit better. We've some controls over
not only the font, the point size, but also
| | 03:20 | the color if we want to, and these tools here
are pretty simple, you've seen all these the
| | 03:25 | bold, italic and underline, and we've also
got additional styles. And this here is just
| | 03:30 | a highlight, it does a background highlight
view. But a lot of people like to do if they
| | 03:34 | have clickable areas on their layout is they
will select Blue and apply an underline to
| | 03:41 | it so that users know that when they click
on it some kind of action can happen, but
| | 03:45 | you can do all sorts of different combinations
using these tools. Another thing that you
| | 03:49 | can do though is for instance, when you see
here, we've moved this Customer ID field up
| | 03:55 | a little bit. Right now, it's showing the
background of the part behind it which is
| | 04:00 | in this case the desired aesthetic. So one
of things that we can do here, if we dismiss
| | 04:05 | the Inspector, we'll notice that the item
that we've got selected here, we could have
| | 04:10 | control over the fill also in the Formatting
bar here below the Status toolbar area.
| | 04:14 | If I select Fill, you'll notice that we've got
all the other colors that we can choose from,
| | 04:18 | but this one here is important, the one
with the white box with a red line through it,
| | 04:22 | that's what actually make something either
you see we can choose a color or if we choose
| | 04:26 | that item that gives us that transparent look.
So if you want the objects to adopt the color
| | 04:32 | of the object behind it, you can just go under
your Fill and make sure that you choose Transparent.
| | 04:37 | But here to make these fields pop we'll just
Shift-select them. For example, all at once
| | 04:46 | I can apply these formatting, go into Browse
mode and save. You can see where the Layout
| | 04:51 | area is without even having to click into
it, if the background color isn't the same
| | 04:56 | as the fill color of the field. But you can
also manipulate the way that the formatting
| | 05:01 | is applied to the data that's within a field.
So for example, if we go over to the Product
| | 05:06 | Detail, you'll see that some of these records
have Extended Cost, Extended Price, some Currency
| | 05:14 | values. So what we can do here let's use the
Cost one, for example. We see that it's got
| | 05:22 | numbers applied to it, but it doesn't look
like its currency. So one way we can do that
| | 05:26 | is go into Layout mode and select this item,
invoke the Inspector, and you'll notice that
| | 05:32 | under Data, at the very bottom you see this
thing called Data Formatting. So I can select
| | 05:36 | a field that happens to be number, and if I
wanted to be displayed as currency, I can
| | 05:40 | select Currency and then I've got some
options here that allow me to choose a Fixed number
| | 05:46 | of decimals, sse a thousands separator, for
example, even the symbol that appears, and
| | 05:50 | I can even apply a Color if the value is negative.
You'll see when we go into Browse mode that
| | 05:57 | that now looks like it's formatted as currency,
but keep in mind, that doesn't affect anything
| | 06:01 | with the actual underlining data that's in the
field. So a Dollar sign symbol, for example,
| | 06:06 | doesn't go into that field. We can do the
same thing, not just for numbers and currency,
| | 06:10 | but for dates. You'll see that FileMaker will
recognize what kind of field that it is that
| | 06:15 | you've selected, and it will show up in the
selected icon above here, because that's the
| | 06:18 | field type that you chose when you define
this field. And I have all sorts of different
| | 06:22 | ways that I can display dates. I can get as
verbose as I'd like there. So we go and hit
| | 06:29 | Save, and we see that it doesn't change the
date in the field, but it gives us a different
| | 06:34 | way that the Date value is displayed. The
same is true for Time and even Images, which
| | 06:41 | of course we've looked at when we were
working with Container Fields. And in the interest
| | 06:45 | of time, if you have multiple fields on screen
at a time you can Shift-select them and apply
| | 06:54 | the data formatting to all of them at once.
So now you see all the fields that reflect
| | 07:04 | money had been changed all at the same time.
I'll be making these same changes on all the
| | 07:08 | layouts in the database, so you'll see those
in upcoming exercise files, and you can do
| | 07:11 | the same for some extra practice if you wish.
So you see that we've got a couple of different
| | 07:15 | formats that we can choose from here. Even
though FileMaker stores data in specific
| | 07:19 | ways internally, you can use the Field Attribute
tool to control how users will view the data
| | 07:24 | and the fields when they are
looking at it in Browse mode.
| | Collapse this transcript |
| Understanding object states| 00:00 | In previous movies we looked to how you can
apply formatting to objects in your Layout.
| | 00:04 | In this movie I'm going to show you a pretty
cool new feature in FileMaker 12 that allows
| | 00:09 | the object on your Layout to have different
States. And in each one of those States, you
| | 00:13 | can apply different formatting. So you can
specify attributes indicating the state of
| | 00:17 | an object when they're viewed in Browse mode,
which gives a database user some kind of visual
| | 00:21 | feedback for the actions that they are making
on screen. So I can format field, for example,
| | 00:25 | in Layout mode. I select the CompanyLogo field,
for example, and I go under the Inspector
| | 00:31 | to the Appearance tab. And you'll notice in
the very top here we've got this dropdown
| | 00:36 | and by default it's going to say Normal State.
We've got 2 point lines here applied, and let's
| | 00:43 | say no other features, that's what it's
going to look like in Browse mode in its Normal
| | 00:49 | State. We let's look at what some of the other
States are that available to us Normal State
| | 00:53 | means it's not been interacted with, it's
just the default state of the object when
| | 00:56 | it was placed on the Layout. The In Focus
State that we see here, the second one, that
| | 01:00 | indicates that the object has been activated
by a mouse click or the tab key--you can tab
| | 01:05 | to it--or via a Script. There's a Script step
these actions that you can say that, say, for
| | 01:10 | example, go to a field. Hover is just when
the user pauses the pointer over the object,
| | 01:16 | so as you're moving over the object it recognizes
that it's over the field area, and then you
| | 01:21 | can apply different formatting. And of course
Pressed is if there's a clickable object on
| | 01:26 | screen like a button, for example, you can
apply different formatting for when it's actually
| | 01:30 | being pressed. So now let's say we have the
Hover State selected. So right now, because
| | 01:36 | we haven't made any changes, it's going to
give us the same exact formatting as it does
| | 01:40 | when it's in its Normal State. So let's just
say, for example, I add another color to this.
| | 01:47 | Let's see how that looks in Browse mode,
just real simple example here. So now there is
| | 01:52 | our Normal State, but when I pass my mouse
over it we see that it now becomes yellow.
| | 01:57 | So this is great for buttons, for example,
that has going to some kind of action so that
| | 02:00 | the user knows that oh, if I click here,
maybe something might occur. FileMaker 12 allows
| | 02:07 | you to specify attributes, indicating the
state of an object when viewed in Browse mode,
| | 02:11 | which gives database users visual feedback
for actions that they're making, allowing
| | 02:15 | your Layouts to appear more
intuitive and interactive.
| | Collapse this transcript |
| Setting field behaviors| 00:00 | Sometimes when you place a field on a FileMaker
layout, it's really just there to display the data.
| | 00:05 | You don't necessarily want users clicking
into it or editing or adding new data.
| | 00:09 | A great example of this is our Customer ID
field or our primary key field that we
| | 00:14 | have here. It will be very detrimental to
some of the functions in the system if users
| | 00:18 | were able to go in and click these and change
them. Of course, you can manage this behavior
| | 00:24 | and manage database. If I go into the field itself,
I can say that they Prohibit the modification
| | 00:31 | of value during data entry, but if that's
not checked. I can also make it so the user
| | 00:36 | can't even click into this field, so we do
that in layout mode. I will go into Layout
| | 00:41 | mode and select the field, we go to the
Data tab and in the section here in the middle
| | 00:46 | it's called Behavior. Keep it in mind that
any settings that we make here are only going
| | 00:50 | to be applied to this field on this layout.
If this field appears actually somewhere else
| | 00:55 | on this layout, we have to apply the same
behaviors to it. If it appears on another
| | 01:00 | layout, well of course, we'll have to go in
there and apply Behaviors to it as well.
| | 01:03 | But once we apply Behaviors to a field, we can
then copy it somewhere else and then Behaviors
| | 01:08 | go along with it. But the one I wanted to
focus on here is that by default any field
| | 01:13 | that you place in the Layout--and you can
see that by me clicking around--is going to
| | 01:18 | be available to the user in Browse mode and
Find mode, but let's uncheck this box right
| | 01:24 | here, and now I'll go into Browse mode, Save
our changes, even when we click into these
| | 01:30 | fields, we'll notice, by the way, that when
we click into all the fields that the field
| | 01:33 | active sort of borders are not applied to
the Customer ID, and also as I click I can
| | 01:39 | see that I can't get into that field, but if
I go into Find mode, which we'll be covering
| | 01:43 | in the next chapter, we see that users can
go in here and enter data so that they can
| | 01:49 | use that as part of their find criteria if
they like to. And that can be controlled by
| | 01:56 | either checking or unchecking the Find mode.
But leaving it available for entry in find
| | 02:01 | mode isn't that dangerous, because all users
are doing is using it as a potential criteria
| | 02:05 | in their searches, it doesn't actually affect
the data that's in there. So it's very common
| | 02:10 | to have fields that you don't want users to
change to be deselected in Browse mode but
| | 02:15 | selected in Find mode. And you'll notice
here that if I hold down the Option key on Mac
| | 02:21 | or Ctrl key on Windows, and drag and create
a new field--let's to say I add this address
| | 02:28 | zip over here--that when I select the field
you see that it's adopted the same behavior
| | 02:33 | as the one that I copied originally. So that's
one of the benefits for using that drag/copy
| | 02:37 | technique to add new fields to your layout
if in fact you want them to adopt normally
| | 02:41 | the same formatting, but the same behavior.
There is also a couple of other things that
| | 02:44 | you can control under the field behaviors
dialog. You see here that when I have this
| | 02:49 | field selected that I can control how the
Tab order works. We're going to cover Tab
| | 02:55 | order later in this chapter, but basically
when people are using the Tab key to go from
| | 02:59 | field to field, we can say that maybe in
this particular field they have to hit the
| | 03:04 | Return key to go to the next object. Those
are more advanced techniques, but this is
| | 03:08 | where you control that. And we'll also talk
about in the next chapter in searching the
| | 03:13 | concept of Quick Find, and this is where
you control by either turning off the default
| | 03:18 | option for including in this Global Quick
Find or not and then finally by default there
| | 03:23 | is this option here for not applying visual
spell-checking. Visual spell-checking in the
| | 03:27 | field is applied by default, meaning you'll
see a red line if a word is misspelled, but
| | 03:32 | here's where you can exclude that from spell-
checking if you'd like to, so you can select the field
| | 03:37 | and then select Do not apply visual spell-
checking. I will be making the same changes on other
| | 03:43 | layouts, and you'll see those in upcoming
exercise files, but you can do the same on
| | 03:46 | these files for extra practice if you wish.
Many fields on your FileMaker Layouts are
| | 03:51 | going to have their own independent usage
rules, and working with Field Behavior in
| | 03:55 | the Field Behavior dialog will
allow you to control all of those.
| | Collapse this transcript |
| Using the Tab Control feature| 00:00 | A tabbed user interface is a popular design
feature for many different applications.
| | 00:05 | When selected, each tab can display unique set
of objects in your data, thereby allowing you
| | 00:09 | to use the same location of real estate in
your layout for multiple different purposes.
| | 00:14 | Tab control is not a navigation tool, that's
actually the tab order which we'll cover in
| | 00:19 | the next movie. Rather, it's a layout organization
tool used to selectively display different
| | 00:24 | sets of fields or related fields for that
matter from the same context or base table.
| | 00:28 | I'm going to show you how to create a tabbed
interface here in the Customer Detail.
| | 00:32 | First, I have to go into Layout mode. And before
we get started, we want to figure out how
| | 00:36 | these fields can really kind of group together.
So right now you see we've got all sorts of
| | 00:40 | information here on screen. It's a lot for
users to process. So it might be easier for
| | 00:45 | us to compartmentalize these a bit and make
it all in the same layout because we don't
| | 00:49 | want to have users having to go to different
layouts and click around. People like that
| | 00:52 | dashboard view. They want to go to one spot,
not have to scroll left or right or scroll
| | 00:56 | up and down on their screen, but just maybe
click a couple of things. So what we need
| | 01:00 | to do before we create tabs with different
panels is figure out how these fields all
| | 01:04 | maybe logically work together. So for example,
I've got a set of contact fields, I've got
| | 01:10 | the Address, City, State, Zip, Phone and Fax,
Email, those types of things, and we'll call
| | 01:15 | those contacts. So let's say that's one Tab
panel. We can see the contact information
| | 01:19 | is going to be one panel and then we have some
financial fields like TaxRate and DiscountRate,
| | 01:24 | we can put those on a separate tab. And we
have a Logo field and a Notes field, and let's
| | 01:30 | say we want to put those onto their own tabs.
What we've got there are four different panels,
| | 01:33 | Contact, Financial, Notes, and Logo. So once
we determine the different groups that our
| | 01:38 | fields can fit into, fields are actually
other layout objects. So for example, you can put
| | 01:42 | things like charts or portals and web viewers,
all different things that we'll cover later
| | 01:46 | in the title. You can put those into their
own tab panels. And again, we can occupy this
| | 01:52 | whole space here in the middle with several
different layers of fields without having
| | 01:58 | the users having to scroll or move off of
this layout. So now that we've determined
| | 02:01 | that we're going to have these four different
panels, I'm going to add this to the area
| | 02:05 | here in the middle. But before I do that,
what I'm going to do is I'm going to select
| | 02:09 | these objects and move them out of the way
just temporarily. Actually let's do it this way.
| | 02:15 | I'm going to select them all and put
those into our Clipboard, so I did a cut,
| | 02:27 | so I'm going to send those into the Clipboard
for the moment, it gives me some space to
| | 02:30 | work with. And in order to create a Tab
Control, we go into the Status toolbar, and you'll
| | 02:35 | see here that we've got this tool right here
in the middle called the Tab Control tool.
| | 02:41 | And when I select it, it turns my cursor
into a Drawing tool, and I'll draw this to fill
| | 02:48 | up the entire layout space and up pops a
Tab Control Setup dialog. This is where it'll
| | 02:54 | allow us to determine what number of tabs
will appear and name each one of the tabs,
| | 02:58 | so let's go in here first and type in Contact.
That'll be the first tab, we'll hit Create.
| | 03:06 | And then we'll also add Financial, Create,
Notes, and Logo. Now those are all the different
| | 03:19 | tabs, we can move them around and reorder
them by moving the handles around if we'd
| | 03:23 | like to. But over here on the right-hand side,
we see we've got some options available to
| | 03:26 | us, so we've got which one of these tabs is
going to be the default front tab, so what
| | 03:30 | tab is going to be showing when somebody
navigates to this layout. We'll keep that at Contact
| | 03:33 | for right now, but it could be any one of
these. And then the tabs will, by default,
| | 03:38 | be left-justified, so they'll all stack over
from the left, but we can change that to Center,
| | 03:43 | Right, or Full, meaning in the middle. We'll
keep it at the default of Left. And then the
| | 03:47 | Label Width, so you see that we've got different
lengths of the words here that for each one
| | 03:52 | of our titles for the tab. So we can choose
to have a specific label width that we can
| | 03:58 | type in by points or centimeters or inches,
and it'll be the width of the label plus a
| | 04:03 | margin of whatever this value is that we enter.
The width of the widest label, so in this
| | 04:08 | case it would make all of the tabs as wide
as Financial, or a Minimum or a Fixed Width,
| | 04:14 | and we'll go Width of the Widest Label here.
So now we hit OK, we see that the tabs appear
| | 04:21 | on screen and users can click these different
tabs, and when we're in Layout mode, it allows
| | 04:26 | us to bring one of the tabs forward so that
we can actually place layout objects inside of it.
| | 04:30 | And now we're going to want to place
the fields back into the appropriate tab,
| | 04:33 | so I'm going to hit Paste and here comes
all the fields. Let's move them over into our
| | 04:42 | layout space here on the right-hand side.
This is a great use of the gray area off to
| | 04:47 | the right, it's sort of a developer kind of
holding area. So first, I'm going to choose
| | 04:51 | the CompanyName, move those over. Let's say
we resize this. You see that I can resize the
| | 05:01 | panel by clicking on it just like any other
object, and we'll move the CompanyName field
| | 05:07 | up on top if we like and then we'll grab some
of the contact related fields. So here we've
| | 05:16 | got address information and even email, web
site, phone number, fax number, and of course,
| | 05:28 | the names and title. So let's move those over.
Now that they're all selected, I can move
| | 05:34 | them as one big object over to the left, and
I can take some time to reorganize these if
| | 05:46 | I'd like to. But what I'm going to do now is
go over and grab the financial fields which
| | 05:51 | are DiscountRate, TaxRate, and I'm going to
copy those to the Clipboard. And now what
| | 05:59 | I'm going to do is I'm going to move over
to this other panel. So now I can just paste
| | 06:03 | the fields or move them right into this panel,
and now you see that when I'm clicking on
| | 06:10 | Contact, it shows these fields, when I'm
clicking on Financial, it shows those. And we'll do
| | 06:13 | the same with Notes. Let's get the Notes panel
forward, drop it in here, and now that we've
| | 06:21 | got all this extra space to work with, this is
a great example of why we'd use a Tab Control.
| | 06:24 | Let's say the Notes are a huge field. Now
we can have the Notes occupy the entire area
| | 06:29 | of the screen without conflicting with some
of the other fields that we want to see, same
| | 06:35 | thing with the Logo. So let's move that one
over. And a lot of times you don't need field
| | 06:49 | labels anymore because the Tab panel acts
as a field label, so we can make this one
| | 06:54 | rather large, and we can move these fields,
the DateCreated and whatnot down to the footer,
| | 07:00 | for example. So now we see by going through
just really the task of creating a Tab Control
| | 07:06 | and applying it to our layout that we're able
to not only organize all the fields into logical
| | 07:13 | groups, but also place them into the same
layout area on our layout without really having
| | 07:19 | to make a larger layout or navigate the users
somewhere else that they might require some
| | 07:25 | additional training to get to. But here we
see that our layout doesn't change--especially
| | 07:29 | when we're talking about other devices like
FileMaker Go devices--the layout panels will
| | 07:34 | work on those as well. You can also modify
the appearance of the Tab Control.
| | 07:38 | For example, if we go into Layout mode, it's just
like any other object. So if we go in here, we
| | 07:44 | can change the color of the tab if we'd like
to. You'll notice that each individual tab
| | 07:48 | can get its own color if you so desire in
any kind of time that you--there you go--make
| | 07:56 | a selection. You'll see now that we can see
when we're in Contact because it's one color
| | 08:04 | and then the gray here on Financial. And at
any time if you want to change any properties
| | 08:08 | about the Tab Control while you're in Layout
mode just simply double-click on it, and you
| | 08:12 | can change the names or any of the features here
on the right-hand side. One of the interesting
| | 08:16 | things about a Tab panel is now that you've
got all these items contained within it, if
| | 08:21 | I select the Tab panel, I can move it
around on my layout, and you'll see that all the
| | 08:24 | other objects inside of it move along with
it. So I don't even have to group it, but
| | 08:29 | it just automatically groups all the things
together. This makes it easy to be able to
| | 08:34 | move things around without moving the Tab
panel and maybe leaving some of your fields behind.
| | 08:38 | One thing you have to be careful of
though is the edges of the Tab panel.
| | 08:42 | Let's say, for example, this field just goes off
the edge just slightly, so it's no longer
| | 08:49 | contained within the panel. So you'll notice
that what happens is it's no longer considered
| | 08:53 | part of the Tab panel, and it shows up in
every one of them. So the area here that you
| | 08:59 | see is very important and a lot of times
this'll get you with field labels because you see
| | 09:04 | the text doesn't actually extend off but
maybe the label area does. So in that case, you
| | 09:13 | want to be careful that you make sure that
it is within this edge. So keep those all
| | 09:19 | contained within the edge, and in that case,
you might run into a problem if you don't.
| | 09:25 | The other thing that you can do is in Layout
mode, you can add another Tab panel inside
| | 09:31 | this if you'd like to. So you can have a Tab
panel here for Logo, Contract, that type of
| | 09:42 | thing. So now I can take this Logo field,
make sure it's contained and then I can have
| | 09:53 | another one that maybe has a different
container that we can embed a file into, for example,
| | 09:57 | like a signed contract. Now you can resize the
entire Tab panel by selecting it and resizing
| | 10:04 | it, but keep in mind that if some of the
items no longer fits, you have to be always aware
| | 10:10 | of the objects contained within because you
want to cut those off. So you've got to make
| | 10:14 | sure that if you're going to do any kind of
resizing after you've put objects inside the
| | 10:17 | Tab panel already, make sure that you're
resizing some of the elements inside of it first,
| | 10:25 | like this for example. And then you can go in and
actually resize the Tab panel. So always size
| | 10:31 | the elements inside first before you resize
the entire Tab panel itself. Tab panels are
| | 10:35 | a great way to reuse the screen real estate
for other information that you want to add
| | 10:40 | and to get rid of clutter and allow users
to have all the information about something
| | 10:44 | on your layout all at their fingertips. I'm
going to be applying these tab panels to the
| | 10:47 | other exercise files and doing some other
finessing here with the layout tools, but
| | 10:52 | you can use these exercise files for
practicing adding tab panels if you like.
| | 10:56 | The tab user interface is a popular design feature
for many applications, not just FileMaker.
| | 11:01 | So your users are going to be comfortable when they
see these on screen. They'll know exactly
| | 11:04 | what to do because they've seen these before
in other applications. So using the Tab Control
| | 11:09 | feature in FileMaker layouts will help you
easily create tabs to organize fields and
| | 11:13 | other layout objects without having to
create new layouts or larger layouts.
| | Collapse this transcript |
| Setting the tab order| 00:00 | When users start using your FileMaker Database,
you might find out that they would rather
| | 00:04 | keep their hands on the keyboard and tab through
different fields when they're doing data entry,
| | 00:08 | especially actually in the case of data entry.
The alternative of course is users having
| | 00:13 | to click into each field when they want to
add new data, and that can slow people down
| | 00:17 | when they're doing data entry. So an important
aspect of creating an effective User Interface
| | 00:21 | is managing how users move through the layout.
The primary means for doing so is by customizing
| | 00:26 | something that's called the Tab Order so that
you can create smooth and logical progression
| | 00:30 | throughout your layout. FileMaker creates
a default Tab Order in Layout mode, if you
| | 00:36 | into View > Layout mode, you'll see that
under the Layout menu we've got this option down
| | 00:42 | here for Set Tab Order. This reveals arrows
next to every field object or even button
| | 00:48 | object, buttons will be covered in the scripting
chapter, but that's, for example, like a graphic
| | 00:52 | or something or any other layout object
that has a script action assigned to it.
| | 00:56 | Since users can interact with those buttons,
those are also included in the Layout Order.
| | 01:01 | You see one of those here in the upper right-hand
corner, but you see all these numbers already
| | 01:07 | assigned, FileMaker assigns a default tab
order for each layout according to the physical
| | 01:11 | placement in the order of placements of these
objects that you see here. You'll also notice
| | 01:16 | that Tab controls are included in the Tab
Order, but the default option that FileMaker
| | 01:21 | has given us here is starting with the upper
left-hand corner and kind of reading down.
| | 01:26 | But you see that the AddressStreet field was
placed before the contactName, so it's all
| | 01:30 | kind of messed up. So we actually have the
ability to reset this Tab Order and the easiest
| | 01:34 | way to do it is to choose the Clear All button,
and you see now that all the different arrows
| | 01:38 | are now cleared out. This allows us to do
two things, not only reset the order in which
| | 01:42 | users can tab through the fields, but also
to omit certain fields that we don't want users changing.
| | 01:47 | For example, the primary key
field is going to be auto entered so we want
| | 01:50 | to exclude that completely. So now what I
can do is I can just click on the fields in
| | 01:54 | the order that I want them to be tabbed, so
I click on CompanyName, Contact First, Last,
| | 02:02 | Title, PhoneNumber, you get the idea here,
and I can leave all these alone because these
| | 02:09 | are auto enter ones as well, and I can
even include this button there if I'd like.
| | 02:14 | So let's take a look at how this looks in Browse
mode. First, we have to hit OK to apply them,
| | 02:20 | we are all set, go to Browse, Save our changes. So
now let's say we get a new record, automatically
| | 02:26 | when a new record is created or any time the
user lands on this layout, it's going to activate
| | 02:31 | the first field in the Tab Order, that can
also be useful, depending on what sort of
| | 02:35 | techniques you're using as you navigate
from that to layout. And now I'm just going to
| | 02:38 | hit the Tab button on my keyboard, and you see
that it's going in the order that we originally
| | 02:43 | created, and it's even selecting the buttons.
So now when it comes to a button, it'll just
| | 02:47 | select the button, but it won't run the action
that's associated with it. I'll need to actually
| | 02:52 | hit my spacebar in order to be able to activate
it. If I go into Layout mode, and I show the
| | 02:59 | Tab Order, if I go in here, and I say I want
to add the Tab control now, you see that it
| | 03:05 | adds it to the last one, but I can change
that to a number 2, for example, and click
| | 03:09 | outside the field. And what's nice is that
FileMaker then reorders everything after it,
| | 03:13 | which is a very handy tool so that you don't
have to go in and reset the Tab Order from
| | 03:18 | scratch every time. So you'll notice now I'm
tabbing over to the Tab Control, and you see
| | 03:24 | that it just activates the first panel, but
if I want to go to other panels what I can
| | 03:28 | do here is I'm using my arrows, my left and
right arrows on the keyboard, and if I hit
| | 03:33 | the Spacebar it'll activate whatever panel
I'd like to. And then I can continue tabbing
| | 03:38 | off the panel into other objects onscreen. You
will also notice that that dynamic renumbering
| | 03:45 | works if I want to add a new field to a layout.
It'll add it to the end of the Tab Order,
| | 03:56 | but again, if I go in here, and I select it,
it will then move it into the Tab Order and
| | 04:01 | then move everything that comes after it dynamically.
One thing to note however is that if I have
| | 04:06 | a field let's say, for example, this
TaxRate one that I just added, and I move it over
| | 04:12 | to this gray area, the sort of staging area
off to the right, it's not going to be part
| | 04:17 | of the Tab Order, even if we go under Layout
mode here, and we see Set Tab Order, we see
| | 04:21 | that it's included as the third option. If
we go under Browse mode, we click into the
| | 04:27 | first field, and we say Tab 1, 2, and it
should be going to the field that's over here, but
| | 04:33 | it's been skipped, because it's over in the
gray non-active area of the layout.
| | 04:38 | I'll be going through each one of the layouts in the
Excise Files, and applying these same changes,
| | 04:42 | you can certainly do the same on your own
if you'd like some extra practice.
| | 04:46 | You'll find out that the order in which the users
can tab through fields and other objects while
| | 04:50 | they're doing data entry can really help make
the data entry process a lot more efficient.
| | 04:55 | So the Set Tab Order functionality gives you
control over how the Tab Order will be set
| | 04:59 | on each one of your FileMaker Layouts.
| | Collapse this transcript |
|
|
12. Finding DataUsing the basic find functions| 00:00 | One of the key requirements of a database
is to store data, but that doesn't really
| | 00:05 | do you much good if you can't retrieve the
data. So in FileMaker we've the ability to
| | 00:09 | add data to the database, we've been working
on that through quite a bit of different movies
| | 00:13 | throughout this title. But now I'm going to
talk about retrieving data and FileMaker provides
| | 00:18 | this retrieval functionality through the Find
mode features. We've been looking at different
| | 00:23 | modes, of course, the default one is Browse.
We've been looking at Layout mode, and now
| | 00:27 | we're going to move on to Find mode. And in
Find mode we're going to perform something
| | 00:31 | that's called the Find Request. We're going to
get real familiar with that. When you perform
| | 00:34 | a Find Request FileMaker Pro searches through
all the records in the table, comparing the
| | 00:39 | criteria that you've entered in that request
to all the data that's in the table and then
| | 00:43 | it comes back with all the matching records.
And these matching records are what are called
| | 00:48 | the Found Set, and that's going to really
important thing when you're working with FileMaker,
| | 00:52 | this idea of a Found Set. It's basically just
the records that come back after you've performed a find.
| | 00:57 | And records that don't match the criteria
are then omitted, but they're still in the database.
| | 01:02 | So, you know, we've got 1523 records in the
Customer Table, but maybe we don't want to
| | 01:06 | work with all 1500 all the time, so things
like printing, exporting all those different
| | 01:12 | types of things are affected by the found
set, they will only export the Found Set,
| | 01:15 | for example. You can enter Find mode a couple
of different ways. You can go under View to
| | 01:20 | select Find mode. You can do that also here,
you can hit the Find button on your Status
| | 01:26 | toolbar, but what most users end up doing
is just using the QuicKey equivalent, which
| | 01:31 | of course is Command+F on Mac and Ctrl+F on
Windows, and that will get you right into
| | 01:36 | Find mode. Now the first thing you see it's
a little dramatic change, it might look like
| | 01:40 | you've just deleted all the records in your
database. But one of the really neat things
| | 01:44 | about FileMaker that sets it apart from other
database systems is that you can use any screen
| | 01:49 | in your entire database as your search
layout or your search screen. This means that any
| | 01:55 | combination of screens or one screen that
you've got or different layouts, those can
| | 01:59 | all be used so that your users can interact
with Find Request. You could of course, create
| | 02:04 | your own special find screen, but you don't
have to. The users can be trained to be able
| | 02:09 | to extract whatever data it is that they're
interested in retrieving from your database
| | 02:13 | by simply using Find mode. When you're in
Find mode, and this is an indicator that tells
| | 02:18 | you that you're in Find mode and not, creating
a new record or having deleted all the records
| | 02:22 | is that you'll notice in the corner of all
the fields you see this little magnifying
| | 02:26 | glass here. That indicates that you can access
this field in Find mode first of all, because
| | 02:32 | sometimes the field behaviors might be turned
off, but also indicates the mode that you're
| | 02:36 | in. So now what I'm going to do is I'm going
to click into a field. Here's the State field, for example.
| | 02:41 | I can type something in here,
I'm just going to type in California, and
| | 02:44 | I can hit the Perform Find or go under Requests
and hit Perform Find as well, but most users
| | 02:49 | just hit the Enter key on their keyboard.
And you'll see now that it gives me a found
| | 02:54 | set of data. This is what's referred to as
a Found Set. I can search on any one of the
| | 02:59 | fields if I'd like. For example, if I go into
the City field and type in L-O-S, hit the Enter
| | 03:05 | key, and I see that I get four records in
this case. So let's take a look at this for a second.
| | 03:09 | So we'll notice up here in the upper
left-hand corner, and this is pretty important,
| | 03:13 | this is a visual indicator telling me that
I've got a 4/1523. So what that tells me
| | 03:19 | is that I've got 1523 total records in the
table that this layout is based off.
| | 03:24 | So it tells me I've got 1523 customers. But at
the moment only four of them are in my active Found Set.
| | 03:30 | So you'll see if I go to print
something, only those four will be printed
| | 03:35 | or if I go to export these things or save
them as an Excel or anything like that, it's
| | 03:39 | only going to export these four. And, by the
way, also Deleting Found Records applies to
| | 03:45 | only the active Found Set. Now technically
speaking, when you hit Show All you've now
| | 03:51 | made your Found Set all of the records in
the database. So it's still a Found Set and
| | 03:56 | then we'll go back in here and bring those
four records up again. I can move through
| | 04:01 | each of the four records if I'd like you,
and I can manipulate these in any way that
| | 04:04 | I see fit. You'll also notice next to the
numbers here is this little Pie Chart, and
| | 04:09 | what that indicates is that these four records
are really this percent of the overall records
| | 04:15 | in your database so that can be a useful
visual indicator. All the other records still exist
| | 04:19 | in the database, but they're just not visible
to the user. For example, I could go under
| | 04:24 | Records, and I can toggle between them using
this Show Omitted Only option, and now what
| | 04:29 | it does is it switches back and forth. It
says, okay, well now all the records that
| | 04:33 | don't match the Find criteria which was los
in the City field, all of those are now part
| | 04:39 | of the Found Set. Out of the 1523, 1519 are
showing, so you can toggle back and forth using that.
| | 04:44 | The other thing that's important
to understand is that each user that's in
| | 04:48 | the database gets something that's called
their own session. So when they login to a
| | 04:51 | database they are kind of initiating this
thing called the Session and they can do things
| | 04:55 | independently of the other user sessions. So
when I'm doing a search, and I'm isolating
| | 04:59 | four records all the other users that are
connected to this database, they are not going
| | 05:03 | to see my Found Set. They are going to be
able to create their own or just see all the records.
| | 05:06 | So that's another thing that add
some additional levels of versatility to working
| | 05:10 | with Found Sets in FileMaker. The other thing
you'll notice is that I did a search for the
| | 05:15 | search term L-O-S, and you'll notice that
I've got Lost Nation, Los Lunas, Lost Creek
| | 05:21 | and Los Angeles. So even though I put in L-O-S,
it still returns back values like L-O-S-T.
| | 05:28 | So what it's doing is it's finding the L-O-S part
in each one of these because what its doing
| | 05:32 | is doing a search based on the field's index.
And that's something that you'll see by, if
| | 05:37 | you click in here, there is a little trick
here. So if I Command+I on Mac or Ctrl+I on
| | 05:42 | Windows you see that it will pop up the Index.
So the way that finds work in FileMaker is
| | 05:48 | that when I go in and I type in L-O-S, it's not
going through all 1523 records and comparing
| | 05:54 | LOS to each one of those records on at a time. You
saw that we've got a really snappy response to searching.
| | 05:58 | The same would be true if we
had 15 million records in this database, it
| | 06:02 | would take us less than a second to retrieve
the matches. Because what FileMaker is actually
| | 06:06 | doing is it's creating this thing called an
Index. So what it's done is it's gone into
| | 06:11 | the City field, and it's noticed that all
these different words exist in the City field.
| | 06:17 | And what we're not seeing here though is it
says that the word Acosta is in at least one
| | 06:23 | record, we know that. But it's putting the
record IDs of each record. It's storing that
| | 06:27 | in this thing that's called an Index. It's
just get stored in the memory of the application,
| | 06:31 | aside from viewing it here you can't really
access that or use it, but FileMaker uses
| | 06:35 | it all the time. So when I type in L-O-S,
it's actually going into its Index looking for
| | 06:40 | L-O-S, and it's saying, well here is the four
record IDs that actually match that.
| | 06:44 | So that way it's really just comparing the Index
which doesn't have any duplicates in it and is a
| | 06:49 | much smaller list than all the records that
we have in the database. So that's the secret
| | 06:53 | is to how this works. And also it has two
different types of indexes, this is what's
| | 06:57 | called the Value Index, so it's just looking at
this as not the word McLean, but M-C-L-E-A-N,
| | 07:03 | and it also can do individual word. So this
is where we actually will see you know the
| | 07:08 | L-O-S built inside the field. So when FileMaker
is doing a search it's just taking whatever
| | 07:13 | you typed in and comparing it against the
Index. Another example of this if I go into
| | 07:19 | Find mode, type in angel, you see I get Los
Angeles and Angels Camp, and this is just
| | 07:26 | a demonstration of how, it doesn't even have
to be the first word. Here the angel is the
| | 07:30 | second word in a field and here it's a first
word. And that doesn't matter to FileMaker
| | 07:34 | because it's actually breaking apart all
these individual words rather than you see we've
| | 07:39 | Angels Camp right there, but when I break
it into individual words it's just going to
| | 07:42 | be angel and then camp a separate word. It
gives you a ton of versatility when you're
| | 07:46 | searching for these things in FileMaker and
make sure your users are trained on this type
| | 07:50 | of functionality because they are going to
be able to do some really interesting things
| | 07:53 | when searching for data in the database. So
these are basic ways to find data inside your
| | 07:57 | FileMaker database. Keep in mind that in
addition to FileMaker's ability to be able to create
| | 08:02 | the data storage mechanisms and provide a
user interface, it also provides this very
| | 08:06 | powerful data retrieval mechanism.
| | Collapse this transcript |
| Reviewing new requests in Find mode| 00:00 | In many cases when you are searching through
data in your FileMaker Database, you might
| | 00:03 | need to search for multiple criteria in one
single field. In these instances you will
| | 00:09 | need to be familiar with something that is
called Adding a New Find Request. So for example,
| | 00:13 | in this exercise file let's say I want to
create Found Set of Customers in California
| | 00:18 | so that I can print a report, and I only need
to see the California fields. So, I will go
| | 00:22 | into Find mode, click into the State Field,
simply type in California. Now, when I hit
| | 00:27 | Enter to perform the Find, I will see that I
have got 24 records that match that criteria.
| | 00:33 | However, now let's say our Boss comes back
and says, well, I actually want to see a report
| | 00:37 | that contains both the State of California and
Washington. So now we go into Find mode again,
| | 00:43 | and I can try California, well, if I put California
and Washington in the same field, what I am
| | 00:48 | actually going to get is an Error that says,
No records match this Criteria.
| | 00:51 | Of course they don't, because there is no State that
is CA WA. So the way that we will actually
| | 00:56 | do this is to go up here, we see this button
called New Request, I can create a New Find
| | 01:02 | Request for the same search. This is important
to kind of wrap your head around this you
| | 01:07 | will notice that it gives me another line
and up here in the upper left-hand corner,
| | 01:10 | we see that this number has turned to 2, and I
can navigate back to the original Find Request
| | 01:15 | and what it allows me to do is now put a different
value in the same field. So what I am actually
| | 01:21 | asking the database to do now is to show me
all of the records where the State matches
| | 01:26 | California or Washington. So you will now,
and when I hit Enter, it gives me 57 records,
| | 01:32 | and it is a mixture between the California
records and Washington records. When you are
| | 01:36 | in Find mode, you can add New Requests, but
you can also Duplicate Requests if you want to.
| | 01:43 | So if you've got a very sophisticated
combination of a bunch of different fields
| | 01:47 | and search criteria, you can simply duplicate
it and add new criteria if you would like to.
| | 01:52 | So what are you really doing when you
are searching is you are saying to FileMaker,
| | 01:54 | give me records that match this value or
this value. Now alternatively, if I hit Cancel,
| | 02:02 | and I go back into Find mode, and now what
I am going to do is in the Last Name, I am
| | 02:06 | going to type in Hanks, and I go into the
State, and I enter in CA, but now what I am
| | 02:12 | asking FileMaker to do is search for any
record that has Hanks and the State of California.
| | 02:18 | So when I do a Perform Find, we see that we
get two records that have the Last Name Hanks
| | 02:22 | or that include Hanks in the index and then
also the State of California. I could accomplish
| | 02:29 | the same thing by going into Find mode, typing
in the Last Name Hanks, creating a New Request
| | 02:36 | and then type in CA. Now when I perform the
Find, what it is doing is it is giving me
| | 02:41 | all the Californias or the Hanks. So, we see
here that we have got Hanks that is not in
| | 02:46 | California, but it was part of my Found Set,
because when I went in, I said well, this
| | 02:52 | way I want to create a Found Set of all the
Hanks. There are three of those. But I want
| | 02:57 | to combine that with the Found Set California,
which gives me a combination of both.
| | 03:06 | This is what is called an Or search. So, really
what we are asking FileMaker to do in this
| | 03:10 | case is saying give me all the records that
match this request or this request and my
| | 03:17 | Found Set showed matching records in either
one of those two. Couple of quick notes, when
| | 03:21 | you are in Find mode, you can continue to
Add New Requests as many as you like actually,
| | 03:25 | but keep in mind that the more you add the
less likely you are going to have matching data.
| | 03:29 | But at some point when you are adding
requests, you will notice that this Error
| | 03:33 | pops up in FileMaker, and it says hey, by
the way, You are in find mode and appear that
| | 03:37 | you think that you are adding new record data
rather than entering find criteria.
| | 03:40 | This happens every so often and really these magnifying
glasses here should be an indicator to your
| | 03:45 | users that they are not creating new records,
but instead Find Requests. But it can be rather
| | 03:50 | disheartening for users if they think they
are in Browse mode, creating new records,
| | 03:53 | but really they are in Find mode by accident
and then when they hit Find, it just says
| | 03:57 | can't find any other criterion and all those
records are lost. Another thing that I want
| | 04:01 | to show you is when we go into Find mode, we
see that there are button here called Matching
| | 04:09 | Records, either Including or Omitting,
whatever criteria that we have got here.
| | 04:13 | So really what I am saying when I am typing
California is that I want you to include in my Found Set
| | 04:17 | any records that match the criteria. However,
I could choose the Omit. So what I am saying
| | 04:23 | here is Omit from my Found Set, any records
that have California in it. So, now when we
| | 04:28 | perform the Find, we see that it's all
records besides the ones that have California.
| | 04:34 | So, sometimes that is useful as well. And
actually you can do combinations of these two, so we
| | 04:38 | go into Find mode, and now I am going to
type in California in our First Request, and I
| | 04:45 | am going to make a New Request, but in this
one I am going to say Hanks, but on the second
| | 04:49 | one I am going to tell it to Omit any of the
Hanks, but you will notice when I go to the
| | 04:52 | first record that it is still, including California.
So here I am saying, give me every record
| | 04:58 | with the State of California, but from that
list omit all of the ones that have a Last
| | 05:03 | Name of Hanks. So now when I hit Perform,
before we had 24 records when we searched
| | 05:07 | for California, but now we have 22, because
it is omitting those two records that said Hanks.
| | 05:11 | So, in addition to just doing basic
Finds, you can use the New Requests and even
| | 05:16 | omit in combination with new request which
will allow you to create both And/and Or searches
| | 05:22 | when retrieving custom Found Sets of data
from within your FileMaker Database tables.
| | Collapse this transcript |
| Establishing search operators| 00:00 | In FileMaker Pro, when you're searching for data,
you don't always have to specify exact search criteria.
| | 00:06 | For example, in the Exercise 12_03,
if I want to find all the invoices
| | 00:10 | that were created between the years 2000 and
2010, I would enter Find mode, and here we
| | 00:16 | have an Invoice Date. And what I could do
is put-in the year 2000. By the way, when
| | 00:23 | I enter in a four digit date in Find mode
into a Date field, FileMaker automatically
| | 00:27 | assumes that I'm searching for any date
that's within that year. So I could do 2000, 2001,
| | 00:33 | and you could see here it saw that there
were the four characters, so now it does what's
| | 00:37 | called these wildcards. So it puts an */*.
So it says any month, any day of the year 2000.
| | 00:44 | So, I've got a new one. I could keep doing
this doing 2000, all the way up to 2010, and
| | 00:48 | of course, it would find all those matching
records for me. But a much easier way to do
| | 00:53 | it is to use what's called a Search Operator.
So I can type in 2000 and here we see this
| | 01:00 | dropdown with all these operators in them.
This is really a guide that tells you the
| | 01:04 | different operators that are compatible with
FileMaker. I could choose range, and not only
| | 01:08 | was it a guide, but it actually puts in the
three dots for me, but I could easily just
| | 01:12 | type in the three dots which you'll get used
to doing. And I'll say 2010. So in one request,
| | 01:18 | I can hit Enter, and now it's going to find
every invoice that was created between the
| | 01:23 | years, including the years 2000 all the way
up to and, including 2010. There are some
| | 01:29 | other operators that I want you to be
familiar with. I'll go through the most useful ones.
| | 01:33 | But you'll notice that there's this one
called find duplicate values. One thing I can do
| | 01:37 | is go into a field, type in an Exclamation
Point, and simply hit the Enter key, and what
| | 01:43 | it's going to do is tell me all the
different records that have another record that also
| | 01:47 | match it, so basically, non-unique values. I
can do the same in the Invoice # field which
| | 01:52 | might be useful for us if we're trying to
go in and scrub our data and make sure that
| | 01:56 | we haven't duplicated any invoice numbers.
Same can be true when you're bringing in email
| | 02:00 | addresses, or IDs that you want to make sure
that you don't have duplicates of inside your database.
| | 02:05 | So simply putting an Exclamation
Point in will search for non-unique values.
| | 02:09 | If it finds two records that are duplicates,
it's going to actually present both records,
| | 02:14 | and sometimes if there are five records
that are all duplicates, it's going to present all five.
| | 02:17 | You can't imagine it would have
the intelligence anyways that would say, well,
| | 02:21 | this one is the duplicate, this is one that
was created second. You can figure that out
| | 02:25 | by looking at things like creation dates and
modification dates, for example.
| | 02:29 | Another thing that you can do is go into Find mode and one
of the other operators are these Equals signs here.
| | 02:35 | So let's take a look at how we use those
So, if we want to be diligent about entering
| | 02:39 | data into our database, and we need to figure
out where all the missing entries are, we
| | 02:43 | can use this technique of the Equals sign.
So if we go under the Ship Via field, and
| | 02:47 | put an Equals sign in, the way the Equals
sign works is what it's really doing is it's
| | 02:51 | saying find a match of whatever is following
the Equals sign. So, if I say Equals and then
| | 02:56 | I put nothing after it, what I'm really instructing FileMaker
to do is find all the records that equal nothing.
| | 03:01 | So, if I hit Enter, you see
that this tells me I've got five records in
| | 03:05 | here that don't have a Ship Via value assigned
to them. This is a quick way that I can ask
| | 03:09 | the FileMaker database a question as to hey!
How many of these invoices haven't shipped
| | 03:13 | yet? So here, I go in there, and I search
for the empty values. The Equals sign also
| | 03:18 | means match the whole word or empty. You'll
notice here it says match whole word or match empty.
| | 03:24 | Well, we can use that to our advantage
as well. Some of the operators are more obvious,
| | 03:29 | like, for example, you've got the Less Than,
Greater Than, Less Than or Equal To, and so on.
| | 03:33 | Those can be used either in a number
field like Invoice Total, where I can go in here,
| | 03:39 | and I can say anything that's greater than
1000, for example, and I hit Enter, now it
| | 03:44 | gives me all the invoices greater than 1000.
You can do the same thing for greater than
| | 03:48 | or equal to. But I can also use these in dates.
So here, I can say 2002. The reason that
| | 03:56 | works if you remember is because dates are
entered in, in the Date format, but FileMaker
| | 04:02 | turns them into an integer that represents
the number of days since the beginning of
| | 04:06 | the calendar for them which is 110001. So
really, I'm just saying anything greater than
| | 04:10 | the first date of the year of 2002. So I hit
Enter there, and we see that all these date
| | 04:15 | fields match that range. So greater than less
than greater than or equal to, less than or
| | 04:21 | equal to work on number fields and date fields,
and the same is true for the range function
| | 04:26 | with the three dots. Those work in the same
manner on both of those field types.
| | 04:29 | You'll see here if I go into Find mode, and I say
Invoice Total, 1000... 1500, finds any invoice
| | 04:39 | that matches that range. There's a couple
of other operators as well if you go into
| | 04:43 | Find mode, and in a date field, if you enter
in // it's going to find any dates that match today's date.
| | 04:50 | So, if you're looking for invoices
that were created today, you can just simply
| | 04:54 | put // in there and FileMaker will know that
you're talking about today's date.
| | 04:58 | There's another one that can be a little bit tricky.
Let's go into the Customers, and go into Detail.
| | 05:03 | We've got a field here in each one of our
contact records that has the At symbol in it.
| | 05:08 | Of course, every email has one of those.
So, if I go into the List View, for example,
| | 05:15 | and go into Find mode, and I type in the At
symbol. I want to search for basically any
| | 05:22 | field that has an At symbol in it, so I can
make sure that they're all properly formatted emails.
| | 05:25 | When I hit Enter, you see that it
says No records match this criteria, which
| | 05:30 | is odd because every record at least visually
here matches the criteria. So the reason for
| | 05:35 | that is because there's actually an operator
that means any one character, sort of wildcard character.
| | 05:42 | I'll show you how that works in
a second. But just to show you how we can
| | 05:45 | actually accomplish that task that we were
talking about before, if I take the At symbol,
| | 05:49 | and I wrap it in quotes, now I've told FileMaker
not to use it as the search term or the search
| | 05:54 | operator, but instead, actually look for that
text, the At symbol. So we see that all the
| | 05:58 | records in our database match that. But the
real use of the At symbol--for example, if
| | 06:03 | I go into City, and I say L@s--what I'm
asking FileMaker to do is to use the At symbol as
| | 06:11 | a wildcard character within other text so
that I can find words with one or more unknown
| | 06:16 | or variable characters, which is what they
mean by any one character. For example, in
| | 06:22 | City, if I add L@s, it's going to find any
records with a word that has an L followed
| | 06:28 | by any character and then an s. So here I've
got Las Vegas, Las Vegas, Los Lunas, Los Angeles.
| | 06:34 | So, it's a good idea to get used to some of
these operators here, some of them are a little
| | 06:39 | bit more obscure. But the more you get
familiar with these, the easier it's going to be to
| | 06:43 | work with the data in your database. So, in
addition to doing multiple requests, you can
| | 06:46 | also insert different search operators like
we see here in order to assist you, and your
| | 06:51 | users in retrieving data with minimal data
entry within the search request themselves.
| | Collapse this transcript |
| Constraining or extending found sets| 00:00 | I like to introduce you to a technique that's
different from doing an inclusive search using
| | 00:04 | one or more requests like we talked about
in previous movies. But instead, there are
| | 00:08 | going to be times where we may need to add
or remove from your current Found Set or Add
| | 00:12 | Criteria or Remove Criteria from your current
Found Set, as opposed to just searching within
| | 00:16 | the entire database of records. So right now
if I did a search, it will search within the
| | 00:20 | 1523 and give me anything that matches. But
wouldn't it be nice if I could sort of continue
| | 00:25 | to constrain that Found Set adding additional
criteria to it? Well, that's what I am going
| | 00:29 | to show you how to do here. So for example,
we'll go, and we will do our search for California,
| | 00:34 | hit Enter, and we see we have 23 records in
the database. Now I am going to go back in
| | 00:39 | the Find mode, and I am going to go over to
Status, and I'm going to a type in Inactive.
| | 00:46 | Now if I did a separate search, what it
would do is give me 147 records, it's completely
| | 00:51 | ignoring the previous search criteria that I did.
But if I do it in just a slightly different
| | 00:56 | order, Search for California, and I do Find,
and now I am going to type in Inactive.
| | 01:03 | Now instead of hitting Enter or the Perform
Find button, I'm going to go under the Request
| | 01:08 | dialog here, and I'm going to show something
that's called Constrain Found Set instead.
| | 01:13 | So now what that has done is it has given
me four records, so what that's telling
| | 01:16 | me is that within the Previous Found Set,
so I created as Found Set a 24 records, all
| | 01:20 | the State California, only four of them had a
Status of inactive. So the Constrain option
| | 01:26 | that you find when you're in Find mode, allows
you to only search within your Previous Found Set.
| | 01:32 | So I can search even further if I'd like
to, for example, if I go back into Find mode,
| | 01:35 | and I type in andrew in the First Name field,
and I go and Constrain even further, now it's
| | 01:42 | searching just within the last Found Set.
So now I can go back into Find mode, and let's
| | 01:47 | say I want to go in here, and I say inactive.
Another option that I have is to go into Request
| | 01:53 | and do what's called Extending the Found Set.
So now what it's going to do is it can take
| | 01:57 | the Found Set of onezx, it's going to add
to it any records that have a Status equal
| | 02:00 | to inactive. You see we have 147 records here,
and of course, that's going to include that andrew value.
| | 02:06 | So we did some searches with
multiple requests in previous movies, but
| | 02:11 | we can do same thing here with Extending.
For example, if I search for California, then
| | 02:17 | I go on the Find mode and search for Washington
and Extend Found Set, it accomplishes the
| | 02:23 | same thing as adding multiple requests in
one search. But now let's say I want to drill
| | 02:29 | through the Data and go into Status and say
pending, so instead of Extending, now I can
| | 02:34 | go back and Constrain, and so on. Now the
real power of this is when you've thousands
| | 02:39 | of records on your table, and you want to be
able to drill down or drill up from certain
| | 02:43 | criteria to chase certain Found Sets, whether
you are troubleshooting data or whether you
| | 02:47 | are trying to identify a very specific Found
Set of data. Using Constrain and Extend can
| | 02:52 | really help you find interesting things about the
data that you're storing in your FileMaker Database.
| | Collapse this transcript |
| Finding records using date, time, or timestamp criteria| 00:00 | Another of the useful benefits when you're
searching in FileMaker, are what are called date
| | 00:04 | and time range searching capabilities. You'll
see here in our exercise file that we've got
| | 00:09 | a list of invoices and they contain some
fields that have date, time, and timestamp values.
| | 00:14 | We've worked with the Invoice Date in previous
movies, but there are some interesting enhancements
| | 00:18 | inside Search mode that you might not be
aware of. I showed you one example where we could
| | 00:23 | just type in a four-digit date inside in Date
field, and it recognizes that four-digit date
| | 00:29 | as a year. If you put a one or two-digit date
in here it will search for records using that
| | 00:36 | one or two-digit number in a Date field as
the month, so it will actually search for
| | 00:41 | this month in the current year, which we don't
have any of those, but if you look here when
| | 00:45 | you search, you see it does 6 and then a
wildcard character and then another / and 2012,
| | 00:50 | so those are just some shortcuts that you
should be aware of. However, if I try to go
| | 00:54 | into a new record and type in just let's say
6/2010, FileMaker is going to say, hey, you're
| | 01:02 | not allowed to do that. You have to enter it
in Month-Date-Year with the proper slashes
| | 01:07 | and four-digit year and all that type of thing.
Delete that record. Browse mode has different
| | 01:12 | rules than Find mode, so if I go into Find
mode, and I say 6/2009 and hit Enter, it tells
| | 01:21 | me that no records are written up in the month
of June in 2009, but I can change it to 2010
| | 01:28 | and see it finds there's a whole bunch of
records in here that were generated, the invoices
| | 01:32 | were created in the month of June. So the
same rules don't apply when you're entering
| | 01:36 | date into a Date field that's when you're
searching inside of Date field.
| | 01:39 | You could also author those by yourself, you could go
on and click into an invoice date, and to
| | 01:44 | make it so that you can see this little bit
better I'm going to click in the bottom lower
| | 01:47 | left-hand corner to the Plus sign to increase the
view to 150%, wildcard character/12/wildcard character.
| | 01:56 | So now you can see what we're going
to search for here is any month and any year,
| | 02:02 | but the 12th in the day let's see if we have
any matching records there. And we do, you
| | 02:07 | see that regardless of the year or the month
that these are all 12. The 12th day of that
| | 02:13 | month, and the same can happen in any combination
of Month-Date-Year. And also, if I just simply
| | 02:19 | type in 6/2010, gives me anything in the
month of June 2010 of course, but I can also use
| | 02:28 | these sort of quick search formatting to do
ranges. So I can say 4/2000... 6/2010, and
| | 02:40 | it gives me anything, including April or
beyond of 2000 all the way up to June of 2010 and,
| | 02:47 | including that month as well. So combinations
of these date and time formatting and other
| | 02:51 | search operators can provide some interesting
results as well. Another way you can search
| | 02:55 | for values is by entering data that's not
in date format typing this right into the Date field.
| | 03:01 | One of my favorites is when you
click into the Invoice Date I can type in
| | 03:05 | the word Friday and hit Enter, although the
word Friday is not stored inside of the Date
| | 03:10 | field anywhere, FileMaker knows internally
because it's got this established date range
| | 03:15 | of 11 of the year one, all the way through
the date of 12/31 4000 there's some algorithm
| | 03:22 | actually that they use that tells you which
of those days is a Friday, Saturday, or Sunday
| | 03:25 | factoring in leap years and all that kind
of stuff. So basically you can go into your
| | 03:29 | Invoice Table and say, how many of these
invoices were generated on a Friday or a Thursday or
| | 03:34 | a Wednesday, and you can use those inside
ranges if you like. We can also use brackets,
| | 03:39 | by going to a Date field, I'll add this bracket
here, that gives me 4... 6. So what I'm doing
| | 03:48 | is I'm isolating that criteria from the
other criteria that I'm about to add here, so I
| | 03:51 | can say /{2009... 2010}. So what I'm doing
here is I'm saying give me any month between
| | 04:03 | four and six and, including, it's a really
any month four, five or six, and any year
| | 04:09 | '09 or '10, including both of those of course.
So we know that if we put a number and then
| | 04:15 | a / and then a four-digit one, it's
going to recognize that month of that year, but
| | 04:18 | now I can use brackets to really open up
that range and say, well it could be April, May
| | 04:23 | or June of any of the years 2009 or 2010.
When I hit Enter we see that it gives us Junes,
| | 04:30 | Aprils, Mays, 2010 and then some 2009 sprinkled
in here, I'm sure, oh, we don't have any 2009s
| | 04:36 | but they would be included if there were
records in the database. Now the same is true for
| | 04:41 | Time and TimeStamp fields, you see here that
I've got a Time field. If I go into that field
| | 04:48 | here for ShipTime I can simply type in 3pm,
for example, and even though that's not properly
| | 04:54 | formatted time, it'll still tell me
anything in the 3 o'clock hour, and using the same
| | 05:02 | wildcard principles that we talked about
with dates, we do wildcard *:15, and what this
| | 05:09 | is going to do is tell us anything with a
ShipTime of 15 after any hour, in that case
| | 05:14 | we see we have two 3:15s. Also I can enter
in just simply AM if I want to, and it'll
| | 05:22 | tell me anything that is a ShipTime that was
in the morning, so these are pretty neat ways
| | 05:26 | that you can do dynamic searching and the
same is true for timestamps. Everything that
| | 05:30 | I showed you that works in a date or works
in a time you can combine those together into
| | 05:34 | a timestamp search. If you get familiar
with the searching syntax, it's not only going
| | 05:39 | to help you but as you train your users and
possibly as you start to work with scripts
| | 05:43 | which we'll cover later on this syntax can
help you more accurately find date, time and
| | 05:47 | timestamp data within your FileMaker database.
| | Collapse this transcript |
| Using Fast Match and Quick Find| 00:00 | FileMaker 12 has two different ways that you
can create a Found Set, without even having
| | 00:04 | to go into Find mode, and you can do both
of these while you are within Browse mode.
| | 00:09 | The first of which is a feature that was
released a few versions ago and is called Fast Match.
| | 00:14 | It's all based on the contextual menu, which
is this menu that you see when you click into
| | 00:17 | a field, and you right-click or Ctrl-click
if you don't have a right-click, then you
| | 00:22 | see all these different options available to
you. The one down here is called Find Matching
| | 00:27 | Records, and you will notice, if you are
going to a field and, for example, you click on
| | 00:31 | one that says California in it and right-click,
when you do Find Matching Records without
| | 00:37 | even having to go into Find mode it's created
a Found Set with all the records that match that criteria.
| | 00:42 | And there are three Fast Match
options found in the contextual menu.
| | 00:46 | See, we have got Find Matching Records, which we
just looked at, Constrain Found Set, and Extend Found Set.
| | 00:51 | These all perform searches for records that
have the same data in the given field.
| | 00:55 | So I can say find all the Californias
or constrain the existing Found Set down to
| | 01:00 | just the ones with the State of California
that type of thing. So it's the equivalent
| | 01:04 | of copying the contents, entering Find mode
and then pasting the results, so it would
| | 01:08 | be akin to this. Copy, Find, Paste, Enter. So
all those steps are done in just one right-click.
| | 01:17 | So let's take a look at an example of this.
So we are going to find, and we'll say ME,
| | 01:23 | and we do a search, and we see that we've
got 26 records. So now within this Found Set,
| | 01:28 | I can click into the Last Name let's say the one
here that says Ippolite, and I can right-click
| | 01:32 | on it and say, Constrain. So I am going to
constrain the Found Set, and you see that
| | 01:37 | it narrows down to the three records that
match that criteria. Another way of doing
| | 01:41 | Finds is up here in the upper left-hand corner,
you might be familiar with this sort of Quick
| | 01:46 | Find area if you use iTunes or other Apple
applications, for example. What this allows
| | 01:51 | us to do is click into the Field, and what
it does is it does a global search, almost
| | 01:56 | kind of like a Google-type search across all
the fields on the layout. It's layout-specific,
| | 02:02 | but here I could put in CA and hit Enter,
and now what it's done, as you'll see here
| | 02:08 | if we look really closely it's on the State
of California which we've been doing in these examples.
| | 02:13 | But also if you look in here Caymus
has CA in it, Cascioli has CA in it, and there
| | 02:20 | might even be some--Captiva Florida. So,
what it's doing, it is searching across all
| | 02:23 | the different fields. It's very handy, if
you don't know exactly the context of the
| | 02:28 | value that you are searching for, and it does
really search just like a Google Search does,
| | 02:32 | but you can control whether certain fields are part
of Quick Find. You can do that through Layout mode.
| | 02:37 | If you go into Layout mode, the
first thing that you will notice is that all
| | 02:41 | these different fields have this little
lollipop looking thing on it, and I will go down to
| | 02:46 | the bottom left-hand corner and zoom up to
150, so you can see. What that little green
| | 02:51 | thing indicates is that it's what's called
the Layout Badge that indicates that this
| | 02:54 | field is included in the Quick Find. So, by
default if you place a field on a layout,
| | 02:59 | it's automatically going to have Quick Find
associated with it, you will see here, it
| | 03:04 | automatically gets the Quick Find, and I
will Undo that by hitting Ctrl+Z or Command+Z.
| | 03:10 | So what I can do is I can say, well, I want
people to be able to search through here but
| | 03:14 | the last names are kind of tripping things
up and the first names are tripping them up.
| | 03:18 | So I will do Shift-select, and then you
will notice, when I go over into the Data Tab,
| | 03:23 | you will see in the Field, Behavior section by
default there is this option here for Include
| | 03:29 | field for Quick Find. So, if I uncheck that,
you will notice that the badges are now gone,
| | 03:36 | and if I go into Browse mode, and now you
see we have 140 records before. So let's do
| | 03:42 | the CA search again now, and we only get a
138 because some of the ones were omitted
| | 03:48 | from the Contact Name, First, Name and Last
Name field, although Email is part of it and
| | 03:52 | the First, Name and Last Name are included
there. But in some cases where a CA existed,
| | 03:58 | only in Email and not in First and Last Name,
that's where we get this Found Set from.
| | 04:02 | You can also remove Quick Find functionality from
the entire layout all at once. If I go into
| | 04:07 | Layout mode, choosing the icon here to display
the Layout Setup, and you will see here we've
| | 04:12 | got this check box, which is by default it
allows you to Enable Quick Find on the entire
| | 04:18 | layout or not. If I uncheck that and hit OK,
you will see that it didn't remove the badges,
| | 04:24 | but what it did is it made the badges gray.
So, it indicates that if I turn this back
| | 04:27 | on, these are the ones that will be included
in the Quick Find, but right now none of them
| | 04:31 | are included in the Quick Find. If I go back
in there, I also have the ability to check
| | 04:36 | it and then Reset Quick Find which means that
any changes that I have made since the defaults
| | 04:41 | when they are placed on the layout will be
reset. So I hit Yes, hit OK, and you notice
| | 04:47 | now that the Layout is sort of turned back on
and then also the First and Last Name fields
| | 04:52 | are now included. And the reason that you
are going to want to turn some on or off is
| | 04:55 | really to limit the search to only fields
that contain data that you are searching for,
| | 04:59 | much like we did with the names and emails,
for example. There is also going to be three
| | 05:03 | different color badges. We already looked
at what the green means that's included in
| | 05:06 | Quick Find, and we already looked at the gray
that means it was included with the layouts
| | 05:10 | been turned off. But there is also an
option for yellow, we don't have any of those on
| | 05:14 | the screen right now, but yellow badges indicate
slow searches which are un-stored or un-indexed
| | 05:20 | fields, fields where Indexing is turned off
or related fields which we will get into more
| | 05:25 | in later discussions. And you can see we have
got some examples of those at least just visually
| | 05:29 | inside the Invoice Detail. Any time you see
the :: in front of the field in Layout mode
| | 05:34 | that indicates that it's a field that's
related, that's coming from another table.
| | 05:37 | We will talk more about that in the Relationship
chapter. But you can see here that those are fields
| | 05:42 | that are un-indexed or un-stored and they
are going to search a little bit slower.
| | 05:46 | So FileMaker puts a yellow badge on those.
So if you find that your Quick Find searching
| | 05:51 | is running kind of slow or not so quick
find then you may want to consider turning off
| | 05:56 | Quick Find on some of these yellow badge
fields or all of the yellow badge fields, and it
| | 06:01 | will assuredly increase the performance of
your search. So the idea here is that you
| | 06:05 | might want to train your users on these
different ways, they can perform finds using Browse
| | 06:08 | mode because they are great tools for
drilling down or drilling up in data
| | 06:12 | that you are working with on screen.
| | Collapse this transcript |
| Saving find requests| 00:00 | FileMaker actually has a third way that you
can perform a Find in Browse mode, and it's
| | 00:04 | a feature that's called Saved Finds. You see
here that we have this Layout Status Bar across
| | 00:10 | the top of our screen. If you don't already have it,
we can add an icon to it that's called Saved Finds.
| | 00:14 | So if we go into the Status
toolbar and either right-click or Ctrl-click on it,
| | 00:19 | or go into View > Customize Layout toolbar,
we can add the Saved Finds icon by dragging
| | 00:25 | it up to the toolbar. By the way, if you go
into Find mode, that won't show up over here,
| | 00:32 | but you'll notice it over on the far right-
hand corner. But you don't actually need to be
| | 00:36 | in Find mode to be able to do the finds, so
if you want to add it to your Browse mode
| | 00:41 | Status toolbar, it can be a very useful tool
for you. So let's talk about how this works.
| | 00:46 | If we click and hold the Saved Find, you'll
notice that it's got a couple different options
| | 00:49 | on here, Save Current Find or Edit any
existing ones. This feature is specific to the user
| | 00:54 | logged into this copy of the database. So
if your Saved Find does not show any Saved
| | 00:59 | Finds that means that in your account,
where you logged into the database on your copy
| | 01:03 | of FileMaker, you haven't done any or you
haven't saved any. So if you look at the Exercise
| | 01:07 | File, and you don't see the Saved Finds in
later exercise files, that's because they're
| | 01:11 | saved for my account on my copy of FileMaker
that I'm using for this title, which is actually
| | 01:16 | useful, because then the file when it's in
multi-user mode allows users to save all their
| | 01:21 | own without kind of cluttering it up with
other users. The only thing that you have
| | 01:24 | to be aware of though is that this isn't a
feature that you can build in and have it
| | 01:28 | be portable with the database, this is
something that's going to be specific just for users.
| | 01:33 | So let's do a quick search, go into Find mode,
search for California, hit Perform Find.
| | 01:39 | Now when we go under Saved Finds, we see it listed
here under Recent Finds, and I can clear all
| | 01:43 | those Recent Finds if I'd like to, but we'll
leave that one in there. Now, if our users
| | 01:47 | want to store this we can say Save Current
Find. You'll notice in the Specify Options
| | 01:52 | for Saved Find window that we can name this
whatever we want, we can call it CA or something
| | 01:57 | when we see it, it will make more sense, like
CA in State, then we can Save that, and now
| | 02:04 | we see it show up as CA in State. So you
see how that works here in Browse mode.
| | 02:08 | We go into Saved Find, and we do search, and it
just executes that find. But we could also
| | 02:13 | go in here to Edit Saved Finds, and we get a
different view, this is the Edit Saved Finds
| | 02:19 | dialog, and here you can see the Saved
Finds listed, and these are going to be all the
| | 02:24 | different find requests. So just like you can
go into Find mode and add multiple requests,
| | 02:28 | you can list multiple requests here, and you
can edit them by adding a new one if you'd
| | 02:33 | like to or editing it using the Advanced feature.
So here you'll see that it's saying Find all
| | 02:41 | the Request where the Criteria is the AddressState
equals California. Well, I can hit Edit again
| | 02:47 | and select that option, and I can go in and say
WA and Change. I can also pick from different
| | 02:54 | fields, I could say CompanyName equals Inc,
and I could Add that if I want. So now what
| | 03:01 | I'm doing is I'm finding records where this
field equals this value, and this field equals that value.
| | 03:07 | I could also go in here, and I
could make the second one an Omit.
| | 03:10 | If you remember when we did these manually,
I could have one of the find requests be an Include
| | 03:15 | and another be an Omit, the same kind of
thing that I'm doing here, and I can go in after
| | 03:19 | the fact and manipulate these if I need to.
So now I'll hit OK, and let's actually make
| | 03:31 | that a Find, hit OK again. So now I've
modified this to say, give me all the customers that
| | 03:40 | have the State of California and of Washington,
and I hit OK. And now let's go into my Saved
| | 03:45 | Finds, there we go, the second one for
Washington finds California and Washington.
| | 03:53 | And if I go into the Edit Save, instead of having this
be two different Saved Finds in my Edit list,
| | 04:00 | I can go into the first one let's delete that,
go into the first one, and now I'm going to
| | 04:06 | add to this list. So understand that this
list is all the individual Saved Finds, but
| | 04:10 | when you drill down into one of the finds,
this list that you see here are all the find
| | 04:15 | requests, so let's add a new one, State equals
Washington, Add. So now this request is going
| | 04:25 | to search for both California States and
Washington States. So let's see how this performs,
| | 04:34 | change the name, hit OK, Show All, go under Saved
Find, and choose California or Washington,
| | 04:41 | and we see that it automatically does that
for us. The idea here is you're able to do
| | 04:45 | a find in Browse mode, or actually you can
even use these in Find mode, because you'll
| | 04:49 | see that they're available to you here, but
if you're working with a search that might
| | 04:53 | be rather complex or something that you would
normally make note of, like let's say there
| | 04:56 | is something that you have to search for all
orders over $1,000 that don't have a ship
| | 05:00 | via, that have a certain status, whatever
it is you can just save that as your find,
| | 05:05 | and then you can just click on that from the
list as time goes by. And also keep in mind
| | 05:09 | that in these Saved Finds that you're creating,
you go into Edit, you can do things like make
| | 05:16 | the criteria say equal sign, or use another
search operator, like the exclamation point.
| | 05:25 | Or if you do an invoice date, you can do slash,
slash, so now you can have a Saved Find that
| | 05:29 | dynamically goes and finds all invoices let's say,
that have today's date on them.
| | 05:33 | And remember though, that these Saved Finds are specific
to a single user in a database, so developers
| | 05:38 | can't access these lists, nor can other
users other than the ones who have set them up.
| | 05:43 | These aren't bugs, it's a feature that's
preventing Saved Find confusion between multiple users
| | 05:47 | on the same shared database. So Saved Finds
are a feature inside FileMaker that should
| | 05:51 | really change the way you're searching
for data inside your FileMaker databases.
| | Collapse this transcript |
|
|
13. Sorting DataSorting with one criterion| 00:00 | In each of the exercises in this title,
we've been working with multiple records.
| | 00:04 | But you will notice as you open up each file that
the records are in order that really doesn't
| | 00:08 | kind of have any relevance. It's not alphabetical
order, not by contact name, or not by state
| | 00:13 | or anything like that. But what's happening
is when you first open up a file, and you
| | 00:16 | look at these, you're seeing that they're
actually being sorted in the order in which
| | 00:20 | they were created in the database. That's
not always meaningful to users though.
| | 00:24 | So in this movie, I am going to show you how
you can sort records in FileMaker, and you
| | 00:28 | can sort in any layout using what's called
the Sort dialog window. You can invoke that
| | 00:32 | window by going into the Status toolbar and
Browse mode and clicking this button right
| | 00:36 | here or under Records there is a Sort
option there, but what's most common is that you
| | 00:41 | are going to use Command+S or on Windows the
Ctrl+S option to preset the Sort dialog window.
| | 00:47 | And inside the Sort dialog window, you will
notice that there might already be some criteria
| | 00:51 | over here in the Sort Order. It's helpful
because FileMaker will actually restore whatever
| | 00:55 | the most recent sort was in case you're
going back and doing it again, and that actually
| | 00:59 | means even if you close the database. But
if it's not what you want to work with, you
| | 01:02 | can hit this Clear All button. So now what you
have got is a blank sort records and basically
| | 01:06 | what you can do is you can pick from anyone
of the fields either on the Current Layout
| | 01:11 | and FileMaker does that separately than all
the fields that are defined in the table,
| | 01:15 | because a lot of times you are going to only
choose values to sort from that are visible
| | 01:19 | to you on this layout. And as you change from
layout to layout, it will show different values
| | 01:24 | here, or we can say all of the different
values in the whole table, getting us everything
| | 01:27 | to work with. So I am going to say in Customer
List, we are going to go in, and we are going
| | 01:32 | to choose AddressState. I can select the
item and hit Move, and I move it over into the
| | 01:37 | Sort Order window, and I can clear it if
I've made a mistake, or I can just double-click
| | 01:41 | on it, and it moves it over into that
window as well. Now once it's in the Sort Order,
| | 01:45 | you will see that it's got this icon here--
and for those of you using certain cell phone
| | 01:50 | carriers, you may have never seen this before.
But it looks sort of like a reception signal,
| | 01:54 | but really what it is is it tells you
whether or not you are sorting in Ascending order
| | 01:57 | or Descending order. When it's a text field
it will sort alphabetically, A through Z or
| | 02:02 | you can toggle it to do Z through A, and numerically
and date-wise, of course, it goes ascending
| | 02:07 | or descending numerically. It really just
depends on which one of these you would like
| | 02:10 | to use, and then you can hit the Sort button
or just hit Enter, and now you see a couple
| | 02:16 | of things have happened on screen. So first of all,
it looks like it hasn't sorted alphabetically,
| | 02:19 | but in fact, it has. But what it's done is
it's maintained the active record.
| | 02:23 | If you notice over here, you see this little area
where there is that little black line next
| | 02:28 | to the record. So what that's indicating to us
is that was the record that was acted before
| | 02:33 | we did the sort, and it was at the top of
the list, but now you'll notice it's in the
| | 02:37 | middle of a list. But if we go all the way
to the top of our list, we see that it has
| | 02:40 | in fact, sorted all 1523 records in alphabetical
order as we instructed it to. But the record
| | 02:45 | that we were on at the time we did the sort
is now number 704 alphabetically.
| | 02:49 | The other thing you should note is that once the Sort
Order is set, you can make a change to any
| | 02:53 | of the records in the Sort field, then you
can see it automatically update.
| | 02:57 | Like, for example, if I click into Bahama and say CA
and click outside of it, you will notice that
| | 03:02 | it automatically drop down into the California
list automatically. So what's happening there,
| | 03:07 | if we invoke the Sort dialog is that it's
using this default setting which is called
| | 03:11 | Keep records in sorted order. When left in
the default state after the Sort Order dialog
| | 03:16 | is dismissed, sorting works as it did in
previous versions of FileMaker for those of you that
| | 03:20 | are familiar with it, but if not, basically
what it does is it will not resort when any
| | 03:24 | of the values are changed, but if you uncheck
this and then do the sort, now we see here,
| | 03:29 | we can say Washington, for example. Now it
doesn't re-sort those values, and this can
| | 03:34 | be useful if you are going through a list
of items, and you are just trying to update
| | 03:37 | them, and you don't want everything to re-sort,
but sometimes it's useful of course to re-sort
| | 03:41 | them on the fly. It really depends on how
you want your sort to behavior. You can either
| | 03:45 | go in and uncheck or check the default value.
I can reset a Sort Order by going under Records
| | 03:51 | to Unsort, it goes back to its original
creation order. Another thing that you'll notice is
| | 03:56 | that when you go in, and you Sort by Addresses,
notice up here that these values are empty.
| | 04:02 | So what FileMaker does by default is it
will always put empty values in the top of the
| | 04:06 | list, when it's a text field you're sorting on,
and you are doing it in ascending order,
| | 04:11 | if you Sort descending, it will put them on
the bottom of the list. So basically any empty
| | 04:15 | values are going to come before A, in A to Z
search and Z to A, they will end up as the
| | 04:20 | last ones. That's just something that you
should be familiar with. So understanding
| | 04:23 | how to use basic sorts is going to help you
manipulate the data inside Found Sets, so
| | 04:27 | they can be more meaningful when users are
reviewing it on screen. Keep in mind that
| | 04:31 | the Sort Orders will also affect the order
in which users are viewing the records when
| | 04:34 | they're being printed or exporting, so
understanding how to sort can be useful
| | 04:38 | in all of those functions as well.
| | Collapse this transcript |
| Sorting with related fields | 00:00 | When you're looking at data inside FileMaker
the layout which you are looking at is based
| | 00:04 | on a table so that means that most of the
data that you're seeing on screen actually
| | 00:07 | lives inside that table, or more specifically
these are fields that were defined in this table.
| | 00:12 | We discussed this a bit in the relationships
chapter, and we'll also talk more about this
| | 00:16 | concept later in the movie. But for right
now one of the things that we are going to
| | 00:19 | discuss is how you can play something that's
called a related field on a layout.
| | 00:23 | That's given the assumption that if you look at the
invoice lists in Layout mode you'll actually
| | 00:27 | see an example of this. Notice that all these
different fields, and I'll go down, and I'll
| | 00:31 | hit zoom to 150 in the bottom left-hand corner.
So that we can see that most of the fields
| | 00:36 | are all fields that are defined inside the
Invoice Table, and we know that because this
| | 00:40 | one over here if you look closely has a Double
Colon on it, I'll increase that to 200.
| | 00:46 | That indicates that it's a related field and the
rest of them are defined within this table.
| | 00:50 | You also can see if you have the Quick Find
Layout badges on, that this one is yellow
| | 00:54 | because one of the things that makes a quick
find search slower is if there is a related
| | 00:58 | field on the layout. You can also notice that
when you select a field that you'll see that
| | 01:02 | in the Inspector under the Data Tab that says
Customers::ContactNameFirst, whereas the rest
| | 01:08 | of them say Invoices:: so that table designation
before the :: tells me that it's coming from another table.
| | 01:14 | There's a whole movie on this later
in the relationships chapter if you
| | 01:17 | want to learn more information about using
related fields. But for now I wanted you to
| | 01:21 | see that you can actually use these in your
sort order. So let's go into Browse mode and
| | 01:26 | go into the Sort dialog and clear these out
so that we can start from scratch, and let's
| | 01:31 | choose the ContactName field, and we see that
that's listed under Invoice List, but if it
| | 01:37 | wasn't under Invoice List, and were just going
into the table, we notice that it's not defined
| | 01:40 | in this table. So what FileMaker allows you
to do is actually pick any tables related
| | 01:45 | to the active table and use those fields for
searching as well. So here I can go inside
| | 01:49 | of this and say ContactNameFirst and sort
alphabetically, and I hit Sort, and if I go
| | 01:56 | all the way to the top of the list, you can
see that it sorts A, B, C, and so on.
| | 02:01 | So really what it's doing in these cases is just treating
that field as if it's defined locally in this table.
| | 02:07 | So another one of the interesting
things you can do when you have relationship set
| | 02:10 | up between your tables. So the rule here is
that any field that you have on your layout
| | 02:13 | whether it's local field or related field
can be used in your sort criteria, and even
| | 02:17 | if that field isn't on the layout, and it's from
a related table you can also use that as a sort.
| | Collapse this transcript |
| Sorting with multiple criteria| 00:00 | Often when you're working with FileMaker and
you have a large set of records, you may want
| | 00:04 | to just look at them in a certain order.
This of course is where sorting comes into play
| | 00:08 | and sometimes when you are shorting you may
have multiple different criteria that you
| | 00:11 | need to sort with. For example, in the
database that we're looking at here, we've got
| | 00:15 | 1523 records, and if I go in to sort them by State
alphabetically in ascending order, we'll see
| | 00:25 | that even within certain states we still
have a lot of information that's kind of still
| | 00:30 | out of order. So it might be useful for us
not only to sort by state, but let's say then
| | 00:34 | to make it more organized anytime the state
matches we want it then defer to an alphabetical
| | 00:39 | sorting in city. So let's take a look at
that in the Sort dialog, the way we do that is
| | 00:44 | by adding another criteria. So I can move
City, and it's important of course which order
| | 00:50 | you can move these above or below. This one
of course if I executed this search it would
| | 00:54 | search everything by City and then whenever
the City name matches it would then defer
| | 00:58 | to sorting by State, but that's probably
less likely since a lot of the cities are going
| | 01:03 | to have the same state, anyways, it really
won't have much effect. So you can see how
| | 01:06 | the order would be very important. So here
it's going to sort by State and then when
| | 01:10 | it finds matches in the State field then and
only then is it going to defer to the City.
| | 01:15 | So here it would sort all these states in
within, it would do the As, Bs, and so on.
| | 01:20 | So let's take a look at how that was going
to work? So now if we go to our first record
| | 01:26 | we see that we've got all the As, and it
does A, B, C, E, G, and so on. And then now we
| | 01:31 | have the AEs that goes A, B, and so on. It's
important to remember, however, that the second
| | 01:37 | sort criterion only kicks in when there's
matching records in the first one, and now
| | 01:41 | I can continue to add multiple criterion here,
and I can add as many of these to the list
| | 01:47 | as I'd like, but keep in mind it's going to
become less and less likely that anything
| | 01:51 | after the first one even comes into play.
You'd have to have a record that matches State
| | 01:55 | and matches City and then it would have to
kick in and sort by last name in order for
| | 02:00 | this to work. That might be likely, but as
you continue to add more it becomes less and
| | 02:04 | less likely that you don't have any records
that match the criteria. So it's really about
| | 02:08 | sort all the records in the foundset by this
and then sort any duplicates that it finds
| | 02:12 | in that criteria by this and sort any
duplicates it finds in this criteria, and that criteria
| | 02:18 | by this one, and I can move them around in
order of priority. So in cases where you need
| | 02:21 | to sort within a sort group just use
multiple criteria in your short dialog box.
| | Collapse this transcript |
| Sorting using custom values| 00:00 | Many times when you're looking at records
in List View you want to sort them so that
| | 00:04 | you can see them in a specific order. As we've
looked at in previous movies in this chapter
| | 00:08 | you can see that you can add single criteria
or multiple criteria to your sorts, much like
| | 00:12 | I'm doing here, State and then City, and those can
also be modified to sort either ascending or descending.
| | 00:19 | Now of course ascending and descending
which are set here after you selected
| | 00:23 | one of the values in the sort order, will
sort differently depending on the field type.
| | 00:26 | So for example it's a text, it's going to sort A
to Z, if it's numbered, it's going to sort
| | 00:30 | one through whatever number, and so on. However,
that might not always work for certain types
| | 00:35 | of sorts that you're doing in the database.
Let's say for example we are going to do a
| | 00:40 | sort by Status, clear out everything but Status,
and so what it's going to do is sort alphabetically.
| | 00:47 | So that's fine, we've got active here and
then we've got inactive, pending.
| | 00:53 | However, let's see that doesn't actually make sense, so
for example, active and inactive, and pending
| | 00:58 | certainly sort alphabetically but when you're
looking at this data or you are printing it
| | 01:01 | out or you're exporting it, and you're going
to adopt the sort order maybe you actually
| | 01:05 | want to see them in a different order. For
example, more naturally they might go in the
| | 01:09 | order of active, pending, and inactive,
maybe that's actually how a customer works with you.
| | 01:14 | When you first get him, they are active,
and if you take them off, some sort of status
| | 01:17 | they are pending and then maybe eventually
they become inactive, but it doesn't make
| | 01:20 | sense to have them in any other order. So
the way that you can do this if you go under
| | 01:24 | the Sort dialog, and you have Status selected
you'll notice that you've got Ascending, Descending,
| | 01:29 | and then you've got this other option down
here which is called a Custom order based
| | 01:33 | on something called the value list. We'll
be covering value list in the next chapter,
| | 01:37 | but if you're not familiar with them, what
a value list is is something that you can
| | 01:41 | define inside your FileMaker database that
is exactly what it sounds like, it's a list
| | 01:45 | of values, and you can create different list
of values and save them in the database, it's
| | 01:48 | just one of the areas that you can use them.
So if I'd already set up a list of values,
| | 01:52 | and I want to use it I would just select it
from this list. However, I don't have any
| | 01:56 | value list assigned currently in the database,
so what I am going to do is I am going to
| | 01:59 | check this thing that says Manage Value Lists.
So what I am going to do is create a new value
| | 02:04 | list, I hit New, and I can call it Status,
and basically all I need to do is just type
| | 02:10 | the values in here, so I am going to type
in Active, and I am going to do a return
| | 02:15 | character, that's how FileMaker knows it's a
new value and then Pending and then Inactive
| | 02:21 | so they are not in alphabetical order, they
are not Z-A either, they are in a custom order,
| | 02:26 | and so all I do is I just type in the order,
I have to make sure I am spelling the names
| | 02:29 | correctly so that they match the values in
the field, but, also make sure that there
| | 02:32 | is a return character between them. Now I
hit OK, hit OK again, and now that I've got
| | 02:37 | that value list chosen you'll see that the
icon has changed a bit as well, and now I
| | 02:42 | hit Sort, we still see Active at the top,
now it's pending and then it finishes with Inactive.
| | 02:48 | So what we learned here is that
you're not just constraint to using your ascending
| | 02:51 | or descending sort order values when sorting
records in FileMaker, but instead you can
| | 02:56 | create whatever customized value list that you want
and set those up inside your manage value list dialog.
| | Collapse this transcript |
| Sorting using buttons| 00:00 | FileMaker Pro provides a special interface
for sorting your records, and that can be
| | 00:04 | viewed by clicking the Sort icon in the toolbar
or using the menu or the Quick Keys.
| | 00:09 | But sometimes for your users, they might not be as
familiar with this Sort dialog box as you are, so instead
| | 00:13 | of providing training for them so they can
view the records in their desired format,
| | 00:17 | which you can do instead is allow them to
use buttons on screen. This way they can sort
| | 00:21 | values by just clicking on certain objects
on screen, without having to mess around with
| | 00:24 | the Sort dialog box. The most logical way
to do this if you're looking at List View
| | 00:28 | is to make your column headers clickable.
This is something that people are used to
| | 00:31 | from using the web, and it's very common in
other applications. Later in this title
| | 00:35 | we will be discussing the concept of Scripts
in great detail. But I am going to introduce
| | 00:40 | you now to the idea of attaching an action
to a Layout object. So if you look at our
| | 00:44 | Customer list, and if we go into Layout mode
we will notice that we have several different
| | 00:48 | layout objects on screen, most of them are
field layout objects and most of them are
| | 00:53 | field label layout objects, but you'll notice
if I zoom, that we've also got some additional
| | 00:59 | layout objects here that just happen to be
icons or graphics. And in this case they are arrows.
| | 01:04 | But if we focus on the field labels,
these are separate objects independent from
| | 01:08 | the field themselves. We go back down into
150, if I select for instance the State field
| | 01:14 | label, what I can do is assign to it in action
that when a user clicks on it, it will automatically
| | 01:18 | run some things, some action. In the way that
I invoke that is by either selecting any one
| | 01:23 | of these layout objects and going to Format
Button Setup, or I can Right-click or Ctrl-click
| | 01:29 | on this and also select button Setup and what
this does is present us with the button Setup
| | 01:33 | dialog and what FileMaker allows us to do is
assign any one of these actions steps here
| | 01:38 | to the user clicking this button or clicking
on this object. So you could go to navigate
| | 01:43 | to another layout or Copy, Paste things or
perform a certain Find or whatever it is.
| | 01:48 | But what are we going to do is we are going
to go scroll down through this list until
| | 01:52 | we find the section that's called Found Sets,
and we are going to choose Sort Records.
| | 01:56 | Now that we have selected Sort Records from
the list on the left I have different options
| | 02:00 | that I have to choose. So you'll notice if
I do specify Sort Order, presents us with
| | 02:04 | the familiar Sort Records dialog box, and
so what it's really asking us to do is enter
| | 02:08 | in the sort values, that every time a user
clicks on the State column header it will
| | 02:13 | sort by these values then. So we are provided
an instruction on what to do. So if we hit
| | 02:17 | Clear All, in this case we say double-click on
AddressState and do that in ascending order,
| | 02:23 | now we hit OK, and we notice there is this
other one here, it says Perform without dialog.
| | 02:27 | If we leave this unchecked, the user is
still going to be prompted with the Sort dialog,
| | 02:30 | even though it will have the AddressState
put in there form, but the idea here is that
| | 02:34 | we don't even bothering with the dialog. So
now let's hit OK, go in the Browse mode, and
| | 02:39 | hit Save, and we see now that when we click
on the State header, we notice that there
| | 02:43 | is this little kind of Mickey Mouse glove
thing here that tells us that it's an active
| | 02:46 | button and users can click on it. So if we
instruct our users to just click on the Column
| | 02:50 | header, you'll notice then that it will sort
alphabetically by State. Sometimes they'll
| | 02:54 | want to sort A to Z or possibly Z to A. So in
that way we can use these other arrow objects
| | 03:00 | to do something similar, but a little bit
more comprehensive. We go into Layout mode,
| | 03:04 | I am going to select the Arrow that's
pointing down, and I am going to right-click on it
| | 03:09 | and go to button Setup. And I am going to
do the same thing here. We will go to Sort,
| | 03:14 | choose Without dialog. So what I am going
to do is clear out AddressState, and instead
| | 03:21 | Sort by City and do that in ascending order
and hit OK. And now I am going to select the
| | 03:27 | other button, say, button Setup, and we will
select Sort from our list, Perform without
| | 03:34 | dialog, and this time we will specify this
order. Let's do Clear All and move the City.
| | 03:40 | But this time we are going to make it sort
in descending order, and we will hit OK.
| | 03:45 | So now this button has a sort ascending
assigned to it, and this one has a sort descending
| | 03:49 | assigned to it. Let's see how that works in
Browse mode, so now let's hit ascending, and
| | 03:55 | we can see that all the cities have sorted in
alphabetical order, but if I hit descending,
| | 04:01 | we see now that they have sorted Z to A. I
will be adding Sort buttons to other field
| | 04:06 | labels in the future exercise files, but you
are welcome to do these yourself inside the
| | 04:10 | exercise files for a little bit more practice.
So in addition to having your user trained
| | 04:14 | on how to use this Sort dialog window, you
can also make any of the objects that are
| | 04:18 | on the Layout, whether they be Field Labels,
Fields, or some kind of Graphic, or Icon that
| | 04:22 | you put on screen, they can use those as a
button by assigning a ScriptAction to them
| | 04:27 | and within that ScriptAction we
can define a predefined Sort Order.
| | Collapse this transcript |
|
|
14. Value ListsIntroducing control styles| 00:00 | FileMaker Pro provides many tools in Layout
mode for configuring the behavior of fields
| | 00:05 | that make data entry easier and more efficient
for your users. Among these is something that's
| | 00:09 | called the Fields Control Style, which enables
you to find something called the value list
| | 00:14 | for data entry and then to format the field
to display the value list as either a pop-up
| | 00:18 | menu, dropdown list, or a series of check
boxes or radio buttons, all of which we'll
| | 00:21 | review in this movie. There are two primary
benefits for formatting fields in this way.
| | 00:26 | It allows for a faster data entry by users,
instead of users having to click inside of
| | 00:30 | the field and type their own value, you can
provide them with a list of the selections,
| | 00:35 | which will populate the field on their behalf,
thereby, allowing faster data entry, along
| | 00:40 | with greater accuracy. Anytime a user manual
enters data into a field, you run the risk
| | 00:44 | of misspelling or inconsistent data. Providing
with a list of values to choose from goes
| | 00:48 | along way towards ensuring consistent data
entry, and user are usually accustomed to
| | 00:52 | working with data entry devices such as check
boxes and dropdowns and other applications as well.
| | 00:56 | So in addition to consistency, you
also get a bit of familiarity, when it comes
| | 01:00 | to users working with your database. In this
movie, I am going to be discussing how to
| | 01:03 | set up control styles for fields. Typically,
you are going to apply a control style to
| | 01:08 | a field that you've already added to your
layout. So if we go in the Layout mode on
| | 01:11 | the Invoice Detail Layout here, we see all
the different fields onscreen, and so in order
| | 01:16 | to add one of these control styles, I am
going to select a field onscreen.
| | 01:19 | Although it's also possible to add a field control when
adding the field to the layout at the same
| | 01:23 | time by using this Field Control dropdown
that you see here. So I can add a field and
| | 01:31 | select one, and that will automatically ask
me to add a control. But instead what we're
| | 01:36 | going to do is we're going to work with a
field that already exists on the layout, and
| | 01:39 | in this case, it's going to be the InvoiceDate
field. Now if you don't have your Inspector
| | 01:43 | showing, you can go under View Inspector
or do the Command+I or Ctrl+I. So now that
| | 01:50 | we've got the Inspector open, and we've got
the InvoiceDate field selected, you'll notice
| | 01:54 | under the Data tab that we've got information
here about Field that says Display data from,
| | 01:59 | gives us the table and the field name. But
you'll notice this dropdown here below that
| | 02:03 | shows us all these different Control styles
that we can apply to a field. Let me take
| | 02:07 | a moment to review with you what all these
Control style options are. For starters, the
| | 02:11 | Edit box is a style that's given to a field
by default, and it means that there is no
| | 02:15 | action assigned to it. It really just means
no control style. A dropdown list, the second
| | 02:21 | one on the list here, allows users to select
from a list that you've already created, and
| | 02:26 | I'll talk about how to create what are called
value lists. And this is a good interface
| | 02:30 | because when there's a large number of values
to choose from, users can then use arrow keys,
| | 02:35 | or they can type ahead on dropdown lists.
But it's also useful because if they choose
| | 02:39 | not to use the list, they can just click twice
in a field and then they can just type something else in.
| | 02:43 | So, if you are not too worried about
data consistency, and instead just trying
| | 02:46 | to provide suggestions, a dropdown list is
a good option. Pop-up menu is nearly identical
| | 02:51 | to the same look and feel of the dropdown
list, but in the case of a Pop-up menu, if
| | 02:56 | the user double-clicks into a field, they
can't bypass the dropdown and instead they
| | 03:00 | must choose from one of the values that you've
set up inside that field. So this is great
| | 03:04 | if you insist on data consistency. Checkbox
set is a style that presents the value list
| | 03:10 | as a set of check boxes that the user can
either click on or off. The selected items
| | 03:14 | are then stored as return to limited list
in the field in the background, even though
| | 03:18 | when they're clicking on it, it still just
looks like a check box where there's either
| | 03:22 | values that are clicked on or not. What's
nice about this option is that you can let
| | 03:26 | users click multiple different options in
a field, and they are not mutually exclusive
| | 03:30 | of each other. The Radio button is similar.
You can still see all the different values
| | 03:34 | onscreen, of course, you'll have to create
a size on screen to be able to accommodate
| | 03:38 | those, but in the case of the Radio button,
when a user selects one value, it's going
| | 03:42 | to deselect another value. So this is when
the values in a value list are mutually exclusive
| | 03:46 | of each other, very common when you're using
things like ON or OFF, or inactive/active,
| | 03:51 | when you really have it's either/or, one of
these options never and. And finally, the
| | 03:56 | dropdown calendar, which we'll use in this
case, doesn't actually display any values
| | 04:00 | that you set up in a value list. So if we
select it right now, and we go under Browse
| | 04:05 | mode, and Save, you'll see that when I click
inside this field, now this window picker pops up.
| | 04:11 | This will happen whenever somebody
clicks into a field or tabs into the field,
| | 04:16 | but you'll notice that if we go into Layout
mode, we have one option here, and that is
| | 04:19 | to include what's called an icon to show or
hide the calendar. We'll need to make sure
| | 04:23 | that the field actually has borders on it,
so if we go into Appearance, and we pick Line,
| | 04:29 | we'll say Solid, and we'll give it black.
That's what's necessary to actually make it
| | 04:34 | display, So we hit Save, and now we'll see
that if a user clicks into the field that
| | 04:38 | does not automatically drop the calendar down,
but the user would then have click on the icon.
| | 04:42 | So you can have some control over whether
it automatically pops in, or whether the user
| | 04:46 | can use it if they so desire. The thing about
these pop-ups is you don't want to use among
| | 04:50 | every date field, because in the case of a
invoice, it might make sense to use it, because
| | 04:55 | what it's going to do is pop up if the field
is empty. It'll pop up to whatever the current date is.
| | 05:01 | And so if you don't have to do a
lot of clicking to find the right invoice
| | 05:05 | date that's fine. But if you go into like
a customer record, and they have got a birth
| | 05:09 | date, it will make sense for you to click
and start at the current day, because you'll
| | 05:12 | be clicking back you know, tons and tons of
years in order to be able to find the right value.
| | 05:16 | So you want to, you know, be selective
when you're using the dropdown calendars.
| | 05:20 | In the upcoming movies, I am going to show
you how to create a value list and then apply
| | 05:23 | one of these other field controls that I've
viewed with you, to the field, in order to
| | 05:27 | allow the users to choose from values that
you've already defined. So providing field
| | 05:31 | control styles and a list of values to choose
from in any of the options that we discussed
| | 05:35 | here will go a long way towards ensuring
consistency of data entry by your database users.
| | Collapse this transcript |
| Creating and applying static value lists| 00:00 | Several of the Field Control Style options,
the dropdown list, Pop-up menu, Checkbox set
| | 00:06 | and Radio button, which are the ones that
you can find in Layout mode. You select on
| | 00:11 | a field and go into Data, you'll see these
options available to you. But all these options
| | 00:15 | except for the one on the bottom the dropdown
calendar all require that there's something
| | 00:19 | called a Value List already setup inside the
database, and whatever list of values you
| | 00:23 | create and store in the database you can then
reference those and then will also be what
| | 00:27 | are displayed when the user clicks into the
field. In order to be able to create Value
| | 00:31 | List we will go into the File>Manage>Value
List window, and we see that we've got one
| | 00:36 | in here, we used this in our sorting exercise.
But let's create a new one. It's pretty easy
| | 00:41 | to do, you can just hit the New button, and
then you want to give it a name so that way
| | 00:44 | when it shows up on the list you can differentiate
the value list from other value list, so in
| | 00:49 | this case we're going to add one that's called
Shipping Status. We've got Shipping Status
| | 00:53 | field on our Invoice layout, and we're going
to apply this to it. So here we've got the
| | 00:57 | option of custom values, so this is where
we're going to type in all the different values
| | 01:00 | that we want users to see when they click
on the Shipping Status field. So I'm going
| | 01:04 | to type in Pending, and now here's the important
part, I have to hit a Return because this
| | 01:09 | list will need to be a returned delimited
list, and I'll enter in Processing and Shipped.
| | 01:18 | So again, each value must be separated by
carriage Return, and if you want, you can
| | 01:22 | add a divider by entering a hyphen in there,
so we'll go ahead and do that so you can see
| | 01:26 | what that looks like. So now I hit OK, and
now we see that our list has been added to
| | 01:31 | the Manage Value List window, which means
that it's available not only to assign to
| | 01:35 | a field, but I could then use it in a sort
dialog and actually there's a few other areas
| | 01:39 | where I can use this Value List. So it's universal
throughout the whole file, not just specific
| | 01:44 | to this layout or this field. So now I can
select the Status field, and I see in the
| | 01:49 | Inspector, which if you don't have the Inspector
open, you can go under View and choose Inspector,
| | 01:53 | but I see that its default control style edit
box is still selected. So I'm going to choose
| | 01:58 | dropdown list, and now because the dropdown
List Control Style requires a Value List,
| | 02:04 | I'm prompted to enter the Value List or pick
one from the dropdown, so this is where it's
| | 02:08 | helpful to use a naming convention, because
I can see, I can choose the Shipping Status
| | 02:12 | instead of just Status. And if I want to invoke
the Manage Value List dialog I can do that
| | 02:17 | by hitting this pencil, and it will popup
for me. Well, let's go into Browse mode and
| | 02:21 | see how this looks. And when I select the
field I see that here's all the values that
| | 02:26 | are available to me, and we see that that
hyphen turned into a nice clean looking divider.
| | 02:30 | Now the thing with the dropdown list is that
if I click twice into the field, the user
| | 02:33 | can still type a value in there. So it's helpful
if we want them to be able to tab or click
| | 02:38 | into a field and see these, but if they click
again, they can just type some other value
| | 02:42 | into the field or whatever they desire. But
if we want to be a little bit more constrained
| | 02:47 | and allowing them to do what they want to
do, I can instead choose Pop-up menu, Pop-up
| | 02:52 | menu is more restrictive in that when we're
in Browse mode, we see that it only allows
| | 02:58 | them to choose one of these options. So just
to say if you want to do more consistency
| | 03:02 | in your in the data entry, so you can either
choose the drop down list that will popup
| | 03:08 | any time the user clicks into the field or
you can even do a dropdown list where you
| | 03:11 | show what's called the arrow, and that of
course requires that you've got a line that's visible.
| | 03:18 | So if we go into Browse mode, so
now when the user clicks, and it doesn't pop-up
| | 03:24 | the list, but they can select it on their
ownor I can make it so the arrow is not there,
| | 03:28 | so when they click it, it shows it but then
they can click again and they can dismiss
| | 03:32 | the list or of course I can use the Pop-up
menu option. And to show you the other Control
| | 03:40 | styles in action let's go to the Taxable field
down here, it doesn't have a Control style
| | 03:45 | applied to it yet, but let's say we want to
choose whether something is taxable or not,
| | 03:49 | so Yes or No. So in that case we would want
to use something called the Radio button set,
| | 03:54 | and we'll add a new Yes or No value list,
Yes, No. Of course, making sure there's carriage returns.
| | 04:03 | We hit OK, and now that's available
to us, and so we can see that its changes
| | 04:08 | will give this little bit darker of a color,
so it's more pronounced. And now when we go
| | 04:14 | into Browse mode we can see that the user
can pick either Yes or No, but not both.
| | 04:21 | These options are mutually exclusive of each other,
but let's say for whatever reason we want
| | 04:26 | them to be able to choose Yes, No or both
doesn't necessarily make sense in this case,
| | 04:30 | but if we wanted to do that just to give you
demonstration, that's what the check box set
| | 04:35 | provides, so I can pick one, both or none.
Of course in this case the Radio button makes more sense.
| | 04:42 | By creating a Value List, you
can provide users with options to choose from,
| | 04:46 | rather than having them figure out what data
entered in specific fields. Static Value List
| | 04:50 | will require the manual entry of the items
that will appear in the Value List, and you
| | 04:54 | do so through the Manage Value List window,
but after you create your Value List, keep
| | 04:58 | in mind that you can use them throughout the
database, but also that you want to choose
| | 05:01 | which kind of Control Style makes the most
sense for this data. For example, like using
| | 05:05 | the Radio button instead of Checkbox and the
Taxable field. So getting to know the different
| | 05:10 | values that you can create, storing them in
your database and then understanding the Control
| | 05:14 | Styles at your disposal will really help you
make a more intuitive interface for your users.
| | Collapse this transcript |
| Creating and applying dynamic value lists| 00:00 | In the previous movie we discussed creating a
Static Value List that will contain a preset
| | 00:05 | range of values. There is also another way
that you can populate a Value List, and assign
| | 00:09 | it to a Field Control on a field in a layout,
and that is called creating a Dynamic Value List.
| | 00:14 | Dynamic Value Lists are created on the
fly based on data that is already in a field.
| | 00:18 | If you remember, in a previous discussion, we
have talked about how each field in FileMaker
| | 00:24 | can have an Index. We can actually see that
Index if we click inside of it, do Command+I
| | 00:29 | or Ctrl+I on windows. So what this tells me
is that out of all 146 records in the Invoice
| | 00:34 | table that only one of these three Options
shows up in any one of those fields.
| | 00:38 | So it could be that there are 100 of them that
say Pending and 20 that say Processing and 26
| | 00:44 | that say Shipped, but all FileMaker does is
create a alphabetized and de-duped list of
| | 00:49 | values in what's called an Index. So we can
actually draw on this Index to create a dropdown
| | 00:55 | Value List for our users to choose from when
they are doing data entry, and the way that
| | 00:59 | we do that of course with any Value List is
by going under the File>Manage>Value Lists,
| | 01:05 | we see the different value that we have
created and notice in the middle it says Source, and
| | 01:09 | it just says Custom Values. But this time,
we are going to create a new one, and let's
| | 01:13 | name it Customers and instead of typing in
all the Customer Names, what we are going
| | 01:17 | to do is choose this Option here that is
called Use Values from field. It might make more
| | 01:21 | sense if was said Use Values from field
Index but for those that are unaware of Indexes
| | 01:26 | just as Use Value from Field. Now you get
the specify fields for Value List Customers
| | 01:31 | window and what we need to do is first pick
a table, so let's pick Customers and then
| | 01:36 | from that table, we want to pick a field.
So, what we are going to do here do here is
| | 01:40 | we are actually going to pick the Primary
Key field, and the reason we are doing that
| | 01:45 | is because when we create an Invoice Detail
record, in order for it to be related to a
| | 01:50 | Customer, we need to populate the Foreign
Key field or the __pkCustomerID field with
| | 01:54 | a primary key from a Customer. If you need
more re-fresher on that please take a look
| | 01:58 | at the prior chapter on Relationships to get
reacquainted with the concept of Primary and Foreign keys.
| | 02:03 | But for the sake of this example,
we know that we need to populate the Foreign
| | 02:06 | Key field on the Invoice Detail child record
with the Primary Key from a selected Customer.
| | 02:12 | What would help is if we had a dropdown
list of all the different primary keys for all
| | 02:15 | the active Customers in our Customer table.
So let's do that we select Primary Key, and
| | 02:19 | we say OK, say OK again and then Dismiss this.
Now let's go into Layout mode and in Layout
| | 02:26 | mode, we will select the __fkCustomerID field
which is the Foreign Key Field in the Invoice
| | 02:30 | table and in the Inspector, we will click
on the Data tab, and if your Inspector is
| | 02:35 | not open, you can always going under View
and choose Inspector. In the Data tab, we
| | 02:39 | see that we have the fields selected in the
Invoice table called __fkCustomersID, and
| | 02:44 | what we are going to do is choose the Pop-up
menu from that list, and now we have to choose
| | 02:49 | which Value List is going to populate that Pop-
up menu, and we are going to choose Customers.
| | 02:53 | So, actually what this is going to do, when
we go under Browse mode and Save is when we
| | 02:58 | create a new Invoice record, the data entry
person will click into the Customer ID field
| | 03:04 | and they are going to see all of the IDs from
the Customers that are stored in the Customer table.
| | 03:09 | Of course, this is one of the things
that they have to pick in order to be able
| | 03:12 | to create this Invoice, and associate it with
one of the Customers. However, as we are looking
| | 03:17 | at this which, by the way, this is the Field
Index of the Customer Primary Key Field in
| | 03:23 | the Customer table. As we are looking at it as
useful as it is that they are all in numeric
| | 03:27 | order, as a user, I do not know what these
IDs represent. So one thing that we can do
| | 03:33 | inside of our Value List under File, Manage
Value Lists is to Edit the Value List, and
| | 03:39 | if we go in to the Use Values from field and
hit Specify Field. We will notice over here
| | 03:43 | we have got a second window, and if we check
this box here that says Also Display Values
| | 03:48 | from second field. Now what we can do is not
only display the Primary Key value from the
| | 03:52 | Customer table but next to it, we will put
the Company Name. This way a user will really
| | 03:57 | be picking the number, and when they choose
the number, it will show up that Customer
| | 04:01 | ID in the field. But they are going to have
the Company Name there is a guide.
| | 04:05 | Let's take a look at how that works. So now we see that
we have got IDs, and we also have an actual
| | 04:11 | Company Name next to it. So now it makes a
little bit more sense. Yeah, of course for
| | 04:14 | all the ones that do have Company Names. But
it is a little odd because the users still
| | 04:18 | see the numbers, so maybe they do not want
to see that number there. So instead what
| | 04:21 | we will do is we will say Value List, and
we have some Options down here that say Show
| | 04:26 | only values from the second field let's see
what that looks like. Now what it does is
| | 04:32 | it narrows it down to just the, the values
that we see onscreen and so we can pick an ID.
| | 04:37 | Now in our Customers table, we have
various different records that are all from the same
| | 04:42 | Company but the idea for this example would
be that in your Customers table that you have
| | 04:46 | got an ID that is associated with the
unique Company Name. So that is actually what we
| | 04:49 | are seeing here, we are seeing that there is
a Company called iSolutions and one called
| | 04:52 | Radley & Friends. So now when we pick it,
we see that we have populated the Foreign
| | 04:56 | Key field, and now all these related fields
populate because we have picked the Customer 1529.
| | 05:01 | I can actually switch over using the
Value List to pick a different Customer 1530,
| | 05:06 | and it populates all the other related values
here. This is a common technique, when populating
| | 05:10 | child records and trying to bring in
related values, but in a more common application,
| | 05:15 | you can use Field Indexes to populate Value
Lists for all sorts of different reasons.
| | 05:19 | They are creating a Value Lists based on the
Field Index, you will not have to go and manage
| | 05:23 | that list inside the Manage Value List dialog,
instead every time a new value is added then
| | 05:28 | the list will be updated, and it will always
be de-duped and indexed and make it very easy
| | 05:33 | and elegant for your users to be able to use as you assign
those to fields as a Field Control Style and Layout mode.
| | Collapse this transcript |
|
|
15. Printing and SavingPreviewing pages and print options| 00:00 | One of the benefits of FileMaker Pro is that
you can print any layout that you can view on screen.
| | 00:04 | So, this way, you don't have to
create special print layouts, but there are
| | 00:08 | some ways to approach creating layouts that
can help you get better results. If you look
| | 00:11 | at some of the tools that FileMaker gives
you to visualize what layouts will look like
| | 00:15 | when they print, then you can make all your
layouts look like print layouts.
| | 00:18 | The first of those tools is Preview mode. In Preview
mode, you can see what a page will look like
| | 00:24 | when it's printed, and you can also notice
that there's page margins around the edge,
| | 00:28 | those are taken into account as well. You
can also change the orientation by clicking
| | 00:33 | the Page Setup button while you're in Preview
mode, and you can toggle between Landscape or Portrait.
| | 00:38 | But when you're in Layout mode,
you actually do have a visual indicator.
| | 00:43 | You'll notice that you've got this dotted line here.
You've got a dotted line on the right-hand side.
| | 00:47 | You'll see that you've got a dotted
line going across the page as well.
| | 00:51 | So you will see where these two intersect. That's
telling you that anything that's on the right
| | 00:54 | of this page is going to be cut off in the
single print, and anything that's below this
| | 00:59 | will appear as a second page. So ideally,
if you just want to create a layout that's
| | 01:03 | going to print one page, you would make sure
that nothing extends off to the right and
| | 01:07 | then nothing extends below. So that's what
we're actually seeing when we go back into Preview mode.
| | 01:12 | We're seeing that it's cutting
off anything that's below this area.
| | 01:17 | So this is really where that access is in Layout mode.
So, that guide is there. It can't be removed.
| | 01:21 | It's there for you to be able to position
things on screen when developing a layout,
| | 01:25 | that will allow you to see whether or not
they're going to get cut off if users try to print.
| | 01:28 | Now, this is not to say that it's
not a bad idea to create special print layouts,
| | 01:33 | that way you can have layouts with more graphical
features on them, and extend off, and use
| | 01:37 | the entire full screen and then maybe have
a button that a user prints to navigate them
| | 01:41 | to a layout where you set things up that they
fall within those parameters. But in case
| | 01:46 | you want to print the same layouts that you
see on screen, you are going to have to use
| | 01:49 | the guide and then also check in Preview mode
before you print something in order to make
| | 01:53 | sure that it's going to print properly. On
the Invoice list, we can use this logic to
| | 01:58 | say, all right well, maybe I can move some
of these fields around to make sure that they
| | 02:03 | all fit within the print area. So these are
kind of things that you do or maybe you decide
| | 02:07 | that you're going to omit some fields, whatever
it might be. But now when you go into Browse
| | 02:13 | mode, and save and then hit Preview, you see
that everything fits in here nicely.
| | 02:18 | In addition, Preview mode also serves a couple of other
proposes. It lets you preview how many pages
| | 02:22 | will print based on the found set. So here,
we see that if we print all the records in
| | 02:27 | the found set on this layout, it will take
five pages to print. It also gives us the
| | 02:31 | ability to save these as Excel or save as
a PDF and like I mentioned earlier to make
| | 02:38 | Page Setup changes so that we can see how
things will change, for example, if we go
| | 02:43 | with Portrait versus Landscape and then we
can actually initiate the print from here as well.
| | 02:47 | The Print dialog you're seeing on
screen is not going to look like the one that you have.
| | 02:50 | The Print dialog itself is actually
driven from your print driver that's installed
| | 02:55 | when you install your printer. So, the one
that I happen to have has a Details button
| | 03:00 | on it, and you probably have something similar.
But you'll notice that when you click on the
| | 03:04 | details, you see there's going to be a dropdown
somewhere, and eventually, you'll be able
| | 03:08 | to find this dropdown for FileMaker Pro. It's
got three options here, one for Records being
| | 03:14 | browsed, one for Current record and then one
just shows a blank record. The Records being
| | 03:19 | browsed versus Current record is important
because for example, if you're in let's go
| | 03:24 | to Customer Detail, here I am on the Cris
Ippolite record. If we go to print this, and
| | 03:30 | it says Records being browsed, what it's going
to print is all 1523 records rather than just
| | 03:36 | this record that we want to see. Unless that's
what we want, we want to print one page for
| | 03:40 | all 1523 records, but likely, that's not the
case. Instead, we would choose Current record
| | 03:46 | in that case. The opposite could be true if
you go back to the list, here you don't want
| | 03:52 | to necessarily print something as Current
record, instead it would be Records being
| | 03:56 | browsed, and that way you can manipulate
the found sets, and you can determine how
| | 03:59 | many of these rows are actually going to print
out. There are some slight changes between
| | 04:03 | Mac and PC, mainly just the language that's
used here in the Status toolbar. In Mac, that's
| | 04:09 | called Page Setup as you see here, but in
Windows, you might see an icon that indicates Print Setup
| | 04:14 | When it comes to the Mac, you
see that you have the ability to scale the output printing.
| | 04:19 | But on most Windows drivers,
you're unable to do so. The most important
| | 04:23 | takeaway here is that a lot of what's happening
when you print relies on the print driver
| | 04:27 | that you have installed. As a matter of fact,
when I go into Layout mode, and we talk about
| | 04:31 | this line here let's say I go in here, and
I tweak this one field to perfectly match
| | 04:36 | that edge let's say I get really close to
the edge like that. Then I handed over to
| | 04:41 | some other users, or I put it up on the network,
and some other user with a different print
| | 04:46 | driver prints and they say it's cutting off
a little bit. Well, that's because some print
| | 04:50 | drivers are just slightly different than others.
So what you really want to do when you're
| | 04:54 | designing layouts is use your print driver
as a guide, but always give yourself a little
| | 04:58 | bit of bleed room, and that's because things
change printer driver to print driver or if
| | 05:02 | you're really having some complications with
it just go to the user's computer that's going
| | 05:05 | to do all the printing, and go into Layout
mode on their machine and modify it so that
| | 05:10 | it fits their driver. And for the most part,
printing in FileMaker Pro is very similar
| | 05:14 | to printing in other applications. If you
get familiar with some of the Printing Preview
| | 05:18 | tools like the Layout mode dashed line, or
Preview mode itself, then FileMaker Pro helps
| | 05:24 | you take all the guesswork out of the way layouts
are going to look when they eventually print.
| | Collapse this transcript |
| Printing in different views| 00:00 | When you're printing in FileMaker you really
have two different options for how you are
| | 00:03 | going to print your data. You can either print
out one record at a time or you can print
| | 00:07 | out all the records in a Found Set. When you're
looking at printing multiple records or records
| | 00:12 | in a Found Set, the most common way to do
that is in a List View, any layout can be
| | 00:17 | a List View, for example, you see here all
I have to do is toggle between Form View which
| | 00:21 | just shows me one record on screen at a time,
and, by the way, we'll also only print one
| | 00:25 | record at a time, or I can set it to view
as a list. But the thing that really makes
| | 00:29 | it an efficient printing view is that in Layout
mode the body part, which you see here on
| | 00:35 | the left that contains all of the different
fields for this record. Actually is only high
| | 00:40 | enough so that it can accommodate the fields,
that way there is not a lot extra white space.
| | 00:45 | This will be the most efficient way to be
able to print multiple records at a time.
| | 00:48 | If you go into let's say the Product Detail,
for example, and print all 40 of these records,
| | 00:53 | it's basically going to be 40 pages, which
isn't a very efficient way to do printing.
| | 00:58 | So the rule of thumb here is to get the most
efficient use out of your prints that you
| | 01:02 | want to make sure that you're minimizing the
size of the body part. But even when you're
| | 01:07 | printing lists you have to keep in mind that
FileMaker is only ever going to print all
| | 01:12 | of the records in your current Found Set.
So right now if I go to Print, as I can see
| | 01:17 | in Preview mode, it's going to print four
pages because I've got all 146 records chosen.
| | 01:24 | But instead if I decide to narrow down my
Found Set here we have 19 of the 146 that
| | 01:30 | match the shipping status of shipped criteria.
You see that in Preview mode it prints less
| | 01:35 | than one page. So you don't always need to
print everything, so really the first step
| | 01:39 | that you should be aware of is that you create
a Found Set first, and then you'll want to
| | 01:43 | choose the appropriate layout for printing
those records. So remember when you're printing
| | 01:46 | FileMaker layouts, make sure that you've made
the most efficient layout, and of course that's
| | 01:51 | going to be the one with the smallest body
part on it. It's also a good idea to include
| | 01:56 | as many records on screen at one time as you
can to make efficient use of your printing.
| | 02:01 | And also remember that you control your Found
Set so that you are only printing the records
| | 02:04 | that you need to, and this can help you generate
precise and efficient outputs.
| | Collapse this transcript |
| Applying object sliding and visibility| 00:00 | When you're thinking about allowing your users
to be able to print layouts that you have
| | 00:03 | created in your FileMaker database, there
is a couple of things that you might want
| | 00:06 | to take into consideration. First of all,
you know that you can print any layout that
| | 00:10 | you can see on screen, so you might want to prevent
certain objects that are on the layout from printing.
| | 00:15 | And also you want to create
efficient layout so that when users go to
| | 00:18 | try to print a layout you can minimize the
amount of whitespace that gets printed.
| | 00:22 | So in order to be able to control both of these,
you will use what's called the Sliding & Visibility
| | 00:26 | section of the Inspector Position tab. We'll
go into Layout mode, and if you don't see
| | 00:31 | the Inspector go under the View menu and choose it.
And the Position Tab is the farthest left one.
| | 00:37 | On the very bottom, we can go ahead and
collapse these right now, you will see the
| | 00:41 | Sliding & Visibility section. So first of
all if we go over to the Customer List let's
| | 00:46 | say we've got these arrows here that are great
for assigning buttons, and we use them here
| | 00:51 | for users be able to sort, but let's say that
we don't want those to show up if a user decides
| | 00:55 | to print this layout. So the simple way to
do that is hold down the Shift key, select
| | 01:00 | all the items that we don't want to have print,
and even if there are some fields that we
| | 01:05 | don't want to print, but in this case we
will just select the graphics and in the
| | 01:09 | Sliding & Visibility section you see Object
Visibility Hide when printing. So now after you save
| | 01:15 | your changes you will notice that they still
show up in Browse mode, so it hasn't affected
| | 01:19 | any of that behavior. But when you switch
over to Preview mode you will notice that
| | 01:22 | they're not going to print. So Preview mode
also let's you preview whether or not things
| | 01:26 | are visible in Print mode. Now the same is
true when you save as a PDF. So you're hiding
| | 01:32 | things from both printing as a hardcopy and
also saving as a PDF file. There is also another
| | 01:37 | way that an object on a layout will not be
visible in Browser or Preview mode.
| | 01:40 | If we go to the Product List, and we go into Layout
mode, you will notice that there's this field
| | 01:47 | here called Category, and it's off to the
right, even though it's not selected to hide
| | 01:51 | when printing it's off the explicit layout
width. So it's in the gray area to the right
| | 01:57 | of our layout area. And we go into Browse
mode, we'll see that we can't see in Browse
| | 02:01 | mode, and we also cannot see it in Preview
mode. But if we simply go into Layout mode
| | 02:07 | and include it in the Layout area, after saving
our changes you'll see now that that shows
| | 02:14 | up not only in Browse, but in Preview. And
while we are in Preview mode we notice something
| | 02:19 | else about this layout. Notice how the whitespace
isn't really used efficiently from record to record.
| | 02:25 | Many times in a list view this
could be okay, but let's say that we want
| | 02:29 | the cost to show up right at the end of the
product name, instead of there being all this
| | 02:33 | whitespace in-between. Since the product name
is a different length every time, it's difficult
| | 02:38 | for us to actually line up the fields right
to the edge. So you see here with the
| | 02:41 | Bonsai Gardens Guide for Beginners, it does actually
follow with very minimal whitespace right
| | 02:48 | after the name of the product. However, if
we go into Layout mode there's another option
| | 02:53 | available to us in the Inspector and Sliding
& Visibility, and if we select the Product
| | 02:57 | Name, and let's hold down the Shift key and
select Cost and then while these are selected
| | 03:02 | let's go under the Inspector, and we'll notice
that there's this option here that says Remove
| | 03:06 | blank space by, and if we choose Sliding
left, notice that on-screen, and I will zoom
| | 03:13 | up for you to 100%, you'll see that there's
now these little visual indicators that are
| | 03:17 | pointing in the left direction. Those are
arrows so that tells us when we are looking
| | 03:21 | at a layout that everything is sliding left.
So what does it mean to slide left?
| | 03:25 | well, let's take a look at Browse mode, save our
changes. So we see nothing changes in Browse,
| | 03:30 | so it doesn't affect the user's interaction
with the data. But when we go into Preview
| | 03:34 | mode we see now that they dynamically collapse based
on wherever the data ends in the Product Name field.
| | 03:42 | So what's actually happening here
is that we've instructed FileMaker to start
| | 03:47 | to display the data in this second field after
the text inside the first field ends.
| | 03:52 | So it's ignoring the edge or the space occupied by
the actual field, but instead it's just working
| | 03:58 | with the space occupied by the data. But while
we are in layout mode I am going to show you
| | 04:01 | another example of this that's even more useful.
If we go into Product Print layout, this is
| | 04:06 | a layout that has been specially created for
printing. You see that it falls within the
| | 04:11 | margins, and if we going into Preview mode
we can see what it looks like. So as we go
| | 04:16 | from page to page we see that we are showing
the Product Name, the Category and a Description.
| | 04:20 | The problem here of course is that in order
to fit some of the longer descriptions like,
| | 04:24 | for example, the one on this one, we had to
create a Description field that was large
| | 04:28 | enough to display all the values, because
if it was smaller, it would cut this information off.
| | 04:33 | Which is fine for the large ones with
a lot of data, but then we have a description
| | 04:37 | that's only one line we've got a tremendous
amount of whitespace here, and we are using
| | 04:41 | a lot more pieces of paper to print than we
need to. Plus users really don't like the
| | 04:45 | aesthetic of this. So in this case we can
actually do something that's called sliding up.
| | 04:49 | Go into Layout mode, and we are going
to select the Description field. And now in
| | 04:54 | our Inspector we see that there's another
option here which is called Sliding up.
| | 04:58 | So if we check Sliding up we have a couple of
different options here. The one that we are
| | 05:01 | going to select here is Sliding up based on
All objects above. So what's that saying is
| | 05:07 | just collapse this field and respect the whitespace
between the object above and where this field starts.
| | 05:14 | So really what we're instructing it
to do if we just select one field, we are
| | 05:18 | just saying collapse based on the text that
you have inside the field. If we select multiple
| | 05:23 | fields, then they will all collapse until
they hit the text in whatever field isn't
| | 05:27 | included in the sliding up. But it's best
if I show you an example of this. Now, the field
| | 05:33 | itself will collapse as we'll see here in
Browse mode. This field is actually collapsing,
| | 05:37 | but we are not seeing any change in the whitespace,
and that's because the body part is still large.
| | 05:43 | So in order to include the body part
in this we have to select the field, and you
| | 05:48 | see here Also resize enclosing part. That
combination is the key here. Now we will go
| | 05:53 | into Preview mode and save our changes, and
now we have a very nice compact print that
| | 05:59 | expands and contracts to the content that's
stored within the field of layout.
| | 06:03 | Now keep in mind though, it's still good practice to
create a layout that has a very large let's
| | 06:08 | say description field in this case. And when
you're employed in the Sliding up it's actually
| | 06:13 | safe for you to even create layouts that have
an oversized or enormous description field, for example.
| | 06:20 | That way you know if you ever
get a description that's huge or very long
| | 06:24 | then it'll print that because remember what
you're doing when you're creating the size
| | 06:28 | of the field is you're saying what the highest
length or the greatest space will be occupied
| | 06:33 | by the field data. And then when you do the
sliding, it'll compress both the field and
| | 06:38 | the enclosing part down to the space only
needed to display the data. But again it's
| | 06:42 | a good idea to create maybe oversized ones,
because they'll shrink down dynamically.
| | 06:47 | Use these options and Layout mode in the Inspector
tool, if you want to prevent layout objects
| | 06:51 | for printing or if you want to control the
whitespace in your FileMaker systems so that
| | 06:55 | you can create cleaner and more professional
looking reports and printouts.
| | Collapse this transcript |
| Printing merge letters| 00:00 | One very popular request from FileMaker users
is the ability to print letters and much like
| | 00:05 | other applications like Word, for example,
FileMaker supports this concept of Merge Fields.
| | 00:11 | If you navigate over to the layout called
Custom Welcome Letter inside the Untitled_15_04
| | 00:17 | exercise file. I'll show you an example of
how this technique works? First, let's go
| | 00:21 | to Layout mode, and you see what I've got
here is really just a big text area, and you
| | 00:26 | can create this by clicking in some text.
And then expanded it out to whatever size
| | 00:31 | you want to occupy the letter, and that's
what we've done here. I'll delete that one,
| | 00:36 | you can see that with eight handles shows
you the area that's occupied there.
| | 00:39 | And within a text area we can use regular text and change
the fonts and the size and style in, and the alignment.
| | 00:46 | But the key to having a good merged
letter is actually having dynamic data show
| | 00:49 | up in here let's see we could say this is
a welcome Letter, and we could put a contact
| | 00:56 | name in here so let's drag a field, and we
could say ContactNameFirst. And let's look
| | 01:04 | at what happens when we go into Browse mode.
You see that as I go from record to record
| | 01:09 | it's dynamically pulling in the CustomerFirstName
so that we can print. But honestly it looks
| | 01:16 | pretty hacked because the names might have
different lengths and they won't expand and
| | 01:22 | contract appropriately, if they do so instead
what you want to do in this case is get rid
| | 01:26 | of all the whitespace. And then when you're
in Layout mode go to Insert and then select
| | 01:31 | this thing here called Merge Field. And here
we can still select a field but this time
| | 01:35 | I'll select ContactNameFirst, put a little
space after it. And now we are going to Browse mode.
| | 01:43 | You can see that it will pull in the
names but all of the text will expand and
| | 01:50 | contract around the different length of the
name and leave and do different line spaces as well.
| | 01:55 | It's really perfect for doing any
kind of merge printing. Also you can select
| | 02:01 | just this piece of information if you'd like
and apply style to it. And here's the another
| | 02:07 | one where we can add a merge fields. So let's
go ahead and do that one as well Insert Merge
| | 02:13 | Fields CustomerID, and let's look at what
this merged letter looks like now.
| | 02:21 | To see its expanding and contracting, even the number
of lines as we go from record to record.
| | 02:28 | So really the take away here is that you can
combine a large text area on a FileMaker layout,
| | 02:34 | and this concept of merge fields to be able
to create these dynamic letter type layouts
| | 02:38 | so that when you print a found set of letters
it will print one-page with all sorts of dynamic
| | 02:43 | information in there, and you can have as
many these merge fields in your letters as you want.
| | 02:47 | For example, I'll add a merge fields
here, we will just say it mean first there
| | 02:56 | and then, and we want to verify their address
so I could say Insert Merge Field AddressStreet,
| | 03:04 | and it just is treated just like text, so
it will do the carriage return and other Merge
| | 03:08 | Field, AddressCity and then State and Zip and
put a space, you got to make sure you're doing
| | 03:20 | all the proper formatting. And now let's take
a look what this look like in Browse mode.
| | 03:26 | So now we say dear so and so, thank you for
signing up such and such. Please verify your
| | 03:32 | shipping address and call customer service,
it doesn't match. Then you can even go down
| | 03:36 | here and say instead of signing from customer
service you could dynamically put whatever
| | 03:40 | the salesperson is was assigned to the order
something or like that. So you get the gist.
| | 03:44 | Another thing I wanted to show you while we're
working with Merge is that in addition to
| | 03:48 | inserting merge fields let's say on this footer
we want to insert the day that the letter
| | 03:53 | was printed, for example, so if you look it
Insert there's a new feature down here which
| | 03:58 | is new in FileMaker12, that's called Other
Symbol, and this brings up a view which has
| | 04:03 | all these different things, these are Get
functions inside calculations which will talk
| | 04:07 | about in the calculation chapter but their
terms that represent some kind of environmental
| | 04:11 | thing, like something in your session, in
your database session, something in your operating
| | 04:15 | system, something on your system clock that
type of thing. Some are a little bit cryptic
| | 04:19 | you can learn all about these though by going
into your help system or even watching the
| | 04:24 | Calculation chapter in this title. But here
I can select current date, for example, and
| | 04:29 | notice this text that appeared I will put
this on the footer and extend it out a little
| | 04:35 | bit, and I can apply alignment to it, and
you know, Italics or whatever, but notice
| | 04:42 | that it's just simply bracket, bracket and
then {{CurrentDate}}. Just take a look at
| | 04:48 | what that looks like. Now if we go all the way
to the bottom we see that we've got the current date.
| | 04:52 | So if you want more information on what
these other symbols are. You should go into
| | 04:59 | the help system and learn about GetFunctions
in FileMaker, everyone of these is a Getfunction
| | 05:04 | but there's all search of really pretty cool
stuff that you can gather and embed as a merge
| | 05:08 | fields in your printable layouts. So it's
a good idea when you're creating letter layouts
| | 05:13 | that you always use Merge fields, however
Merge fields can also be used anywhere in
| | 05:16 | a layout where you want a 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 that
allows you to save data that you're viewing
| | 00:05 | in a layout is either a Microsoft Excel file
or an Adobe PDF file, that has all the engines
| | 00:10 | built in to be able to do these conversions.
You can see these options in Preview mode.
| | 00:14 | We are going to lay on Preview mode. You'll
notice that you got these icons here at the
| | 00:18 | top of the screen. However, in any layout,
you can see that you got the File Save/ Send
| | 00:24 | Records options and Excel and PDF appeared
there as well. The Save/Send Records As Excel
| | 00:29 | functionality makes it easy for user to export
FileMaker data from the current layout and
| | 00:34 | foundset and work with it as an Excel worksheet.
Note that FileMaker12, supports both the
| | 00:40 | .xsl and .xslx formats for Microsoft Excel
when it comes to Saving As. This is a great
| | 00:46 | option, if you want to share data that's stored
in your FileMaker database with someone who
| | 00:49 | doesn't have access to the database. However,
before I show you this feature, I want to
| | 00:53 | make sure that you understand this is not
intended to be an alternative to the data
| | 00:57 | in your database. You shouldn't create an
Excel Spreadsheet, send it to someone who's
| | 01:01 | then going to make modifications, when they
could just make those modifications directly
| | 01:05 | to the FileMaker database. This is intended
to be for people who don't need to update
| | 01:09 | the data in your database, and it's just someone,
like let's say your accountant wants to see
| | 01:13 | all your orders, and he doesn't have FileMaker
Pro or access your database. Then fine, Save
| | 01:18 | it as Excel and send it off to him that way.
But it in fact, somebody contacts you, let
| | 01:22 | say it's an accounting person and they want
some information that's stored in FileMaker,
| | 01:26 | then this is an excellent tool for being able
to share the data, and it's really easy to do too.
| | 01:29 | So the first thing you will need to
do is identify the layout your FileMaker database
| | 01:33 | that has all the fields on it that you want
to export. So that's the key here, if you
| | 01:39 | decide to use the Export Option, not the Save/Send
As Excel but the Export Option which allows
| | 01:45 | you to save an Excel document, you'll notice
that you have the option to pick and choose
| | 01:50 | all the different fields from the table that
you want to include, however if you choose
| | 01:55 | these Save/Send Records As Excel option, it
doesn't even ask you for that so let's say
| | 02:01 | save it our Desktop, and I am going to automatically
open the file, and you see we can choose either
| | 02:07 | xls or xlsx, and I mentioned that only because
FileMaker can only import data as .xlsx in
| | 02:16 | FileMaker 12, but it can export in both. So
the other thing that's important just like
| | 02:20 | when you are printing is you are saying whether
or not you want to choose the records being
| | 02:23 | browsed or just the current record. So records
being browsed means your found set.
| | 02:29 | So here you'll notice we have got all 40 selected,
but if I say in search, I have only get six
| | 02:39 | records selected then, when I say Save/Send
Records As Excel, choose the location, choose
| | 02:46 | Records being Browsed, Automatically open
file, I have also got some other options you
| | 02:50 | because it's Excel the Worksheet, Title, Subject,
Author, I am going to hit Save, and now it's
| | 02:55 | going to open up this Spreadsheet in Excel
and notice that it only exported out the found set.
| | 03:01 | So just like printing or exporting you
have to make sure that you got the correct
| | 03:05 | found set created before you save the record
as Excel. So couple of things here notice
| | 03:10 | first that FileMaker does do the Excel thing
where it creates a first row and then puts
| | 03:17 | in the field names, these are the FileMaker
field names but, puts them in bold and puts
| | 03:21 | them in a first row which is nice, they act
as column headers that way. The one thing
| | 03:25 | is though you'll notice that it's applying
your naming conventions all though Product
| | 03:29 | Name and Cost make sense, here the _pkProductID
might not make sense so you might have to
| | 03:35 | go in here and just manually change and save
it before you share it with somebody.
| | 03:40 | And if you use related fields, it's going to show
the tableName:: and then the related field
| | 03:45 | so that's definitely something that you will
want to change before you share these with anybody.
| | 03:48 | Other than that it's exactly what
you need users can now manipulate this as
| | 03:52 | raw data, create charts, import it into another
system whatever they want to do it.
| | 03:56 | But again, I would caution you not to create a Spreadsheet
so that users can start managing the data
| | 04:00 | in the Spreadsheet rather than in your database
that's a big no, no. So now let's explore
| | 04:08 | the option for saving as a PDF, so Show All
records, in a similar fashion, a user can
| | 04:14 | create a PDF file in the case of the PDF file,
it's going to look exactly like a hard copy
| | 04:20 | would look if you printed out of this layout.
Same thing applies here, allows you to select
| | 04:25 | the layout, so you got to pick the layout
that you want to reflect in PDF and then of
| | 04:29 | course, you want to, so let's say customer
welcome letter, and you want to create the
| | 04:34 | right found set so let's say before we are
go in to the Customer list, we say everybody
| | 04:39 | from main, se we create a found set of 26.
And I'm going to another layout that's based
| | 04:48 | on the customer table. So I still have 26
records, so I have got the proper layout,
| | 04:54 | and I have got the found set created. So now
I can go to Preview mode if I want or of course,
| | 04:58 | I can go to File Save/Send Records As PDF.
I'll do this one for Preview mode, so I am
| | 05:04 | going to hit Save as PDF same thing here and
tell it where I want to save it and after
| | 05:09 | saving it, I can automatically open the file.
I can even create an email with this file
| | 05:13 | as an attachment. I will also want to make
a decision on whether or not, I am going to
| | 05:17 | choose all records being browsed the current
record. And here's an interesting one, for
| | 05:21 | blank record, if you have a data entry screen
in your database, and it shows all the different
| | 05:25 | fields that are necessary to set up a customer,
for example, you might want to just print
| | 05:29 | one copy of those as a blank record, and then
you can send that over to customer to have
| | 05:33 | them fill it out by hand so that they know
what information is necessary. Just a thought there.
| | 05:37 | But now, when I hit Save, it's going
to take a minute because FileMaker has to
| | 05:41 | pass this off to the Adobe engine, and now
it will pop up, but you will notice that I've
| | 05:45 | got a letter now printed with dynamic data
in PDF form for every record in my found set.
| | 05:53 | So it's really just a PDF version of exactly
what you would print if you were to print
| | 05:57 | it to a printer. So these are really great
tools for FileMaker for sharing information
| | 06:02 | on the fly, you can either save as Excel or
save as PDF allowing you to save out formats
| | 06:07 | that can be shared by those who do
not have access to FileMaker Pro.
| | Collapse this transcript |
|
|
16. Reports Building simple reports with summary fields| 00:00 | One of the most powerful and useful capabilities
of FileMaker Pro databases is its capacity
| | 00:05 | to group and summarize data in a report format,
this allows you to do things like aggregate,
| | 00:09 | organize, and otherwise just manipulate
data that users have already entered into your
| | 00:13 | system in the form of reports and outputs
that gave you visibility of data that you
| | 00:17 | wouldn't normally have. And the most powerful
type of report in FileMaker is something that's
| | 00:21 | called the Subsummary Report. At its essence
is Subsummary Report is a way to present a
| | 00:26 | list of data that's grouped by certain variable,
let me give you an example that based on our
| | 00:30 | Invoice List View. If you look at this in
List View, you can see that the Invoice List
| | 00:34 | layout is really just a list of a bunch of
different orders, placed by a customer, to
| | 00:39 | the tune of about 146 different orders. Now
this is great, the information looks just
| | 00:43 | like it does when the user entered into the
system, but with one simple change we can
| | 00:47 | turn this list into a report. Now this first
step isn't going to be the Subsummary Report,
| | 00:51 | and I'm going to show you sort of the
evolution of the Subsummary Report starting from just
| | 00:55 | modifying this List View. If you go into Layout
mode, you'll notice that we have three parts,
| | 00:59 | we have a header, a body and a footer. So,
I'm going to use this footer here as an area
| | 01:05 | for us to be able to aggregate some of the
information let's say the InvoiceTotal from
| | 01:09 | this list of invoices. In order to be able
to do this this is going to require special
| | 01:13 | type of a field, the type of field that shows
this information that's been aggregated rather
| | 01:17 | than input into the database is called the
Subsummary field, let first define one of
| | 01:21 | these subsummary fields. In the chapter on
Fields we discussed all the different field
| | 01:25 | types, and I told you we'll be talking about
subsummary fields in this movie, so if you
| | 01:30 | remember from that discussion, if you go
under File>Manage>Database you can open up the
| | 01:35 | Manage Database window, and if we go to the
Fields Tab and pulldown to the invoices table,
| | 01:41 | you see that I can add a new field right here,
I'm going to add a field called TotalSummary.
| | 01:46 | Now the key here is the Type of the field.
The only field type that we haven't worked
| | 01:50 | with yet in this title is the Summary field.
Now when I hit Create, you'll notice that
| | 01:54 | the dialog is a little bit different than
the dialog that appears in any of the other field options.
| | 01:58 | A summary field is unique in
that it isn't a field that contains data,
| | 02:01 | you can't actually type any data into it,
and rather, it's a field that aggregates data
| | 02:06 | but unlike a calculation that also can
aggregate data this one is specific to just aggregating
| | 02:12 | data across a Found Set, so it's really almost
like a field that's defined in a table rather
| | 02:17 | than a record. The value in the Summary
field will be different based on the records in
| | 02:20 | the user's current Found Set and of course
it'll be different based on each individual
| | 02:24 | user session, since they could potentially
have different found sets. So as you see here
| | 02:28 | we have a couple of options when we're
setting up a Summary field. First, you'll see all
| | 02:33 | the different aggregates we can use, we can
choose a Total, Average, Count, Minimum, Maximum,
| | 02:37 | and so on. Total can total values from a single
number field. Average can determine the average
| | 02:42 | from a Found Set of values across a number
field. Count will actually provide a count
| | 02:46 | of the number of records that contain a value,
so basically a count of nonempty values across
| | 02:52 | a Found Set. Minimum can determine the minimum
date or minimum numerical value from the Found
| | 02:56 | Set of a single number or date field, and the
same is true with Maximum, but the opposite.
| | 03:01 | So we'll notice that when I select Total I
can scroll through all the other fields that
| | 03:05 | are in the Invoice Table and some of them
are grayed out. Those are fields that do not
| | 03:09 | have supported field types, they're either
text fields or their calculations don't result
| | 03:14 | in a number, but basically what we need is
either a date or a number. For this exercise
| | 03:18 | we're going to use Total, and we're going to
select a field that we want to total, there
| | 03:21 | is one here called InvoiceTotal. So this is
going to give us the total of all the invoice
| | 03:26 | totals for all the records in the Found Set,
it's going to give us an overall total of
| | 03:30 | invoices depending on whatever the user is
entered in for search criteria. So let's hit
| | 03:35 | OK and hit OK again, and we see that we've
got this field dropped on the layout just
| | 03:40 | because I have that setting on preferences,
and I am going to go to the Footer and drop
| | 03:45 | that in the Footer, and I'm going to select
these two fields and go into my Inspector,
| | 03:53 | and I'm going to choose Currency, this is
just a formatting thing that we've talked
| | 03:56 | about of course. All right, so now let's go
into Browse mode, I am going to hit Save and
| | 04:04 | so here we see that we've got all the different
invoices with the invoice totals, and if you
| | 04:09 | look at the bottom of the screen and the Footer,
you'll notice that I have a total, so this
| | 04:13 | tells me that of all the 146 invoices if you
total up all their totals it equals 418,390.60.
| | 04:20 | So, already, this List View is now a type
of a very simple report, because it's giving
| | 04:26 | me information about the data that's stored
in the list that I didn't have to enter into the system.
| | 04:30 | The other thing that's interesting
about this is if I search for the ship records,
| | 04:34 | and now you see that this value has changed
to 57,266.75, and this is information that's
| | 04:41 | specific to the user that's working with the
database as I can show you here.
| | 04:46 | Anytime you want to emulate multiple users in database
you can open up at two different windows.
| | 04:51 | In this window I'm looking at a Found Set
of all these Shipment Status equals Shipped
| | 04:55 | invoices and over here I can do a Found Set
of all these SalesPerson equals Jeffrey, and
| | 05:00 | you'll see in this one my Summary field gives
me 32,589.97, in this one it gives me an invoice
| | 05:06 | total of 57,266.75. Now really we could
look at these list views as different reports,
| | 05:12 | I can say that this is the by shipment status
report, and this is the by salesperson report,
| | 05:17 | it's the same layout, but if you combine a
aggregate function of some sort like this
| | 05:22 | Summary field and modifying found sets, one
layout can become multiple different types of reports.
| | 05:27 | So in just a few minutes you can
take any list view and add a Summary field
| | 05:31 | to it, and you end up having yourself a nice report that
can give you aggregate information across any Found Set.
| | Collapse this transcript |
| Creating subsummary reports| 00:00 | Adding a Summary field to a List View can
turn a static list into a somewhat more compelling
| | 00:04 | report by showing a user some aggregate data
that they did not have to enter into the database.
| | 00:09 | As you see, for example, here we've done a
search for shipping status of shipped, and
| | 00:14 | it tells us that in that found set, the invoice
total equals 57,000 and some change.
| | 00:19 | However, very large List Views can still be a little
too tough to interpret, but a good method
| | 00:24 | for making them more intuitive is to group
the data into lists. This'll break down the
| | 00:28 | data into easier to consume sets of data.
FileMaker has a special layout part that we
| | 00:32 | can add in Layout mode, and this part is called
a sub-summary part. You can use this to give
| | 00:37 | your layout instructions on how to group the
data in the list, and every time it creates
| | 00:41 | a group, it's actually creating a mini found
set of data. So it's really nested found sets
| | 00:45 | in your overall found set, but setting up
a sub-summary part when you're in Layout mode
| | 00:49 | will give FileMaker instructions on how to
group it and by what field. So let's look
| | 00:53 | at the layout parts that we have right now.
If we go into Layouts and Part Setup, you
| | 00:57 | see that we've got the header body and footer.
We are going to hit Create, and you see we
| | 01:00 | have a series of parts here, Leading Grand
Summary, Sub-summary when sorted by, and Trailing Grand Summary.
| | 01:06 | The one I want to introduce
you to is the Sub-summary when sorted by.
| | 01:09 | Really, it's just a lot of FileMaker speak
for saying group by, but it is important that
| | 01:14 | they put in here when sorted by, because that's
going to help you understand how to trigger the groupings.
| | 01:18 | But basically, what we are
doing here is we are selecting the button
| | 01:20 | here to group by and then we have to pick
the field that we want to group by.
| | 01:25 | And even though we're looking at a list of invoices,
what we actually want to do is sort by a field
| | 01:31 | that is a related field just for this exercise.
It's coming from the customer table.
| | 01:36 | So since every invoice can only have one parent/customer,
we are actually going to group by the company
| | 01:40 | name, and we have a question that's asked
to us here every time we add a new sub-summary,
| | 01:45 | it says well, where do you want the grouping
to start? Do you want it to be above the data
| | 01:48 | that's shown in the body part or below it?
We are going to say Print Above. So now you
| | 01:52 | see that we got a header, and we can see,
we now have whitespace here where we added
| | 01:56 | this Sub-summary group part, and it's followed
by the body and the footer. So what we want
| | 02:00 | to do is actually add the company name to
this part. It's pretty traditional that you
| | 02:07 | go into the part that you just added and add
the field which is referred to as a break field.
| | 02:12 | It's the field that you're using to
group everything. So let's say we've got all
| | 02:17 | these fields right here and just for the sake
of cleaning this up a little bit, we are going
| | 02:21 | to go in, and we are going to get rid of these
fields, and let's add SalesPerson over here.
| | 02:29 | Really, that's because we want to fit it within
the bounds of printing. So now what we've
| | 02:34 | got is a list view that shows an InvoiceNumber,
the ContactName, we can get rid of that too,
| | 02:41 | and we will move the invoice over a little
so we have sort of an indenting look here.
| | 02:46 | So it's still our invoice list, it's still
a layout that's based off of invoices, but
| | 02:50 | what we have decided to do is add a part that's
going to allow us to group these invoices
| | 02:53 | by the company name or the customer that they
are associated with. So let's take a look
| | 02:57 | in Browse mode, go into Browse mode, and we
save and for some strange reason, it still
| | 03:01 | looks like a list view. Well, any layout with
a sub-summary part is going to look like a
| | 03:05 | list view until we do something to trigger
the grouping to happen. So first, let's go
| | 03:10 | Show All and the thing that triggers this
group to happen was found in the name of the
| | 03:15 | sub-summary part. Remember, it said Sub-summary
when sorted by. So what we have to do is go
| | 03:20 | in and do a sort, and we have to sort by the
same field that we pointed to when we set
| | 03:25 | up that part. So that happens to be in the
Customers table, CompanyName. It doesn't have
| | 03:29 | to be related field, by the way. It can be
any one of the fields that are on the layout
| | 03:32 | or any of the fields that are in the invoice
table. I just thought this would be more compelling
| | 03:36 | to sort by the Customers. So now when we sort,
we see that it does group by the Customer
| | 03:41 | name and actually if we go all the way to
the top, there's a couple of steps I like
| | 03:44 | to add here to make it look a little bit more
like it's a group. I'll select the sub-summary
| | 03:50 | part, and I'm going to change the fill to
like a light gray, choose the company name,
| | 03:55 | and hit Bold, and now let's take a look at
what it looks like in Browse mode.
| | 03:59 | Let's go all the way to the beginning, and now we see
it's a lot easier to look at these invoices.
| | 04:04 | We've got the company and then all its invoices,
the next company, all their invoices, and
| | 04:08 | so on and so on. pretty neat stuff. But now
I am going to make this even more compelling
| | 04:13 | of a report, not only is it visually grouped,
but if you remember, I mentioned earlier that
| | 04:17 | the sub-summary part creates many found sets
of data so actually, if we look at this in Browse again.
| | 04:23 | So this is one found set, that's
another one, this is another, and so on.
| | 04:28 | Then there's the overall found set of 146 records,
but what do we remember about found sets?
| | 04:32 | There is a special type of field called the
Summary field that will aggregate data across found set.
| | 04:37 | So we are already doing that in
the footer, why don't I copy this by selecting
| | 04:41 | the Option key or the Ctrl key on Windows,
and I am just going to copy the exact same field.
| | 04:46 | I am not going to make any changes
to it. I am just going to take the same field
| | 04:49 | that's in the footer and put it in this part.
Let's take a look at this in Browse mode.
| | 04:54 | Now we see that we've got the company and
then also it tells us what their invoice total is.
| | 04:59 | So now this is gray. This isn't even a
field that we have anywhere, this isn't a
| | 05:02 | field that's defined in the customer record
or anything like that. It's just this Sub-summary
| | 05:07 | field reacting to these mini found sets. Now
in Layout mode, we could go another direction
| | 05:11 | with this too. We could say, Part Setup, add
a Trailing Grand Summary, and that's where
| | 05:22 | we could put this instead of above, and now
we can take a look at this in Browse mode,
| | 05:29 | and you'll notice what happens on the very
last page. Instead of having it in the footer,
| | 05:33 | we can actually have this at the end of the
list of items and the advantage to doing that.
| | 05:39 | So if we go in here, and we get rid of it
here is that when this prints let's go to
| | 05:45 | the last page, you will see that it doesn't
have to go all the way to the bottom.
| | 05:48 | It kind of slides up wherever the last record so it's
truly trailing. But in Layout mode that still
| | 05:54 | leaves us with not having a subtotal for each
company. That's a simple fix. In that case,
| | 05:59 | we are going to add another one of these Sub-summer
parts, and it's also going to be sorted by
| | 06:05 | the same thing. We can add as many of these
as we want. This time we are going to print
| | 06:10 | below, and we are going to put the copy right
there. So now we go into Browse mode, we hit
| | 06:17 | Save, and now we see we've got the company
followed by their subtotal, next company,
| | 06:22 | subtotal and so on, and if we look at this
in Preview mode, let me go to the last page.
| | 06:27 | We see the last company subtotal and then
the grand total listed there. With a little
| | 06:33 | bit of layout design like a adding a little
line there and another little line here, and
| | 06:41 | maybe making this field bold, select the field,
make it bold, now we can see that this can
| | 06:48 | really come together. Tweak the layout just
a tad. So in just a few minutes, you can take
| | 06:53 | any list view, add a couple sub-summary parts
and end up having yourself a group report
| | 06:57 | which allows you to aggregate, organize, and
synthesize or even manipulate the data that
| | 07:01 | other users have already
entered into your database.
| | Collapse this transcript |
| Adding charts to reports| 00:00 | Adding sub-summary parts in summary fields
to a layout can make the data on a layout
| | 00:05 | easier for your users to read and interpret.
FileMaker also has features that make data
| | 00:09 | visualization very appealing. This can be
achieved by adding a chart to one of your
| | 00:13 | reports using the FileMaker Charting tool.
So you see here in the Exercise File that
| | 00:18 | I'm on a layout called Invoice by Salesperson
Report and in Layout mode, we see that this
| | 00:23 | is a Sub-summary report when sorted by SalesPerson.
With the trailing grand summary and the InvoiceDate,
| | 00:30 | CompanyName, and the Total for the body, pretty
simple stuff. But what I'd like to do is in
| | 00:34 | addition to just being able to view the report
and seeing the breakdown of each salesperson,
| | 00:39 | what I'd like to instead do is be able to
visualize for each found set that I create
| | 00:44 | what percent of the entire whole the salesperson's
total represents. So sure I can look at the
| | 00:49 | very bottom of the page, and I can see that
41,390 is the total, but I don't have a real
| | 00:56 | visual representation of that. So what I am
going to do is add a chart. Anytime we are
| | 01:01 | talking about percentage of the whole that
means that using a pie chart is going to be
| | 01:04 | the best option. So first, let's talk about
this Charting tool. See I've made some room
| | 01:09 | for the Charting tool by going into the header
and in the gray line that separates the header
| | 01:13 | and the first sub-summary part I've made it
just a tad bit larger. I could do the same
| | 01:17 | thing by going View Inspector and going
into Position and just making it a certain
| | 01:25 | height if I want. But this looks like it's
going to be enough room for us to put a nice
| | 01:28 | pie chart in there. So now in the toolbar
I am going to select this button right here
| | 01:32 | which is the Chart tool and like many other
layout tools once selected it turns the pointer
| | 01:37 | tool to a crosshair, so I can draw a space
for our pie chart. So I am going to draw this
| | 01:42 | right here and then release. And what this
pops up on screen is what's called the Chart Setup window.
| | 01:46 | The Chart Setup has its own
inspector, and we are going to go down the
| | 01:49 | list and pick all the different features of
our chart, and as we do so we are going to
| | 01:53 | see our chart preview built right here in
front of us so that we can make sure that
| | 01:57 | all the selections that we are making are
okay before we are done with the Chart Setup window.
| | 02:00 | So first, we've got the ability to
choose a Title, so I am just going to call
| | 02:05 | this one By Salesperson. And I could make
this based on a calculation or a specific field.
| | 02:12 | So the sky is the limit for making
dynamic names. Anywhere you see one of these
| | 02:17 | three dots in the Chart Setup window that
means that you can connect it to either an
| | 02:21 | existing field or use the calculation engine
to create something dynamic. Next we want
| | 02:25 | to choose the Type and so we've got a bunch
of different types to choose from here.
| | 02:30 | So a Column chart you see here on the top of
the list will compare increases to decreases,
| | 02:36 | or highest with lowest, how many or how often
that type of thing. So it's good if you wanted
| | 02:40 | to show like monthly sales based on several
different products. You can do a Column chart
| | 02:45 | which is the same type of thing or a Bar chart
which is basically a horizontal version of the Column.
| | 02:51 | The Stacked Column and Stacked
Bar are similar except in these cases they
| | 02:56 | have multiple series. So they compare parts
to the whole, the whole in this case is being
| | 03:01 | one of the bars. So you can have two different
data series that will split the bar in half
| | 03:06 | or three data series will split it into thirds
and each one of those parts will have its own color.
| | 03:10 | You've got Positive Negative Column
charts where you're comparing positive and
| | 03:13 | negative values, and you're determining what
the zero point will be, and that can be driven
| | 03:17 | by the average or a value that's in a field
somewhere. Then you've get things like Line
| | 03:23 | chart which changes continuously over time.
It's really good for things like historical
| | 03:27 | financial data, that type of thing. The Area
chart compares data that trends over time
| | 03:31 | while emphasizing highs and lows and movements
between data points. It's also really intended
| | 03:36 | to have more than one data series. Line needs
more than one data series, Area does, and
| | 03:41 | of course all the stacked options do. You've
got a Scatter chart where you can plot X and
| | 03:45 | Y coordinates as individual values to reveal
correlation patterns. For example, you can
| | 03:50 | compare target wait time to actual wait time
at a call center. Again, you will want to
| | 03:54 | have multiple data series in that case. And
a FileMaker favorite, the Bubble chart can
| | 03:59 | compare individual data points in terms of
size. For example, compare market share by
| | 04:03 | charting the number of products sold, sales
figures for per product or percentage of the
| | 04:07 | total sales in each point. But the one that
we are going to use is Pie and the reason
| | 04:11 | we are using Pie is because you could compare
percentage of individual parts within the whole.
| | 04:15 | So for example, show the percentage
of each salesperson's total against the total
| | 04:20 | number of order sold in a found set. Perfect.
So now we are starting to see some of the preview.
| | 04:24 | We see our name up here. We don't
have a legend yet, and we don't have any data
| | 04:28 | yet, but we'll see the preview of our Pie
chart once we select data. So now we have
| | 04:31 | a few decisions to make as far as category
labels and the slicing of the data.
| | 04:36 | So in a Pie chart you just have to tell FileMaker
how to create the pie slices basically and
| | 04:40 | then each pie slice needs to have a label.
These are easier decisions to make than for
| | 04:45 | example, the Stacked Bar, where you have to
say X axis Y axis, and so on. We'll do some
| | 04:51 | examples of other charts in the last movie
in this chapter, but for now we have to pick
| | 04:54 | something that's going to act as the label
for our Pie chart. So in order to choose an
| | 04:58 | existing field, click on the three buttons
there and say Specify Field name.
| | 05:03 | So this will allow us to select from a field, or we
could create our own calculation formula,
| | 05:07 | but there happens to be a field already, and
we're going to choose SalesPerson, because
| | 05:11 | actually each one of our groups are already
being broken down by SalesPerson as you see
| | 05:15 | here in our sub-summary part. So it makes
sense for our Pie to do the same thing.
| | 05:20 | Now we need the actual data that will determine
what the slice of the pie will be.
| | 05:24 | And in that case we also already have a field that
we created for our sub-summary part, and that's
| | 05:30 | the summary field called TotalSummary. And
what that does is it summarizes the invoice
| | 05:36 | total for each salesperson, and that's the
same value that we want inside each slice.
| | 05:40 | So really what's happening in this pie chart
is that whereas in the sub-summary part we
| | 05:45 | were creating many found sets and then totaling
them within each grouped part, we are doing
| | 05:49 | the same thing here but for a slice of the
pie. So now we see a little bit of a preview
| | 05:54 | on screen, and we can show the Legend too.
Here you see this is a listing of all the
| | 05:59 | different individual salespeople with the
color coding corresponding to their slice
| | 06:03 | of the pie. But right now it's not actually
showing our data because we need to still
| | 06:07 | select some other options. So you see here
down below we've got the ability to say whether
| | 06:12 | or not we want to Show the values on the chart,
so we'll will say sure. So now we can see
| | 06:16 | the values that represent each salesperson.
And how about we add percentages as well,
| | 06:21 | so now you can see what percentage of the
overall whole in the found set does any particular
| | 06:25 | salesperson represents. Fixed number of decimals
let's say we make it 1, make it a little bit
| | 06:30 | cleaner and then we can pick actual values
as well. So in the case of actual values you'll
| | 06:36 | notice that not only is there a percentage
underneath it, but there's also the dollar
| | 06:41 | value that's represented for each one of these
salespeople. And we can do a little bit of
| | 06:45 | formatting, because you see it just looks
like a raw number with decimals, so we can
| | 06:48 | say Data as a Number, formatted as Currency,
Use a thousands separator and the Leading Notation.
| | 06:57 | Same thing we could do with a field
that's a number field that's displaying currency
| | 07:01 | on a layout. But now we've got all the information
we need showing in our Pie chart.
| | 07:05 | But there is still some decisions to make. If we click
under Styles, you see that we can change the
| | 07:11 | style from Flat to maybe Shaded, get a little
bit of preview. We'll change it to a solid
| | 07:17 | 3D, gives it just like a nice 3D angled look.
And the chart background that you see here,
| | 07:23 | we are going to keep it Transparent. That
way we can reveal the color of the header
| | 07:28 | part behind it. The Legend Position can be
toggled, Top, Left, Bottom or Right, we are
| | 07:32 | going to keep it on the Top. And the Legend
also has its own Background, and we'll say
| | 07:37 | No Border outside the chart, so it kind of
seamlessly integrates in with the background.
| | 07:42 | And we can work with Chart Text if we want
to make it customized, but we will be fine
| | 07:45 | with the default automatic values that we
have right now. We can make the Text Size
| | 07:50 | a little bit smaller if we want to fit a lot
of values on screen here so that's how we will do this.
| | 07:54 | I'll go back to that Size and any
kind of styling that we need.
| | 07:58 | Now finally, the most important part is the Data Source.
We see that by default we have Current Found Set selected.
| | 08:05 | This means that we are drawing
data from the Found Set, and that the data
| | 08:08 | will change as we update the Found Set, which
is great, that's just what we want.
| | 08:11 | We see we've got some other options here, Current
Record or even pulling in Related Records,
| | 08:16 | we will work with those in the last movie
in this chapter. Since it's the current found
| | 08:20 | set, the breakpoint is also taken into account.
We see here that the Sort Order that was chosen
| | 08:26 | is by SalesPerson, because we have a sub-summary
part on this layout, FileMaker is able to
| | 08:31 | make the decisions that we want to work with
the Current Found Set, and that we are going
| | 08:34 | to be using this break as a SalesPerson, because
we actually selected that as our label field.
| | 08:39 | Now, you see Chart display when layout is sorted.
Well, what that basically means is Summarized
| | 08:44 | groups of records, so we'll do that when we
are sorting by this field, the Label field,
| | 08:51 | it'll break down each group and give us the
summary total for each pie, and that's how
| | 08:55 | it will actually draw the pie. If we didn't
do that and we just had Individual record
| | 08:59 | data, we get this kind of weird sort of art
looking form here. And what it's doing is
| | 09:04 | it's creating a slice for every record in
the Found Set, there is 146 records in this
| | 09:08 | Found Set, so it's creating 146 Pie slices
with one Legend per each. So as you can see
| | 09:15 | even visually that's not the desired effect.
We are just going to ask it to create one
| | 09:19 | pie slice per group that it's finding in the
Found Set. Now we can hit Done, and we can
| | 09:24 | see our pie, a little bit of a preview of
our pie here, but it will really be great
| | 09:28 | is if we go into Browse mode and save our
changes. Now we can see that not only do we
| | 09:32 | have this report, and, by the way, we can
print this. So if we go under Preview mode,
| | 09:36 | we'll see that we've got a report that gives
us a salesperson, all of their invoices, the
| | 09:41 | total of their invoice and then the next salesperson,
and so on and so on. But also we've got this
| | 09:46 | chart that breaks down a pie slice for each
one of the salespeople and gives us the total
| | 09:52 | dollar value. You'll notice that Boo 33,980,
Boo 33,980 and then we can see more detail here.
| | 09:58 | So it's a great overview, great data
visualization, using a chart at the top of our report.
| | 10:03 | And then we can break down a group
report which really is just a couple of steps
| | 10:07 | away from being a list that provides us a
more compelling way to look at this data.
| | 10:11 | So in really just a few steps you take a list
view, add a grouped part, add a summary part,
| | 10:16 | and now even a chart. This makes this a great
way to look at the data that's been entered
| | 10:20 | into your database and interpreted
in a very compelling manner.
| | Collapse this transcript |
| Creating subsummary reports in Table view| 00:00 | Earlier in this title, we discussed working
with the quick table view in FileMaker and
| | 00:04 | how you can add and manipulate fields and
look at data in a spreadsheet looking view.
| | 00:09 | In this movie, I want to show you how you
can add a part or at least the functionality
| | 00:12 | that's produced by a part that will allow
you to turn a spreadsheet looking viewing
| | 00:16 | into more of a report. Specifically speaking
we're talking about sub summary parts similar
| | 00:21 | to how we added some summary parts to list
views in our previous movie in order to create reports.
| | 00:25 | You can allow your users or just
yourself as the user to go into any layout
| | 00:29 | that's in Table view or to switch a layout
into table view and then be able to create
| | 00:33 | reports for themselves. So, here I have the
customer list that normally looks like this
| | 00:38 | but I select the view as table, so we can
get into that quick table view, and now we
| | 00:42 | can pick any one of these column headers to
use as our group. So you'll see here that
| | 00:47 | I have over 1500 customer records here and
each one of them has their own state.
| | 00:53 | If I Unsort them, it'll give you a better idea
of the range of the different states that
| | 00:58 | we've got reflected here. So what I can do
is choose any one of these column headers,
| | 01:02 | and I'm going to choose the state field, because
what I'd like to do is see this customer list
| | 01:06 | grouped by state. So, I'm going to go into
the AddressState, and I'm going to click on
| | 01:10 | the dropdown on the top and the options that
were interested in are the Add Leading Grand
| | 01:15 | Summary or Add Trailing Grand Summary and
the rest of the options associated with those.
| | 01:19 | So what we're going to do is select the Add
Leading Group by AddressState. When we select
| | 01:27 | that we notice that our layout has changed
onscreen and what it's done is it's automatically
| | 01:33 | grouping all the records by each unique value
that it finds in the state field. But in just
| | 01:38 | being able to right click on the column header,
I'm able to create what really looks just
| | 01:42 | like a sub summary report that we've created
in our list view earlier. This makes it a
| | 01:46 | lot easier to be able to look through all
this data, we can see we once state abbreviation
| | 01:51 | begins and the next one ends, but we're not
done yet, we can actually add some additional
| | 01:54 | features to make this spreadsheet looking
view look even more like a report. I can go
| | 01:59 | into this group area here, and I can right-click
on it, and I can actually change the part
| | 02:03 | color to give it a little bit more style.
Now we see the groups really pop, but in addition
| | 02:08 | to that let's say, first, I want to add some
subtotals by state. It's very easy to do,
| | 02:12 | but just for conversation, I want to show
you that in the customers table, we don't
| | 02:16 | have any summary parts created. But now, we're
going to create one on the fly by clicking
| | 02:21 | on the State column header, and you see that
we've got options called Add Leading Subtotal
| | 02:27 | or Trailing Subtotal either one of these.
So we're going to add either a Leading Subtotal
| | 02:31 | or Trailing Subtotal, we'll do a Trailing
Subtotal, and now you see what we got available
| | 02:35 | to us are options similar to what we get when
we set up a summary field, so I'm going to say Count.
| | 02:39 | And now we see at the very bottom
of the list is a trailing count of the total
| | 02:46 | number of records that we have. Also though,
I can go in and I can say Subtotals Count,
| | 02:52 | and do a leading subtotal, and now what that
does is for each group, we see that I've got
| | 02:58 | 22 records, this group has 87, so on, and so on.
Scrolling all the way down to the very
| | 03:03 | end where we got our trailing count. So it's
really just right clicking on a couple of
| | 03:07 | column headers we're able to not only turn
this layout into a grouped report, but you
| | 03:12 | see when we go into Manage Database now,
we've added two summary fields on the fly
| | 03:18 | by simply doing some right clicking on certain
column headers, all of this being done in
| | 03:22 | Browse mode in Table View in FileMaker Pro.
Creating group layouts helps you turn simple
| | 03:26 | lists into compelling reports. Adding group
aggregate values can create useful data for
| | 03:31 | you, and your users as you look at different
record sets in new database. With FileMaker
| | 03:35 | Pro, you can easily create group layouts on
the fly using quick table view features.
| | Collapse this transcript |
| Creating quick charts in Table view| 00:00 | Thus far, we've discussed creating reports
in our FileMaker databases that you can set
| | 00:04 | up and allow users to run against your stored
data or even print, and save to a PDF if you like.
| | 00:09 | Charts, of course, have been adding
an additional layer of visibility for the
| | 00:12 | reports, and in FileMaker 12, now you can
allow users to create their own chart reports
| | 00:18 | on the fly without you having to build a layout
for them. This concept is referred to as Quick
| | 00:23 | Charts, and with a little bit of guidance,
users can create and print a Quick Chart in
| | 00:27 | Browse mode and even create and save their
own layout in the FileMaker database.
| | 00:32 | So you're first going to want to have a layout in your
database that contains as many fields as you
| | 00:35 | want the user to be able to work with and
then present that layout in Table View.
| | 00:40 | So what I've got here is the customer list presented
in Table View, and I could have added a ton
| | 00:45 | more of these columns if I want my users to
be able to pick and choose and be creative
| | 00:49 | with their charting. But for the sake of this
example, I've picked about six of them here,
| | 00:53 | and these are all available to us to be able
to chart, and express in sort of a visual
| | 00:57 | way through the different charting options.
Users who are familiar with working with spreadsheets
| | 01:02 | and other applications should already be familiar
with this concept anyways. So if you want
| | 01:07 | to chart group data, then you're going to
want to start by sorting one of the columns.
| | 01:11 | When you start in Browse mode, FileMaker sets
up a chart based on the field type and contents
| | 01:15 | of the active field, and the active field
is going to be the one that you right-click
| | 01:19 | on when you want to create the chart. It also
depends on the sort order specified so that's
| | 01:24 | why it's important that we go ahead and sort
these. So let's try sorting by right-clicking
| | 01:28 | or Ctrl-clicking on a Mac on the Status field.
I am going to sort ascending, and we can tell
| | 01:37 | it's sorted because we get this little cellphone
signal looking icon on the top of the column,
| | 01:42 | and we also can see that they're all sorted
by the different status. Now let's right-click
| | 01:48 | again and choose Chart by Status. This is
one of the new features in 12. We say Chart
| | 01:56 | by Status, and up pops the Chart Setup window.
So, this is something that users can do as
| | 02:01 | long as you give them access to be able to
create the things that are necessary in this
| | 02:05 | interface. They can do all sorts of really
neat things in this view. So now that we have
| | 02:09 | the chart set up, the window will appear by
default, and it has built a bar chart displaying
| | 02:14 | the three statuses represented in our data
set, and it's also displaying the bars as
| | 02:18 | a count of all the invoices for each status.
Quick Charts will work best for Column, Bar,
| | 02:24 | Pie, Line, and Area charts out of all the
options, because they all have single data
| | 02:30 | series, and one axis, and there's also options
for one or more data series on other axes as well.
| | 02:35 | You can change the Chart Type, for
example, to a Pie Chart if you wish, and now
| | 02:42 | you can see the different statuses shown up
as a part of the whole, or any kind of chart
| | 02:47 | that works best for the data that you're evaluating.
But this can get even more interesting if
| | 02:52 | you decide to work with more than one field
at a time. So for example, let's hit Cancel,
| | 02:57 | and let's sort by state, Sort Ascending and
then let's right-click the Invoice Total or
| | 03:06 | click the arrow, and now we see that the option
for Chart By a certain field has changed.
| | 03:11 | Now, you can see that it's taken into account
the two different fields that we've been working
| | 03:15 | with, we've got Chart by Invoice Total, which
we can do, or we can do Chart by Invoice Total
| | 03:20 | by AddressState. So now what it's done is
it's added two data series here, the Invoice
| | 03:25 | Total is the active field which is determined
by the fact that we've clicked on its header
| | 03:30 | and then the Sort field is the AddressState
so that's how FileMaker determines this.
| | 03:34 | It's generically saying chart by active field sorted
by this value. The Chart By value plots individual
| | 03:42 | data points in a current column, and the Chart
by Sort field plots data from the current
| | 03:47 | column in groups based on the sort order.
So let's choose Chart Invoice Total by AddressState,
| | 03:54 | and up pops the chart setup. When you chart
data in Table View, FileMaker users see the
| | 03:59 | current state of the file and the context
of your selection to be able to estimate chart settings.
| | 04:04 | You can see some of them already
added. So the X axis is the AddressState,
| | 04:10 | the field is already chosen, the title is
already given for the Y axis and the field
| | 04:14 | is already chosen, all sorts of stuff is already
done here, and we can see that all in our preview.
| | 04:18 | And depending on the complexity of
your data set and the chart type that you
| | 04:22 | choose, you might need to use the Chart Setup
dialog box to make adjustments to a QuickChart.
| | 04:26 | We can see that FileMaker has chosen
the Bar Chart and plotted each state individually
| | 04:31 | with the bar representing the total invoices
in each state. Keep in mind that we actually
| | 04:35 | do not have a field to find in FileMaker that
totals up the invoices, the Chart tool has
| | 04:39 | summarized that for us. FileMaker Pro is choosing
the appropriate summary type based on the
| | 04:44 | active field which was the Invoice Total field.
But what if we did want to work with more
| | 04:49 | than one data series? Let's close the Chart
Setup and go back to the layout one more time.
| | 04:54 | This time let's unsort. So let's sort by address
state so that's our Sort field, and now I
| | 05:02 | am going to click on the Invoice Total column
header, and when I'm holding down the Command
| | 05:06 | key on Mac, or Ctrl key on Windows, I'm also
going to select the DiscountTotal.
| | 05:12 | So what I've done is I've established the Sort field,
and now I'm actually picking two different
| | 05:16 | data series, the Invoice Total is one data
series and the DiscountTotal is another.
| | 05:21 | Now when I choose the dropdown on either DiscountTotal,
or Invoice Total, we'll just pick DiscountTotal,
| | 05:26 | I see that my Chart Options get even more
extensive. So I can chart just by the one
| | 05:31 | field DiscountTotalor I can chart by the DiscountTotal
sorted by AddressState, so broken down by
| | 05:37 | the different states or I can do this new option,
Chart by DiscountTotal as one data series,
| | 05:44 | InvoiceTotal as another data series, all broken
down by state. Let's choose that one.
| | 05:50 | Now, up pops our Chart Setup, and you can see that
we have two data series represented here,
| | 05:55 | one of the data series is the total invoices
by each state and then the other data series
| | 06:00 | reflected here in green are the total discounts
for each invoice by state. And we can see
| | 06:06 | those here, you'll notice that the X axis
was already determined, we see that along
| | 06:11 | the bottom where we have all the state abbreviations
and then we have the Data field which is the
| | 06:16 | Customers::AddressState field. But now look
and notice that we've got two different data
| | 06:22 | series, and I could add a third data series
here if I'd like to, but instead, we'll just
| | 06:27 | stick with the two that we've got. So we see
the first one is the DiscountTotal field,
| | 06:32 | the second is the Customers::InvoiceTotal,
and we can toggle these and change it to a
| | 06:37 | calculation or whatever we'd like to do. But
what we're doing is also telling it what to
| | 06:41 | do with this data. These are the fields that
it points to, but we're telling it to total
| | 06:46 | up all those values in the data series.
I could also decide to show a legend if I'd
| | 06:50 | like to, to make it easier for the users to
interpret. But what I am going to do here
| | 06:54 | instead of showing two different side-by-side
columns, I am going to go, and I am going
| | 06:58 | to pick the Stacked Column instead. So now
you see what we've got is that we've got the
| | 07:04 | discount showing on the bottom in the green
and then the rest of it is the Invoice Total,
| | 07:09 | and I'd actually really like to swap these
because I think it makes more sense to show
| | 07:12 | the discount on the tip of the bar. So what
I do here is I use the little handles, and
| | 07:17 | I drag that to the top, and I switch these
around. So now, the InvoiceTotal is in the
| | 07:22 | green, and the DiscountTotal is actually on
top represented in the beige color.
| | 07:27 | I could also choose any of the other chart types that
have multiple series like, for example, the
| | 07:31 | area or line. But I think in this case, it's
most compelling to show the Stacked Column,
| | 07:40 | whichever one makes the most sense for your
data. But the great thing about this is that
| | 07:44 | your users can make all these decisions on
their own, and of course, they have all the
| | 07:47 | other options available to them, you can show
the data points on the chart. I can format
| | 07:52 | those as numbers, currency just like we were
doing with fields on a layout, and I can do
| | 08:02 | the same for the Y axis. Users also have the
ability to choose different chart styles,
| | 08:07 | choosing 3D, different color schemes, making
the background transparent if they'd like.
| | 08:15 | You can show grid lines or minor gridlines
or major gridlines, even position the legend
| | 08:24 | around at different locations, whether or
not you want to have a border, all those things
| | 08:28 | that we saw on the previous view. This is
an area where they probably won't do much
| | 08:32 | changing, but in the Quick Charts, they're
going to be able to work against current found
| | 08:37 | sets, so these options are already chosen
for them, and we see that our sort value is
| | 08:41 | already indicated, because the user had gone
in and sorted by state before they created the chart.
| | 08:46 | So it's pretty intuitive stuff,
and it doesn't take much training to get your
| | 08:49 | users to understand. But the best part is
that the users can actually save their chart
| | 08:54 | as a layout in your database or just print
the chart that they just created.
| | 08:58 | So it's not just for this one session that they're
here, working with the chart, they can go
| | 09:01 | in here, and say, Print Chart, and they can
print it to a printer as a hard copy, or if
| | 09:07 | they've got a PDF option available to them,
they can save this as a chart, as a PDF, whatever
| | 09:14 | they're allowed to do through their normal
print drivers, and they can also save as a
| | 09:18 | layout if they, like so. that they can go
back to this later. So for example, I can
| | 09:23 | say Save as Layout, up pops the screen that
ask me to name the layout, we could probably
| | 09:26 | come up with something a little less for both
of these, but that's fine, we'll hit OK, and
| | 09:30 | now we see a new window popped up with this
new layout, and you'll see that even when
| | 09:35 | we close this and a user navigates over, you'll
see that we've got a new Charts folder created,
| | 09:40 | and we've got a DiscountTotal, InvoiceTotal
by AddressState, and when you navigate to
| | 09:46 | it, it automatically sorts everything, breaks
everything down, and displays a resizable
| | 09:51 | chart inside the new window on screen, and
of course, this could be printed at any given
| | 09:58 | time as well. And if the user wants to make
any changes, and of course you've given them
| | 10:02 | the ability to access Layout mode, they can
go in and simply double-click on it and make
| | 10:06 | any kind of changes that they'd like to. Since
the chart will require that the fields be
| | 10:13 | sorted and show totals, FileMaker has also
created a script. This is something that we're
| | 10:18 | going to get to later on in this title, but
it's basically a script or something where
| | 10:21 | that stores different actions much like the
button that we assigned the script to.
| | 10:26 | But it assigns it to the layout so that anytime
it's loaded, it will automatically sort the
| | 10:29 | records as they need to be so that you can
view the layout properly. And when I mentioned
| | 10:34 | earlier that users must have the correct privileges,
I meant that the users account that they use
| | 10:38 | to log into the database must allow them to
create layouts, fields, and scripts in some
| | 10:42 | cases, because some of those summary fields
were being created on the fly, the layout
| | 10:46 | was being created on the fly and so was the
script. So you won't see those options available
| | 10:51 | if the user has logged in with limited access.
And another very important note here is that
| | 10:56 | you do not have to be in Table View to do
a Quick Chart. I demonstrated it here in Table
| | 11:00 | View, but you can start by right-clicking
any field on any layout. If we go into Products
| | 11:12 | List, for example, you'll see that there's
the Chart by option in any of the contextual
| | 11:17 | menus in any one of the list views. So FileMaker
provides an ad hoc patent pending charting
| | 11:22 | process that can be used even if your users
cannot conceive of the graph first.
| | 11:27 | Now, you can decide on the graph and then tweak it
as you go along, plus users can create their
| | 11:32 | own charts without you having to build it
for them. Charting allows the layouts to do
| | 11:36 | most of the heavy lifting of sorting, grouping,
and adding summaries and the context of your
| | 11:41 | database makes educated guesses about what
you might be interested in charting.
| | Collapse this transcript |
|
|
17. Calculation EssentialsIntroducing calculations| 00:00 | The three core areas of any successful database
application are building the proper architecture,
| | 00:06 | which we've discussed when we built the tables
and fields, and the next is allowing users
| | 00:10 | to input data effectively, which we discussed
when we talk about developing layouts and
| | 00:15 | then finally, we've also touched on the third
important core value of a database, and that's
| | 00:20 | allowing users to output in the form of printing
and exporting. But now outputting isn't specific
| | 00:25 | just to reporting or being able to print out
or export data, output also means that you're
| | 00:29 | putting certain data into a system and then
it's been aggregated in spitting out new data
| | 00:34 | that you didn't have before, and that's the
role of calculation fields and the calculation
| | 00:39 | engine inside the FileMaker database. These
are also considered output. A calculation
| | 00:44 | allows you to drive information from values
or data. If you're defining the calculation
| | 00:49 | in FileMaker, you're using either fields or
data that you're feeding into the calculation
| | 00:53 | formula that will then produce the desired
output or result. So calculations have parameters
| | 00:59 | or inputs and they also have a result and
the result is which you're actually seeing
| | 01:02 | inside of a calculation field if it's put
on a layout. But keep in mind that the calculation
| | 01:06 | engine is used in various different places
throughout the database. Calculations will
| | 01:10 | always return a result so that means you to
feed the information in, and it will return
| | 01:14 | some other value for you. You're probably
already familiar with what calculation syntax might be.
| | 01:19 | For example, if we just created a
calculation that's set in text values, 2+2,
| | 01:24 | well, then the calculation results will always be 4.
Now if we're creating a calculation
| | 01:29 | in our database, instead of saying 2+2, what
we'd actually do is put the word, amount,
| | 01:35 | plus the word, tax. Now in FileMaker we're
not actually adding words together, what we're
| | 01:40 | doing is we've a field that's called amount
and a field that's called tax. So when we
| | 01:44 | are creating the formula, we're actually saying
take the value inside the field amount and
| | 01:49 | add it to the value inside the field tax and
in that way it can reevaluate and gives us
| | 01:53 | a different result for every record that's
stored in the table. As you flip from record
| | 01:58 | to record, the value in the amount field will
change the value in the tax field is going to change.
| | 02:02 | So, therefore, the value returned
from your calculation will also change.
| | 02:07 | There are many different uses for calculations,
for example, the most obvious is that fields
| | 02:11 | can hold and display the results of a calculation.
But you remember we set up our fields that
| | 02:15 | we can also validate based on a calculation
and then we can also do auto-entries based on calculations.
| | 02:21 | You'll also see that when
we get into movies on scripting that we can
| | 02:24 | use calculations to help us run scripts in
a dynamic way and to set up specific types of security.
| | 02:29 | There are really a dozen different
places inside the fabric of FileMaker that
| | 02:33 | allow you to leverage what you know about
specifying calculations and understanding
| | 02:37 | the different parameters and formulas. So,
really, to learn how to use calculations,
| | 02:42 | we're going to want to understand the Calculation
dialog and the calculation formulas.
| | Collapse this transcript |
| Exploring the Calculation dialog window| 00:00 | In this video I'm going to introduce you to
the mechanics involved in the Calculation
| | 00:04 | dialog so that later when you encounter it
when you're defining fields or the various
| | 00:08 | other areas in FileMaker were you can invoke the
Calculation dialog then you have the understanding
| | 00:13 | needed to write some initial formulas.
So the first place that we can see this dialog
| | 00:16 | is if we do under File>Manage>Database, and we
can create just a Sample Calculation Field.
| | 00:25 | Say we type in any old name, and we are going
to choose the Type of Calculation.
| | 00:30 | Now when we hit Create we will see the Specify Calculation
dialog appear. Again, this is just one of
| | 00:35 | the many areas where you can see the Specify
Calculation dialog. Let's take a quick tour
| | 00:39 | so that you know what all of these different
elements are and what role they play in creating
| | 00:42 | calculation results. The window here on the left
-hand side allows you to see all the different
| | 00:48 | fields that are contained not only in the
same table where you're defining the field,
| | 00:52 | but all of its related tables. When you switch
from the table where you're defining the field
| | 00:57 | to any of the related tables you'll see all
the fields in the list had the double colon
| | 01:01 | prefix which of course means that this is a
related value. But it's important to note
| | 01:08 | that you can use not only local fields, but
fields from other tables where you're related.
| | 01:12 | Another great reason to be able to use related
databases over flat files. And remember when
| | 01:18 | you do choose a field it's really just a
placeholder for the data that's going to be found inside
| | 01:23 | that field. So for example, if I pick DiscountRate
that just means that on a record by record
| | 01:28 | basis go pull the data that's inside DiscountRate
and then run that through the formula instead.
| | 01:34 | So really you're thinking of the field names as
just placeholders for the data that's contained
| | 01:37 | within them. And then in the middle are a series
of different operators that you can use when
| | 01:42 | you're constructing your formula. A quick
tour here. The ampersand is a very important
| | 01:47 | operator in FileMaker Calculation dialogs.
What it allows you to do is not only connect two
| | 01:53 | fields together, for example, if you were
to do ContactNameFirst and ContactNameLast
| | 02:03 | that would actually result in ContactNameFirst
& ContactNameLast. But what you also might
| | 02:08 | want to do is add some text or, for example,
a space in-between. Now one of the first rules
| | 02:14 | that you are going to want to understand
about the dialog does involve the ampersand and
| | 02:18 | what you need to know is that the ampersand
must connect any field value, any operator,
| | 02:24 | or any function to any other field operator
function, or even raw text. So in this case
| | 02:31 | we see that we've got a field, and we've got
some text so we needed an ampersand in-between.
| | 02:35 | An actually if I try to close this FileMaker
is going to give me an error, because what
| | 02:39 | we don't have is an ampersand connecting
that text in this field. So the ampersand plays
| | 02:45 | a very important role and the quote code
really just allows us to put either, for example,
| | 02:50 | here anytime you want to have a blank space,
you have to put a quote in there.
| | 02:54 | Buy any text that's not a field name or not an
operator or not a function has to be wrapped in quotes.
| | 03:00 | That will become more obvious to you as you
work with these calculation functions little
| | 03:04 | bit further. This button here is the carriage
return or paragraph return. So if I wanted
| | 03:10 | to show the first name and then return down
to the next line and show the last name, this
| | 03:15 | is how I would construct it. And every one of
the functions has these open parens and close
| | 03:19 | parens. So if you want to write them by hand
you can use the open close parens button here.
| | 03:24 | These other ones are a little bit easier to
understand. The slash is a mathematical operator
| | 03:29 | that indicates divided by. So if I put that in-
between these two fields, this would indicate
| | 03:36 | the value in the first field divided by the
value in the last field. Now keep in mind
| | 03:39 | when you're using mathematical operators just
like in ampersand they can connect to different
| | 03:44 | fields together or a result of the formula.
So you don't need to use the ampersand when
| | 03:49 | you're using these. So you've got forward
slash means divide and the asterisk means
| | 03:53 | multiply by, and the reason we can't just
use the X is because an X is a letter that's
| | 03:58 | used for different functions and sometimes
field names. Then of course you've got the
| | 04:02 | ability to subtract and add within your formulas
as well. Then you have logical operators like equals.
| | 04:07 | So you can say things like if this
value equals that value then do something
| | 04:14 | or if the first value is not equal to
another value or if the result of a function, for
| | 04:18 | example, is equal to dah-dah-dah, then do
something. You can use any one of these, equals,
| | 04:23 | not equals, greater than, less than, less
than or equal to, greater than or, all these as
| | 04:27 | well as, and, and or, and any of the logical
operators that you see in this list. On the
| | 04:33 | right-hand side are a list of functions, and
we're going to talking about these function
| | 04:36 | groups in detail in the upcoming movies and
the rest of this chapter. But this is where
| | 04:40 | you can find each one either organized alphabetically or
organized by type. You'll notice as you select
| | 04:47 | and double-click on any one of functions you'll
see that each function has a name. So FileMaker
| | 04:54 | knows how to process this information and
then in open parens and close parens, and
| | 04:59 | it'll depend on the type of function, but
inside of the function you'll see these things
| | 05:03 | that are words, this is really just a guide
saying this is where you want to put a field
| | 05:06 | that is a text field and here's where you
want to put a value that results in or the
| | 05:11 | actual value that equals a number of characters.
These are what are called Parameters inside
| | 05:16 | the function. Every function will have at
least one parameter, and you can see while
| | 05:20 | FileMaker warns you know if you try to name
a field with the same name as a function.
| | 05:24 | Like, if you had a field called numberofCharacters,
this could be very confusing for FileMaker to process.
| | 05:27 | Or of you get field with an ampersand
in it or an asterisk or a forward slash.
| | 05:33 | All those would be very confusing to FileMaker.
The whole formula entry space that you see
| | 05:37 | here is where you're going to author all of
your formulas and all the other pieces that
| | 05:41 | you will need to be familiar with are on the
bottom of the Calculation dialog are the Result
| | 05:45 | Options. So for example, here just like any
field, if you remember, any field that we
| | 05:49 | have needs to have a field type, well, since
every calculation is going to result in something,
| | 05:55 | FileMaker needs to know how to handle that
result as it stores it if it's going to be storing it.
| | 05:58 | Here is where you choose the
Type or the Handling that FileMaker will apply
| | 06:03 | whether it's Text, a Number, Date, and so on.
So given the wide range of uses for calculation
| | 06:08 | formulas within FileMaker Pro establishing a
solid familiarity with the calculation dialog
| | 06:13 | as well as the function parameters themselves is
essential to becoming a seasoned FileMaker developer.
| | Collapse this transcript |
| Using number functions| 00:00 | Understanding and employing calculation functions
is really key to being able to make the most
| | 00:05 | out of your FileMaker developer experience.
The number functions as a class are the easiest
| | 00:10 | ones to manipulate and perform. They're
relatively easy to learn as well because many of them
| | 00:14 | only have one or two parameters. So this is a
good starting point for learning calculation
| | 00:19 | functions and they all just produce a numeric
result and may be familiar due to their mathematical
| | 00:24 | property. So you see here in our file,
Untitled_17_03, I've got the Invoice Detail layout.
| | 00:30 | You see that I have a field here that's somewhat
highlighted in yellow that has a number in it, this number
| | 00:35 | 123.4567. First, I'm going to create a couple
of quick calculations that result in a number
| | 00:42 | just to show you how to use these fields and
operators to create calculation results.
| | 00:46 | So you see that we have a field here that's
supposed to display the sales tax, we have a tax rate
| | 00:51 | already, but we of course need to apply this
tax rate to the subtotal to be able to get
| | 00:55 | this value. So rather than have users type
a value into the text each time, which of
| | 00:59 | course could create the potential for error,
we're going to create a calculation field
| | 01:03 | that will result in the proper value for them.
So we go under File>Manage>Database, and
| | 01:10 | we see we have a field called SalesTax which
is currently just a Number field.
| | 01:14 | So we're going to change that to a Calculation and
hit the Change button. FileMaker alerts us
| | 01:20 | that we're changing it, we could lose any
data that's in the field. Of course, because
| | 01:23 | we're changing it to a Calculation, that's
not going to store anything, but instead it's
| | 01:26 | going to result in something. So up pops
the Specify Calculation dialog window, and in
| | 01:31 | this example, the sales tax amount will be
the result of the invoice subtotal multiplied
| | 01:36 | by the sales tax rate. This is a pretty
easy formula for us to create. This one is not
| | 01:40 | using any number functions but instead using
mathematical operations. So let's go in here
| | 01:45 | and say InvoiceSubtotal and then use the mathematical
operator which is the Asterisk and multiply
| | 01:52 | that by the SalesTaxRate, and we want to
result this in a Number, and we'll hit OK.
| | 02:02 | Let's hit OK again, and now if we go into Layout
mode, we see that this field SalesTax has
| | 02:10 | already been added to the layout, so in Browse,
we can see our result. So here's the tax
| | 02:15 | 1,405. 17 for this order, and as we go from
order to order, we gave it the Subtotal field
| | 02:21 | as a placeholder, but it's actually taking
the value in the Subtotal field and the value
| | 02:24 | in the Tax Rate field and multiplying them
and then we're getting this Tax value here.
| | 02:29 | It cuts down a lot on having to enter data
into the system, and it gives us very accurate
| | 02:35 | results for each sales tax for each record.
Another quick example that we see is the Total.
| | 02:42 | Of course, the Total here is going to be Subtotal
minus any Discount plus the Tax plus Shipping.
| | 02:48 | So again, instead of the users having to add
all the stuff up, we can simply go in to File>
| | 02:51 | Manage>Database, and change InvoiceTotal
from a Number to a Calculation and hit Change
| | 03:01 | and OK. Now what we'll do is just create a
mathematical equation using field names and
| | 03:07 | operators again, but in this case I'll say
InvoiceSubtotal - InvoiceDiscount + SalesTax +
| | 03:17 | ShippingCost, and the result will be a Number.
We hit OK and OK again, and now we see that
| | 03:25 | as we go from record to record, our calculation
results in a number. These are both examples
| | 03:31 | of number results. So what I'm going to now
is I'm going to show you in the Calculation
| | 03:36 | dialog some of the different number functions
and then we're going to look at how they give
| | 03:40 | results. And the field that we're going to
use in each one of these examples is the Number
| | 03:43 | field that you see on screen here. So as I
go from record to record, you see that these
| | 03:48 | all have the same value. Keep in mind that
as we're putting these functions together,
| | 03:52 | we can kind of expect to see what the result
might be because we know it's 123.4567.
| | 03:58 | So if we open up the Manage Database window,
and let's create a new field called NumberCalc,
| | 04:07 | make it a Calculation, and hit Create, and
this time, we see the Specify Calculation
| | 04:13 | dialog, and it's already said Calculation
result is a Number, but we could change that.
| | 04:17 | We're going to keep it Number, but keep it
mind you can change it. First, we'll see in
| | 04:20 | the right-hand window, all of our functions
are listed by name. So let's choose the one
| | 04:25 | by type and select just the number fields.
So I'm going to select the number functions,
| | 04:32 | and you see that we've got several of these,
most of which you'll probably never run into
| | 04:35 | because they're pretty sophisticated for
crunching numbers, and some of them are actually pretty
| | 04:39 | popular. I'll show you a couple of the most
used and popular ones, for example, the Round
| | 04:44 | function. If I double-click on the Round function,
you see that FileMaker has highlighted the
| | 04:48 | parameters inside the parentheses because
those are the ones that we need to replace
| | 04:52 | with either field values or actual numbers.
So the Round function is going to round whatever
| | 04:57 | number or value that we place here by the
precision that we indicate here. So you see
| | 05:02 | it has two parameters, the number and the
precision. So we need to add either a number
| | 05:07 | field formatted as a number for the number
parameter and then a number field or field
| | 05:12 | formatted as a number for the precision parameter.
So I'm going to select the field that we call
| | 05:18 | the number, it might be a little bit confusing
because I chose to name the field Number which
| | 05:23 | is not going to mess this up here for FileMaker.
But the precision, I'm going to say let's
| | 05:29 | round this however many decimal points--let's
say 2. So now when I hit OK and hit OK again,
| | 05:35 | you'll see the Number field or the NumberCalc
was added down below. I'll place that right
| | 05:42 | under the Number field, and let's go into
Browse and look at what we've got. So if I
| | 05:46 | apply the Round function to 123.4567, it
outputs a value of 123.46. And of course, I can't
| | 05:54 | change this value because it's just a result.
I can search in it if I want to. I can display
| | 06:00 | it anywhere I'd like, but I can't make any
changes to it. I could change the data in
| | 06:05 | the field that it's displaying, and that of
course, would change the result. But you see
| | 06:09 | here what Round is doing is it's rounding
up to the two points precision that I had
| | 06:15 | asked it to. Let's try a couple of more
number function examples. We go back into Manage
| | 06:20 | Database let's modify the NumberCalc by
double-clicking on it. I could also choose
| | 06:25 | to truncate the Number field by 1, and if
I do that it's very similar to rounding.
| | 06:35 | But you'll notice here if we were to round
it, it would have rounded this up to 5, but
| | 06:40 | instead it just chops it off at the certain
amount. So the Round will actually do the
| | 06:43 | rounding of the last number to the decimal
places, but Truncate just chops it right off,
| | 06:48 | and it doesn't do any rounding on the last
values. They're very similar functions, but
| | 06:52 | those are two of the more popular number functions.
A couple other ones, for example, we've got
| | 07:00 | Floor which will give us the next lowest
integer to the value that's inside of a field.
| | 07:07 | So we'll see that that's 126. Of course it changes,
129, whatever it is. So it basically strips
| | 07:13 | off any decimal places and gives you the next
lowest integer. There's also one called Ceiling
| | 07:18 | that does the next highest integer, and so on.
And there's a lot of other ones that are
| | 07:22 | pretty advanced. Probably remember these from
high school algebra or trigonometry, but we
| | 07:30 | can also use calculation functions as auto-enter
instructions, which is another place where
| | 07:34 | we see the Calculation dialog. For example,
in Number, we'll choose the Options field,
| | 07:40 | and we see that under Auto-Enter we have a
Specify button next to Calculation value,
| | 07:45 | and that'll present the Specify Calculation
dialog. However, in this case, it doesn't
| | 07:49 | allow us to choose what the output is going
to be because we already know the output needs
| | 07:53 | to be Number because the Field Type has been
chosen as a Number already. Here what we can
| | 07:59 | do is refer to the Number field. And what
that means when we do that is that the values
| | 08:06 | that the user is going to type into a field
before it commits to the database will then
| | 08:10 | be run through whatever formula we create.
And then eventually, when it hits the database
| | 08:14 | or commits to the database, it'll be the
result of this calculation, not what the user typed in.
| | 08:19 | So let me show you can example of that.
There's a function that just grabs the integer,
| | 08:26 | so if the user types in 1234567, for example,
what it's going to do is it's going to strip
| | 08:32 | everything but just the 123 integer. So what
I've done is even though I'm defining an auto-enter
| | 08:37 | calculation function inside the Number field,
I'm actually referencing the Number field as well.
| | 08:41 | So this is kind of crazy wacky
stuff here. What this means is that the user is
| | 08:47 | going to type something in when they create
a new record. And when they hit Enter, or
| | 08:50 | they commit the record, it's actually going
to run whatever they typed in. That's what
| | 08:55 | this placeholder represents, what the user
is typing into the Number field. It's going
| | 08:59 | to run that through this calculation and
basically it's going to strip out any decimal places
| | 09:03 | and just leave the integer and then what we
see displayed after we commit the record will
| | 09:07 | be the result of this calculation. Let me
show you that. But first, before we do it,
| | 09:11 | we see there's this other check box here,
this is another one of FileMaker's famous
| | 09:14 | cryptic check boxes. It says Do not replace
existing value field (if any). It basically
| | 09:19 | just means do you want me to change the value
that the user is typing into the field using
| | 09:23 | this calculation? Since we've referenced the
same field that we're defining here, we have
| | 09:28 | to uncheck this. So basically, forgetting
what this verbiage says, if you want to use
| | 09:32 | the technique where we're filtering values
that are entered into the field based on this
| | 09:36 | formula just uncheck the Do not replace option.
Now we hit OK, and now I hit a new record,
| | 09:44 | and I say 113.12... So what I wanted to do,
now I haven't committed the record. One of
| | 09:51 | the things I can do to commit the record is
actually click outside the field, so let's do that.
| | 09:53 | So now even though the NumberCalc
is evaluating, what's more important here
| | 09:58 | is that the actual number field, even though
the user typed in a whole long string of decimal
| | 10:02 | places, it ran it through that integer
function and came up with just the integer of 113,
| | 10:07 | and that's what got saved into the database,
and that's what's actually being displayed
| | 10:11 | here in this field. So in this movie, we
focused on the core number functions that are being
| | 10:15 | most frequently or that are most useful. So
it's best to become adept at using these functions
| | 10:20 | without needing to refer to a reference as the
source. So practice and apply these functions
| | 10:24 | as often as you can, for example,
as an auto-enter data entry option.
| | Collapse this transcript |
| Using date and time functions| 00:00 | The next group of calculation functions will allow
you to manipulate Date/Time and Timestamp data.
| | 00:05 | This group of functions are among the
easiest to learn because of the easy syntax
| | 00:09 | that each of the functions have. They fall
under one of two categories, one of the categories
| | 00:14 | are the functions that are going to extract
a bit of information from Date or Time and
| | 00:18 | then there's those that actually construct date,
time or timestamps from bits of information
| | 00:23 | that you are going to provide inside your
calculation as parameters in the functions.
| | 00:26 | Well, let's take a look at these. First,
we'll go under File, Manage and Database, and you
| | 00:33 | see that we've got a DateCalc function that's
currently a Number. We are going to go ahead
| | 00:37 | and change that to Calculation and hit Change
and confirm, and now we are presenting with
| | 00:42 | our calculation dialog. So let's isolate these
functions on the right, Date functions first,
| | 00:49 | so you see that nearly every single one of
these functions has just one parameter, and
| | 00:55 | that's where you put in a Date field, those
are the functions that are going to extract
| | 00:58 | something out of a date. So the date field,
it already exists that potentially has date
| | 01:03 | of course and then there's a few of them.
You see one here that actually constructs
| | 01:07 | it, so you have three parameters, they could
be a number or a field that represents a number
| | 01:12 | in each of those three parameters to put
together a month, day, year date and then there's a
| | 01:16 | pretty helpful function here, week of year
fiscal where put the date, and then you just
| | 01:21 | say what the starting day of the fiscal
year is. The rest are pretty self-explanatory.
| | 01:26 | So let's say, for example, we choose day, and
we already have a date field here in Invoice
| | 01:30 | date, so we'll double-click on that and so
now you see that we've replaced the placeholder
| | 01:35 | asking for a date field with an actual field
that is a date, even though this is a date
| | 01:40 | function this results is going to result in a
number, so we are going to leave this calculation
| | 01:46 | result as a Number, and let's hit OK, and
OK again. In Browse mode here is where the
| | 01:53 | Date field is I placed it right next to the
Invoice Date on Layout so that we could see
| | 01:57 | what we are getting as a results. So you see
what's happening is it's actually extracting
| | 02:01 | the day as a Number from the Invoice Date
field. And we can make some assumptions here
| | 02:10 | as well that the Day, Month and Year functions
will perform in the same way. Now there is
| | 02:17 | another group which is Day, Name, and I will
InvoiceDate again, so actually make this one
| | 02:25 | text, say OK, and OK again, this one is kind
of interesting, it uses the internal calendar
| | 02:32 | that FileMaker has that spans its entire date
range, and it's able to extract from a date,
| | 02:38 | any date what the day of the week was at
that time. Kind of interesting for you so that
| | 02:43 | you can, for example, do searches on how many
orders were created on Fridays versus Mondays,
| | 02:48 | that type of thing, and just like with the
Day functions, DayName, MonthName, we see
| | 02:56 | also that we've got YearName but this one
is not that what you would expect, this one
| | 03:01 | is actually a function that returns the
Japanese YearName for a given date, and you need to
| | 03:08 | supply a certain format that you want that in
as well. So really in this particular group,
| | 03:12 | it's more about the DayName and the
MonthName but you can extract a numeric year from a
| | 03:19 | date, InvoiceDate example. That would be a
Number and so you see here that it extracts
| | 03:26 | the four digit date as a year, so then you
can perform some math on how many years have
| | 03:31 | gone by that type of thing. We can also use a
Date function to construct a date from three
| | 03:36 | numerical fields or numbers, and that will
give us a proper formatted date, so you see
| | 03:42 | here, if I were to use this function, I can
either just simply place numbers is in here,
| | 03:48 | so I could say 6, 12, for example or I could
replace these with another function, so for
| | 04:01 | example, I could say, you know the day of the day
created and then year of another date that type of thing.
| | 04:10 | So you get the gist, you can
construct these, and of course this would have to be
| | 04:14 | result of a date. In a similar fashion, we
have time functions and you see if we scroll down
| | 04:19 | here we have a TimeCalc field, we will change
that over to a calculation, and hit Change, confirm
| | 04:25 | the change. So let's isolate the time
functions, and we see here this is the shortest list
| | 04:30 | of functions of any group and really what
these do are just extract a numeric value
| | 04:37 | from an existing time. So we can go to
TimeCreated and of course, this is going to result in
| | 04:44 | a number, so we leave that as a number, we
say OK, and now we see what it's doing is
| | 04:48 | in that case we can extract anything hours,
minutes, anything that we want to extract
| | 04:53 | from components we have. We have Hours there,
Minutes and even the Seconds and then we can
| | 04:58 | do to reverse just like we did with the date,
where we can actually construct a time by
| | 05:03 | inserting a numeric value or a field that
represents a number or a series of functions,
| | 05:09 | that's going to result in a number in any
one of those three parameters and of course
| | 05:12 | we need all three parameters for it to be
able to construct the time. Timestamp are
| | 05:18 | similar to time it's only got one function,
and it is just the one that simply constructs
| | 05:22 | all of the components into a timestamp, so
you could take a date field and a time field
| | 05:27 | and put those both together. So this lesson
focused really on the core number of date,
| | 05:31 | time and timestamp functions, it's a small
group easy to understand with easy parameters
| | 05:35 | that really fall under those two categories,
but also easy to understand, in case you need
| | 05:39 | to refer to them as you are
doing your FileMaker development.
| | Collapse this transcript |
| Using text functions| 00:00 | The largest group of Calculation Functions
in FileMaker Pro pertain to investigating
| | 00:05 | and manipulating text strings Unlike some
groups of functions in which only a few
| | 00:09 | are used on a regular basis I'd say that
nearly half of the text functions are of primary
| | 00:14 | application and importance. So in this movie
I'm going to introduce you to the syntax of
| | 00:19 | some of the core text functions. So if we
open up the Manage Database window in our
| | 00:23 | Exercise File, and we go to the field called
TextCalc let's hit Options, and let's isolate
| | 00:31 | the Text functions here, they're the first
group on the list. You see there's quite a
| | 00:34 | few of them, but they really boil down to a
couple of different groups. So I'll introduce
| | 00:39 | you to the groups, and you can kind of set
some expectations as to what the other functions
| | 00:43 | in the group might do as well. Let's start
with some of the easiest ones to understand,
| | 00:47 | like, for example, I've got a Length function.
Length is simply going to give me the total
| | 00:53 | number of characters in the text. And so in this
case the text is the values that are found
| | 00:58 | in the CompanyName, so I'm going to hit OK,
and let's take a look at it. You see on the
| | 01:04 | Exercise File I've placed the TextCalc here.
So what this is telling me is that there are
| | 01:09 | 10 characters in the CompanyName iSolutions,
there are 16 in Radley & Friends, and so on.
| | 01:17 | Let's take a closer look at this in the
Calculation dialog. So Length is similar to other text
| | 01:24 | functions that are producing a number, so
they're counting something, whether it's number
| | 01:28 | of characters in this case, or there's another
example here that I'd like to show you, which
| | 01:33 | is a popular one, which is PatternCount. And
one thing I'll tell you right as we're getting
| | 01:39 | into this is that you might look at these
and say, hmm, these are popular, people really
| | 01:43 | need to count patterns of something in a
calculation, or they really need to count total characters.
| | 01:47 | Well, really, the text functions of all groups
of functions are most commonly nested in with
| | 01:52 | other functions. Sometimes one of the
parameters in another calculation that you're doing you
| | 01:57 | need to figure out, well, how many times is
there an ampersand or a comma or something
| | 02:00 | like that in this string of information and
then that's where you would nest in this entire
| | 02:04 | function with its parameters to serve as just
a single parameter in another Calc. So just
| | 02:09 | sort of a heads-up there. In the case of PatternCount,
if we use CompanyName again, here we'll put
| | 02:15 | in the text that we're searching and then we
actually want to put in what we're searching
| | 02:19 | for. So let's say R, and what we're going
to get as a result is a number. So if I hit
| | 02:24 | OK, then hit OK again. So first of all, in
the CompanyName iSolutions we don't have an
| | 02:29 | R, but here this is interesting, you'll
notice that we have an R here and an R there, and
| | 02:37 | it's properly counting two of them. The reason
I mentioned that it's interesting is because
| | 02:40 | this R is capitalized, and that r is lowercase.
So it's important to know that in some cases,
| | 02:45 | in some functions case matters, but in this
particular one it does not just something
| | 02:49 | that you want to be aware of. Another function
that you might find useful, but in a different
| | 02:54 | application is something that's called the
Trim function, but what I'm going to do is
| | 02:57 | I'm going to go into the CompanyName field
that you see here, and let's double-click
| | 03:01 | on it in the Options. So you notice that we've
got a calculated value here in the Auto-Enter
| | 03:06 | functions, we've done this in a previous movie,
but this is a technique that allows us to
| | 03:11 | filter the values that a user is typing into
a field. So anytime somebody types something
| | 03:16 | into a new record or typed something into an
existing record, we can apply some instructions
| | 03:21 | to that before it gets committed to the database,
and this is how we do that. In the Auto-Enter
| | 03:25 | function, for the field, we choose Calculated
value, and you will see here there's a function
| | 03:30 | called Trim, and what the Trim function does
is it will trim any leading or trailing spaces
| | 03:35 | from text. So let's say we have an issue here
where users are typing into a field and inadvertently
| | 03:41 | hitting the Enter key, which makes it go to
Return, and so we end up with all this text
| | 03:46 | that has inadvertent return character in it
or inadvertent spaces or something like that
| | 03:51 | whatever the cause may be, we want to
eliminate those leading and trailing spaces.
| | 03:55 | So what we can do in the CompanyName field, and this
is another one of these examples where I'm
| | 03:59 | actually using this field as a parameter in
the Auto-Enter calculation for the same field.
| | 04:06 | So the instructions I'm providing to the
CompanyName field are to Trim and then really what this
| | 04:11 | placeholder stands for here is I want it to
trim whatever the user is typing into the
| | 04:15 | field after they commit it. So after they
commit, take the value they've typed in before
| | 04:21 | commit and apply this function to it. And
that only works if we uncheck the default
| | 04:28 | of Do not replace existing values (if any).
This is sort of a weird cryptic jumble of
| | 04:34 | dialog, but all you need to know is you leave
it unchecked if you want to apply the function
| | 04:39 | to the value that's been entered into the
field, or even easier to understand, you check
| | 04:44 | this value, and you don't check that one
anytime you're doing this filtering technique.
| | 04:47 | So let's see how that works. So if I go into
Radley & Friends, here I'll just put some
| | 04:53 | trailing spaces, and now we're in a pre-commit
stage, and you can tell that visually because
| | 04:58 | the field I'm in has a border around it and
these have dotted borders in it, and so of
| | 05:03 | course one of the many things I can do to
commit a record is to click outside the field,
| | 05:06 | and let's look what happened. So you see that
it is trimmed off the trailing spaces in this
| | 05:11 | case, and it's not just the Trim function
that works as a filter, there's all sorts
| | 05:15 | of different filters that you can apply.
Let's open the TextCalc field again, get rid of
| | 05:20 | the PatternCount by deleting. So now there's a
whole series of functions under Text function,
| | 05:27 | and you'll see here we've got Left, LeftValues,
LeftWords, Middle, MiddleValues, MiddleWords
| | 05:34 | and then Right, RightValues, RightWords.
So let me explain what those are. So in the case
| | 05:38 | of Left, what it does is that you take a piece
of text, in this case we'll say Customer Full
| | 05:45 | Name, and here what it's doing is we're putting
in a number, and we're saying, give me a certain
| | 05:50 | numberOfCharacters starting from the left. So
here we've got let's say we want to extract
| | 05:56 | Boo, so we would say, one, two, three, right,
so give me those three characters, make it
| | 06:00 | text and then we can see what this looks like.
So now you see that we've got Boo.
| | 06:05 | Keep in mind one thing, though, is that if I had said
four, it would have given me the space after
| | 06:10 | that so keep in mind that spaces and punctuation
and things like that are considered characters
| | 06:15 | as well, so you've to be careful. Visually
you may not be able to see that you've got
| | 06:19 | four characters in there, but it only looks
like three. So keep that mind. So that's what
| | 06:23 | Left does. You'll notice the other functions
in the family are LeftWords. So if I said
| | 06:34 | LeftWords, and asked for one of them, I'll
get the same value, because I'm pulling one
| | 06:42 | word from the left. Now, you'll notice that
we have them starting from the other side,
| | 06:47 | so we could just go from the opposite, Right,
give me three characters, that would give
| | 06:50 | me ley. RightWords, text, Customer Full Name,
numberOfWords 1, result is a Text.
| | 07:00 | We see here that gives me the one word from the right.
So here is where these functions might come
| | 07:04 | into play. So let's say, when we imported
all this data into our customer records, the
| | 07:09 | other source of data that created this data
only had all the first and last names, all
| | 07:15 | mixed together inside of one field. But of
course as one of our rules that we've discussed
| | 07:19 | earlier in this title is that we want to
break data down to the most granular piece.
| | 07:24 | So we wisely decided that we would have First and
Last names as separate fields. So how do we
| | 07:29 | get all this data out of the full name and
into these fields? Well, certainly we could
| | 07:33 | go one at a time and add all this data, going
record by record, and just simply type that in.
| | 07:38 | But I'm going to introduce you to a
function in FileMaker that also uses the Calculation
| | 07:43 | dialog and show you a good example of being
able to use Calculation functions to make
| | 07:47 | this task very easy to do. So under the
Records menu there's a thing called Replace Field
| | 07:52 | Contents, and really what this is is it's a
batch update feature. What you'll do when
| | 07:57 | you're going to use Replace Field Contents is
you're going to create a found set, because
| | 08:01 | it's only going to perform or operate against
whatever instructions you provide here for
| | 08:05 | just the records in the found set. So we say
Show All so that all 1523 records are affected,
| | 08:11 | and there are a couple of different things
you can do with it. You can say, whatever
| | 08:14 | the value is in the first record that I have
here, apply it to all the other records in
| | 08:18 | the database. That's usually what this is so
you can see here there is nothing in there
| | 08:22 | so it's saying, well, do you want to apply
nothing to all the records? Well, that's not
| | 08:25 | what we want to do here. There is also this
ability to apply serial numbers. But the one
| | 08:29 | we're focusing on is this one here, Replace
with calculated result. So you see here what
| | 08:34 | we've got is another area where we see this
Specify Calculation dialog that has nothing
| | 08:38 | to do with defining a field, but what we're
going to do is say, okay, we're here in the
| | 08:42 | First, Name field, so what I want to do is
go under LeftWords, and from the Customer
| | 08:49 | Full Name, put the left word into the First,
Name field, right? So let's go ahead and do
| | 08:58 | that. And, by the way, I should caution you
that you should be real comfortable with these.
| | 09:02 | Maybe you can even isolate one record in your
found set to test your calculations against,
| | 09:06 | because there's no undo in a Replace Field
Content. It's very powerful and extremely
| | 09:10 | useful, and it's a great tool to have in
your tool belt, but there's no way to back out
| | 09:14 | of it. So my tip would be to isolate just
a couple of test records before you run it
| | 09:20 | against the full batch just to make sure
it's giving you the results that you expected.
| | 09:23 | So let's take a look at how this would work.
We hit Replace, and we see we have no spaces
| | 09:27 | after it, either first, that one, Boo, Jaxson
and so on, and that would apply for all the
| | 09:33 | records in our entire set of 1523, and it
only took about a second to do. So we can
| | 09:37 | do the same thing in Last real quickly. Hit
Calculation, do Text functions, RightWords,
| | 09:49 | text is the Customer Full Name, numberOfWords
one. Take a look at how that works, and now
| | 09:57 | we see we have last names for everybody in
our database, all the way through to 1523
| | 10:03 | records. So it's just another way to use the
Calculation dialog that doesn't have anything
| | 10:07 | to do with defining fields. Another example
just to finish up the tour here is TextCalc,
| | 10:14 | I'd like to show you a function that's pretty
popular, so we've talked about the most common
| | 10:19 | ones are Left, Middle, Right, and now there
is another one--and we talked about Trim,
| | 10:26 | now we've got Substitute, which I would like
to show you. It does what it sounds like it
| | 10:31 | does, it takes information from let's say,
the CompanyName, and we can say we're going
| | 10:37 | to look for certain text strings, so of course,
we have to wrap it in quotations, and the
| | 10:42 | one we're going to look for is an Ampersand,
and we're going to replace it with the word And.
| | 10:46 | Okay? So let's say, in that calculation, so
there is no Ampersand there, but there is
| | 10:54 | an Ampersand here, and notice that we've got--
this is a good example of understanding how text
| | 10:58 | works here. So it does replace it, but all
we have to do is make a simple tweak in our
| | 11:02 | calculations. This is something that happens
in a lot of calculations so you've got to
| | 11:05 | be aware of it, but what we're replacing it
with is just and, but what we really want
| | 11:09 | to do is do space and space. That happens
in a lot of different calculation functions,
| | 11:15 | which is something to beware of. Finally,
couple other functions just to show you. Text
| | 11:21 | functions, see all the way down in the bottom.
In addition to counting characters, you can
| | 11:26 | count the number of words, you can count the
values, which is in an array, so every time
| | 11:32 | you have a list of return delimited values,
you can count each one of those. And things
| | 11:37 | like Upper will take the text, for example,
in another field and make it all caps for you.
| | 11:45 | And the opposite of that is a function
that's called Proper, that will take all caps
| | 11:48 | if you're importing it from another source
and turn that into a capital letter at the
| | 11:53 | beginning and then lowercase for the rest.
Just a handful of examples to try to get you
| | 11:57 | familiar with how functions, and in this case
the Text functions, work with existing field
| | 12:02 | values. So it would be good to get familiar
with these functions, because they're going
| | 12:05 | to be used in quite a few areas within
FileMaker Pro, and this lesson focused really on the
| | 12:09 | core text functions, the ones that are used
most frequently, but it's best to become adept
| | 12:13 | at using these functions without needing to
refer to the reference as a source. But if
| | 12:17 | you want more information on some of these
functions here that we've covered in the Text
| | 12:20 | section, feel free to go into the FileMaker
Help System where you can learn about these
| | 12:26 | things outside of the context of actually
programming. So the more you can write these
| | 12:30 | free flow, the better, so do your best to
apply these functions as often as you can.
| | Collapse this transcript |
| Using get functions| 00:00 | Get functions are a rare breed of function
because they pull information about either
| | 00:03 | the session that you are in, in FileMaker
and a session refers to when you login, and
| | 00:07 | you logout and everything that happens in
between or the application, for an instance
| | 00:12 | the version of FileMaker or even if you are
in FileMaker Go or accessing from the web
| | 00:15 | that type of thing or information about your
Operating System. For example, not just whether
| | 00:20 | you are using Mac or PC or what Operating
System level, but also things like what time
| | 00:24 | is it on your time clock and information from
the calendars and time of day, you know those
| | 00:29 | type things. But these could be really
useful if you need to extract this type of info,
| | 00:33 | and then you have these functions available
to you in your scripts. Now we saw this when
| | 00:37 | we were talking about Layouts because there
is way that you can drop and merge fields
| | 00:41 | that use Get functions as well. So, I would
recommend watching the movie in this title
| | 00:46 | on using merge functions inside reporting.
So let's take a look at the Manage Database window,
| | 00:53 | and you'll see that we have a function here
called GetCalc, so let's go into GetCalc and
| | 00:58 | open it up and take a look at some of the
Get functions that are availabl |
|
|