navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

FileMaker Pro 11 Essential Training
Richard Downs

FileMaker Pro 11 Essential Training

with Cris Ippolite

 


In FileMaker Pro 11 Essential Training, Cris Ippolite demonstrates the principal features and functions of this popular database software, including creating tables and relationships, managing fields and records, and working with layouts. The course shows FileMaker developers how to find, sort, and share data as well as how to create reports, calculations, and scripts. It also covers brand new features in FileMaker Pro 11 such as the Inspector tool, charting, and portal filtering. Exercise files accompany the course.
Topics include:
  • Creating databases from templates
  • Creating fields in spreadsheet format
  • Creating tables and relationships
  • Defining key fields
  • Adding validation and auto-enter values to fields
  • Managing records, including duplicating, locking, and deleting records
  • Creating and managing layouts
  • Formatting layout objects
  • Finding and sorting data
  • Creating calculation fields
  • Building reports
  • Printing and saving as PDF or Excel
  • Writing and triggering scripts
  • Using relationships throughout a database

show more

author
Cris Ippolite
subject
Business, Databases
software
FileMaker Pro 11
level
Beginner
duration
9h 11m
released
Jun 25, 2010

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi, I'm Cris Ippolite, and welcome to FileMaker Pro 11 Essential Training.
00:08FileMaker Pro is a leading desktop database software, popular for its ease of
00:12use, that's used by everyone from Fortune 500 companies to individuals who just
00:16want to get a little bit more organized.
00:18I'll guide you through building a database the right way with FileMaker Pro 11.
00:22I'll teach you the basics behind how a database works, and we'll take you step
00:26by step through the true essential elements of creating a database from scratch,
00:30beginning with creating tables and relationships, how to manage the various
00:34types of fields, how to work with layouts to display data, and as well as how to
00:39format your layouts in a number of different ways.
00:43I'll show you how to build interesting and attractive reports, including
00:46subsummary reports, to help you share your data with impact.
00:49Most importantly, we will create a FileMaker database together from
00:53scratch, taking care to study each step in the order that you would do so in a real project.
00:58I'll be providing guidance and examples based on 18 years of
01:01FileMaker experience.
01:02And now, without further delay, it's time for us to dive into FileMaker Pro
01:0611 Essential Training.
Collapse this transcript
Understanding the FileMaker family
00:00Before we get started with our exercises, I'd like to take a moment to introduce
00:04you to the five different products in the FileMaker 11 product family.
00:07First, we've got Bento, a personal database for Mac that's sold by FileMaker.
00:13We won't be covering Bento in this course, but you can find movies on Bento in
00:17the lynda.com Online Training Library.
00:20Next, there is FileMaker Pro 11.
00:22This is the product that we're going to be using throughout this title.
00:25It's the standard user version of FileMaker Pro that allows you to create your
00:29own databases, modify your databases and basically do everything that we're
00:32going to be doing throughout this title.
00:34FileMaker Pro 11 Advanced has all the functionality of FileMaker Pro 11, but it
00:39also has some additional tools that developers find useful, like Script Debuggers,
00:43with the ability to create things called Custom menus, it allows you to create
00:47Runtime Versions of your FileMaker Pro applications, and that type of thing.
00:50It costs a little bit more, but if you want this extra functionality, or if
00:53you're going to be maintaining a lot of databases using FileMaker, it really is
00:57a good product, and you should have it.
00:58Then there are two different FileMaker Server products.
01:02FileMaker Server 11 is an application that gets installed on a dedicated server
01:07machine, or up to three different machines, and it's used to be able to share all
01:10the different files that you create in FileMaker Pro to many different users at
01:14the same time, or to share them in a multiuser environment;
01:17for example, you can have your FileMaker Pro databases shared up to 250
01:22consecutive users who are all using FileMaker Pro or FileMaker Pro Advanced, and
01:26you can also have the ability to publish your databases to the Web using
01:30technologies called XSLT or PHP, you may have heard of them, or to publish your
01:35raw data as XML to be shared by other applications. All of that's built right
01:40into FileMaker Server 11.
01:42Now, if you'd like to be able to your databases for more than 250 consecutive
01:46users, or publish your databases using a technology that's called Instant Web
01:50Publishing, or if you want FileMaker to host any kind of ODBC or JDBC
01:54connectivity, then you'll need to purchase something called FileMaker 11 Server Advanced.
01:59It's an upgrade to FileMaker Server 11.
02:01So you can see that we've got product here for the FileMaker end-user, the
02:04FileMaker developer and then also different options for deploying your
02:07application, whether its just on a network or deploying out to the Web.
02:10But the product that we're going to be using moving forward is FileMaker Pro 11.
Collapse this transcript
Using the FileMaker Quick Start screen
00:00One of the new features in FileMaker Pro 11 is a redesign to the Quick Start dialog.
00:04So here you see onscreen that I've opened up FileMaker Pro, and I'm seeing the
00:08FileMaker Quick Start screen.
00:10One of the things you'll notice on the right-hand side of the screen is that
00:13FileMaker has given you links to additional training resources.
00:16You can visit the FileMaker Resource Center, or learn more about FileMaker Pro,
00:21or access some of the FileMaker Pro Tutorials, or view the FileMaker Forum,
00:25which allows you to collaborate with other FileMaker users through an online bulletin board.
00:29But on the left-hand side, you'll see where there's all the functionality of the screen.
00:33First, you'll notice that you can click on the link here to create a
00:35brand-new database, and that's what we're going to be doing throughout the
00:38rest of this title.
00:39Here you can convert a file into a new FileMaker database;
00:42for example, those types of files might be an Excel file, tab delimited file,
00:47those types of things, or you can use one of FileMaker's Starter Solutions as a
00:51pre-designed template to get you going very quickly.
00:54We'll talk about all these different things in movies later on this title.
00:57In the middle of the screen, you'll see something that's rather helpful.
01:00If you find yourself using the same databases over and over again, you can
01:04consider these your favorites.
01:05And like many other applications, FileMaker allows you to manage your favorites,
01:09or pick which databases might be your favorite databases, and then displays them
01:13here in the Quick Start screen.
01:15And the way to Add Favorites is by simply clicking on the Manage Favorites link.
01:18This will pop-up in the Manage Favorites window where you can see any existing
01:23favorites, and if you have them, you can click on them and remove them from the
01:26list if you know longer use the database.
01:28Or if you want to add a new database, you can just hit the plus sign in the
01:32bottom left-hand corner, where you'll then navigate to a database and choose
01:37that one as one of your new favorites.
01:41Now you'll see the file in your Manage Favorites window, and when you close the
01:44window, you'll see it under your Favorite Files.
01:47You'll also see that any recently opened files will appear under the Recent
01:50Files section, and you can reset those by closing this window and going under
01:57the File menu, and under Open Recent, simply hit Clear Recent Files.
02:02This is very similar to many other applications where you see that you've got recent files.
02:06Now, if you want to invoke the Quick Start screen again, you can go under the
02:09Help Screen and hit Quick Start Screen.
02:12You might not need these resources, and you might want to skip the Quick Start
02:16Screen, so if you want to do that, the way you would do this is uncheck the
02:19box in the bottom left-hand corner that says Show this screen when FileMaker Pro opens.
02:24And then when you close it, now FileMaker will no longer show the Quick Start screen.
02:28And this is the setting that we're going to use in our copy of FileMaker Pro for
02:31the rest of the title.
02:32The new Quick Start Screen in FileMaker Pro 11 will equally address both new
02:36and experienced users.
02:38New users who aren't sure how to get started will be able to see all their
02:41alternatives and have access to Help and Tutorials.
02:44Experienced users, on the other hand, will have quick access to Recent and
02:48Favorite Files and the ability to customize their display in the window.
Collapse this transcript
Using the exercise files
00:00If you are a premium member of the lynda.com Online Training Library, or if
00:04you're watching this tutorial on a DVD, you will have access to the Exercise
00:08Files used throughout this title, and in this title we'll be creating an
00:12invoicing file from scratch.
00:14In the first part of the title, you'll be building the file along with each movie
00:17in the order that a database should be built.
00:19In later movies, we'll use that same file to add more specific features and data
00:23to our Exercise Files.
00:25If you want to just jump to a specific movie, you can find this specific
00:28exercise file that corresponds with it.
00:30The way that the exercise files are laid out is that they all come in one
00:33folder, as you see here, and each folder is broken into different chapters;
00:38for example, if you're watching the movie in chapter 1, movie number 4, you can
00:45just click on the subfolder, and then double-click on the exercise file.
00:49Each of the movies has its own dedicated FileMaker file, so you can start from
00:52any point in the title.
00:54If you're a monthly subscriber or an annual subscriber to lynda.com, you don't
00:58have access to the exercise files, but you can follow along from scratch on your
01:01own files, and this lesson works quite well if you're creating your own files.
01:05So let's go ahead and get started.
Collapse this transcript
1. Getting Started
What is a database?
00:00Before we start working with a database it's important to understand a little
00:03bit about what a database actually is.
00:05By definition, a database is a collection of "like" information with
00:09underlining attributes.
00:11Now you've probably already seen databases in forms of things like Address Book
00:14applications on your computer.
00:15In these cases, you have bunch of different individuals that are being stored
00:18inside of your database.
00:20You're storing information on a bunch of different individuals and the "like"
00:23information that you have, or different attributes about them like their phone
00:26number, address, or IM and that type of thing.
00:29You're probably already familiar with databases from your Web experiences, as well;
00:32for example, lynda.com is just a huge database system.
00:36It's a database of different titles with information about those titles, and
00:40links to the videos that you can watch for training.
00:42And having this database of these products allows the user to search the
00:46databases and give them back results that make more sense to the user experience
00:49that they're looking for.
00:50The role of the database is twofold.
00:52First, the database will physically store the data that's contained within it.
00:56So it acts as a place where you can put different pieces of data and then
00:59retrieve that date if necessary, but in addition to storing the data, it also
01:04contains, or describes the information that's been stored within it.
01:08A good example of this is in a spreadsheet.
01:10So here, in this case, a spreadsheet is the database, and more specifically this
01:14spreadsheet is going to be storing information about individuals, or let's say
01:17customers more specifically in this case, but it also describes the information.
01:22For example, you see here that we've got different rows inside of the
01:26spreadsheet. Each row represents a different individual and in FileMaker, those
01:31rows are referred to as records, and that's terminology that I'm going to use
01:35from here on out in this title.
01:36But in addition to the rows, or the different iterations of a person stored
01:39inside of this spreadsheet database, you also know that we have columns, and
01:42these columns are attributes about the different customers that we're storing
01:46in our spreadsheet.
01:47In FileMaker we call these attributes fields.
01:49So, for example, we would go into our FileMaker database and define things like
01:53a First name field or a Last name field, Title, Status, Start date, that type of thing.
01:59So here not only are we storing information about customers, but we're also
02:02describing the information that's been stored, so here clearly we're saying,
02:05what is this information I'm looking at here? This is the Title or the Title of
02:09each of the individuals that are stored inside the database.
02:12So the important thing to remember here is that in FileMaker our rows will
02:15become records and our columns will become fields.
02:19Hopefully a little background on databases that you're already familiar with
02:21will help you understand the concepts that we're going to discuss later in
02:24the title.
Collapse this transcript
Flat vs. relational databases
00:00So what makes an application like FileMaker different than just a spreadsheet?
00:04There's actually many different ways that you can store data inside of your
00:07computer, for example, like in a Word Processing document or in an Excel Spreadsheet.
00:11These are examples of what are called, in database circles, a Flat File.
00:15That's where it's just one single table, so in this case here, the table of
00:19Customers or contact information, and it's independent from any other tables
00:24that might have related data.
00:25So you could have Customers, and you could have orders, but they're stored
00:28independently of each other, so there's no actual relationship between that data.
00:32But in a true relational database, like FileMaker Pro, for example, it's
00:37designed to make it even easier for you to enter data and also retrieve data,
00:41but in a true relational database like FileMaker Pro, it's set up to have
00:46various different tables that are all linked or related together.
00:49The reason that you would want to have many different tables related in your
00:52database is so, for example, if you have customer information, and you've got
00:56order information, you won't want to have to rewrite the customer's name and
00:59address and phone number and everything every time that you create a new order,
01:02but you might have to do if your Customer information and your order information
01:06were independent of each other, or not linked.
01:08Also, imagine if, instead of just having 4 records here, we had 4 million.
01:13It wouldn't be very easy for us to manipulate, extract or work with data, or even
01:16turn it into reports if it's just in a spreadsheet form, but in FileMaker Pro
01:20you're able to store your information, but also create different layouts that
01:24are related to other tables inside your database, that allow you to link all your
01:27information together,
01:29like be able to create an order layout that has information from both the
01:32Customer and an order all on one form. And this is something that you could
01:36print out of as a hard copy if you need to.
01:38Another one of the important goals of a relational database is to eliminate
01:42redundant data entry.
01:43If you have a spreadsheet of orders, every row that you enter will represent an
01:47order, but you also want to have customer information like their mailing address
01:50and shipping address that kind of thing.
01:51So each time you create a new order row, you'd have to reenter in all the
01:55customer name, customer phone number, customer address info.
01:59When you have a related database like in FileMaker Pro, I can just say,
02:02hey, this order is linked to this customer record that I've already created in my database.
02:07That way you don't run the risk of possibly entering the data in wrong the
02:10second time around, or if the customer information is updated, it'll then
02:14propagate automatically throughout your system.
02:16We're going to see various different examples of this as we go throughout this
02:19title, but it's important to know that the advantage of having a database like
02:23FileMaker Pro is because your data is going to be related, thus called a
02:27relational database.
Collapse this transcript
How FileMaker works
00:00We've talked about why you want to use a relational database to manage your data
00:04over a flat file, for example, but I'd like to show you a couple of reasons why
00:08FileMaker is such a great application for developing those relational databases.
00:12First off, you can see here onscreen that we can store information within our
00:17application much like we do in a spreadsheet or other applications.
00:21We can create new records if we'd like to by simply hitting the New record
00:25button, or delete those records if we'd like, and we can even search for records
00:30by simply typing in some criteria onscreen and hitting Perform Find, and this is
00:35that retrieval aspect of the database, which is so key.
00:39So you could have, instead of just having one record like we have here, you could have
00:41millions and millions of records, and within just a matter of a second you can
00:46retrieve whatever information it is that you're looking for inside the database.
00:49What's nice about FileMaker though, is that it's a relational database.
00:52So, for example, you'll see if we click over to this button here that says
00:55Invoices, we're in a completely different table.
00:59The database itself can have many different tables. In this case, we've got a
01:03table that stores customer information, a table that stores Product information,
01:07another one that stores Invoice information, and in a true relational database,
01:11all these tables can be linked together.
01:14So, for example, you see if I create a new record here inside my Invoices table,
01:19I can choose one of my customers from my Customer table and by simply choosing
01:24that customer, you see that I've filled in all of the customer information that
01:28we see stored over in the Customer Detail section.
01:31So what's key about this is that all these different tables can fit into one
01:35FileMaker file, so you don't have to manage different files
01:38like, for example, when you have to create a new spreadsheet every quarter or
01:40something like that. All of the files and all of the data can be tagged
01:44appropriately and stored in one easy-to-share FileMaker database.
01:47In addition, FileMaker has all sorts of FileMaker-specific kind of cool
01:51functionality here as well;
01:53for example, you'll see if I click on this Website tab, it's going to
01:57automatically load a Website right inside my FileMaker layout.
02:00So although FileMaker isn't intended to be a Web browser, it can certainly
02:04link your data over two things like Google Maps and stuff like that like you see here.
02:09And also you're not just limited to storing a text or number data inside of FileMaker;
02:13you see that we've got different fields or attributes: First Name, Last Name,
02:17President that kind of thing.
02:18We've got a special type of a field called the Container Field that we'll talk
02:21about later in this title, that allows us to store Media.
02:24So, for example, we can insert in a movie into a FileMaker record, and not only
02:35can we Insert in the movie, but we can also play movies.
02:37We can do the same thing with sound files or image files, so you can play music
02:42or have pictures of contacts inside your database, all that kind of stuff.
02:45But the strength of FileMaker is that it provides the ability to create a database
02:50very easily, probably one of the easiest database creation environments out
02:53there, and also works the same on both Windows and Mac.
02:57So if you have two users on your same network, one that uses a Mac and one
03:01that uses Windows, they can both share the same FileMaker database at the same
03:05time, thus making live changes to it while the other person is in the database as well.
03:10And with the advanced Security model that comes with FileMaker, you can
03:13determine what your users can do and see when they're inside of your database.
03:16Then up to 250 different users can share the database simultaneously, all having
03:21their own session and all being logged into a server, and you can even publish
03:25your databases to the Web.
03:26You see you've got support here for FileMaker PHP or something called
03:30Instant Web Publishing, which allows you to share your FileMaker databases
03:33through the browsers.
03:34You can also share your database with other applications that are what are
03:37called ODBC or JDBC compliant;
03:41this allows you to integrate your FileMaker databases with things like your
03:44accounting software, for example.
03:46In addition, not only can you store your information and share it with other
03:49FileMaker users, but FileMaker allows you to do things like export records, and
03:54you can export them in various different file formats that you can share your
03:58data with other non-FileMaker Pro users.
04:01You can also save your records as Excel spreadsheets or as PDF files, so any
04:07user that has Excel or that has in a PDF reader on their computer can also
04:10access your data, all sorts of different things that you can do with the
04:13FileMaker database.
04:14We're going to cover a lot of these in this title, but for those of you that
04:18have never worked with FileMaker before, and you're thinking okay, what is this?
04:21You get that it's a database, but you've really got here with FileMaker is the
04:25ability to create a fully functional and powerful database application using
04:29FileMaker Pro, without having to know anything about databases, or computer
04:33science or anything like that.
04:34By the time you're done with this title, I assure you that you'll be able to
04:37create FileMaker Pro databases, deploy them, share them with people, understand
04:42their limitations, build reports and do all sorts of different functions that
04:45you never have been able to do before.
Collapse this transcript
Understanding the essential preferences
00:00The first time that you launch FileMaker, it's probably a good idea to get
00:03familiar with some of the different preferences that are available to you.
00:06If you are a Mac user, you can find the Preferences dialog under the FileMaker
00:10Pro menu, here. Or if you're on a Windows machine, you can find it at the
00:15bottom of your Edit menu.
00:16Either way, it'll open up the Preferences dialog, and you see here in the
00:20Preferences dialog that we have five different tabs to choose from, and I'm just
00:23going to go through a couple of these settings to show you some of the ones that
00:25you'll probably be using more often, and we'll skip over some of the ones that
00:29you may not use that often at all.
00:31So first you'll open up to the General tab, and you'll see in the General tab we
00:34have a couple of default settings already chosen for us.
00:37The first of which, that I'm going to point out to you, is how many different
00:40recently opened files the your use.
00:42If you work with a lot of different files, you probably want to use the recently
00:45opened file option, which allows you to not have to open up a file, find it on
00:49your computer or even find it on your network if it's hosted on the server, and
00:53here it allows you to choose how many different files you want to see.
00:56The most useful option though is here under User Name, where you see you've got
00:59two options to either choose the system name or another name.
01:03The User Name is the name that FileMaker Pro uses to identify what copy of
01:06FileMaker Pro you're using to access this database.
01:10So, for example, here, when we installed FileMaker Pro on this machine, it
01:13grabbed the name of the user account that we were logged in as when we did the installation;
01:18in that case, it's my name. But if you want to identify your computer, for
01:21example, as like a shipping computer, or the finance computer, or station number
01:251 one or that type of thing, you can choose the Other option and type in the
01:29name of the machine.
01:31That way you can find out not only who is accessing your database, but what
01:34machine they're using to access the database.
01:37The other thing you can use the User Name for is that whatever name shows
01:40up here, if it's the System name or the Other name, that's going to be the
01:44name that, by default, gets put into your User Name field, when you're
01:47logging into your database.
01:48So if we use the same User Name all the time, it's not a bad idea to go into
01:52here, click Other and type in that User Name so that it saves you one field
01:56worth of entry when logging into your database.
01:59Moving on to the Layout section, I want to show you this option right here.
02:03By default, the Add newly defined fields to the current layout option is chosen.
02:08What that means is that if you're creating your database from scratch, and
02:10you're defining fields, which we'll talk about later in the title, these fields
02:14will appear on whatever layout you're on, as you create them.
02:17But later on down the road when you're getting into more of the maintenance
02:20mode on your database, and you're not creating a lot of fields, you probably
02:23want to turn this off.
02:24So my advice is to keep the default on when you first start creating your
02:28database and then later turn it off, so you don't have fields appearing on
02:31layouts that you spent a lot of time trying to finesse and make look perfect.
02:36In Memory it's safe for you to keep everything as their defaults, and Plug-Ins
02:40are something where if you buy something called a plug-in from a third-party
02:44vendor, which allows you to extend the functionality FileMaker,
02:47this is where you'll be able to turn them on or off ,or even configure them.
02:50That's information that you'll get from the plug-in manufacturers.
02:54And under Fonts, the most useful setting here is the ability to specify the default font.
02:58You can leave it here as the default Helvetica option.
03:03So just like with many other software applications, Preferences are
03:06something that you probably want to check out the first couple times you
03:08open the application, and then you can just really leave them set as you
03:11start to work with the database.
Collapse this transcript
Touring the interface
00:00Before we dive into building our database, I am going to first take a moment and
00:04give you a brief tour of the FileMaker Pro interface.
00:07In addition, I'd like to introduce you to these things that are called FileMaker modes.
00:11FileMaker has four modes, and in each of the four modes there are different
00:15interfaces that you're going to be working with.
00:17When you first open up FileMaker Pro, you're automatically put into
00:20what's called Browse mode.
00:22You can see that here underneath the View menu, and we've got Browse selected.
00:27Browse is the mode that's going to allow you to view your data and edit data,
00:32meaning that you can click into different fields, add new records, or edit
00:35existing record, or just browse them in a read-only fashion.
00:38In Browse mode, there are a couple of components of your interfaces that you're
00:41going to want to be familiar with.
00:42Most of the interface that changes from mode to mode can be found in what's
00:45called the Status toolbar, which is this gray area across the top of the screen.
00:49You'll see on the far left side of this Status toolbar, you've got a couple
00:54of tools that allow you to navigate through the multiple records inside your database.
00:58Here we've got 1 record in our database, but if we had more records, you see
01:01that we can navigate between them using this book icon:
01:04Left goes to the previous record, right goes to the next record and so on.
01:08We can even scrub through the entire set of records using the slider bar or just
01:13click into the field, and type the exact record number that we want to find by
01:16entering in the number of the record.
01:18We'll talk about this pie chart area and the difference between Found records
01:23and the amount of records in your database when we talk about working with Found
01:26sets later in the title.
01:27But also on the Status toolbar, you'll see that you've got some default buttons.
01:31When you first purchase FileMaker Pro and open up your first FileMaker database,
01:35you're going to see these buttons here onscreen.
01:37Show All is a button that will allow us to remove a Found set.
01:41Again, we'll talk more about that when we talk about Finds.
01:44But we've got the ability to create a new record by simply hitting the New
01:47Record button, or to delete an existing Record, and all these options can also
01:52be found under the Records menu.
01:55Additionally, we can enter a different mode, Find mode, which we'll look at in
01:59a second, or sort the records that we have in Browse mode by clicking on the Sort button.
02:04You'll also see that you've got the Quick Find fields, which we'll talk about
02:07more when we get to the Quick Find movie.
02:10If you don't want to have any of these things in your Status toolbar, or if you
02:13want to change the things that you have in you Status toolbar, you can go to the
02:16View menu and choose Customize Status toolbar.
02:21This pops up onscreen all the different things that you can add to the Status toolbar.
02:25Here you see all the different buttons that you currently have in your toolbar,
02:29but you also see that your toolbar has become active.
02:31So, for example, I could grab one of these buttons and drag it off to the side
02:35and release it, and if you're on Mac, you see that Mac effect of the proof
02:39effect, and on Windows, it just simply disappears.
02:42You can click on an icon, drag it from this area and drop it onto your toolbar
02:46to add more functionality.
02:48You can add as many of these as you would like, and in addition, you can choose
02:51separators, as you see here, or spaces, as you see here, to be able to space out
02:58the buttons and give it a little more aesthetic look.
03:00In addition, you can choose to show either Icons Only or Text Only to give
03:05yourself a little bit more room.
03:10So as you get more familiar with some of these features, you might want to place
03:12them in the Status area of your file.
03:14This is where you can actually customize each one of them.
03:16Keep in mind though that every user will have their own Status toolbar.
03:21So as a developer, if you set your Status toolbar in your database and then plan
03:25to distribute this database, your user is going to see the buttons that they've
03:28set up in their Status toolbar on their copy of FileMaker Pro.
03:31So you don't want to necessarily rely on having those buttons there in a
03:35distributed FileMaker database.
03:37You can also either hide or unhide the Status toolbar, if you'd like, by
03:42going down to this area.
03:43And in the very bottom left-hand corner of your screen, you'll notice this icon
03:47that, when we click on it, it will hide the Status toolbar completely.
03:51So it's optional; you don't necessarily have to have this as part of
03:54your FileMaker database.
03:55But of course your users could just click on it and reveal it in their own copy
03:59of FileMaker if they would like to.
04:00There are some things in the scripts that allow you to hide and lock that when
04:04you open up a database,
04:06if that's something that you desire to do. You'll notice that the second tier of
04:09the Status toolbar in Browse mode is what's called the Layout bar.
04:13That's this long gray area here just below the Status toolbar.
04:17On the far left, it allows you to choose from the different layouts that you've
04:20got inside your FileMaker database, or a way that your users can navigate around
04:25the database itself, and also the different Views.
04:29In Browse mode, you can view your records either as a Form View, a List View or a Table View.
04:36Here we are looking at Form View, which is customarily used to look at
04:40one record at a time.
04:41So for things like detail views or views that have more information onscreen,
04:45you might want to just have it be a Form View that your users are looking at;
04:49however, if you want to fit multiple records onscreen at a time, like in the
04:53Record List, you'll see that that's what's called a List View.
04:58This has a smaller size of a record and therefore allows us to not only view
05:01multiple records onscreen at a time, but print multiple records onscreen at a time, as well.
05:06In FileMaker Pro, if you're still used to working with data in a spreadsheet,
05:10you can click the Table View option, which will turn your FileMaker Pro layout
05:14into a spreadsheet-looking view, which allows you to sort by different column
05:19headers and move different fields around onscreen.
05:26Back into the Record Detail and in Form View, you see that we've got other
05:30options here, as well.
05:31Clicking on these two double As will show and hide what's called the Formatting Bar.
05:36So you see you've got even a third bar.
05:39Just like in other applications, a text Formatting Bar allows you to choose
05:43different fonts, sizes, and some of the different formats that you can apply, as
05:47well as some of the alignment.
05:49You can toggle between showing and hiding that by either clicking the Aa button or not.
05:55Finally, you have two buttons that allow you to switch to different modes.
05:58The next mode that we are going to look at is what's called Layout mode.
06:01You could navigate to Layout mode by going under the View menu and choosing Layout,
06:05but you can just hit this button here in your Layout toolbar called Edit layout.
06:09This takes you into a mode that looks just like your Browse mode, but this
06:13is the mode where you are going to create your layouts and make
06:15modifications to the layouts.
06:17You'll notice here in the top of the screen that your Status toolbar has changed, as well.
06:22In this case, instead of navigating from record to record throughout your
06:25database, you're navigating from layout to layout.
06:28So you see all the different layouts that are configured inside your file.
06:33You'll notice here in the Status toolbar, in Layout mode, that you've got all
06:36these different layout tools.
06:38We'll be working with those in the various layout chapters later in this title.
06:41But also in Layout mode, you see you've got some similar things like being able
06:44to navigate to the different layouts and invoking your Formatting toolbar,
06:48a lot of the same things that you saw inside the Browse mode.
06:51The next mode that I want to introduce you to, under the View menu, is Find mode.
06:57Find mode allows you to enter in different search criteria, allowing you to
07:01create something called a Found set, which are different subsets of data that
07:05have been stored inside your database.
07:07Your Found set will match whatever criteria your users are entering into these fields.
07:11We'll be working a lot with Found sets and search criteria in chapters involving Finds.
07:16So as a result of changing into Find mode, you see that our Status toolbar
07:19buttons have changed again.
07:21In this case we are navigating through something called a Request, of which you
07:24can have many inside of each Find.
07:27You see then that the buttons change from New Record to New Request, and also
07:32the ability to Perform a Find or Cancel a Find.
07:34The last mode to review is Preview mode.
07:36This view is meant solely for seeing what your layouts are going to look like
07:39when they're either printed as a hard copy or saved as a PDF.
07:43This way you can kind of line up your margins and even use this as a way to
07:47design your layouts, if they are going to be something that users are going to print.
07:50From this view, you see that you have an option to Save as Excel or Save as a PDF.
07:55But you can also print directly from Preview mode or access the Page Setup
07:59dialog, allowing you to choose different print drivers or paper settings.
08:03So now that we're familiar with what everything is called onscreen and where we can find them,
08:07it's time to start using some of these tools to create our own
08:10FileMaker database.
Collapse this transcript
2. Database Creation Essentials
Creating databases from templates
00:00Once you've become familiar with the FileMaker application and how to set it up,
00:03there are a couple of different ways that you can start creating databases - of
00:06course by scratch, which we'll do for almost the remainder of this title -
00:10but there is also a couple of different ways.
00:11The first one I am going to show you in this video is by using what's called
00:14a Starter Solution.
00:16A Starter Solution is a FileMaker database that's already been created for you.
00:19FileMaker ships with several of these different Starter Solutions for you to choose from.
00:23They are meant to be fully functional FileMaker solutions that you can create
00:27and save and modify, and then start adding data to and then sharing them with
00:30all the different users.
00:31Let me show you what I am talking about here.
00:33So if you open up FileMaker Pro and you go under the File menu, you'll notice
00:37that there is an option that's called New From Starter Solution.
00:40You can choose that option,
00:42or if when you opened up FileMaker you go to the Quick Start Screen, you can
00:46choose the Use a Starter Solution option here, and this will bring up what's
00:49called the Starter Solution viewer window.
00:52Inside the viewer window, you see lists of various different types of Starter Solutions.
00:57You see that they are grouped into different categories here:
01:00Finance, People, Activities, Collections, or just General, and you get a little
01:05icon onscreen that's supposed to represent the database.
01:07But that's not exactly what the database will look like.
01:09So, for example, if we chose Invoices and then hit the Choose button, you will
01:14then choose what you want to name the file and choose a location to save it.
01:17Then FileMaker Pro creates a database for you, as you can see on our desktop,
01:21and then opens up that database file.
01:23Each one of the Starter Solution databases has different settings and user
01:27preferences, and FileMaker takes you to a layout that they've created for you
01:31that gives you descriptions of each.
01:32Once you get familiar with how the database works, you can start adding data
01:36right away if you'd like, or you can start adding your own fields and modifying
01:41the database as you see fit.
01:42The most important idea here is that you can make any modifications that you'd
01:46like, and they'll never expire.
01:47For example, if you are using the 30- day trial version of FileMaker Pro, keep
01:51in mind that you can continue to make modifications to one of these Starter Solutions:
01:54adding data, changing fields, creating your own layouts and reports, and they
01:58won't expire when the trial version of FileMaker expires.
02:01These databases are just like any other database that you create for yourself,
02:04except it takes a lot of the work out of it for you.
02:06You'll notice, of course inside, of the Starter Solution viewer window, that you've
02:11got tons of different databases to choose from.
02:13Starter Solutions are a great way to get familiar with FileMaker without having
02:16to do any of the programming.
02:18So if you're brand-new to FileMaker, I encourage you to go take a look at a
02:20couple of these different Starter Solutions, to see maybe if there's one that
02:23fits you or if there's one that can give you some ideas on what to do with the
02:27database you create from scratch.
Collapse this transcript
Creating new databases in the spreadsheet-like format
00:00Certainly, the easiest way to create a fully functional database right out
00:03of the box is by using a Starter Solution like we've talked about in the previous movie.
00:07But if you want to create a FileMaker database that already contains data, you
00:10can convert different file types into FileMaker databases and then do your
00:15modifications and create your database from there.
00:17I am going to show you a couple of these different principles in this movie.
00:19The first concept will be creating a database from an existing file, in our
00:24case a spreadsheet.
00:25Then once we are in FileMaker Pro, we are going to use the spreadsheet-type view,
00:30or the Quick Table view to create some fields inside of our database.
00:34So first, when you open up FileMaker Pro, you'll notice under the File menu that
00:38we've got an option called Open.
00:39What you may not be aware of it is that if you select File > Open and point to
00:44a file that isn't a FileMaker database, you'll notice that we can choose from
00:49other FileMaker Pro files, a couple of different formats of Text files like
00:53Tab-Separated, Comma-Separated, Merge files and the different types of Excel
00:58Workbook ones, which we'll actually be choosing here.
01:01But also you see that you can pull in something called an XML Data Source, which
01:05means you can connect to a remote server that's going to provide data for you in
01:09XML and create a database that way, or in the same manner you can do that from
01:12what's called an ODBC Data Source.
01:14Now if you happened to be a Mac user, you'll see that you have an option here
01:16for turning a Bento Database into a FileMaker database.
01:21Here, in our case, we are going to use Excel Workbooks, and we are to choose
01:24Itinerary from our exercise files and hit Open.
01:27In the case of creating a FileMaker database out of the spreadsheet, you are
01:30going to see a First Row Option window appear.
01:33In this case, you are going to be asked whether or not you want first record
01:37inside of your spreadsheet to be represented as Field names in your FileMaker
01:41database, because if you remember columns become fields in FileMaker Pro, or if
01:46they are just going to be the first row data.
01:47So in this particular example we are going to choose Field names and hit OK.
01:51Now, we are going to choose a location to save our new file.
01:55Now, you see that not only we've created a new FileMaker database, but we've
01:58created a FileMaker database with three fields defined for us already.
02:01You see we've got an Adventure id field, Day field and then a Description.
02:05But not only has it created a new database for us, with 653 records, but it's
02:11also taken us into the database in the Table view, or the new FileMaker 11 Quick Table View.
02:16The reason it's new inside FileMaker is because there are some functionality
02:19that you can do inside of this Table view that you couldn't do in previous versions.
02:23You'll also notice that in addition to this view, we've also got another layout
02:26that you see here in our Layout dropdown that's by default called Layout #1,
02:30which shows all of our data, one record at a time, in what's called Form view.
02:35If you recall, Form View shows one record at a time; List and Table View show
02:39many records onscreen at a time.
02:40So, this allows you to navigate through record to record, focusing on just one
02:45record at a time, instead of course by going to Layout #2, which is your Quick Table View.
02:50From this layout, you are going to be able to add fields as column headers or
02:54select the field type without having to go into your Manage Database dialog.
02:58So FileMaker Pro allows you to make all the changes under the File menu, under
03:01Manage > Database, where you can see you can work with tables and fields and all
03:05sorts of other settings we'll be working on in future movies.
03:08But if we stay here inside of the FileMaker Quick Table View, you'll see that
03:12we can add new Fields.
03:14You notice this button here on the top part of your layout.
03:17If you click the button, you'll notice that it automatically creates a field for you.
03:21Here, we can just type in the name of our new field and click outside that area.
03:24Now, in addition to the three fields that we were created when we imported
03:27to the spreadsheet,
03:28we've now created a new field that's called Type.
03:30So, in this case we can enter in a new value for each one of the records that
03:33you store in your database.
03:35You'll notice, also, that if you go to File > Manage > Database that the Type
03:40field has also been added to the database for you.
03:43Hitting OK and going back into the Table View,
03:45you'll see that we can also make changes to the different fields by clicking on
03:49this arrow that appears when we hover over the Column header.
03:52If you click on the arrow, you see that we can make changes to the Field Type;
03:55for example, a field can be a Text, Number, Date, Time, Timestamp, Container or
04:00even a Calculation or Summary field.
04:02We can toggle between those different types by simply clicking on this arrow.
04:06In addition to field type, you'll also notice that there's a Field Options.
04:09When you click the Field Options, up pops the Options for Field window, which
04:14allows you to make many different changes.
04:16We'll focus on these when we get into the chapter on Fields.
04:18Keep in mind, though, that though that before you can add any fields in Quick
04:21Table View or change any of the settings, you must first have full access
04:25privileges to the files.
04:26That means you have to log in with an account that's assigned to something
04:29called the full access privilege set in order to be able to make any of
04:32these modifications.
04:33Notice though that you can also Hide different Fields or Delete Fields completely.
04:38Hiding means you are just removing it from this layout but not from the database.
04:41Delete means you are removing it from the database and from the layout at the same time.
04:46Reset Table View will change everything back to the default before you'd made
04:50changes to the width,
04:51let's say, of a Table View.
04:52Of course, you can hover over the edge of a column and click down and drag and
04:57release to allow you to resize some of these fields.
05:01If you hold down a field until it turns dark gray and drag it to a
05:04different location,
05:05you'll see that you can reorder the fields that are inside your Quick View - some
05:09things that you couldn't normally do inside of a spreadsheet, for example.
05:11So, if you are used to working with spreadsheets, or if you have a spreadsheet
05:15that you've been using all this time, you can open it up in FileMaker Pro, which
05:19will of course convert it into a FileMaker database for you.
05:22Then you can use the Quick Table View, which should be familiar to you if you're
05:25used to working with spreadsheets, which allows you to add new fields to your
05:29database and start to create your first FileMaker database from just your
05:33experience using a spreadsheet.
Collapse this transcript
Importing tables
00:00You see here what we've got is a FileMaker database that we've created by
00:04opening up a spreadsheet inside the FileMaker Pro application.
00:08What that has done for us is not only brought in 653 Records that were once rows
00:13inside of a spreadsheet, and represents them here in our database.
00:16But it's also done something that you'll see, if you go under File > Manage > Database,
00:22it's created these things called Fields, which are represented in our
00:25Spreadsheet view as a column, but it's created these fields for us in the database.
00:30But one thing we haven't talked about yet is a Table.
00:33When we created this FileMaker database from our spreadsheet, it created a
00:37default Table for us.
00:39A Table is something that we're going to be talking about in the upcoming movie.
00:42But in short, a Table is the part of the database that stores different types of data.
00:47You can have many different Tables inside of your FileMaker database.
00:50In this chapter, we're focusing on easy and quick ways to go from 0 to 60 to
00:54create your database.
00:56So here I'm going to show you, in this database we can also add additional
00:59tables to it, as well.
01:00So here already we've got an Itinerary table.
01:03Let's say that we want to add adventure information to this database,
01:07not only the adventure data, but the adventure fields and all those stored
01:11within an adventure table.
01:13The easiest way to do that is to go under the File menu, to Import Records, and
01:18choose File and navigate over to your 02_03 Exercise Files folder.
01:24Here we can choose Adventures.
01:26You see that Adventures is a text file, which is indicated by the .txt at
01:31the end of the file.
01:32Hitting the Open will bring up something called the Import Field Mapping.
01:36What we're doing here is we're actually importing in information from another
01:40source into our FileMaker Pro database.
01:43But what's interesting here, if you choose this option called New Table,
01:46after we choose New Table, we now see all of the different Source Fields listed
01:51in the middle of the Import Field Mapping window.
01:53These are the different columns of information inside of the text field Source
01:57that we're trying to import in.
01:58But since we've chosen New Table, we're not only going to import in the new
02:01records, but we're also going to import in a new Adventures table for those
02:05records to be stored.
02:06You see that we don't have field names yet, but if we choose this option,
02:09Don't import first record, you'll see that now what it's done is identified
02:13that the first record in the Import Source, in this case the Adventures text
02:18file, has names or column headers, which will then become the field names
02:22inside of our database.
02:23So later in the title, we're going to talk about importing data into FileMaker Pro.
02:28But we're using the File, and then Import Mapping window here just to create a new table.
02:34So in this case, we're going to hit the Import button.
02:36You see we've got some information that we've got records added and no errors.
02:40We see we've got a new Layout automatically added to our database.
02:43This one is called Adventures.
02:44You see that in addition to the first two that were created when we first
02:47created the database from a spreadsheet.
02:49Not only do we have the New Table created in FileMaker and a new Layout created,
02:54but we've got 10 Records.
02:56We've got 10 Records and all these various fields.
02:58You'll see that if you go into the File > Manage and Database option, you'll
03:02notice that under the Tables tab, we now have two tables:
03:05the original Itinerary table, and now we have Adventures.
03:08You'll see under the Fields, we've got all the fields defined from within Adventures.
03:13So without knowing anything about how to create Tables or how to define Fields
03:18or add records to a database, we've been able to create a database from a
03:21spreadsheet, and then add new tables to that from different sources.
03:24So we've, in this case, taken a spreadsheet and a text document from separate
03:28sources, and combined them together into one FileMaker Pro database.
03:32Adding Tables from various different data sources is a fast and easy way to get
03:36these Tables, Fields and Data into your new FileMaker database.
Collapse this transcript
3. Creating Tables
Determining which tables you will need
00:00There are a couple of different methods that you could use to create a
00:02FileMaker Pro Database,
00:04first of which would be to use one of the templates or starter solutions that we
00:08discussed in the previous movie, that are prebuilt for you.
00:10In that way, you can just go ahead and make some modifications, add some data,
00:14and you're ready to roll.
00:15But another option, which is actually a lot more popular, is to create a
00:18database from scratch, or to build all of the components from the ground up.
00:23In order to build the database from scratch, you need to first make some
00:26decisions about what type of information, or data, is going to be stored
00:29within these databases.
00:30So the first thing that you're going to have to determine is what types of
00:34tables you're going to have in your database.
00:36So let's back up for a second. What's a Table?
00:39A Table is a container within your database that stores data.
00:42If you remember, a database is like a big bucket of information that can
00:46store all sorts of data.
00:48That's one of its key role is to store the data.
00:51But you can have different types of data within one database.
00:55So in that case, if you have multiple different types of data, each one of them
00:59needs to have its own little mini bucket within the database.
01:02These smaller storage areas are called Tables.
01:05A database can have multiple tables, each representing a different Entity.
01:10Now an Entity, it's kind of a database term.
01:13It's useful here when we we're discussing Tables.
01:15An Entity describes a single person, place, or thing, or basically anything for
01:20which we can store data, anything that we can describe, and anything that we
01:25can store data for.
01:26So, for example, people or customers would be an Entity.
01:30That's certainly something that we could store inside of a database.
01:33Now it's important that we remember that a database can consist of one or more tables.
01:38The database that we're going to be creating in this title, we're going to have
01:41many different tables.
01:43So a database can have many different tables, and a table can have
01:47many different records.
01:48A table can consist of records.
01:50Each record is made up of a number of fields.
01:52But focusing just on the tables, they are going to represent the groups of
01:56information that we're going to store within the database system.
01:58For example, let's say you're going to create a database that tracks the
02:01enrollment of students in classes.
02:04You can then create separate tables that contain details about teachers, and
02:08classes, or even classrooms.
02:10They're all different types of data, but they're unique and discrete from each other.
02:14So they would deserve their own little mini storage area, or table within the database.
02:19When you have multiple tables in the database, those tables were going to have
02:22relations to each other.
02:23We'll talk about those in an upcoming chapter, but in that case, this is what we
02:27call a relational database.
02:29But a FileMaker Pro database, like any other database, is presented to the
02:33database developer as a collection of these tables that we've been discussing.
02:37But how do we determine which tables we're going to need?
02:40A very important note here is that when you sit down at a computer and you open
02:44up FileMaker Pro to start a new database, what you're actually doing there is
02:48constructing something.
02:49Much like any other construction project that you embark on, like let's say a
02:52home construction project,
02:54your database will proceed more smoothly if you first begin with some type of a plan.
02:59The very first part of any plan, when you're developing a database, is to
03:03determine what types of information you're going to be storing inside of that database.
03:07So the first thing that you really want to do, even before you open up
03:10FileMaker Pro, is to come up with a plan and what type of data you're going to
03:14be managing your system,
03:15and therefore, what tables you're going to need.
03:17So, for example, if it's a very complex system, then it's going to have a lot
03:20more parameters to it.
03:21You're going to have a very complex plan.
03:24But even if it's a very simple project, you still want to take a couple
03:27of minutes ahead of time, and determine what kind of data you're going to be storing.
03:30A lot of people think that they don't have a very complex solution that they're
03:34trying to build in a database, and they can skip the planning stage, but it's
03:37just as important as as it would be with something very complex.
03:40So, first take a few minutes and look at the data.
03:42Literally sketch out what type of information you plan to manage in your database.
03:46For example, for this movie, and for the entire rest of the title, we're going to
03:49have a basic database system where we need Customers, Invoices, and Products.
03:53It's really a standard invoicing system, where Customers are ordering Products
03:57and creating invoice forms as a result.
03:59So in example like this one, we can see that we've got different types of data.
04:03So I've mentioned a couple of them already.
04:05First of all, as we're sitting down and sketching this,
04:07we realize that we're going to have to have customers stored inside of this database,
04:10so we jot that down.
04:12We know that we're going to have Orders, or Invoices we'll call them in this case,
04:15so we jot down Invoices.
04:17And then finally we notice that we're going to have to have Products, because
04:19the Customers have got to be ordering something,
04:21so it seems to us that we can jot down Products as well in our list.
04:25So in an example like this one, we can see what types of data we're going to be storing.
04:29It's important for us to pick discrete and unique buckets of information,
04:32because after all, that's ultimately going to tell us what tables we need to
04:36define in our system.
04:37So here we see we've determined that we're going to have different groups of
04:40information in our one database: Customers, Invoices and Products.
04:45What we've really done is created a list that tells us what tables we need to
04:48store inside of our database.
04:51Later, we'll look at how these tables are going to relate to each other,
04:53but for now, we're going to use this table list we created to start working
04:56with our new database.
04:58So by doing this exercise, we've determine that we need a Customer table, and we
05:01need an Invoice table and a Products table, because these are the discrete
05:06buckets of data that make up the database that we're trying to build.
Collapse this transcript
Creating tables in the Managing Tables window
00:00In the previous movie, we determined that we needed a Customer table and
00:04an Invoice table and a Product table in order to be able to create our
00:07new FileMaker database.
00:09In this movie, we're going to talk about how to physically add those tables to your database.
00:13Adding a table is going to be the very first step in creating a FileMaker Pro
00:17database, so this is really going to be the first step in us creating the
00:22database that we're going to be using for the rest of the title.
00:24Creating a FileMaker database from scratch will always start in one location,
00:28and that is under the File menu, where you'll see File > New Database.
00:34When you choose New Database, you'll be asked what you want to name the file and
00:37where you want to name it.
00:39You'll see that all FileMaker databases end with .fp7.
00:42That's a file format suffix for FileMaker Pro, and in this case, we'll just call
00:47it Untitled, and we're going to choose to save it to our Desktop.
00:51Once we've made those decisions, we can hit Save.
00:54And now you'll notice that its created a FileMaker Pro file for us, and its
00:58taken us to the Quick Table View layout that we discussed in previous movies.
01:01So you'll see here, we've got a layout already created for us, and if we go
01:06back under the File menu and choose Manage and Database, you'll see that we've got three tabs.
01:13We're going to focus on the tab for Tables.
01:15And here you'll see that it has already created one table for us.
01:18And what you'll notice here is that it has taken the name of the file, so
01:23whatever name that you choose when you're naming the file becomes the name
01:26of your first table.
01:27Traditionally, the name of your file won't necessarily be the name of any of the
01:31tables inside of it, but FileMaker Pro takes that name because it does have to
01:34name your title something.
01:36So really the first thing that you're going to want to do is change the
01:38default table to a name that represents one of the tables that you want to
01:42define in your file.
01:43So let's pick Customers.
01:44And you'll see what we do is we just type the word "Customers" in the table name,
01:49and while we have the table chosen, we're going to hit the Change button, which
01:54is now going to change the table from Untitled to Customers.
01:58So now we've got one of our three tables already defined inside of our database.
02:03And if we want to create a new one from scratch, we just simply type into the field.
02:08In this case, we want to add our second table, which is Invoice.
02:11But this time we're going to hit the Create button, so that it simply creates
02:14the table for us, as we see in the Table list above.
02:18For the third table, we're actually going to bring in a table that exists in
02:21another database we've been working on.
02:23So let's say in this case that we had a Products table that was in FileMaker,
02:27but we wanted to integrate it into our new invoicing solution database, so
02:31instead of creating the new table from scratch, we're going to import one into the system.
02:35So first we'll hit OK.
02:36Then we go File > Import and choose the File option.
02:47Now, our Source database has several different tables in it.
02:49We're going to choose the one that's called Products.
02:51You can see all of the different product fields here, and we're going to choose
02:56the New Table option, which of course is going to create a new table and define
03:01all these fields for us.
03:02So simply hit Import, and now we see we've got records and fields chosen, but
03:08most importantly, when we go back into Manage and Database and look under the
03:11Fields list, now we have all three tables that we've determined in the previous
03:15movie were required for our database. You see all three of those tables now
03:19defined within our new FileMaker Pro database.
03:22And here I just wanted to demonstrate that we've got some information about our tables.
03:27We've got Customer, the name, and then some details on how many fields and records.
03:31We don't have any fields defined in these first two, but we'll see that by
03:34importing in a table from another source, we're able to bring in, not only the
03:38fields, but also records from that other source.
03:42Once we've created the tables, we can then move on to create the fields, but
03:45also when we have multiple tables, we can evaluate what types of relationships
03:48they might have between them.
03:50So now that we've got our database created, or the shell of the database created,
03:54we can start adding things like relationships and the different things that
03:57we'll cover in the upcoming movies.
Collapse this transcript
4. Creating Relationships
Understanding relationship types
00:00A quick note before we get started, since the topics that we're going to be
00:03talking about in this chapter are going to be relationships, specifically
00:06relationships between tables:
00:09You're going to need to have multiple tables in your solution.
00:12In the example solution that we're creating, we do have multiple tables, and
00:15that's what we'll be using throughout the rest of this title.
00:17But also if you've determined in your own real-world database that you only
00:21have one table, well then you're not going to be able to have new
00:24relationships between tables.
00:25So feel free to go ahead and forward on to the discussion on fields so you can
00:29talk about assigning attributes to your table.
00:32But at some point you will want to come back to relationships, because this
00:34really is a core concept behind, not only FileMaker databases, but databases in general.
00:40With that said, in the previous chapters I have mentioned things like
00:43relationships before.
00:45And when I'm talking about relationships, I'm specifically talking about how
00:48different tables are related to each other, and how the relationships between
00:52those tables really define the data that's stored inside the tables.
00:56So the process of determining the relationships between tables in a database is
01:00known as data modeling, and the goal of data modeling is to translate a
01:04real-world problem into a structure that can then be captured in some kind of
01:08database, and in our case, a FileMaker relational database system.
01:12A relational database system can be thought of as a collection of discrete
01:15data groups or tables, which have some connections between them, and these
01:19connections will be referred to more commonly when we use the terms relationships.
01:24So in order to decide on the data model for your database system, it's important
01:27to first determine what are the possible kinds of connections that we could have
01:32between our databases, and then we can choose from those types of connections, or
01:36relationships, to determine which ones we actually have.
01:39So in this movie we're going to quickly review the different types of
01:42relationships and give an explanation of each.
01:45To keep things simple, we're only your focus on two types of relationships that
01:49account for most of the situations that you are going to encounter in your
01:51database, but there are three, technically.
01:54The first one that we're really going to skip over is called a
01:57one-to-one relationship.
01:59It's very rare, and it usually means that you've created a table for something
02:02that should actually be field.
02:03A lot of times you'll see one-to-ones when you have, let's say you thought
02:06you needed a table for phone numbers, but then you also have the table for customers.
02:10If a customer only has one phone number, then you don't need to have two
02:13tables. What you've got there is you should just have an attribute or a field
02:17defined inside customers.
02:18So if you go through this process and find out you've got one-to-one, you should
02:22really take a look at it, and what you actually might have is just a field;
02:25they should be combined together into the same table.
02:28But the two relationships that you will want to be familiar with are the one
02:32that's called a one-to-many relationship, which could also be interpreted as
02:36a many-to-one, more commonly called one-to- many, and then also a many-to-many relationship.
02:41And when you're done data modeling, the way that you'll know you're done is
02:45because you've evaluated all of the possible relationships between your tables,
02:48and you've determined that all you have left are one-to-many relationships.
02:52So that's the first notable learning point here is that you must resolve all
02:56your relationships to one-to-many relationships.
02:59And we'll talk about how identifying many- to-many relationships will factor in there.
03:03So another other way to interpret these types of relationships is if we look at the tables.
03:07Tables have records in them.
03:08So in the case of a one-to-one, like we mentioned before, that means that any one
03:12record in table A, for example, could only have one other related record in
03:18table B. So one customer can only have one phone number.
03:22If it's true that a customer can have multiple phone numbers, then we don't have
03:25a one-to-one anymore.
03:26We actually have a one-to-many.
03:28So in the case of a one-to-many relationship between two tables, again, we look
03:32at the records, and that means that one record could have one or many related
03:36records in another table.
03:37So if we look at that again, in our case we've got a Customers table, and we've
03:42also got an Invoices table.
03:44So we've determined that any one customer could have one or many different
03:49invoices in the invoice table, or be zero for that matter, but ultimately
03:53they could have many.
03:55So if we go to our customer table and we have a record in there that's customer
03:58XYZ, and we know that the customer XYZ has ordered five different times each
04:02reflected by an invoice, represented by a record in the invoice table, that
04:07means that we've got a one-to-many relationship between the Customer and Invoices table.
04:11Now in the case of many-to-many, that's just simply means that we've got a
04:14one-to-many going in one direction, and a one-to-many going in the
04:17opposite direction.
04:18In the case of the many-to-many that just tells us we've got two one-to-many
04:20relationships kind of butting heads with each other.
04:22But before we get further in to that, the most important type of relationship is
04:27known as a one-to-many relationship.
04:29As I mentioned earlier, this is going to be the only relationship you want left
04:32when you're done with your data modeling process.
04:34Now I'm going to use some terminology throughout this title that I want to make
04:37you familiar with now.
04:38And it's common to refer to the table that access the one in a one-to-many,
04:44so let's say we have, the one in this case is the customer,
04:46so that's commonly referred to as the parent in the relationship, and in this
04:51case invoices is on the many side;
04:53that's referred to as the child.
04:56So we've got customers are related to invoices in a one-to-many fashion, and
05:00customers are the parent and invoices are the child.
05:03I'm going to use that terminology a lot.
05:04Whenever I talk about child table or child record, I'm talking about the many side.
05:09Whenever I talk about parent table or parent record, I'm talking about the one side.
05:11So we should know in our system one customer can have many invoices;
05:16therefore, the parent is the customer.
05:18Remember, your goal is to resolve all relationships in your system to a
05:23one-to-many relationship.
05:25We're going to go through several examples of that.
05:27However, there is this other type of relationship, which is called a
05:30many-to-many relationship.
05:33Ultimately, a many-to-many relationship could be something like a product in an invoice.
05:38So, for example, in our solution we've got customers and invoices.
05:42We know the relationship between those two.
05:43One customer can have many invoices.
05:45But what about the relations between a product and an invoice?
05:48One product could appear on many invoices,
05:51so it looks like we've got a one-to-many,
05:53but one invoice can also have many products.
05:55So we've got a many-to-many, in that case.
05:57And generally we're going to need to do some extra work in order to resolve these.
06:01Many-to-many relationships are common and powerful type of database
06:05relationship, but unlike one-to-many relationships, which can be constructed
06:08simply by adding appropriate key attributes to related tables, a many-to-many
06:13relationship is going to require a lot of extra work in our data model, and
06:16the reason we will eliminate these many-to-manys, as we'll talk about in
06:19upcoming movies, is because it makes it impossible for us to store our data
06:24properly, to enter our data properly or to even create reports based on the
06:28proper amount of data.
06:30Data modeling in FileMaker, or any other database platform, allows you to
06:34determine the relationships between your tables, and you'll eventually set
06:37those tables up inside the database file, and you're also eventually going to
06:40set up the relationships.
06:41But first you need to know what their relationships are.
06:43So as we've talked about in this video, you can have a one-to-one relationship,
06:47or more commonly you'll have one-to- many relationships or many-to-many
06:50relationships, and once you understand those relationship types you can then go
06:54ahead and diagram the relationships.
Collapse this transcript
Diagramming relationships (with ER diagrams)
00:00So far in this chapter we've learned about basic relationship types.
00:04We've reviewed those as the one-to-many and many-to-many being the most common
00:08and then sort of an obscure kind of rare one called one-to-one.
00:12In this movi,e we're going to expand on those concepts, and we're going to learn
00:15a general method for diagramming database systems.
00:18This method we're going to learn is called Creating an Entity
00:21Relationship Diagram, and I know that sounds like a lot of Computer
00:24Science and kind of a mouthful,
00:26but it's a common term if you're in database circles, or if you're going to be
00:29working with FileMaker Pro it's going to be something that you're going to
00:31run into quite a bit.
00:33The good news is it's often referred to just simply as an ERD.
00:37So an entity relationship diagram, entities of course being tables. If you
00:41really break this down, it's a diagram that just shows what the relationships are
00:45between your tables.
00:47It's a simple process, and generally most useful for relational database systems.
00:50Of course, FileMaker's relational databases system, but any other database
00:54system requires data modeling and entity relationship diagrams as well.
00:59So the ERD modeling really breaks down into three phases.
01:03First you're going to develop your list of tables, which we've done, because we
01:06want to evaluate what types of information we're going to be storing in our
01:09database and how they break up into individual groups.
01:12So we've already determined what our list is.
01:15Then you determine in diagram the relationships between those tables, which
01:20we're going to do here.
01:21And then you do sort of a rinse and repeat process by reviewing your diagram and
01:26you repeat steps in one only if you encounter either a many-to-many or a
01:29one-to-one relationship.
01:31And ultimately your goal is to resolve all of your relationships to one-to-many.
01:35Now in this process, I advice you to use a piece of paper and a pencil, because
01:40whatever your first diagram is is almost never what the last diagram is, and
01:44it's an important part of the process to kind of go through this a couple of
01:46times before you've got your final set of relationships.
01:49In the database that we're going to be creating in this title, we've got a
01:53pretty standard invoicing solution.
01:55So if we start at step number one, and we determine what our list of tables
01:59might be, you'll remember that in the database that we're going to be
02:02creating in this title,
02:04we've determined that we've got three different tables already.
02:06We've got one table that's going to store customers, one that's going to store
02:09invoices and one that's going to store products.
02:11Those are all three discretely different types of data, so we know that they all
02:15need their own table.
02:17So in the example, like the one we've got here, we can see what types of data
02:20we're going to be storing, pretty simple stuff.
02:22And what's important is that we've picked these unique and discrete bucks of data.
02:27So after we've determined what tables we need, so now that we've got our list,
02:31we want to move on to determine how these things are related to each other, and
02:35when you're doing this, it's another good idea to sketch this out on a piece of
02:38paper with a pencil, for example. And really what you're going to do is ask
02:41yourself a series of questions.
02:42For example, consider the case of a system that tracks both customers and
02:47invoices, and asking some questions about the business rules that govern the
02:51customers and invoices within your organizations, or within the users that you
02:55have, you might find out the following:
02:57For example, consider the case of a system that tracks both customers and
03:01invoices, and asking some questions about the business rules governing customers
03:05and invoices at this particular organization, you find out the following:
03:10Each customer may potentially have many invoices in the system, and each invoice
03:14is associated with one, and only one customer.
03:17So data modelers like yourself would call the relationship between customers
03:21and invoices a one-to-many relationship, meaning one customer can have many invoices.
03:27So if you ask in reverse about the relationship between invoices and customers,
03:33the answer could also be reversed, and you could call it many-to-one, meaning
03:36there could be many invoices to just one customer.
03:39So the questions that we're talking about here are, can one customer have many invoices?
03:44So if the answer is yes, then you want to create a relationship between those two tables.
03:49Or if we determine by asking this question that there is no relationship between
03:53these tables, then we don't have to do anything here.
03:55We just note that accordingly.
03:57But in this example, we have in fact determined that one customer could have many invoices.
04:01We still have to evaluate the relationship between invoices and products.
04:07So let's ask the same questions.
04:10Does a product have a relationship with invoices,
04:12so, for example, can one product appear in many invoices? Yes.
04:16So we've got a one-to-many go in from products to invoices.
04:19It appears that way.
04:21But can an invoice have more than one product appearing on it?
04:24Well, that answer is yes as well.
04:25So what we've got is a many-to-many relationship, and the key to resolving a
04:31many-to-many - because if you recall, we can't have many-to-many relationships.
04:34There were various different reasons.
04:36There were things that we can't do as far as storing the data properly.
04:39There are ways that that we can't find data properly.
04:41We can't report on it properly.
04:43And this is a good place to catch it, rather than after you spent hours and hours
04:47and hours developing a many-to-many relationship into your system, only to find
04:52out later that you can't do a bunch of things.
04:53Now is the great place to do it, because you're just doing it on a piece of
04:56paper with pencil marks at this point.
04:58So the key to resolving that many-to- many, when you find one, is to think of it as
05:02two one-to-many relationships, and then you're going to add an additional table
05:07between these two tables that you're trying to relate.
05:11So, for example, so the key to resolving many-to-many relationships is to think
05:16of it as two one-to-many relationships, and then what you're going to do is add
05:20another table to be the child or the many part in these relationships.
05:26So of course, here we've got invoices and products directly related to each other.
05:30Well, it's many-to-many, so how about if we add a third table? And let's call
05:34this invoice line items.
05:37Now we get rid of the relationship between invoices and products, and we can
05:41say, can one invoice have many different line items on it?
05:44Well sure, that can be the case.
05:47And can a product be represented by many different invoice line items?
05:50Yes, that's the case as well.
05:52So now we don't have to worry about a direct relationship between invoices and
05:54products, because now we've got two one- to-many relationships, one coming off of
05:59invoices - invoices being the parent, line items being the child - and another one
06:03coming off of products - product being the parent and line items being the child.
06:07So why do we need a third table?
06:09Well, if I needed to just create a report of all the products ordered during a
06:12certain time period, like let's say the first quarter of any given year, which
06:16table would I search in?
06:18Would I search in products?
06:20I wouldn't actually, because there's only one record per product.
06:24It doesn't give me all the various products that were ordered.
06:27So would I search in invoices?
06:28Well no, I've only got one record per invoice, and it tells me very different
06:31items that appeared on that, but I can't necessarily isolate individual products
06:35on any given invoice.
06:37So what about if one product can be ordered at many different times?
06:40Where do we store that many different times?
06:42Do I create a field inside products for that?
06:45Do I create a field inside invoices?
06:46No, we don't do that.
06:48You can only store one piece of information in any given field in a database.
06:52So this would require many different pieces of data in one field if didn't
06:55have a third table.
06:56So what we do here is we create a third table
06:59that can be the child to both products and invoices, and then we can have the
07:03many-to-many relationship between them, like we've discussed.
07:05So you see here in this sketch that I have this all cleaned up.
07:09We know that we need a fourth database in our entire database system.
07:12We've got customers, invoices, products, and now invoice line items.
07:17And also you see this is how we've drawn them all up inside the database.
07:22So now we know that we need a fourth table in our database and we call this
07:24table anything we like, really.
07:26So let's call this one Invoice line item as we see here, and let's add it to our database.
07:35So back in our database, if we go to File > Manage > Database, we see that we've
07:39got three of the tables defined already.
07:42So let's go ahead and add the fourth one that we've determined we've needed
07:45through the data modeling process, and then just hit create.
07:51So now we've got all four tables defined inside of our database.
07:57If you've got a really tiny project, it might not seem likely you need to sketch
08:01things out ahead of time, but I cannot emphasize enough how important it is to
08:04make these decisions on tables and relationships before you start working.
08:09Because the pitfall here could have been that we defined a bunch of fields and
08:12layouts and did a whole bunch of stuff before we even figured out we needed an
08:15invoice line item table, and now what's our overhead?
08:17We don't have to undo anything.
08:18We just simply add a table to the database.
08:21So after a little bit of what's called data modeling, we've determined what
08:24tables we need to build in FileMaker, and we've determined which tables have
08:28relationships with each other and what types of relationships they have.
08:32So now we can move out of what we call the architecture stage and into FileMaker
08:36to define these table relationships accordingly.
08:39In the upcoming movies in this chapter, we're going to use the Relationship
08:42graph in FileMaker to establish and then maintain the table relationships in
08:47our FileMaker solution.
Collapse this transcript
Determining which key fields you need
00:00Once you've completed your data modeling exercise, you will have determined what
00:03tables you are going to need in your FileMaker database, as well as what
00:06relationships you are going to need between these tables.
00:10Since we've already gone into our FileMaker database, and we've defined the
00:13tables that we need - we've talked about four tables that we need to define -
00:16we need to now create relationships between them.
00:19Now what we need in order to create relationships is something that could hook
00:23these two tables together.
00:25So each table has got to have a little hook in there that allows it to connect
00:29itself to another table that it's related to.
00:32In relational databases, you're going to connect two related tables together
00:36using special fields that are called Keys.
00:38A key field is just like any other field you are defining in your database, but
00:42key fields come in two different types:
00:44There is a Primary Key and a Foreign Key;
00:47two more pieces of vocabulary for you to wrap your head around.
00:51The Primary Key is a field that gets defined in the Parent.
00:54Remember that there is always a Parent in a relationship and always a Child.
00:58Because it's going to be one to many, the Parent is the one; the Child is the many.
01:03So in our case, we need to define a Primary Key field in every Parent table and
01:07define a Foreign Key field in every Child.
01:09Now let's talk about what these mean a little bit more before we go ahead and define these.
01:14First, a Primary Key field:
01:17A Primary Key field is defined in each Parent table, and its main role is to
01:21ensure the uniqueness of each record in this table.
01:25So they must contain a unique serialized value inside of every record.
01:29So these records must never be duplicated within a single table, and each Parent
01:33must have one Primary Key defined.
01:37The plain English version of this is just it's a simple way for you to
01:40uniquely identify every record in your database, and that way there will be no
01:43confusion. Here is record number one versus record number two, and since there will only
01:48ever be one record number one,
01:50you can never confuse it with any other records in your database.
01:53The next type of key field is called a Foreign Key field.
01:58This is going to be used to link a related Child record, or a record in a Child
02:02table, back to its Parent record in the Parent table.
02:06So in the case, for example, of having a customer having multiple invoices, we
02:11can have a Primary Key field that's defined,
02:13that's called the Customer ID. And every customer is given their own ID, but then
02:18in every invoice that's related to that customer,
02:20we need to put the Customer ID into a field that's called a Foreign Key field.
02:25This is how we will actually link, or know those two are related to each other.
02:29I'd like to use the example of the last name. How do you know that you are the
02:34child of your parent? Because you share one thing in common, or something that
02:37links you two together.
02:38So on paper if you see two people's names, you can make an estimate as to
02:42whether or not they might be related if they have something in common.
02:46In that case we would be they have the same last name, and in a database that
02:49thing that you have in common is the same value showing up in a Primary Key
02:53field in a Foreign Key field on each side of a relationship.
02:57Now each Child table is going to have a Foreign Key field defined in it;
03:01however, these values do not need to be unique, because since any one customer
03:06could have let's say five different invoices in the Invoice table, that means
03:10that there's going to be five invoice records that all have the same Customer ID
03:13in the Foreign Key field.
03:14So they won't be unique.
03:15And each type of key field is just a field that gets defined in every table.
03:20So let's take a look at the tables that we've got and determine what types
03:24of keys we would need.
03:25So if you use the simple fact that every Child table needs to have a Foreign Key
03:31field, which one of these tables is going to be a Child table?
03:35Well, let's look at our relationships.
03:39You'll see that the lines that we are using have a single hash on the Parent
03:41side or on the one side and a double hash on the many side.
03:45So if we look at Customers and Invoices, we see there is a relationship between them.
03:49Which one of them is the Parent? It's the Customer.
03:52So we know that a Parent needs to have a Primary Key field, so we're going to
03:56have a Primary Key field defined inside of Parent, and then Invoices are acting
04:03as the Child in the Customer relationship, so that's going to get a Foreign Key
04:08because every Child gets a Foreign Key.
04:11But also their table acts as a Parent in the relationship between Invoices
04:15and Invoice line items.
04:16So in that case, Invoices plays two roles:
04:18Child in the Customer relationship, but Parent in the Invoice line
04:22items relationship.
04:23Now Products only plays one role.
04:26It's a Parent in the Parent Invoice line item relationship;
04:29therefore, it serves as a Parent.
04:31It's going to get a Primary Key.
04:33The Invoice line items table that we created to resolve the many-to-many
04:37relationship plays Child in both the Products and Invoices relationship, which
04:41is common in those tables that you create to resolve a many-to-many.
04:46So in that case, this means that the customer is going to have a Primary Key,
04:50Invoice will have a Foreign Key and a Primary Key,
04:54Products are going to have a Primary Key and Invoice line items will have two
04:57Foreign Keys, because we remember each Parent gets a Primary; each Child gets a Foreign Key.
05:02Determining which keys you need in your database tables is an important part of
05:06setting up relationships with a new database.
05:08Once you've determined which tables perform which roles, that'll help you to
05:12determine which tables need to have a Primary Key defined and which need to have
05:16a Foreign Key defined.
Collapse this transcript
Defining primary and foreign keys
00:00Once we've gone through the process of determining which key fields we're going
00:04to need in our database in order to create our relationships, the next step is
00:08going to be to go in and define those fields inside of the FileMaker databases.
00:12So if we open up our Exercise File/04_ 04, we see that under File and Manage >
00:19Database, we've got our four different tables created.
00:23So let's start first with defining all the primary keys in the tables that are
00:27going to act as Parents, and if we look back at our list, we determine that
00:32the tables that are going to have primary keys are going to be Customers,
00:36Invoices, and Products.
00:38So let's start with Customers.
00:40First, in your Manage Database window, you'll notice that under the Tables tab,
00:44if you select a Table and double-click on it, it's going to navigate you over to
00:48the Fields tab. And normally there will be a list of all the fields, but since
00:52we haven't defined any yet, we see that we've got a blank list.
00:56Our cursor is down in the Field Name, and like we would define any field inside
01:00of a FileMaker database, we are going to first start and define our Primary Key field.
01:04What we need to do is decide on a name that we're going to give our field, and
01:09for key fields it's usually a good idea to follow some kind of naming
01:12convention so that later you can easily go into your field list and quickly find a key field.
01:19And there are various different types of naming conventions to use, and none of
01:22them are right or wrong. The convention that I like to use though is to add a
01:26prefix to the name of the field that indicates whether it's a key and what type of key it is.
01:32So in the case of primary keys ,I'd like to use pk, but I also like to have my
01:37key fields appear at the top of my field list.
01:39When we have a bunch of different fields here, they are going to be organized
01:43sometimes alphabetically, sometimes by creation order, as you see here, but
01:47traditionally when organized alphabetically, I want my key fields to show up on top.
01:52So one way I can do that is to add underscores;
01:56here is a single underscore that I can add to the prefix of my Field Name, which
02:00will always make it show up on top and in alpha sort. But since it's a Primary
02:04Key, I wanted to show up even above any other type of key, like a Foreign Key, so
02:08I am going to give it two underscores.
02:10So basically here the naming convention in file name for a Primary Key is __pk,
02:15and pk stands for Primary Key.
02:17Finally, I'd like to end the key field with the name of the table, with the word ID after it.
02:23So in this case CustomerID, and we'll keep it as text, and I'll hit Create.
02:30In the Comment field, I am going to say primary key, and I am going to hit Change
02:35and we see that that gets stored with the field.
02:37Comments don't have any change on functionality whatsoever.
02:40It doesn't make it a Primary Key.
02:41That's just a note to me as I'm flipping through fields in the future to help me
02:45identify which one of these serves as the Primary Key.
02:48We can leave this field as text, even though it's going to count up numbers for
02:51us, so it really won't matter either way, but one important thing that we are
02:55going to want to do is make sure that this field is unique and also make sure
02:59that it gets an unique number every time a new record is created, because
03:02remember the requirement for a Primary Key is that they are to be unique and not
03:07empty, and ideally, they shouldn't be modifiable.
03:11So in order to do that, we are going to hit the Options button to set these
03:14different properties inside of our Primary Key field.
03:17We'll talk about these options later in the Fields chapter, but specifically
03:20for the use of a Primary Key, we're going to go under the Auto-Enter tab and hit Serial number.
03:26And in general what's happening here is on the creation of a new record, a
03:30value will be placed inside of the FileMaker field, and the FileMaker
03:34application will ensure that it never gives the same number to more than one
03:38record inside any given table,
03:40therefore verifying the uniqueness of this field.
03:44So we are going to choose Serial number, and we are going to leave next
03:48value and increment by 1.
03:50So now when we create the first record in our Customer table, it will
03:53automatically put a 1 in there, and the second record a 2, third record, 3 and so on.
03:58Thus this will ensure that these records are not empty and that they have a
04:03unique value, all in one setting.
04:05Now we also don't want any users changing these because then a user could go in
04:08and change it to a value and thus either delete the value, which would make it
04:12empty, or enter in a duplicate value, which would of course make it non-unique.
04:15So we are going to click this button down on the bottom here called Prohibit
04:18modification of value during data entry.
04:20Now our Primary Key value cannot be changed by a user, and it'll be unique and not empty.
04:26So let's hit OK, and now we see all this information show up inside of
04:30our Primary Key field:
04:32Invoices and Products.
04:39So we can switch to different tables through this dropdown and go to Invoice,
04:42and let's just file the same convention. We'll do this one a little bit quicker.
04:49So we see __pkID, call it primary key for invoices, hit Create, hit Options,
04:59Serial number, Prohibit.
05:01Now I did those steps a little bit quickly because we reviewed them in detail prior.
05:06We'll hit OK.
05:07So now we have two out of our three primary keys.
05:10But if you look in your products, since we imported this in already, you'll see
05:15that we already have an _ pkProductID with these values already set.
05:20So really now we're done defining the primary keys inside of our database.
05:25So since every relationship needs to have a Primary Key on the Parent side, and
05:29then it has to have a Foreign Key on the Child's side, that means that we have to
05:32define some foreign keys in to our tables here as well.
05:35So on our List we see that there are only two tables that are acting as a Child
05:39in the relationship:
05:40Invoice and Invoice line item.
05:43So we see that Invoice needs one Foreign Key, and Invoice line items needs two.
05:48So back in our Database, we'll go to Invoice, and we're going to define a
05:55Foreign Key, this time underscore, and we're going to use fk, but which one do we need?
06:00Well, if we look back at our relationship, Invoice acts as the Child in the
06:07Customer and Invoice relationship.
06:09So that means it needs to have a Foreign Key that matches the Customer.
06:13So what we do to make this easier for us to follow is we will use the customer
06:18name inside the definition of the Foreign Key.
06:21So we are going to call it fkCustomerID.
06:26We'll just leave that as text as well and hit Create.
06:29As you'll see now because we used a single and double underscore, if we sort by
06:32the Field Name, we see that our Primary Key shows up on top and then our
06:36Foreign Key on the bottom.
06:37We don't have to have set any settings because if you remember the rule for
06:40a Foreign Key is it doesn't have to be unique, and it can contain duplicate values.
06:44So we don't have any field options here, but we can enter fk for Customer.
06:51And again, comments don't affect any of the functionality.
06:55It's just there for us to be able to see if we click on Options or Comments, we
06:58can see what the role of these different fields are.
07:01Now we go into Invoice line items, and we know that we need two different
07:06foreign keys. Invoice line item acts as a Child in the Invoices to Invoice line
07:10item relationship and the Products to Invoice line item.
07:13So if we need two different keys and we need to name them after the Parent,
07:17that means that we need a Invoice ID Foreign Key and a Product ID Foreign Key.
07:22So let's define those.
07:26Create a new one.
07:27We'll say fk for Product Invoice ID.
07:43Now we have all our key fields set up, and we can hit the OK button to close the window.
07:48Now our next step is to create links between these tables now that we have the
07:52hooks, otherwise known as keys, already in place inside of our tables.
Collapse this transcript
Creating relationships using the relationships graph and table occurrences
00:01At this point in the process of creating our FileMaker database, we have already
00:05gone through the data modeling exercise to determine the tables, and we've
00:08determined what the relationships are going to be. And if you go under the File
00:12> Manage > Database option, it will show us here that we've got all of those
00:16tables already defined inside of our database.
00:19And by clicking on one of the tables, you see that we've gone through each one
00:23and determined which Primary and Foreign Keys we will require and defined those
00:28appropriately within the table.
00:29Now if you look at the last tab on the Manage Database window, called
00:33Relationships, you will get your first glimpse that what's called the
00:37Relationship graph, and inside the Relationship graph this is where we can
00:41establish relationships between tables and also manage those in the future.
00:46You'll see that we have four different blocks or squares in the
00:48Relationship graph.
00:50Each one of these blocks is known as a Table Occurrence, and every time you
00:54define a table in FileMaker Pro, it automatically puts one of these blocks on
00:59the Relationship graph for you.
01:01It's important though not to think of them as a table, because as we'll learn
01:05later in the title, a single table could be represented on the relationship
01:10graph by multiple blocks, but we are not going to worry about that kind of stuff right now.
01:13For now we are going to focus on there being one table occurrence per table
01:17defined in our database.
01:18And our goal is here is to create relationships, and this is really the easy
01:24part, too, as far as the task inside the database, because to physically create
01:28these inside a FileMaker, it doesn't really take that much effort.
01:30First, I want to give you a brief idea some of the tools that are available
01:34to us in this window.
01:35You see down here in the bottom left-hand side we've got a cluster of tables and relationships.
01:40These will allow us to create new table occurrences, as we'll get to in the
01:44future, or define relationships between them, or even write notes about the
01:50existing table occurrences if need be.
01:52You'll also see that we can move these things around by clicking on them.
01:56You see the highlighted one is in yellow, and if we want to line them up a
01:59little bit better, we can drag-select them by holding down the Shift key and releasing.
02:04You see we've all three highlighted. And we can use our Arrange tool to do
02:08either distribute horizontally or vertically to kind of line them up a little bit better.
02:15Also, you can select them, again, holding down your mouse, dragging and then
02:21releasing, and you can choose to make them different colors by clicking on
02:25your color palette.
02:26So, for example, we can make these all the same color, indicating that these
02:31where our initial base tables that we're using when we set up our database.
02:35You'll see we have a remaining set of tools here also. The Pointer tool allows
02:40us to select and move different table's occurrences around, and if we click on
02:45the text, I can click in here and make myself a note, and you'll see it will show up in here.
02:54It won't be a table occurrence, but just a note about table occurrences in case
02:58I want to give myself a note, or share a little note with other developers, and
03:02you can just hit Delete to get rid of it.
03:04And then these are zooms, so if you have a lot of table occurrences you can zoom
03:07in or zoom out, or you could just type in the scale that you want to use.
03:10And since you can print your table occurrence, which is always a good idea,
03:14this allows you to determine how many pages you're going to print when you hit this button.
03:18So just like when you're in Layout mode, you'll see that the Pointer tool is the
03:21default, so therefore our cursor is an arrow.
03:24So in order to create relationships between the different tables, all we have to
03:27do is just select the Pointer icon. And so let's first create a relationship
03:32between Customers and Invoices.
03:34What we'll do is we'll go into the parent, select the Primary Key field, and
03:39you'll see when we click down on the Primary Key field, you will see we get
03:42these little dumbbells underneath our cursor.
03:45By dragging them outside the table occurrence, now you see we have a line that
03:49now needs to be connected to the Foreign Key field in the Child table.
03:55So what's the Child table to Customers?
03:57One customer can have many invoices, right.
04:01So what we need to do is pick one of the fields in the Invoice that acts as the
04:05Foreign Key fields, and then connect the two tables together.
04:08So that's why we use these naming convention, because we can easily see
04:12pkCustomerID is Primary Key of the Customer ID, to fkCustomerID, which is the
04:17Foreign Key. We'll just release, and now we see that that relationship has been
04:20defined, and we'll do the same thing over here, if we move the Invoice line item
04:26table. And I am going to pick the Primary Key, and I need to connect it with the
04:32Foreign Key, or fkInvoiceID.
04:34Again, the naming conventions are helping us here. And we'll choose the Primary
04:37Key in Products and link that to ProductID. And we can move these things around
04:46a little bit, and you can even collapse the table just so it shows the Primary
04:51Keys to give you a little bit more room, by hitting that little button in the
04:53upper right-hand corner.
04:57So now that we've got the base architecture set up in our FileMaker database,
05:00you can continue on to develop the rest of your functionality.
05:03It's important to get your architecture in place first before you proceed, and
05:06when I say architecture, I mean you have to determine what kind of tables you
05:09are going to have, how they are going to be related, so therefore the key field
05:13you are going to have to use, and then you go and set up your relationships.
05:17So once you go through that process, you can then move on to start defining
05:21other things inside of your database.
05:23Later, in the Using Relationships chapter, we're going to show you various
05:26different ways that you can use the relationships that we've set up here.
05:29A FileMaker database contain a database file with one single table in it or be
05:34composed of multiple tables inside one file that are linked internally using
05:39FileMaker relationships.
05:40These relationships are managed here inside of the Relationships tab.
Collapse this transcript
5. Working with Fields
Deciding what fields you will need
00:00Like many other databases, a FileMaker Pro database is presented to the
00:04developer as a collection of tables, as a collection of tables each containing
00:08a number of fields.
00:09If you have ever worked with any other database environments, you may be
00:11accustomed to terms like columns instead of fields. Either term is meaningful
00:15and acceptable here, but the FileMaker Pro interface and documentation use the term field;
00:19therefore, in this video, we'll follow that convention.
00:22A FileMaker Pro file, as we see here onscreen, can hold in almost limitless number
00:29of tables, each with an effectively limitless number of fields defined.
00:34In this chapter, we're going to focus on fields and field types available within
00:38FileMaker Pro, and then how you create those fields.
00:40A field in FileMaker Pro may be viewed as a slot that can hold information
00:45specific to a single database record;
00:47for example, you see here in Products, this slot would contain information on
00:52the category for this particular product, number 47.
00:55The value that's stored in a field could be thought of as an attribute of
00:58the entity that's represented by the table, or in this case an attribute of
01:02the Products Table.
01:03For example, a database table in which a record represents a customer, like we
01:09have here, you might want fields for things like First Name, Last Name and maybe
01:14even a field to store a photo or something like that. And just like with
01:17anything else that we've discussed, you're going to want to spend some time
01:20looking at the data that you want to store in making preliminary lists of the
01:23possible attributes.
01:25You can see that that's kind of a mantra here.
01:27First, you have to stop and sketch things out before you start defining them
01:30inside your database.
01:31It's an important process, as with anything that you construct.
01:34Every database is different, and it's your specific user's needs that will
01:38dictate what fields you need in your database.
01:40So, for example, if we open up the File > Manage > Database and choose the
01:46Products Table, you'll see that it already has fields defined from when we
01:50imported this table from another FileMaker database.
01:53So here we don't have to define any fields, but we can use this as an example
01:55of some of the types of attributes that we can design towards an entity of products.
01:59So you see, for example, we've got Category, which is the category of the
02:04products, the Cost, Keywords, Location, some Notes, a Picture.
02:09We'll get into all these different field types that you see here in the
02:12middle in upcoming movies.
02:14But for now, we're going to concentrate on what an attribute is, and how it can
02:17describe the entity that's in the table.
02:19So a brief review of these fields shows that we've got a lot of different fields
02:23that describe a product.
02:25Also, each field is going to represent a value that will be different for each
02:29product stored in a Products Table, not necessarily different in every record,
02:32but if every single record in the entire database has the same value, it wouldn't
02:36necessarily be a standard field.
02:38So we're looking for attributes that might change from record to record.
02:42Therefore, we want to make sure that we have a place to store each value
02:45independent from all the other values, so one for every product that's going to
02:48be stored in the database.
02:50Also, you should be aware that that fields don't always require a value,
02:54although we'll be talking about that in a later movie how we can make it so
02:56that users must enter values in the fields, but they don't necessarily need to
03:00have a value in them.
03:01Like, for example, every product doesn't have to have a cost, but maybe there is
03:04something that you need to have in every record.
03:06But just because you define a field, doesn't mean it must require a value.
03:10So when you're doing your evaluation of what kind of fields you might need in
03:12your table, keep in mind that even if there's only a few records in the database
03:16that would need a value that describes it, or a field defined, you're still going
03:20to want to create that field.
03:22By looking at Products as an example, let's try to determine what fields we
03:25might want in our Customers Table.
03:28You see right now we don't have any fields defined in the Customers table.
03:32And remember, we need to determine which attributes of a customer may change
03:35from customer to customer, yet at the same time we want to make sure that we are
03:39only including fields that are going to be meaningful to our users.
03:42So it's important that you bring your users of the database into this whole
03:45discussion to make sure that their needs are reflected in the final product.
03:49So let's say that after having appropriate discussions with all of our users
03:53and stakeholders, we determine the following fields will be needed in our Customer table.
03:57We've got things like Customer name, Street address, City, State, Zip and notice
04:01that we were breaking up our fields into the smallest pieces of data possible.
04:05Instead of having one big address field, we're breaking it up into Street
04:08address, City, State, and Zip.
04:09We'll see as we go on through this title how that's going to important.
04:12We've got different types of things, Tax rates, Company Web sites.
04:15For example, a Company Web site, not every customer may have one, but you still
04:19want to define a field for those that do actually have one.
04:22And then we have discussions with our users and determine that these are going
04:25to be all the attributes that describe a single invoice within our system.
04:28So you see a lot of these have to do with the number values in an invoice,
04:32but these specifically define in Invoice.
04:34You'll see we've got things like the Date or totals and Shipping costs and Terms,
04:39and all that type of thing.
04:40To review, what we've actually done here is come up with a list of attributes
04:44that are specific, either to a customer or an invoice.
04:47Notice, for example, that a Company name doesn't describe an invoice, but
04:52an Invoice date does.
04:54So in each case, we've asked what information describes the entity reflected by
04:57our tables, and then what information is specific only to that table.
05:01That's the important part.
05:02What information only describes an invoice? What information only describes a customer?
05:07We'll talk later in the title about how it's important that you can share this
05:10information between tables via the relationships that you have set up, but when
05:13you're defining a list of fields, you've to make sure that the fields are only
05:16specific to that table.
05:18FileMaker databases allow developers to create a field to store information that
05:22describes values that are stored in tables.
05:25When you make decisions on what fields you need, make sure that you're
05:28getting your users input and then break down the data into the smallest parts
05:32before proceeding.
Collapse this transcript
Understanding field types
00:00Before you can define fields in your FileMaker database, you must first take
00:04the time to decide which fields you need in your database and then what table
00:08they are going to belong to. And we've gone through that exercise in the previous movie.
00:12Then you need to make a decision on what field type each field is going to be.
00:17If you go to File > Manage > Database, you'll notice that each field in a
00:21FileMaker Pro database must have a specific Field Type.
00:25You see that all these product fields have a type defined.
00:30Each field in a FileMaker Pro database must have a specific data type.
00:33Choosing an appropriate data type for a field will allow FileMaker to decide how
00:37best to store the data in the field, and then also how to retrieve it, and then
00:40handle it internally, as well.
00:42Though FileMaker does have some flexibility as to what type of data can be
00:45stored in these fields,
00:47iy is essential to choose appropriate field types when defining these fields
00:50inside of your database.
00:52For example, Field Type will determine the behavior of sorting records.
00:55So, for example, if you've Part Number, if you choose to make a part number
00:58numeric, then it will sort them numerically: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, for example.
01:04But if you choose to make Part Number Text, when you sort them in the database,
01:08they will go 1, 10, 11 and so on and so on.
01:13So they will have different behavior depending on their part type that you've chosen.
01:15An overview of the field types can be found by clicking on the Type dropdown
01:21in the bottom right-hand corner.
01:23These of course are the options that you have available to you, not only when
01:25you're creating a new field, but if you choose an existing field that you can
01:28change the Type by selecting a new type and hitting the Change button.
01:32But here we'll just look at the dropdown.
01:34Let's take a quick look at each field type and some of their behaviors and
01:37characteristics to help you make these decisions when defining fields
01:40inside your own database.
01:42First, we have Text fields.
01:44A Text field is appropriate for any type of data that can be stored as text and
01:47does not need more specific handling;
01:49for example, numbers and dates can be stored inside of a Text field, but they
01:53lose their number-ness or date-ness, and they can only be addressed as plain text,
01:58Much like the example we've talked about before,
02:00if I had a Part Number that was actually numbers, but it was stored as text,
02:03it gets handled a little bit differently when you do things like sorting.
02:06A text field can hold about 2 gigabytes of information per field, which isn't
02:10really something that you want to test inside of FileMaker, but it's good to know
02:14that you have got those almost limitless possibilities for storing.
02:17It's equivalent to about a billion characters, or roughly 500,000 pages of
02:21English text, but don't ever push FileMaker text fields to that limit.
02:25You would use a Number field whenever data needs to be treated as a number,
02:29for example, in the Part Number if we wanted to be sorted in numerical order
02:33or more specifically if you're going to use the value in a field in a
02:36mathematical formula.
02:37We'll see a lot of examples of these when we get into calculation formulas
02:40later in the title.
02:42If you define a FileMaker field in the database as a number, it won't prevent the
02:45entry of non-numeric data into a Number field;
02:48for example, text characters can be typed into a number field, but they are
02:51going to be ignored in most database operations,
02:54so it will store them; it just won't recognize it they are there.
02:57In Date fields, FileMaker Pro is able to store and retrieve any date between the
03:01year 1/1/0001, or the first day of the first year, and 12/31 of the year 4,000.
03:08So those are the ranges that you've to work with, with your data.
03:11And the reason for that is because FileMaker has internal calendaring functions
03:15that have to be represented by each one of those days in that range.
03:18FileMaker Pro will generate an error dialog if the user attempts to enter a date
03:23that's not within that stated range, or that's not within an acceptable date
03:27format, when you enter something into a field;
03:29for example, two-year dates are not accepted after the whole Y2K situation.
03:35Internally FileMaker will store a date as a value that is an integer, or a whole
03:40number, that represents the number of days and have elapsed between 1/1/0001 up
03:46to the specific date.
03:47So inside FileMaker Pro, it's saying, how many days have passed since the very
03:52first day of the very first year? And that's really what it's storing inside of
03:55your database when you type in a date.
03:57No matter how you type it in, that's how FileMaker is storing it. And we'll
04:00use that information when we get into creating calculations with date fields
04:03later in this title.
04:05When it comes to Time fields, FileMaker stores time as a value that represents
04:08either a time duration, or a specific time of day within a 24-hour period.
04:13Similar to with date fields, internally, FileMaker stores the time value as an
04:18integer that represents a duration of seconds, and it represents a duration of
04:23seconds from midnight today.
04:24So, for example, 10 a.m. this morning would be stored internally as the
04:28number 36,000, which is actually the number of seconds since exactly midnight this morning.
04:32FileMaker Pro will generate an error dialog if the user attempts to enter a
04:36non-numeric data into a field that's defined as Time.
04:40A Timestamp field combines the functions from both a date and time data types.
04:46A timestamp is really just a combination of the date and time, separated by a
04:49space, and it's stored internally in the FileMaker database as a number of
04:53seconds since midnight from 1/1/0001;
04:55for example, April 10, 2004 at 3:20 p.m. is actually stored as a number
05:02that exceeds 63 billion.
05:05Timestamp fields have the same date range restrictions as date fields, and
05:08FileMaker Pro will generate an error dialog if the user attempts to enter data
05:12that is not a valid timestamp into a field that's defined as a Timestamp field.
05:17There are three other types of fields that we're going to look at in different
05:20movies in this title, and they are Container, Summary and Calculation fields.
05:24A Container field is a very versatile data type that can store any type of binary data.
05:28We'll cover this later on in this chapter.
05:30The Calculation field contains data that is computed based on a formula that you will define.
05:36Calculations are critical to FileMaker Pro database development, and you're
05:39going to learn a lot more about these Calculation fields in an upcoming
05:42chapter on calculations.
05:44Summary fields are a special FileMaker Pro field type that allows you to
05:47aggregate values across a found set of records and possibly for each subgroup
05:52within a sorted found set.
05:54Summary fields with the basis of an important area of FileMaker reporting that
05:57we're going to cover later in a chapter on Reports.
06:00Once you're familiar with each field type that's available to you in FileMaker,
06:03you're going to want to assign a certain type to each of the fields that you
06:07wish to define inside of your FileMaker database,
06:09again, a critical part to planning before you go ahead and add anything to your database.
06:13You're going to go through this exercise by asking yourself what type of data
06:17will be stored in a field and how will I need to have it handled by FileMaker?
06:21Let's look at the field list that we've created in a previous movie and assign
06:24to them types, based on what we've just learned;
06:26for example, we see that Company Name could simply be Text, because it could be
06:30a combination of text and numbers,
06:32so text works fine here.
06:33Or if we look at Zip codes, although zip codes will contain almost exclusively
06:37numeric data, they're really not going to have mathematical value.
06:41So it could be a number, if you wanted to allow Zip code ranges, but this could
06:44really go either way.
06:45We're going to just call it Text.
06:47Date Modified could be more valuable if you both the date as well as time.
06:51So we're going to choose Time stamp, and Tax Rate will in fact have numbers
06:54included, and we're going to want to use this in formulas to help us compute
06:58different invoice values.
07:00So that's something that we would want to have as a Number field.
07:03And finally you see things like Phone Numbers and Fax Numbers, and sure, they are
07:06going to have numbers in those fields, but we never going to use those with any
07:09mathematical values, so we'll keep them as Text.
07:11Then finally down below in the Company Logo, you see we've called that a Container.
07:15We're going to discuss storing images inside of a container when we get to that
07:19section later in this chapter.
07:20And quickly, just by reviewing the Invoice Fields, we have some of the same
07:24decisions to be made.
07:25You see Invoice Date.
07:26We've selected that to be a date because then we can use it to determine how
07:29much time has elapsed when we've delivered an invoice versus when it's due,
07:33those types of things.
07:34And if you look down at things like Terms and Weight, we've decided that we want
07:39those to be numbers, so that we can maybe calculate shipping costs, or when an
07:42invoice might be due based on elapsed number of days.
07:45Once your field list has been reviewed and each File Type is determined, now
07:49you can move on to defining these fields within the tables inside your
07:52FileMaker database.
Collapse this transcript
Defining fields
00:00As we've discussed in previous movies, in order to add fields to your database,
00:04you're first going to need to determine what tables you're going to have, then
00:06what fields, and then finally what types of fields.
00:09Once you've made all those determinations, there are a couple of different ways
00:12that you can define fields within FileMaker Pro.
00:15We discussed adding fields via a Table view in the Creating new databases using
00:19spreadsheet format movie.
00:21Feel free to review that movie for more instruction.
00:23But in general, this is a new method in FileMaker 11, which simulates the
00:27experience of working with a spreadsheet such as Microsoft Excel, allowing you to
00:31define fields on-the-fly as necessary, without even leaving Browse mode.
00:36Those fields that you create in Table view will appear under Manage > Database,
00:41under the Fields tab, under the table that your layout was based on.
00:45You can also use this to delete fields, but a second, and more standard method of
00:53defining fields, is through the Manage Database dialog.
00:58We go File > Manage > Database, and you'll see that we have all of our tables
01:04listed and then fields where we can toggle between the different tables using
01:10this dropdown menu in the upper left-hand corner.
01:13We see that Products already has fields defined because we've imported the table.
01:17But if we go up to Customers, we can see here this is the blank palette that
01:20allows us to define our fields.
01:23In addition for providing a central location for creating and editing fields in
01:27any table, the Manage Database dialog also provides tabs for working with Tables
01:32and also Relationships.
01:33It's a good place to add fields that you've already listed out.
01:35For example, we've determined that in the Customer database we're going to need
01:40the following fields in Field Types.
01:42In this movie, I'm going to add all the fields from that list into the Invoice
01:46and Customer tables using the types that we discussed in previous movies.
01:50I may move quickly through some of these fields in order to get them all added efficiently.
01:54This, however, should just illustrate how quick and easy it is to add fields to your database.
01:58First, a discussion on naming the fields.
02:01Many users employ conventions that have the field types denoted, or even
02:04special prefixes that you might use to be able to sort the fields in a field
02:08list, similar to how we put the double underscore before the pk prefix in our primary key field.
02:14FileMaker Pro is also very accommodating when it comes to naming tables and fields.
02:18There are only a handful of restrictions to consider.
02:22Watch, for example, as I type in a Field Name with numbers and hit Create.
02:32You see this message appear onscreen, and you'll see this dialog whenever you
02:35try to create a table or a field that violates one of the restrictions.
02:39It's helpful because it shows what the restrictions are, and you'll notice that you
02:42really can't use any special characters, or numbers, or anything that contains any And Or,
02:46Not and those type of things, also periods and that type of thing.
02:50Mainly, they don't want you reference anything that you might find in
02:53the Calculation dialog.
02:54We'll be talking about the Calculation dialog later in this title, and when you
02:58get there you'll see that numbers and some of these characters perform different
03:02functions inside of a formula than they would just by a field name.
03:06So by avoiding these characters and following these rules here in the bullet
03:09points, you'll be able to safely create fields that will not confuse FileMaker.
03:13Even though that message pops up, FileMaker will allow you to create the
03:16field, as you see here.
03:19But just because certain characters are allowed in a field and table names, it
03:22doesn't mean that you should use them.
03:23Should you ever need to share data between your database and another
03:26application, you may have difficulty because most other applications have even
03:29more restrictive naming conventions than FileMaker does.
03:32So it's best to best to err on the side of caution and just simply follow
03:36FileMaker's naming convention rules.
03:38And for this reason, it's really a best practice to use only alphanumeric
03:42characters in a table and field name.
03:45Let's add the first couple field names.
03:47You'll see here that to add a field, you can type in the name of a field and hit
03:52Create, or you can select a field whose name you want to change, like we're
03:56doing here and then type over your new name.
04:01You'll notice that I'm using another type of naming convention where I'm not
04:04putting any spaces inside the fields.
04:06It's not necessary, but it's a good practice because if you ever want a
04:09publish your data to the Web or maybe share with another non-FileMaker
04:12database application, sometimes even having spaces in the name can trip up
04:16that communication.
04:17So I've become used to putting all the words all together into one, and using
04:22capitalization to kind of make it easier to read.
04:24So now in this case, if you remember, we've selected the 2345 field, and now you
04:29see the Change button is available.
04:31So I'm going to hit Change and you see it's allowed us to now get rid of that
04:35field and add a new one all at the same time.
04:37Once a field has been added, you see now that you can Duplicate it, or even Delete it.
04:41You also see the Options over here on the right-hand side.
04:45Hitting this button will get us to several different field options, all of
04:48which we're going to be covering in upcoming movies.
04:51Another good idea is to Comment out your fields.
04:53For example, if we go to the primary key, you see that we've got the words,
04:58"primary key for customers" listed in the Comment field.
05:01This isn't necessary.
05:02It doesn't affect any of the functionality of the field, but as you're going
05:05through your field list, it might provide you some useful information when
05:08you're looking for specific types of fields within your list.
05:11You'll also notice that when you hit the Options/Comments, it toggles between
05:15your comments and the field options themselves.
05:18This could be a good way for you to easily find a field in a very long list of
05:21fields inside the Manage Database window.
05:24For the next set of fields, I'm going to use another convention that I suggest
05:27that you might want to use.
05:28We're going to talk about the Address fields: the Street, City, State and Zip fields.
05:34One thing that a lot of developers like to do is, in order to group these fields
05:39together, you'll put the name of the group of the field, in this case they are
05:47all address fields, followed by the name and then hit Create.
05:50And the reason for doing that, as you'll see in a second, is that they'll all
05:54show up in a list so that they are clumped together when you're looking at the field list.
05:59So if I add AddressCity, AddressState, and you see each time I'm just modifying
06:06the name and hitting Create, and it's creating a new field form me,
06:10this is an efficient way to do it, because it saves me a couple keystrokes.
06:14Now that you see all of the Address fields, they will always be together any
06:17time I'm sorting by Field Name.
06:18A lot of the naming conventions are based more around seeing fields in not
06:22only this field list, but you'll notice that you'll see list of fields and
06:25things like Calculation dialogs and various other parts of the FileMaker
06:29database application.
06:30So it's a good idea to keep them all together.
06:32So if you just follow those naming conventions, at the very least, you'll be
06:35in really good shape.
06:36So now I'm going to go ahead and use these same naming conventions to define all
06:40the rest of the fields inside of our database.
06:43You'll notice when I do the Company Name first, I'm using the naming convention twice.
06:46So I'm both grouping the Name fields under the Company. I'm also denoting that
06:51they are in both name fields, as well.
06:52So it sorts first by company and then by name, and then you'll notice that in a
06:56couple of cases, like in CompanyLogo, I am choosing the Container as a type, but
07:00we'll get to that in a later movie.
07:01And in the case of DateCreated, I can easily use date in both DateCreated and
07:05DateModified, but I'm going to use Timestamp in DateModified so that we can use
07:09that in upcoming exercises.
07:11DiscountRate is something we might use in a mathematical equation.
07:22So we'll make that Number, but here you see we've accidentally picked the wrong
07:25field, but FileMaker allows us to just click on the field, make a change and
07:30then hit the Change button to correct what we've done.
07:33FaxNumber will actually have alpha and numeric characters with the dashes.
07:37So we'll just make that Text, so it can contain both.
07:55Now that we've got all our fields defined, we'll notice that if we hit the OK
07:59button to close out this window, and if we navigate over to a different view,
08:06instead of looking at our view in Table view where actually we can see all the
08:11different fields that we defined have been added to our layout already.
08:14We can also look at this in Form view so you can see them all listed.
08:21If this didn't happen in your version of the database, there are a couple of
08:24reasons that could have occurred,
08:26first of which, in your Preferences under the FileMaker Pro, or in Windows under
08:30Edit, under the Layout tab you may not have this option checked: Add newly
08:35defined fields to the current layout.
08:38Even if you don't have that checked, a lot of times when you define fields in a
08:42new database, they'll still add the fields to the layout, but they only do that
08:46the first time around.
08:47Once you've closed the Manage Database window and then open it up again, it
08:51won't start adding those fields for you automatically.
08:53So don't worry; nothing is broken in your file.
08:56Those are just a couple of settings or scenarios that might require you to have
08:59to add a field to a layout manually.
09:01If you have to do that, you can go under View > Layout mode and choose Insert > Field.
09:07But we'll be getting into examples of that in more detail when we start
09:10working with layouts.
09:13Now you see it's a rather easy and quick process to define all the fields in your tables,
09:17if you've gone through and made the decisions on what attributes need to be
09:20represented as fields once you're figuring out your tables, and then figuring out
09:23what those field types are.
09:24Then you can go into them all at once, and you'll see that in some cases they
09:28will even be added to your database layouts for you.
09:30In the next exercise file,, you'll notice that we will have already created all
09:34the fields in the Invoice table and that there are already be fields inside
09:37of the Product table.
09:38So if you'd like to play along, you can follow along using the fields that are
09:42already in the file in your next exercise.
09:44As you can see, after you determine your list of fields and their types,
09:47FileMaker provides a couple of different ways to define these fields.
09:50You can apply field naming conventions, as well as choose Field Types, all the
09:54while you're setting up your fields.
Collapse this transcript
Using Auto Enter options in fields
00:00When you're defining fields inside your FileMaker database, you may notice, while
00:04you're in the File > Manage > Database window, looking at any field list under
00:10the Fields Tab, you see by selecting a field, you'll notice that there's an
00:14Options button that becomes available after the field is created.
00:17You'll notice that in our _pkCustomerID field, we already have some of
00:20these options available.
00:22If we click on the Options button, you'll see that we've got a few different
00:25decisions to make in the event that we want some of this functionality
00:28built-into our field.
00:29For example, developers often design a database so that some of the fields are
00:33automatically populated with the default data whenever a user creates a new
00:36record in that database.
00:38These types of field options in FileMaker are called Auto-Enter options.
00:42And they do just what they say really, it automatically enters a value in the
00:45field based on the developer settings.
00:47So you'll see this example that we did when we created the primary key fields.
00:50We want to automatically enter a serial value into the field _pkCustomerID every
00:57time a new record is created.
00:58So the best way to think of this is, just read it as it says, Automatically
01:01enter the following data into this field, and then if you can imagine after
01:04this, it would say, each time a new record is created.
01:07That's what Auto-Enter means.
01:09FileMaker allows developers to choose from many different options for
01:12automatically populating the contents.
01:14You can access these under the Auto-Enter tab.
01:16One thing you should be aware of is whatever settings you put in here will
01:19only give instructions to FileMaker on what data to put in the field when a record is created.
01:24After that point, a user could change that value into any other kind of
01:28value that they want.
01:30That's of course why we check the Prohibit modification of value during data
01:33entry option on the key fields;
01:35however, in other fields, we might want to just create an initial value and
01:38allow the user to update it if need be.
01:40This of course could help them during data entry to save them a few keystrokes
01:44on a couple of fields.
01:45There's also a concept that uses Auto- Entry options that FileMaker developers
01:49like to call creating housekeeping fields.
01:51For example, if we click on DateCreated, and then hit our Options, we'll see
01:57that when we go to the Auto-Enter tab, we can choose any one of these options
02:01that are available to us.
02:02Let's concentrate on these first two options in the tab.
02:04They relate to Creation and Modification data.
02:07A field can automatically track information about when a record was created, or
02:11last modified, and within some limits, by whom it was modified or created.
02:15Both the Creation and Modification options have the same set of choices:
02:19Date, Time, Timestamp, Name, and Account Name, meaning when this record is
02:23created, put today's date, the current time, or both of those combined as a
02:28timestamp, or the name or copy of FileMaker that was used to create the record;
02:33however, you'll notice in this case that only one of these options is available.
02:37That's because when we defined the DateCreated field, we made that field type Date.
02:44It only makes sense to allow a date to be automatically entered into the Date
02:47field, because otherwise we'd be violating some of FileMaker's storage rules if we
02:51tried to put time in there.
02:52So if we check Create, and Creation, Date, and hit OK, now you see the options
02:57show up in the Options column in our field list, and what this means is that
03:01every time a record is created, it's automatically going to take the computer
03:05date from the machine that the user is using, and put that into the date.
03:08These are called housekeeping fields, mainly because every database table
03:11usually has these defined.
03:13And it's a good idea for you to be able to keep track of your data or clean up
03:16your data, or if you ever have any problems, and you're trying to figure out
03:19what types of things happened last Thursday, you can just do create a Found set
03:23based on that date inside of the DateCreated field;
03:26however, if you don't create these types of fields right away, it won't
03:29retroactively populate any fields if you decide that you're not going to define
03:33these until you've already got thousands of records in your database.
03:36So it's a good idea to do these before you start adding data.
03:38Another example of it is RecordCreatedBy.
03:42Notice this time this is a text field.
03:44I'm going to hit the Options button, and now we'll notice that we've got, under
03:48Creation, we've got the ability to choose all of these.
03:51That's because any of this type of data can be stored inside of a text field.
03:55We could choose current Date, like we did earlier, or the Time, which would be
03:58the current time of creation.
03:59But in this case, we're going to choose Name, which is the name that's in the
04:02Preferences Pane of each user's copy of FileMaker.
04:06And when we did our Preference Preview, we looked at how you can modify that.
04:10So now, every time a record is created, we're going to automatically get a new serial number.
04:16We're going to put a Creation Date, or we'll put a Creation Name.
04:19You also have the option, if you double- click here, that you can check Account Name.
04:24And although Name and Account Name may seem similar, they're really
04:27different concepts.
04:28The Name is the name that's inside the Preferences in your copy of FileMaker Pro.
04:32Account Name is going to be the name or account name used when you logged into the database.
04:36Those are all settings that you'll create when you set up security for your database.
04:40Keep in mind that any user could log in through any number of different machines
04:43or copies of FileMaker, so these really do give you two distinctly different
04:46types of information.
04:49You'll also notice that we've got Timestamp and quickly, we see DateModified.
04:54In this case, we'll choose Modification and have it put a Timestamp in.
04:58This one is a little bit different, because instead of putting a value in
05:00when the record is created, it's going to wait till any one of the fields
05:03that are defined for any given record have been modified, and then it's going
05:06to put a Timestamp in there.
05:08So that field data will continue to update as records are being modified
05:11within your database.
05:12All of these are good fields to have and good fields to define early on.
05:16There's another use of Auto-Enter.
05:18If we go to AddressState, for example, and hit Options, you'll notice that we've
05:23got this box here called Data.
05:25When we check this, our cursor goes inside of this text entry box.
05:29In this case, let's enter in CA.
05:31The reason we're doing so is, let's say, for example, that most of the
05:34customers that you're entering into your database happen to be customers from
05:37the State of California.
05:39So in this case, what we'd be doing is saying, inside of the field AddressState
05:44automatically put the abbreviation for the State of California.
05:48This way when your users are entering new customers into the database, they
05:51won't have to enter any values into this field if they happen to be from the
05:54State of California.
05:56But because it's an Auto-Enter field, they could just type over the CA and
06:00change it to a different state name, if that one applies.
06:02Now let's switch over to the Invoices table, where we see we've got our fields defined.
06:07We're going to use another one of the options for Auto-Enter.
06:09You'll see we have a field for InvoiceDiscountRate.
06:12Now, what's interesting about this field is that even though it's defined
06:15inside of an Invoices table, this is actually going to pull data from the customer record.
06:20Now, you might think to yourself, why would we define this field inside of Invoices?
06:24Well, that's because the discount rate has to have a value at the time
06:27the invoice is created.
06:29So we can use an Auto-Enter field in this case, because we want to just pull
06:33in the discount rate at the moment that record is created rather than if a
06:36record was created last year and the customer discount rate changes, we don't
06:40want it to propagate backwards and then screw up our totals and kind of mess up our books.
06:45So what we'd rather do is use the Auto-Enter feature to insert a snapshot
06:49of data at the moment of creation, and that way it doesn't get updated down the road.
06:52Auto-Enter can be useful for savings some keystrokes during data entry, but also
06:57for taking a snapshot of data at the time a record is created.
06:59Let's take a look at how that would work.
07:01We'd hit Options and choose this value down here: Looked-up value.
07:06By hitting Specify, we're going to choose to look up data from customers.
07:13Remember that we have a relationship between customers and invoices.
07:16So if we're in the context of an invoice layout, and we're looking up to the
07:21parent, we know that because Invoices is the child in the parent-child
07:25relationship, that means that there will only be one related parent record.
07:29That way if we use a look-up, going upstream, so to speak, we can point to one
07:35field, and it will only have one matching value.
07:38Now, when a new record is created, it's going to go find the related parent
07:42and pull the value that's inside the DiscountRate field in the related parent customer record;
07:48however, if I go into this field a month later and change that value, it's not
07:52going to change the initial value that was placed inside the invoice discount
07:55rate at the time the invoice record was created.
07:58So now let's hit OK, and now we're back in Browse mode.
08:01So let's take a look at what happens when we create a new record.
08:04One of the ways you can create a new record is by hitting the button in your
08:07Status toolbar, and now we look onscreen, and we notice we've got a primary key
08:13value automatically created, the words CA have been added inside our
08:17AddressState, and also the dates that these records were created, and an initial
08:21value for modification.
08:22You'll notice, also, when we click into modification, that it gives us a full
08:26string, including both the Time and the Date.
08:28You'll also notice that if we go and we try to edit the primary key for the
08:32customer, by hitting the Delete field, we get a message that says, this action
08:36cannot be performed because the field is not modifiable.
08:39That's because if we go under File > Manage > Database, we see that it says,
08:44can't modify data, Prohibit modification during data entry;
08:49however, if we were to go in and change any of these other values, for example,
08:55California to Washington, and then click outside to commit the record, we see we
08:59don't get that error, and that's because we didn't check the prohibit
09:01modification of value during data entry on this field.
09:04Also, you'll notice that the modification time is updated by one minute, because
09:09we made a modification to the field after we created it.
09:13Using the Auto-Enter field options, developers can design a database so that
09:17some fields are automatically populated with default data when a user creates a
09:20new record, and these are decisions that you'll want to make when deciding what
09:24fields you need to create in your database.
09:25So in addition to deciding what tables, what fields, and what field types,
09:29you're also going to want to consider some of the field options that you have
09:31available to you.
Collapse this transcript
Reviewing field validation options
00:00Any database system that you create really should strive to have consistent data.
00:05Without data consistency, it becomes extremely difficult, if not impossible, to
00:09derive meaningful and viable information about whatever the database is designed to keep track of.
00:14So even in your best efforts to create a good architecture, if you're not
00:17managing the types of data that are going into the database, you might have some
00:20problems with some of the results you're getting out of the database.
00:23So to ensure that data is entered into your database in a consistent and
00:26reliable manner, you must design checks and restrictions on the way that users
00:30are allowed to enter data in the system.
00:33This is where another field option called Field Validation comes into play.
00:37Field Validation, which can be found under the File > Manage > Database Window,
00:42clicking on any field, and choosing Options, you'll notice that in the Field options,
00:47you've got a Validation tab.
00:49Field Validation allows you to test field data against specific criteria, and
00:53possibly even warn the user if the value doesn't pass muster in some way.
00:57So, for example, you can use your field validation to make sure that a price
01:01that was entered is greater than 0, or make sure that a ZIP code field is not
01:05empty, those types of things.
01:07You might be familiar with this type of experience as a user, whether you're
01:10using database system or even making orders online.
01:13If you forget to put in a ZIP code field, the database that runs a Web site, for
01:17example, will come back and tell you, oops!
01:19You've forgotten that.
01:20Can you make sure to add a value before we let you proceed?
01:22As you'll learn later in this movie, if a user tries to commit a record
01:25containing field data that violates the validation rules, a user is going to
01:29receive a warning, and be prompted to change the nonconforming data; thus,
01:33keeping your data consistent and reliable.
01:35They will be frozen in time, not allowed to move forward or backward without
01:39addressing the violation of the data.
01:41Of course, this can be somewhat of a hindrance to data entry, so you have to
01:45make these Validation Option selections very carefully.
01:48So let's do an example here.
01:50If we went into the AddressEmail, and let's say it's very important for you to
01:54communicate with your users via e-mail, and that every time that they order from
01:58you, you send them a confirmation e -mail that they need to reply to.
02:00So in that case, you've got a business rule that says we need to have a
02:03customer's e-mail in order to be able to complete this workflow.
02:06So if we double-click on AddressEmail, or we can select it and hit Options, either
02:11one of those two ways, it'll bring our Field Options window forward.
02:16You can select the Validation tab, and beginning at the very top of the dialog,
02:20we can see that we've got a couple of decisions that we need to make.
02:23First, you'll see Validate this field Always or Only during data entry.
02:26The Only during data entry is of course the default.
02:30When you create a new field, it means that the validation that you select,
02:33if you select any, will occur only when a user manually enters data into the fields.
02:38There are other types of ways that you can get data into the field, such as
02:41scripts or even importing data into your database, but if you have Only during
02:46data entry selected, those other ways will be a mute.
02:49This is a default setting, because it's more common that you want to control how
02:53human beings, or your users, are entering data, rather than other technical
02:57mechanisms like importing or scripts.
02:59So, for example, let's say that anytime someone's data entering a customer
03:03record, I want to make sure that they gather the e-mail.
03:05But let's say I've got a huge database of leads that I got from a conference,
03:09and I just want to import those into my database.
03:11Those might not be customers yet, so I don't necessarily need their e-mail until
03:14we start to engage them.
03:16So in that example, I do want to bring records into my database through an import.
03:20But when a user gets to it, and I want to make sure that the user is alerted
03:23that we don't have an e-mail.
03:24So conversely, choosing Always means that whatever rules we apply inside the
03:29Validation tab will always have to take place, or the record won't be allowed to
03:33be added, or the data won't be allowed to be added if it violates muster.
03:37This is a very strict level of Field Validation, and you should use caution when
03:41you're choosing Always.
03:43We'll keep this one on the default, data entry.
03:45For the sake of the AddressEmail option, we're going to leave it as Only during
03:49data entry, because we may want to import customer records from other sources
03:52that don't have e-mails, similar to the example that we just discussed.
03:55An additional check box in the upper section of the dialog also allows you to
03:59choose whether or not the user can override data entry.
04:02So you see that this is also kind of a soft sort of reminder that there's a rule
04:06about the data in the field.
04:08If that's checked, that means that the user can choose to ignore it;
04:12however, if you uncheck it, that means they have no choice but to comply before
04:15they can proceed on with their activity.
04:17They could, of course, just delete the record they're working on, but they won't
04:20be able to create a record, and ignore your field validation.
04:24So now in the central section you'll see that we've got the various different
04:26choices that we have to apply validation to a field.
04:30These validation rule options that you see here are not mutually exclusive,
04:34meaning that you can pick more than one, and therefore have various different
04:37rules that the data will have to pass in order to be added into the database;
04:41however, some of them really don't make sense to choose both at the same time,
04:45so FileMaker won't allow you to do that.
04:47For example, choosing Unique or Existing, it's only going to allow you to choose
04:51either/or because those conflict with each other and it doesn't really make sense.
04:55However, if I say, Not empty and Existing, it will allow me to do that.
04:59You'll also notice that Strict data type > Numeric;
05:03I can only choose one of those rather than multiples.
05:07So under Strict data type, I can say, this field must only have numeric data
05:10entered, a 4 digit year date or be a time of day.
05:15As we saw here, I can check Not empty, which is what we want to do in this case,
05:19or choose from either a Unique value or Existing value.
05:22These are probably the most common settings that you may have inside of FileMaker.
05:26Member of a value list ensures that the field value that you're trying to enter
05:30into the field also exists in a value list somewhere within our database.
05:35Later on in this movie, we'll show you how to create value lists, and this is
05:38just a number of one of the useful ways that you can use those value lists once created.
05:42In range is pretty self-explanatory. It gives you two entry boxes, and whatever the
05:46data that you enter in must fall within the range, whether your field is a
05:49number field or a date field, it will be able to determine whether or not the
05:53date falls within the range or a numerical value falls within the range.
05:57Validate by calculation is very popular;
05:59however, it's going to require an understanding of the calculation dialog and
06:02functions which we'll be covering later on in this title, and we're even
06:05going to use the Validate by calculation option as a demonstration to show how those work.
06:10So now finally, we're just going to leave the AddressEmail validation
06:12settings to Not empty.
06:14We'll hit OK, and hit OK again.
06:17Now, let's create a new record.
06:19When we try to commit the record, you see when we get this message,
06:23"AddressEmail" is defined to require a value, and you must enter a value.
06:29So until we enter something into this field, it's not going to let us pass,
06:33but one thing that you'll notice is that that message is a little bit nondescript.
06:39So there's something that we can do about that if we need to.
06:42First, we'll enter a value to let us move on.
06:47We'll go to Manage > Database, under the File menu, and go to AddressEmail and
06:52double-click on it, and you'll see we've got Not empty chosen.
06:55But if you notice down below, we can choose to Display a custom message,
06:58should the validation be violated.
07:00So in this case, we can do something a little bit more user-friendly, like "You
07:10must enter an e-mail before proceeding."
07:12Now, when we hit OK, and OK, and try to create a new record, you see that it's
07:17a little bit more user-friendly of a dialog than the other message that popped up earlier.
07:22One important thing. Since we're going to be using this database for our various
07:26other exercises, we don't want the users to have the same experience where they
07:29keep seeing this message.
07:31So we're going to just delete a record, we're going to go under File > Manage
07:37> Database, and we're going to turn off the Required, and we're going to turn off the Not empty.
07:44This way it won't be a hindrance to us when we're doing other exercises.
07:48But you notice though, that by deleting the record, it doesn't require us to
07:51enter a value, and that's because FileMaker doesn't care if you're deleting a
07:54record, because that data is not going to violate the rules that it had set up
07:57for the data that's already storing.
07:59FileMaker Field Validation allows you to test data against specific criteria to
08:04warn your users if a field value does not pass muster in some way,
08:08thus allowing you to keep your data consistent and reliable.
08:11All are keys to having an effective storage mechanism inside your
08:14FileMaker database.
Collapse this transcript
Building with container fields
00:00There is a special type of field that we haven't reviewed yet, that's called the
00:03Container field, and Container fields comprise an important building block
00:07for any FileMaker Pro solution, in which you want to store and/or display more
00:11than just text, numbers, dates, and times, like we've been working with so far.
00:15With the Container field, your database solutions can store and display digital
00:18images, videos, play music or sounds, and even store electronic documents, such
00:23as PDF or Word documents.
00:25The Container field is a versatile data repository that can store any sort of
00:29binary data, and binary just is a generic term for data that cannot meaningfully
00:33be represented as text.
00:35When we set up our fields in our database, under File > Manage > Database, and
00:41you'll see that we set up a field already called CompanyLogo and gave it the
00:45field type, Container.
00:46So let's use this field to experiment with Container fields and the data
00:49that they can store.
00:51So once we've got a field defined, which we do already, let's go in the Layout
00:55mode, and we're going to practice inserting a Container field into our layout.
01:00We'll talk more about inserting fields into layouts when we discuss the chapters
01:04on working with layouts, but for now we can either choose Insert > Field, or you
01:10can choose, on your toolbar, the Field tool, which we'll use in this case.
01:13Simply click down with your mouse, and you'll see your cursor turn to like a
01:16hand that's grabbing a field, and we'll drag that down to an area in our
01:21layout, and we'll release it.
01:22Now, FileMaker pops up and asks us, what field would you like to place here?
01:27We'll say CompanyLogo, and hit OK.
01:31Since the Container field can contain images or video or sound, we might want to
01:35resize it so that it's a little bit larger so that we can actually see the
01:38contents contained within.
01:41So when you have a field selected, which you'll see by the handles in the four
01:44corners, you can grab any one of the corners to click down, drag, and then
01:48release to thus change the size of your field.
01:51You can easily identify Container fields on your layout, because they don't have
01:55text baselines, and that the name of field stays centered, regardless of how
02:00large you make the field in Layout mode.
02:02Now, back in Browse mode, if we go under View to Browse and hit Save for our
02:08changes, you'll see that we can click into this area now, and now it will allow
02:12us to go under our menu and hit Insert, which allows us to add different types
02:17of data into the Container field.
02:19You'll also notice that if you right- click or hold down the Ctrl key and click,
02:23you get these same options.
02:25Let's start by adding a picture.
02:27I'm going to choose Insert Picture and go into our Exercise Files, where we are
02:33going to choose this file called author.tiff and then select Open.
02:40Now you see the picture we chose in the field, and you'll notice that when you
02:44navigate back to the previous record, that image doesn't appear.
02:47So just like any other piece of data in a field, any one record will store any
02:52binary data, but only for that record where you've inserted it.
02:55Also, once you have data in the field and you click on the field, or the
02:59contents, by right-clicking, or in Mac, you can hit Ctrl and then click, you'll
03:04notice that we now have the option to Export Field Contents.
03:07So this way if I choose this option, you see that it allows me to export out
03:12the value that we're storing in the container and save it somewhere else on my database.
03:16This isn't quite as dramatic if I am the person who put the value in there,
03:19But imagine a database that's shared by various different users.
03:22if someone wants to take an image or a sound file or a movie that you've
03:25created, they can easily just log into the database, navigate to the record, and
03:29then right-click to save the file locally on their own desktop.
03:33You can remove data in the Container field by simply clicking on the field and
03:36hitting the Delete key on your keyboard.
03:39Now let's try adding a QuickTime.
03:41This time we'll do through it Insert > QuickTime.
03:44Now let's choose Managing Fields in the Exercise Files, and this time
03:48we'll choose a movie. I hit Open.
03:52Not only do we see the movie, but we see a bar down here that allows us to
03:55play the movie and control the volume, much like we would do so with any other type of movie.
04:03The same is true for sound files.
04:05So you can include video clips or audio clips, anything you want, and of course
04:10it will be only stored in that one record, and then naturally, any other user
04:14can just right-click to export that video out to their own desktop.
04:19Let's click inside and hit Delete to clear out that value, and now you'll see,
04:23if we insert a file, we can choose a TextFile, and you'll notice that when you
04:31click a file, it puts the name of the file with the extension and then an icon
04:35that represents that type of file.
04:37For example, if I click in and hit Delete again and hit Insert > File, this
04:43time I am going to choose a FileMaker file or a PDF, something that's not a
04:49standard file, you'll notice that the icon changes but that the entire name
04:53with the extension appear.
04:54One of the things you might notice here is that we're adding one file at a
04:57time to each container.
04:58Now, if you ever need to add more than one file to any one record, so for
05:03example, let's say you've got a customer record and you want to store their
05:06signature page for the original contract, as well as a company logo,
05:11that would require doing one of two things:
05:13either creating two container fields,
05:15one that would store the logo and then one that would store the signature page
05:18scan, or you can take any number of files and zip them together into a
05:23packaged set of files, and then you can just store that zipped package in the
05:27container as one single file.
05:29Now, there's one very important word of caution here.
05:31Your database will increase in size every time you add a file to a container
05:36field, and it will increase by the size of the file you are storing.
05:39What does that mean?
05:40Well, it's not a very big deal when you are adding smaller sized files, like PDFs
05:44and such, but if you were to add a four gigabyte video, which of course, four
05:49gigabytes is our maximum size capacity for a Container, if you were to add a
05:52video clip that was four gigabytes in size, that means now that your FileMaker
05:56database has just grown four gigabytes in size.
06:00Imagine if you add assets to Container fields for thousands of records of your
06:04database; your FileMaker database will get huge.
06:07Don't worry; FileMaker does have a file size limit of eight terabytes, which is
06:12pretty enormous, but still you're going to quickly encounter some performance
06:15issues when you're sharing your database over a network, or even just trying to
06:19import your database via e-mail, or any other kind of system like that.
06:23So the best idea is to either make sure you are conscious of the size of the
06:27files, or you can use this other option I'd like to introduce you to, which is
06:30called storing a reference to a file.
06:32So let's click inside here and hit Delete, and then go under Insert to File and
06:39choose one of the files that we want to insert,
06:41let's say, for example, this TextFile. But you'll notice in the bottom left-hand
06:47corner we have an option called Store only a reference to the file.
06:50You'll see when I click on that and hit Open, it still displays the image or
06:54file at the same resolution or quality as it always would have if I just
06:57embedded the file, but now it's just storing the path to the location of the
07:01image, or file, or video using the QuickTime engine to display the image itself.
07:06So since it's only storing a path, it's very small amounts of text rather than
07:10this huge video file, or image, or sound or whatever it is you are trying to
07:13embed in your files;
07:14therefore, storing a path almost has no impact on the overall size of
07:18your FileMaker file.
07:19This is a much more efficient way to store images or videos and just keep them
07:23as a reference for that matter, or movies, or files or whatever you want to store
07:26inside of Container field.
07:28Just keep in mind that the moment that the path breaks, so will the display of the image.
07:33So, for example, if I were to clear this out and insert a picture and choose
07:42Managing Fields / 05_06, and this time choose our image, storing only a
07:46reference to the file, there we have the image.
07:49But if I open my Exercise Files, and I move that image out, let's see what
07:56happens when I navigate back to the record.
07:58You'll see here, this file cannot be found.
08:01That's because I stored a reference that was specifically from this file to that location.
08:06If we move that back to the location and then Refresh, you'll see that it finds the image.
08:12Now, this can be very delicate, because if your file is stored on a network,
08:17that path is really from the server back to the file, so it can get kind of
08:21complicated and you need to be careful with it, but certainly there are ways
08:24that you can store this media as a reference, not impacting the performance of
08:27your file, but at the same time keep a centralized directory somewhere on your
08:31network that all users can use.
08:33It's great for you to use, but if however the purpose of the database itself is
08:37to store media or collateral documents in a common location accessible to all
08:41authorized users, then embedding the files in a Container field may in fact be
08:45the best solution for you.
08:46If the file size are large, then what you want to do is get a database that
08:50stores files on a hosted server, with plenty of fast storage and network access
08:55that all of your users can get to.
08:57This way when a user embeds something in a stored directory, that way all users
09:02will be able to have access from the FileMaker database back to that path.
09:05FileMaker Pro provides you with a really unique and interesting type of field,
09:09the Container field.
09:10This allows you in your database solutions to store and display digital
09:14images, video, play music or sounds, and even store electronic documents, such
09:18as PDF or Word files.
Collapse this transcript
6. Working with Records
Creating and duplicating records
00:00So far in this title, we've discussed how to work with FileMaker to set up
00:03tables and fields in a FileMaker file for you to store data.
00:07Now, we're going to turn the discussion to working with data in those tables.
00:10In this chapter, we're going to be talking about working with records of data,
00:14starting first with creating or duplicating records.
00:17If you open up the file entitled 06_01, you'll notice that it has two records
00:21of data stored in it.
00:22We know that because in the upper left- hand corner of the Status toolbar, we
00:26see that there is a total number of two records, and that we're on the second record.
00:30We, of course, can use the Book icon to navigate to the other records in the
00:34database, or simply type in a number and hit Enter to navigate us directly to
00:39the record of our choosing.
00:40A record in a database is an instance of whatever we're storing in the database table.
00:45So, in this case, we're in a layout based on the Customer table.
00:49So, that means that any one of these records that we're storing represents any one record.
00:53If you're familiar with spreadsheets, you'll be familiar with the Table view,
00:58and you'll notice that FileMaker records are no different than a row inside of a spreadsheet.
01:03Back into Form View. There's different ways that you can add records to your database.
01:07Most common are to go under the Records menu and choose New Record, or you can
01:11follow one of the shortcuts that you see listed next to the option in our menu.
01:16On a Mac, you would use Command+N, and on Windows, it would be Ctrl+N. You can
01:21also use the buttons in your Status toolbar. As you see here, New Record is one
01:25of your default options.
01:27Pressing this button will allow you to create one of these new records.
01:30We notice now that our count changed to 3.
01:33We see that some of the fields have already been populated, because those are
01:35set for Auto-Enter, and you'll also notice something else onscreen.
01:39All the other fields go blank.
01:40Now granted, you could have just come from a record that had data in all of the
01:43fields, and when you hit New Record, most of the things go blank.
01:47If you have a bunch of fields onscreen that don't have Auto-Enter, the entire
01:50field itself will go blank.
01:52It's important that both you and your users understand that you haven't deleted
01:55anything by hitting that button.
01:57But instead what you've done is created a new blank record that will allow you
02:00to enter data into the database.
02:02You're going to see that the fields onscreen are all blank, except for
02:05the _pkCustomerID, AddressState, the DateCreated, RecordCreatedBy, and
02:10the DataModified, and those, of course, were the ones that we set up with Auto-Entry.
02:14We covered Auto-Entry in the previous chapter.
02:16When you click inside of a field, you'll notice that that field becomes black,
02:20and your cursor starts blinking.
02:22That indicates the active field and the location of your cursor.
02:25This will allow you to add new information into the field, like, for example,
02:30the name of a company.
02:31Then after you've entered all the appropriate information, you can click
02:34outside of the field.
02:36This is actually how FileMaker saves data.
02:39So, at the moment that we were still in the field, and you see all of the other
02:42fields show up with the dotted lines, it hadn't yet saved it to the database.
02:46There is no Save button in FileMaker, because it is a database. And a lot of
02:50users who use other applications aren't used to this concept, because in most
02:53cases, you have to hit Save to commit any of the changes that you've just made,
02:57for example, on a spreadsheet, or on a Word document, or really anything else.
03:01But in FileMaker, and other databases, you just type the information into the
03:04field, and then click outside of the field, and this action is called
03:08committing a record.
03:09That's the activity of saving it.
03:11Now, keep in mind that you can't really navigate off the record.
03:14Anything you do, if you change to another layout or various other things, will commit it.
03:18So really, FileMaker almost has an autosave-type option.
03:23These other events that will commit a record include clicking outside the Field
03:26area, pressing the Enter key, unless, of course, you change the field behavior
03:31of the Enter key, and we'll discuss that in Layout movies.
03:33If you switch modes, for example, from Browse mode to Find mode, or Browse mode
03:37to Layout mode, your value will automatically get committed, or if you switch
03:40from one layout to another, or even creating new records by hitting New Record,
03:44or if you simply close the file completely.
03:47By the way, if you have any field validation that you set up in these fields,
03:50it's going to try to run the validation before it allows any of these
03:53activities to occur.
03:54So, not having data that passes muster might prohibit one of these
03:58activities from occurring.
03:59Tabbing from field to field within a record, however, will not commit the record.
04:03It's a good idea to get this concept of committing a record down, because you'll
04:06see this come up later in things like scripts and calculations, or just working
04:10with some more complex data entry concepts.
04:13There are other ways to create records, too, for example, using script steps, but
04:17we'll cover those in the chapter on scripting.
04:19Another way to add records to the database is do what's called duplicating a record.
04:22So, if you already have a record in your database, like this Record number 3
04:26that you see here, and most of the information in your new record is going to be
04:29the same, then you can save yourself some data entry by simply duplicating it.
04:33We can choose the option Duplicate Record, which then creates an exact
04:36duplicate of this record, except that that the primary key value has changed
04:40because that's the role of a primary key value.
04:42But we'll notice now that we can go in and type some other data, and thus commit it.
04:48You see the data in the original field doesn't change, but now we have a new
04:51record that was created using the original.
04:53So, this is a good idea if you want to save yourself a lot of data entry.
04:57The commands for duplicating the record can be found in the same locations, like
05:00we mentioned ,under the Record menu, or you can see if you open up your Status
05:04toolbar, you can add by right- clicking > Customize toolbar.
05:09You can add Duplicate if you'd like.
05:11It's not one of the defaults, however. Or you can use the shortcut keys: Ctrl+D
05:16on Windows or Command+D on Apple.
05:19Now, of course, since we've duplicated a record, you see that we've got four
05:22total records in our database.
05:23These two options, of course, are how you can create new records in your
05:26database, which are an important building block when you're managing the data
05:30that goes inside of your FileMaker Pro database.
05:32These two options for either creating or duplicating records are important
05:35building blocks when managing the data that goes inside of your FileMaker
05:38Pro file.
Collapse this transcript
Editing and locking records
00:00Once you have added records to your FileMaker database, or if you've already got
00:03records in your FileMaker database, you have the ability to edit the data that's
00:06already in those fields.
00:08Now I should mention that you can control whether or not some of your users, or
00:11all of your users, can edit values inside of the database.
00:15There's something that you'll find under File > Manage > Security, and it will
00:18allow you to set up accounts and privileges.
00:20Now, we are not going to be covering that in this title, but I urge you ,if
00:23this is of interest to you, to go check out the FileMaker Help System under
00:26the topic Security.
00:29You can also prevent users from entering a field when in Browse mode through
00:32Field Attributes, which we'll discuss in a later chapter on Formatting Layout Objects.
00:37But assuming that you've allowed users to make edits to the data that's in your
00:40database, all they need to do is click into one of the fields.
00:44You'll see that it puts a border around the active field, and puts the
00:48position of your cursor as a blinking line, and then they simply need to just start typing.
00:53You'll see here I am hitting the Delete key, and I am typing in a new value.
00:57I can now tab to other fields, or click into other fields if I'd like to.
01:02You see I've just Drag+Selected the entire contents and by typing anything into this field,
01:06it will overwrite the previous value.
01:08Now, once you've made a change to a field value, and you click outside of the
01:12record, this is what's called committing the entry.
01:15This is how FileMaker saves changes to data and once the record is committed,
01:19it's automatically saved to your FileMaker database.
01:22Therefore you, or your users, do not need to save any of the changes that you've
01:26just made, like you may have to in other applications.
01:28Now, keep in mind there is one way that you can undo changes.
01:31For example, if we go down into this Notes field and we type in a value, before
01:36we commit the field, there you see we've committed this value, but now if I
01:40make changes, I can go under the Edit menu to undo typing, which will then change
01:45the value that I just entered.
01:47You can do this multiple times, as long as the user has not committed the change.
01:51So it doesn't allow you a lot of recourse for updating any changes that you make
01:54in a field, but if you can train your users that before they commit, they can
01:58undo the changes that they've made.
02:00Otherwise, simply committing the record will commit those changes to the database.
02:03Another very important thing to know about editing records is that only one user
02:08can be editing a record in a database at the same time.
02:11This means that a user can only be editing a single record, not the concept of
02:15editing inside of the database.
02:17It's very common to share your FileMaker databases on a network,
02:20so in that case, you may have multiple users that are interested in working on a single record.
02:24Let's take a look at what that would look like.
02:26I am going to open up a new window which is basically, just another copy of the
02:29same database that I am currently working on, and you'll see by going under
02:33Window, to New Window, it's going to pop up the same database on the same record
02:38on the same layout, and this is just to demonstrate two different users trying
02:41to access the same record at the same time.
02:44If you are interested in more details on managing windows, feel free to take a
02:47look at the FileMaker Help System under Managing Windows.
02:49Now, let's say I am a user over here, and I've selected Record number 4, and I
02:54click inside the field, and I start making a change.
02:57User number 2, who would be on another computer, could be on Record number 1 and
03:01you see they can click into the Notes field, and they can start entering in
03:05whatever kind of value that they'd like to.
03:07Now, what if User number 2 navigates over to Record 4?
03:11Now, you see that we have two users modifying the same record.
03:15What happens now if I try to click inside this field and make a change?
03:18I am going to hit the Delete key right now.
03:19Now, you see a window popped up saying the record cannot be modified in this
03:23window, because it's already being modified in a different window.
03:26Now, that's a message that you see if you have two windows open at the same time, like I do.
03:30But the message that you'll see if you are sharing a database is very similar,
03:34just a slightly different wording, and it basically says another user is already
03:38updating this record.
03:39This is what's called Record Locking, and it prevents confusion while updating
03:43records in your FileMaker database.
03:44For example, if we allowed two users to edit the same record or even the same
03:49field at the same time, how's one user going to know that their changes that
03:52they've just entered got completely overwritten by somebody else?
03:55So when this record locking message appears in a multiuser environment,
03:58you'll see the information on the account of the person who is making a
04:02change, which allows you to possibly contact that person and say, hey, are you
04:05editing this field?
04:06Can I get in there when you are done?
04:07It's not a bug or anything to work around in FileMaker.
04:10It's actually there by design because this is a way that two users who are
04:13trying to edit the same record makes only one of them aware that their
04:16changes have been saved.
04:17So this way the other person is going to be restricted from making any changes,
04:20so that there is no confusion by the users or the database as to who got to
04:24save the last change.
04:25The concept of record locking is something you'll need to be taking into
04:28consideration when you are training your users on updating records in your
04:31FileMaker database when it's hosted.
04:33It's important for you to understand how changes can be made, and even some of
04:36the restrictions that may occur that prevent multiple users from editing the
04:40same record at once.
Collapse this transcript
Deleting records and backing up files
00:00In addition to adding and editing records inside your FileMaker database,
00:04deleting records is also pretty easy to do, and actually it might be a
00:07little bit too easy.
00:08I'm going to show you how you can delete data out of your FileMaker database and
00:11then talk to you about some ways that you might want to protect your database
00:14against accidental deletions.
00:15First, just like creating and duplicating records, you can delete a record by
00:19going under either the Records menu and choosing Delete Record, or using the
00:24corresponding Quick Key, which in Apple would be Command+E, or in Windows would
00:28be Ctrl+E. Or you can go under the Status toolbar and see the button for Delete Record.
00:33Selecting any one of these options will delete the record that you're currently
00:36on at the time that you perform the action.
00:38So you see here that we're on record number 4.
00:41So if I hit the Delete Record button, first you'll see that FileMaker will never
00:46just go ahead and delete the record.
00:47It's going to first ask your user, would you like to permanently delete this
00:51entire record with there default option to cancel?
00:54This is in case they unintentionally hit the Delete button and therefore don't
00:57have to lose the data.
00:58Your users can easily hit the Cancel button to not delete any records.
01:02However, if you do choose to delete a record, you'll notice now that your record
01:06count, in this case went, from four records to three records, meaning that that
01:10record is permanently deleted and no longer part of the database.
01:13You can't undo a delete, either.
01:15If you go under your Edit, you'll see that you have Can't Undo and Can't Redo.
01:19So there's no way to retrieve a record once its been deleted.
01:22Just like when you create a record, or you edit a record in FileMaker,
01:25deleting a record is final.
01:27You should also be aware that under the Records menu, right below the Delete
01:32Record option, is an option called Delete All Records.
01:35This doesn't have a corresponding Quick Key, luckily, but your users should be
01:39aware that if they accidentally select this option, instead of Delete Record,
01:43they're going to see a dialog that's supposed to be different, but to many users
01:47might not be different enough.
01:48You'll notice here that it says, Permanently Delete all three records, and it's
01:52getting that number three because of the Found Set that we've created.
01:55We'll talk more about Found Sets in the chapter on Finding Records, but the
01:59Found Set is however many records you currently have active in the database.
02:03If you have all records active in the database, that means that hitting Delete
02:07All will completely empty out your FileMaker database.
02:11This is a little bit too much power to put in the hands of your users, so your
02:14users should be cautioned during user training to never hit Delete All, unless
02:18they absolutely need to.
02:20As a matter of fact, you can configure Security to not allow users to
02:23delete records at all, or just allow Admin users to be able to perform delete activities.
02:28Since the database is just a storage container, you can imagine the bad
02:32repercussions when it is completely emptied out.
02:34Since we're discussing what happens when somebody accidentally deletes your
02:37database, it's probably a good time to talk to you about backing up your data.
02:41Now, there's a couple of ways that you can back up your database,
02:44first of which, you can go under your File menu and choose Save Copy As, which
02:48allows you a couple of different options for saving copies,
02:52either as an empty clone or a compacted copy that contains data.
02:56For a backup, you'll want to choose compacted copy.
02:59But the more common way to do backups is through FileMaker Server.
03:02If you're hosting your database, you can consult the FileMaker Server Help
03:06System to show you how to set up something that's called a Backup Schedule.
03:10However, if you do not host your database on FileMaker Server, it's a good idea
03:13to use the File > Save a Copy As activity as often as possible.
03:17You should never have just one copy of the database.
03:20You should always be employing some type of backup mechanism.
03:23It's very important, since the data in your database is usually the lifeblood of
03:26an organization, that you really need to have some sort of backup plan in place.
03:30When working with databases, everyone is bound to make mistakes.
03:33So FileMaker allows you the ability to delete records, so that you can correct
03:36your mistakes and therefore maintain the integrity of your database.
03:39However, users must use caution when deleting records, so that you do not create
03:43problems caused by permanently deleting important data.
Collapse this transcript
7. Importing and Exporting
Importing data
00:00So far in this title, we've been working with creating one record at a time,
00:04but the true value of a database is to store and manage a lot of data.
00:08The best way to get a large amount of data into your database at one shot is to
00:11import data from another source.
00:13We've already discussed creating a database from a spreadsheet, and even
00:17importing a spreadsheet into your database as a new table, but in this movie,
00:20we'll discuss just importing the data into your database.
00:24This will also allow us to work with large sets of data in some of the upcoming chapters.
00:28First, let's take a look at our Products layout.
00:30You'll notice here in Products that we no longer have any data,
00:33even though when we first set up this file we imported not only the table and
00:36field definitions, but also its data. But for the sake of this exercise, we're
00:40going to work with an empty Products table.
00:42So, in order to bring data into this table, we're going to use a function that's
00:46called the Import function.
00:47The Import function can be found under the File menu by choosing File,
00:51then Import Records.
00:53FileMaker allows you to exchange information with other applications by
00:56exporting data from other file formats, then importing that data into FileMaker Pro.
01:01So, here we're going to assume that we already have exported data from
01:04another data source.
01:05Most data applications will allow you to create data exports, so this is a
01:09pretty common function.
01:10So, what I'm going to do is choose File from the File > Import functions.
01:14We're going to choose the exercise folder 7/07_01.
01:18Now, you'll also notice, in the bottom left-hand corner, that you can choose from
01:24various different file format types.
01:26These are all the compatible import source formats.
01:29The most common are Comma-Separated Text, or a CSV file or, a Tab-Separated
01:34Text or a .TXT file.
01:36Then of course, there's two options for Excel, either the older format of Excel
01:39or the newer XLSX format.
01:42If FileMaker Pro does not support the format of a particular application, you
01:46may still be able to convert that data by exporting data from that application
01:50into a format that FileMaker Pro supports, like one of these on this list.
01:54For example, FileMaker Pro does not import Microsoft Access files,
01:58but you can export the data from Microsoft Access into a format that FileMaker
02:02Pro does support, and then import that data into FileMaker Pro.
02:06In this case, we're going to import data into an empty table, or the Products
02:11table, more specifically, and when importing, we should exercise more caution, as
02:15some of the Import options will overwrite existing data and cannot be undone.
02:19So, it's important first to pay attention to what layout you're on when you
02:23first invoke the Import dialog.
02:25Here, we've purposely chosen the Products layout, because it's based on the
02:29table, Products, that currently has no data.
02:31But if I was trying to import Products data, and I happen to be on the Customers
02:35layout, it's going to try to force that Product data into the Customer layout.
02:40That's not the desired effect that we're going for here.
02:43So, step number one is pick the context or the layout that represents the table
02:47for which you're trying to import data. Then go under File > Import. Now we're
02:51going to choose the Products.csv, which is a Comma-Separated Text document, and
02:56we're going to hit Open.
02:57The first thing that you should know is that the source file you're selecting
03:00doesn't need to have the same number of fields, or have fields in the same
03:04order as the target file.
03:05It just needs to have the same type of data.
03:07So, in our case, this Comma- Separated File has fields created for all the
03:11different types of attributes for each product.
03:14During this Import process, this Import Field Mapping window allows you to line
03:18up the different fields from your source with the appropriate destination fields
03:22inside of your target table.
03:23Let's open up this window just a tad, so we can see all the fields.
03:26You'll see here that we've got the source on the left-hand side, which is
03:30Products.csv, and then our destination table, which is going to be the target
03:34where all the data is going to go.
03:36You see that at this point, you can change to other tables, but right now we're
03:39going to stick with Products.
03:41On this screen, you have a couple of decisions that you need to make.
03:43The first one is that double-check to make sure that your Target table is
03:46correct before you proceed, and you can see here that we've got the correct
03:49one, Products, chosen.
03:50Then you're going to see the two sets of fields, the one on the left, and the one on the right.
03:54At this point, you're going to have to line up the field, so that they actually match.
03:57One way you can start to line them up if you have similar field names is by
04:01using this dropdown menu in the bottom right-hand corner.
04:04You can choose last order, creation order, field names, for example.
04:07By choosing field names, you see that it's given us a little bit of a head start
04:11by lining up some of them with the data that might be in the right spot;
04:15however, you'll see some that do have the same name aren't lined up appropriately.
04:18That's what these little handles are for within FileMaker that allows to line up
04:22these fields to the right spot.
04:23Only the fields in your Target side, or the right side, can be moved.
04:27So, in the case of Cost, we'll want to click on the Field and move the handles
04:31up, as you see in the blue highlight, to line up with the Cost field.
04:35There's a couple of other ones that would work in the same manner.
04:37Now, in some cases, you're going to be lining up fields that don't have
04:42names that match exactly.
04:43Like, for example, the fields in our Target file, called Unit Dimensions, is going
04:48to line up with the field from the Source, called Dimensions.
04:52You'll also notice that in this case, there isn't an arrow between the two fields.
04:55An arrow indicates that we do want to move fields from the Source to the current table.
05:01If we uncheck the arrow, by simply clicking in between two fields, we'll see
05:05that that will omit them from the Import.
05:07So, once you're done lining up your desired fields, you'll want to select the
05:11values that you do want to import by making sure they have an arrow, and
05:15unchecking the items that do not.
05:17You'll also notice that some fields, like Extended Cost and Extended Price, don't
05:22have arrows next to them and show up in gray.
05:24That's because those are calculated fields that you cannot put data into,
05:27because they're evaluating data from various other fields, and you will always
05:31omit these from your Import.
05:33As a matter of fact, if you try to include them, you'll see the arrow with the
05:36red line next to it, which as indicated down here below, means the Target cannot
05:40receive data into this field.
05:42So, we'll make sure that those are all turned off.
05:45Now, once you have all your fields lined up between the Source and the Target,
05:48you'll need to choose whether or not to import the first record.
05:51You'll see that option here in the bottom left-hand corner of your window,
05:55and you'll choose that option if the Source file uses the first record as column headers.
06:00Many times, you'll see this with spreadsheets that use the first row to identify
06:04what the column header names will be.
06:06In our example, our first row is the column header information, so we do want to
06:10check this option, so that we don't import a record that has the words Dimension,
06:14or Description or Price inside the appropriate fields in our new product table.
06:18If you get all the way to this stage, and you realize that in your current table
06:22you don't have a field for you to be able to map up with one of the Source
06:25fields, you can always go down to the bottom right-hand corner and hit your
06:28Manage Database button, which will bring up the Manage Database and go right to
06:32Fields and allow you to create a new field.
06:34Once that new field is created, you'll see that on the Target Fields list, and
06:38then you can match up your Source field with the new field you've created.
06:42This makes it so that you don't have to close out this window and start all over
06:45again, just because you've forgotten a field.
06:47Now we're ready to import, so we're going to hit the Import button.
06:50Before it proceeds with the import, you're going to see the Import
06:53Options window up here.
06:54The main decision to make here is on the top, whether or not to perform
06:58autoenter options while importing.
07:00If you recall when we discussed setting up autoenter options, anytime a new
07:04record is created, things like Date Created or serial values like Primary Keys
07:09can be automatically populated for every new record.
07:12Since, in this case, we're actually going to be creating a new record in our
07:15database for every record that exists in the source, we have the option here to
07:19say whether or not our autoentry values should be triggered.
07:22In this example, we actually do want to check the box, so that our Primary Key
07:26values, or our _pkProductID values, will continue to serialize, and at the same
07:31time FileMaker's internal counter will be updated to the new serial value
07:36reflected by the total number of records we're importing into the Product table.
07:40After we hit Import, we then see something called the Import Summary.
07:43This shows the total number of fields that were imported, or any errors that may have occurred.
07:48An error would indicate that it did not import a record, because one of the
07:52fields had violated a validation setting,
07:54for example, if you set up a field in your database, to only accept nonempty
07:59values into a Product Name field, then those records from your source will be
08:04skipped during the import if they do contain no value.
08:07However, if your Validation setting is set to Only during data entry, then they
08:11will be included in the import and will not show up as an error.
08:15Once we dismiss this summary, we hit OK, and now we see that we've got 30
08:19records in our new Products table.
08:21FileMaker not only added the new records, and lined up all the fields as
08:25we've instructed, but you can see here, it automatically created serial
08:29values for every product.
08:30If we go under the File > Manage > Database, double-click on the _pkProductID,
08:36we'll see that it's also updated the new value with the new number of records
08:40that are in our database.
08:41You'll also see that it's created what's called a Found Set that includes all of
08:45the records that we imported in.
08:46This way, if we already had, let's say, a thousand records in the database, and
08:49we import in 30, it doesn't mix them with the general population of data until
08:54we get to approve them one last time.
08:56That way, we could go under Records > Delete Found Records, and delete the newly
09:00imported records, in case we've done something wrong during the import process.
09:04Now, we're going to do one more example of the imports to show a
09:06little different method.
09:07We'll do it a little bit quicker this time, File > Import Records, the same way
09:11as we had done before.
09:12This time, we're going to select FileMaker Pro Files, and we're going to choose
09:16a FileMaker file called Products_Plants.
09:19I wanted to show you this option, because importing from other FileMaker
09:22databases where the fields match is a lot easier of a process.
09:27We simply then choose this matching names option, and all of the fields
09:30automatically sync up with their appropriate fields from the source.
09:34Now we hit Import, perform autoenter options again.
09:37And this time you'll see we have no errors, but ten new records were created,
09:40and the ten new records that were imported are isolated as a Found Set, giving
09:44us an opportunity to delete these records if we need to.
09:48The true value of a database is to store and manage as much data as you can, and
09:52the best way to get a large amount of data into your database at one time is to
09:55use the Import functionality.
Collapse this transcript
Importing records to refresh data
00:00In previous movies, we've discussed how to import large data sets from other data sources.
00:05You can also import data into your tables repeatedly using the same data source
00:09in order to obtain certain updates to the fields within your target table.
00:13In this video we're going to do some initial steps of data import, and then I'm
00:16going to show you how to use another data import to refresh data.
00:19First, we're going to start with importing records into our Customer table.
00:22Since we've done this already in a previous movie, we're going to move through
00:25these steps a little quickly.
00:26This time we'll start with the Customers table as our target; therefore we
00:30will navigate to the Customers layout.
00:31Once we've chosen our target, we go to File > Import and choose File, and from
00:37our Exercise Files we're going to choose the Customers Excel spreadsheet.
00:45Now we are going to choose the option for Field Names, and now were going to
00:50line up the Field Names on the left- hand side, which is our source, with the
00:54right-hand side fields, which are our current table.
01:00Now once we've lined up all the fields from our source with the fields from our
01:03target, we're going to want to go and omit all the fields we don't want to
01:07import by making sure that the arrow between the two fields is not selected.
01:13Now let's hit Import, and in this case we're going to choose to perform the
01:17autoenter option so that our primary keys get updated.
01:20After a moment we see that we've imported in 1,524 records into our database.
01:26We hit OK, and now we notice that we have brought in the first record of just Field Names.
01:31Now in this case, we can just hit Delete Record and delete the one record.
01:36But now that we see we've got all the other records that we've imported in
01:40from our import source.
01:41Now let's take a look at the Import Source for second.
01:44Here we see all of the data that we've imported into our FileMaker database.
01:47Now in this example, let's say that we're working with an import source that gets
01:51created from another application on a daily basis, but sometimes the data from
01:55the import source changes.
01:57Let's say, for example, we go in to a couple of Notes fields.
02:10We've made those changes, and we add a last name to one of the records.
02:15We'll hit Save on the source.
02:17Now back in FileMaker, we can see those same records in our database.
02:22We see that there is no Notes field in the first record, no notes in the second,
02:26no notes in third and on number four, there's no last name.
02:32So one way we can maintain the records that we've got inside of our FileMaker
02:37database, but still bring in only the updates from a source file, is also through
02:42the Import activity.
02:43So what we're going to do is we're going to perform another Import.
02:46We'll go to File > Import Records and choose File again.
02:51We're going to point to the same import source, and when we hit Open, it's going
02:56to bring us back to our Import Field Mapping dialog.
02:58The good news is in this case, FileMaker remembers what our last order was, so
03:02we don't have to go through the activity of matching up these fields.
03:05But now in this case you see down in the Import Action, we've got
03:08three different options.
03:09We're going to choose one of these other options to allow to use do this import.
03:13The three different options that are available to us include adding new records
03:16from the source file, which is really a default import, and that's what we've
03:19done in our previous movies.
03:21You'll notice though at the bottom there's an option that's called Update
03:24matching records in found set.
03:26With this selected, you can update matching records and fields in your target
03:29file with data from another file.
03:32After selecting this option, we go back up into the Import Field Mapping area,
03:36and now we will only select the fields that we want to update.
03:39So, for example, we've only made changes to notes and last name, so let's
03:44uncheck all the other fields.
03:46You'll notice now also when you first click on one of these fields, you get this double arrow.
03:51We will see down here that's one of the match records based on this field options.
03:55We'll get to that in a second.
03:56So we want to click every field twice that we do not want to include in this update.
04:01Now you see we've only indicated the last name and the notes fields as the
04:05fields that we want to update on this import.
04:07When you have the Update matching records in found set option selected, you also
04:11need to determine what the match fields are.
04:13If the data in a match field of a record in the target file matches the data in
04:17the match fields selected of the record in the source file, then that record
04:22will be chosen to update.
04:23So, for example, if we happened to choose a value that we feel will be unique
04:27in each record, let's say, for example, AddressEmail, when we first click on it
04:33we get the arrow which would just simply include it in our updates, but if we
04:36click on it again we get the double arrow, indicating that this is a match
04:39record based on this field.
04:41The match fields you choose must uniquely identify each record in your database.
04:45For example, in a database of people you could use just one match field like
04:49this Email, or we could use a combination of fields.
04:52For example, if the Email matches and the First Name matches, then we know
04:57we've got a match record.
04:58In that case, only will the updates in the two fields that we've chosen in the
05:01source file be pushed over into the target file.
05:04You'll also notice when you choose Update matching records in found set that
05:07you've got another option here to check: Add remaining data as new records.
05:11That means if you've added new records in your source file, and they do not have
05:15a match in your current table,
05:16the new records will be added each time you refresh via import.
05:19We don't have any new records in our source file, but this is a good
05:22default option to check.
05:24You'll also see that we're going to make sure to omit the first record, to
05:27only bring in the data so that we don't have field names represented at one of our records.
05:31Now when we hit Import, we get the same message, Perform autoenter options.
05:37In this case, we don't want to perform any autoenter options because we haven't
05:40chosen any fields that have autoenter associated with them.
05:43We only have the Notes field and the Last Name, so in this case, it really won't
05:47perform any tasks for us anyway, so we'll just turn it off.
05:50We hit Import, and now when you read this message, it does say, You've just
05:54imported in 1,523 records.
05:56But if you hit OK and you look, you'll notice that you haven't increased anymore.
06:00You had 1,526 records in the database before, but now you have a Found Set of 1,523.
06:06That's because over in your source file, we see we've got 1,524 records, with the
06:12first row counting as the column headers.
06:14What we're seeing here is that a Found Set will be created with all of the
06:17records that were determined to have the match.
06:19Now the more interesting thing that's happening here is now we'll notice, in the
06:23notes fields, that previously didn't have a data for the first three records that
06:27we've got all the data from the updates from the source file.
06:30Also, in record number 10, we notice that a last name has been added.
06:35So this process can be very useful, for example, if you might have a copy of a
06:38database on your desktop computer and another copy on your laptop computer.
06:42You can update some of the files in your office with the changes that you make
06:44on the road, or you can just select some of the fields to update while leaving
06:48the records in fields to do not select untouched within your database.
06:52This is a great way to refresh data inside your FileMaker database with updates
06:56from a source file that could be FileMaker database, Excel or any other
07:00supported import format.
Collapse this transcript
Exporting data
00:00FileMaker Pro allows many sophisticated ways to connect to other
00:03non-FileMaker data sources.
00:05However, sometimes you might want to just share some of your data without a
00:08direct connection to those sources.
00:10In these cases, you can use FileMaker's ability to export data out of your
00:14FileMaker database in order to share.
00:16You can export FileMaker data to a new file and then open that up in
00:20another application, or use that file as an import source to import into the other application.
00:25So in this movie, we are going to take a look at exporting.
00:27First, if we take a look at the file, we see that we are in the Customers
00:30layout, and we also see that we've got 1,523 records in our database.
00:34Now, these are important, because if we do export right now, it's going to
00:38export out customer information.
00:40But if we navigate over to the Products table, for example, it's going to export
00:44out the product information.
00:46It's important that you first choose a layout that's based on the table that has
00:49data you want to export before you even initiate the Export command.
00:53The other thing is that FileMaker will only export the amount of records that
00:56are in a current Found set.
00:58So, for example here, you see that in Products, we've only got 10 records
01:02chosen, even though we have 40 total records stored in the database.
01:05If we perform an export right now on this layout, only 10 records will be exported.
01:10But if we go back to the Customers layout and then go to File > Export Records,
01:15we see that we have the Export Records to File window appearing.
01:19Here we've got a couple of options to choose from.
01:21First, what are we going to name the file we're exporting?
01:23We will call this one Export.
01:26And where do we want to save it?
01:27We will choose Desktop.
01:29Then you want to choose the File Format.
01:31If we click on this dropdown, we see the different File Format types that we
01:35have to choose from.
01:36FileMaker allows you to export out as text files or some specialized Merge or DBF files.
01:43You can also export a Found set of data out as an HTML Table, which could be
01:47useful if you are building a static Web page.
01:49You can also export data out of FileMaker into another FileMaker Pro file, which
01:54can be useful to create backups, and if the application that you're sharing data
01:58with imports XML data, you can choose the XML option, leaving us with the two
02:02other Excel Export options.
02:04Here we are going to choose Comma- Separated Text, which then appends the name
02:08of our file with .CSV.
02:10These are the most common types of File Formats that are able to be imported
02:14into other non-FileMaker data sources.
02:16Now we hit Save, and we are presented with the Specify Field Order for Export window.
02:21You see here on the left-hand side of this window that we have a dropdown that
02:25lets us choose from any of the different tables that we had in our database.
02:28We will keep it on the Current Table, but you also see that it's on the Current Layout.
02:32Sometimes you have a layout that has only a subset of the fields in your table.
02:36In this case, we happen to have all of them.
02:38But it might be easier for you to export files out if there's a smaller amount
02:42of fields to choose from.
02:43But in this case, let's say that we want to just export out our customer mailing
02:46information, so it can be uploaded to a bulk mailing system.
02:49So in that case what we do is we will choose fields, on the left-hand window, that
02:53we want to include as part of this export.
02:55Here you see when I select AddressCity, I can choose the Move button, or I can
03:00double-click on a field, or I can click on a field, hold down the Shift key and
03:06hit Move, and we see both fields that I had selected moved.
03:09Now, once you see the fields in the Field export order, I can select one and use
03:14the handles to move them into a specific order.
03:16I can do CompanyName first, Street, City, State, and Zip.
03:21Also, if you make a mistake, you can always hit Clear and then go back and add
03:25more fields after that.
03:26Once you have selected all of the fields, you can choose the Export button, and
03:30now we see that we've got our export file on our desktop, and opening up this
03:34file will show that we've exported out all of the records, but only the fields
03:39that we've chosen during the export process.
03:42You can export out as many times as you would like out of your FileMaker
03:45database, in whatever way that you choose, without any risk of changing or
03:49deleting the data in the original file, unlike importing, where each time
03:53you import, you're adding more records or changing existing records in your database.
03:57The importing and exporting features can serve as valuable time-saving
04:01functions, especially when you're working with large sets of data or have users
04:04without access to FileMaker Pro.
Collapse this transcript
8. Creating Layouts
Understanding layouts
00:00FileMaker Pro developers spend a significant amount of time working with
00:03layouts because layouts are the primary way of presenting and organizing
00:08data in FileMaker Pro.
00:10Layouts serve both as user interfaces, as well as areas for design and development.
00:14Throughout this chapter, you're going to learn how to work efficiently
00:17and effectively with layouts, which is an essential skill for any
00:20FileMaker developer.
00:21Layouts come in various shapes and forms, and can be rather simple or extremely
00:25detailed, all depending on the needs of the particular system that you're trying
00:28to create, as well as the aesthetic sense and design skills of the creator.
00:33Generally speaking, FileMaker is going to have one of three different layout types.
00:38First, you're going to see that there's a Form View, which is what we're looking
00:41at here with Customers.
00:43The Form View is different from any other type of layout, because the Form View
00:47will only show one record at a time.
00:48But it's generally a good idea for you to have at least one Form View per
00:52primary table in your database.
00:55This way you're giving users a good place to do data entry, to do searches, or
00:59to edit data onscreen, or if they just want to see the most amount of
01:02information onscreen at a time, most likely you're going to use a Form View.
01:06Commonly, these layouts are referred to as Detail layouts.
01:10Also, it's common to have a List View.
01:13You see we've got Customers as a detail, but we can also click on List View.
01:19List View just simply changes the property of a layout, and allows us to scroll
01:23through and see many different records onscreen at any given time.
01:27Finally, other types of reports can be made up of Table Views, which is really
01:32just another way to view many different records in a List View, but developers
01:36also like to call certain layouts reports.
01:39Reports are layouts that are specific ways to view and output FileMaker data.
01:44Layouts are the primary user interface and display mechanisms in FileMaker Pro,
01:48and each individual data entry screen, List View or Report, is going to be a
01:52separate layout within your database system.
01:56You can see here that this one FileMaker file has four different layouts.
02:00In some applications, you might need only a handful of layouts, and in other
02:04applications you might need several hundred.
02:06There is no practical limit to the number of layouts that you can create in a database file;
02:10it all depends really on what you need to do.
02:13Later on in the movies in this chapter, we're going to create Detail layouts for
02:16each primary table, and then a corresponding List View, and then in the
02:19Reporting section, we'll create reports.
02:22In order to create a report, you must do so when you're in Layout mode.
02:27Once in Layout mode, you'll see that the Records menu changes to Layouts,
02:31and allows you various different options where there used to be options for your Records.
02:35Here, you can create a new layout, duplicate a layout or delete a layout, or
02:40even navigate to the various different layouts that you currently have.
02:43You can restrict a user's ability to access Layout mode by changing the settings
02:47in his or her privilege set.
02:49For more information on this, see Security under FileMaker Help for details.
02:54As a FileMaker developer, you'll spend a lot of time going between Layout mode
02:58and Browse mode, modifying your layouts.
03:00There are a couple of different ways that you can do that,
03:03first of which, you can go under the View menu, or you can use one of the
03:07shortcuts that's available to you, or you'll notice on the very bottom of your
03:11layout, you can toggle between the modes by simply choosing the mode that you
03:15want to navigate towards.
03:16However, you'll find that probably the most efficient way is by using a keyboard shortcut.
03:21Now, you see that we have four different layouts already created in our database.
03:26We haven't created any of those layouts, but what we did is we created new
03:29tables in this database.
03:31Every time you create a new table, FileMaker will automatically create a
03:35form layout for you.
03:36If you create all the tables at once and define all those fields, it will also
03:40place all the fields onto that layout as well.
03:43So, you see we have the four default Form View layouts created already for us.
03:48If you want to create a new one, you go into Layout mode and create new layout.
03:52In the following movies, we're going to explore how to create List layouts for
03:55each one of our primary layouts, as well as some specialty ones, like Mailing
03:59Labels and Envelope layouts.
04:01Because layouts are the primary way of presenting and organizing data in
04:04FileMaker Pro, and layouts serve both as user interfaces as well as areas for
04:08design and development, you'll spend a significant amount of time working with
04:11layouts, and you'll want to be familiar with the concept of a layout.
Collapse this transcript
Using the Layout Assistant to create List views
00:00We've talked about the different types of layouts that you traditionally create
00:03inside of FileMaker databases,
00:05one of which is a Form layout, which is called the Detail View, which displays
00:09all the fields possible onscreen at a time.
00:11But there's another field type that's called a List View.
00:14List View is not only a way to view your layouts and records, but it's also a
00:19way that you can create a layout in order to show the maximum amount of records
00:23onscreen at a given time.
00:24Perhaps you want to create one of these List Views, or maybe you just want to
00:27display the same data with a different look or functionality, but in either
00:30case, you'll need to create a new layout.
00:33So, let's say that we want to create a List View for each one of the primary
00:36tables in our database.
00:37We'll begin by first going into Layout mode.
00:41There are various different ways you can enter Layout mode.
00:43You can go under the View menu and choose Layout mode, or use the shortcut key,
00:47which is Command+L on Mac, or Ctrl+L on Windows.
00:52In either case, this will get you to Layout mode.
00:55Once you're in Layout mode, you can go under the Layouts menu and choose New Layout/Report.
01:00You can use your quick keys for Ctrl+N or Command+N, or hit the New
01:04Layout/Report button.
01:06This pops up the New Layout/Report dialog window, which is very useful for
01:10creating various different types of layouts.
01:12You'll see that on this screen, you've got a couple of different decisions to make.
01:15The first one is the most important.
01:17When you're creating a layout, the first and most important thing that you need
01:21to specify is what's called the context of the layout.
01:25This is the term for what table the layout will be based on.
01:28Every layout in your FileMaker database has to be based on one of the tables in your database.
01:34So, for example, what we're trying to do here is to create a List View for each
01:37of the primary tables.
01:38Since we already have a Form, or Detail View for customers, we're going to first
01:42start off by creating a List View for customers.
01:44So, that means that this layout will need to be based on the table, Customers.
01:49So, this is the first time we're seeing in our FileMaker database that we're
01:52creating two layouts based on the same table.
01:54Again, you can create an unlimited amount of layouts in your database, and an
01:58unlimited amount based on any given table.
02:00So, in this case, we'll choose Customers, and the next decision we're going to
02:03make is what we're going to name the layout.
02:05Here, we'll call this layout Customer List, to make it obvious to our users.
02:10Then we're going to choose whether or not this layout will appear in the Layout
02:13dropdown list in Browse mode.
02:15All layouts will appear in the Layout dropdown list in Layout mode, so that
02:19you can access them and manipulate them accordingly, but only some of them
02:22will appear in Browse mode, and those are the ones where you have this option checked.
02:26We want all of our users to be able to use the Customer List, so we'll leave
02:29this option selected.
02:31Next, we need to select a layout type.
02:33We've got various different layout types to choose from.
02:36We've got the Standard form, which allows us to create a Form View or a
02:40Detail View layout.
02:41We've got Table View, which allows us to create a spreadsheet type view with
02:44multiple records onscreen at a time.
02:46Similarly, a List View will also give us multiple records onscreen at a time,
02:50but it won't appear as though it's a spreadsheet.
02:52We've also got Reports, Blank layouts, Labels, and Envelopes, all of which we'll
02:57use in upcoming movies.
02:59In this case, we're going to choose List view, since we're creating a
03:01Customer List view.
03:03We see, as we choose each one of them, our preview option changes on the right.
03:07This gives us a little bit of an idea of what our layout is going to look like
03:10when we're finished.
03:11The other option when you choose List view is whether or not you want to
03:14constrain the columns to a page width.
03:16Here, you would have the print driver cutoff area on your layout, and if
03:20you choose to constrain, it's going to wrap your List view around and give you multiple rows.
03:25In the majority of the cases when you create a List view, you're only going to
03:29want to have one row of information.
03:31This way, you can maximize the amount of data that you can fit onscreen for
03:34either printing off various different records, or just viewing as many onscreen
03:38at a time as you can.
03:39So, we're not going to choose Constrain columns to page width.
03:43We're just going to make sure that we only put as many columns that will fit
03:46on one printed layout.
03:48Hitting the Next button allows us to specify the fields that we want to
03:53include in our List view.
03:54Now, as I mentioned before, it's pretty traditional to create a List view for
03:58every primary table that you have in your database.
04:00This will be helpful when you're doing things like searching, or printing
04:03multiple records, but the key on a List view is that it's only going to have a
04:06subset of the fields.
04:08It will have enough fields for you to identify whether this is the record
04:11you're looking for.
04:12Then when you select that record, you can then navigate over to a Form view to
04:15be able see all of the fields available.
04:17So, when you're selecting fields for your List view, choose fields that will
04:20help you identify this record over other records in the found set.
04:24In this case, we'll pick things like AddressCity, and if I select it and hit the
04:28Move button, you see it show up in our Fields shown on layout/report.
04:32You can also just double-click on a field to easily get it over to the other side.
04:36So, we'll click State, Name, or choose NameFirst, and hold down the Shift key in
04:42NameLast, and hit Move, and you see both of them go over at the same time, and
04:48Title, and let's just say the last one we pick is AddressEmail.
04:52Just like other windows that you've seen that are similar, you can choose one of
04:56these items, and then grab the handles and move it to the top of the list.
05:00This will be the order in which the fields appear as columns from left to right.
05:10Once we've got all the fields, and in the order that we want, we can hit the Next button.
05:15Next, you'll see the option for choosing the record that you want to sort by.
05:18When you're in List view, you're going to see your records sorted in a certain
05:21way, and this is where you choose the field that you want to sort them by.
05:25Let's say, in this case, we'll pick CompanyName, and hit Move.
05:29Also, while we have the fields sorted, we want to choose whether or not we're
05:31going to see them displayed in ascending or descending order.
05:35We'll talk more about sorting options in the chapter on sorting.
05:38For now, we'll hit Next, and you see we move on to select the theme.
05:43FileMaker ships with many pre-designed themes, but the majority of the time you
05:49can use FileMaker's Layout tools to design the layout just the way you like.
05:52So, you'll just end up choosing Default or the Standard.
05:55In this case, they're both the same, but if I've made changes to one of my
05:58existing layouts, it's going to be saved as a default.
06:01That way, I can apply that same layout style to any new layouts I create.
06:05For now, we'll just choose Standard, and hit Next.
06:08On the next screen, you see we've got something called Header and
06:10Footer Information.
06:12This allows us to choose different pieces of static data that could appear in
06:15our header, which is the part at the top of the screen, or in our Footer, which
06:20is a layout part on the bottom.
06:22We'll choose Page Number in the bottom right-hand corner, and hit Next.
06:28The final option allows us to choose whether we want a script made.
06:32We haven't covered script yet, so we'll skip this until a later chapter.
06:36When you're done, you can choose whether or not you're going to view your
06:39layout in Browse mode, so that you can see the data, or in Layout mode, so you
06:43can make further changes.
06:44Let's go into Layout mode, and hit Finish.
06:47Now you see that I've got a new layout.
06:50The main thing that you'll notice is that the part that's called the body, which
06:54is where all the fields exist, is very short, compared to our Customer layout,
07:00where the body is much taller.
07:01You see in the Customer List, it's very short.
07:05This is what allows many records to appear on one layout at a given time.
07:09When we look at this in Browse mode, we can now see that we get multiple
07:14different records onscreen at a given time, making it easier for us to view all
07:18of the different records in either a Found Set or a printable layout.
07:22The other thing that you'll notice is the reason that we do see multiple records
07:25onscreen is not only because the body part is so much shorter, but also because
07:29we've chosen View As a list.
07:32If we didn't have View As a list, we would just see one record onscreen at a
07:36time with a very short body.
07:37We'll make sure that any List view that we create still has List view
07:42associated with it.
07:43In the next exercise file, you'll see that I will have created Product list and
07:47Invoice list layouts.
07:48You can do the same thing as additional practice, if you like.
07:51Because layouts are the primary way that your users will interact with your
07:54data, the Layout Assistant is a great way to quickly create new layouts for
07:58your system.
Collapse this transcript
Using the Layout Assistant to create labels and envelopes
00:00In a previous movie we looked at using the Layout Assistant to create a new List View.
00:05You can also use the Layout Assistant to quickly create specialized layouts,
00:09like mailing labels or envelopes.
00:11FileMaker has labels and envelope sizes built right into the Assistant to make
00:15creating layouts very easy.
00:17In this movie, we will create customer mailing labels and customer mailing
00:20envelopes using the Layout Assistant.
00:22So first we are going to start by going to our Customers table and creating a
00:26new customer labels layout.
00:28In order to do this, we will have to first enter Layout mode, because that's the
00:32first step in creating a new layout.
00:34Then we will invoke the new Layout Assistant, in this case by hitting the button
00:39in the Status toolbar.
00:40And then of course we go through our decisions that we need to make.
00:43What's the context of this layout?
00:44Since it's going to be customer mailing labels, we will keep it on Customers.
00:48Then we need to come up with a name, and we will call it Customer Mailing
00:55Labels, and choose to Include it in our layouts.
00:58Now we have to choose the layout type.
01:01If you notice all the way down on the bottom, we have an option for Labels.
01:04There are actually two Labels in here.
01:07Vertical labels is for Japanese format only.
01:10So we are going to check Labels, and we see in the preview that this gives us
01:14mailing label type layouts.
01:16We are going to hit Next, and you will notice that the next view here, we can do
01:21one of two different things.
01:22We can use custom measurements to determine the total number of columns of
01:26labels across, as well as the width and height in inches.
01:30We can also manipulate our page margins, if need be.
01:34But the most common thing to do is use the label measurement for one of the
01:37templates that's stored within FileMaker.
01:39You will notice that FileMaker stores layout default sizes for almost every
01:44single Avery label format available.
01:46You will see also that you've got options for DYMO labels, as well.
01:51DYMO and Avery are some of the leading producers of labels that you can buy at
01:55office supply stores.
01:56We will keep it on Avery 5160, which is one of the more popular label layout options.
02:02Hit Next, and now we are going to choose the fields that we want to have
02:05appear inside each label.
02:07But this is a little bit different than other layouts that we will create using
02:10this Layout Assistant, because when we choose the fields, they're going to
02:13appear inside this Label Contents box, which we can manipulate. I will show you.
02:18First, let's pick the fields that we want to have appear.
02:21Let's say, first CompanyName, and we will hit Add Field.
02:25Now, you will notice something kind of peculiar here.
02:27We've got the double brackets on each side of the name.
02:30This indicates that this is what's called a merge field.
02:33So this entire text area is just going to be filled with merge fields, which is
02:36kind of cool, because it allows us to format them as text and also to put
02:40different text characters in between the different values.
02:43For example, here, we are going to actually hit the Return character on our
02:46keyboard to start another line, and then we are going to pick AddressStreet, and
02:51we are going to hit Return again.
02:55Then we will choose AddressCity, but this time we will put a comma after it and
02:59a space, followed by AddressState, a space and then AddressZip.
03:06So in this case what we are doing is we are treating these fields just like
03:09they are placeholders, but in text format, allowing us to put spaces, return
03:14characters, add commas, and when we get into Layout mode, we can even add text
03:17formatting to them.
03:19So now we are going to hit Next.
03:20And now that we're finished, we can look at this in Preview mode or in Layout mode.
03:25Let's go into Layout mode first.
03:26We will hit Finish.
03:28Now, you will notice that this is a unique type of layout, because its grayed
03:32out the two columns to the right.
03:33We've chosen Avery 5160 labels, which is three columns, three vertical columns,
03:39and FileMaker only allows us to manipulate the furthest left column, because of
03:43course whatever we put in that column is going to show up in the others as well,
03:46it just wraps around vertically from column to column.
03:49You'll see it's one big textbox and when we double-click on it, we can use our
03:54cursor, which is now using the Layout Text tool, to go up and change the format.
03:59For example, we can say Style > Bold for the CompanyName and click outside of that.
04:05Now, you will see in the case of the merge field,
04:07it looks like some of these fields are bleeding off the side into the other
04:11column, but one of the things about merge fields is that they must occupy enough
04:15space on the layout to fit the whole name of the field, but when the data is
04:19placed in Preview mode, it won't necessarily take up that much space.
04:23So let's preview these in Browse mode by going to View > Browse mode and hitting Save.
04:28You will see that we've got only one record, and that's because we have to make
04:32sure that we are viewing these as a List.
04:34So we will change that to view as List.
04:36We see that we've got various different records.
04:39Now when we go into Preview mode, by hitting this button here or by going under
04:43View to Preview, this will show us what it looks like when we print.
04:47So now it looks like Standard labels.
04:50Now if we feed Avery 5160 label forms into our printer and print these, they
04:55will print in perfect size into these three-column-across label layouts.
05:01Similarly, we can quickly create Envelope layouts for customers, as well.
05:05Any new layout starts in Layout mode.
05:07So let's go View > Layout.
05:09Hit the New Layout/Report button, keep it in Customers, but call it
05:14Customer envelopes.
05:18Scroll all the way down to Envelope, hit Next, and we will do the same thing here.
05:26CompanyName, Return, Street, Return, City, comma, space, State, space,
05:41same thing we did in the last example.
05:43We hit Next, we look at it in Layout mode, and you see, again, it's just
05:48text, but it's put into a special area into the Layout, because we've chosen envelopes.
05:52Now when we go into Browse mode, we can see that we are viewing them as forms,
05:57because it's just one record per page; thus only printing one address on
06:02every given layout.
06:03Because layouts are the primary way that your users will interact with your
06:07data, the Layout Assistant is a great way to quickly create new specialized
06:11layouts that use columns or specific templates for envelopes or Labels.
Collapse this transcript
9. Working with Layouts
Using the Layout Setup dialog box
00:00In the previous chapter we discussed creating layouts, and once layouts are
00:04created you have various ways to configure each one of them.
00:07In this chapter, we'll discuss the different options available for existing layouts.
00:11Let's start first by looking at the Customer layout in Layout mode.
00:15We'll navigate over to Layout mode by going View > Layout mode.
00:20Although we chose a lot of settings when we created the layout for the first
00:23time, we can also edit this information at anytime in the future by using what's
00:27called the Layout Setup. The Layout Setup dialog can be accessed, in Layout mode
00:33only, by clicking on either this icon that's next to the layout list with the
00:37little pencil on it, or by going under Layouts to Layout Setup.
00:43In either case, the Layout Setup dialog appears, and you see that there are
00:47various different tabs, all with their own options.
00:50The first option you see is the ability to change the existing name of the layout.
00:55You could also choose to change the context of the layout. By checking your and
01:01checking this box, you can include the layout in the existing list of layouts
01:05when you're in Browse mode.
01:06You'll notice that all three of these options were available when we
01:08first created layout.
01:09So if you've ever need to make any changes, you would do them through the
01:13Layout Setup dialog.
01:14But in addition to the layout's Name and Context, there are several other
01:17attributes and behaviors that are controlled by the settings in this
01:20Layout Setup dialog.
01:22Under General, you'll notice that we have two options in the middle.
01:25You can see that Save record changes automatically is set by default.
01:29This makes it so that any changes that your users make while in Browse mode will
01:33be saved when they leave a record.
01:35So it takes on FileMaker's native functionality of automatically saving any changes;
01:40fowever, if you uncheck this box, users will be presented with a dialog to save
01:45the record each time they make a change and then leave a record.
01:48Let's take a look at what that looks like.
01:50Right now, if you don't make any changes, we say OK, and we go into Browse mode,
01:57and we make a change with no issues. We go into Layout mode, invoke the
02:05Layout Setup dialog, uncheck that box and hit OK. Now go back into Browse mode,
02:13and now we go in and we hit Delete and try to commit the record.
02:18Now, we see that a message appears asking us whether or not we want to save the record.
02:22If we say Don't Save, the value reverts back to where it originally was.
02:26If we click in there and hit Delete again and this time hit Save, we see that
02:30now we've told FileMaker to commit the change.
02:32This could be a good idea for users who are having trouble with
02:35making unintended changes.
02:38Back in Layout mode, with the Layout Setup, we'll return it to the default, and
02:42you will see that we've got an option down here below for enabling Quick Find.
02:47We're going to talk more about that in the chapter on Find, but this is one of
02:50the new features inside FileMaker 11.
02:53In the Views tab, you can control whether or not the user can use their View
02:58Settings to toggle between Form View, List View and Table View.
03:02It's probably a good idea, when you have a Detail View like the Customers record,
03:06to only allow them to view it in Form View rather than List View.
03:10So in that case, we can deselect this List View option and even the Table
03:14View option. That way the users won't have the ability to toggle between
03:17those different options.
03:19You also see down below that you can pick the Default View, if you have more
03:22than one option available, but you see now that List View has been grayed out
03:25because we've removed that option by deselecting that check box.
03:29You'll also notice that you must have at least one View selected; otherwise, no
03:32one can actually see your Layout.
03:34You'll notice within the Table View you have several different properties: You
03:38can show your grids horizontally and vertically, and you can choose from some
03:42of the default options which allows the users to resize column headers or
03:46reorder them by clicking them and dragging them, or even sorting by clicking on the column header.
03:51All those are pretty cool features when your users are in Table View, so you
03:54might want to leave those selected.
03:55One of the things that you might want to choose is whether or not to include a
03:58Header part and a Footer part.
04:00Those of these parts here, and in the upcoming movies we will discuss the roles
04:04of the different parts, which might help you make those decisions in the future.
04:07You can also do a custom height for your row. By default it'll take on a
04:1114-pixel height, but you can change that by selecting this option and
04:15then making the change.
04:17And finally, if you've come up with a Custom View that is based off of a Label
04:23Layout, you can decide to print in different columns, either across or down or
04:27use fixed page margins.
04:29This is when you get into more intermediate or advanced layout design.
04:33And then later in this movie, we are going to have an entire discussion on
04:36Script Triggers, but this is where you would assign what's called a Layout
04:39Level Script Trigger.
04:40So you can see that the Label Setup dialog allows us to modify many of the
04:46original settings on the existing layouts, and then provides us some control
04:49over some of the other functionalities that are based on the layouts that
04:52exist within our system.
Collapse this transcript
Understanding layout parts
00:00When you're working with layouts in FileMaker, you'll notice that they are
00:03divided up into several different layout parts.
00:05For example, if we go into Layout mode, we'll notice on the left-hand side
00:11that we've got the small, little bubbles, and there are also these dividing
00:14lines. These dividing lines indicate when a part has changed, and the bubble
00:19is a label for the part.
00:21In the case of the Customer layout, or really any standard form layout, we'll have
00:26a Header, a Body and a Footer.
00:28In this movie, I'm going to describe the different roles of these parts and how
00:31you can manipulate the parts that are currently on your layout.
00:33First of all, you should know that each layout must have at least one part,
00:37and layout parts can contain fields, portals, buttons, text and any other layout object.
00:43The dotted horizontal lines that I mentioned earlier mark the division between
00:46layout parts, and the part Label appears at the left of the divide line.
00:51There are other ways that you can view the layout parts; for example, if one of
00:55the layout parts is covering a field or a layout object that you want to work
00:58with, you can go to the very bottom of your screen and click to either toggle
01:02between Horizontal or Vertical display of the layout parts.
01:06Viewing them vertically is a pretty good way to keep them out of the way when
01:10you are designing your layouts, but by default you'll see them displayed
01:13horizontally, so that you can see the full name of the part.
01:16Layout parts are broken into two groups, Non-summary parts and Summary parts.
01:21Let's first take a look at the Non- summary parts, the way you work with the
01:25different layout parts is by going into the Part Setup dialog.
01:29You can access the Part Setup dialog under the Layouts menu and choosing Part
01:34Setup, here you'll see the parts that we currently have available, as well as
01:38some action buttons on the right-hand side.
01:40You'll notice that if you hit Create, you'll get another dialog called the
01:44Part Definition, which shows us all the different parts that we can create on a layout.
01:48We'll start at the top, and we'll just review the non-summary parts.
01:52The Title Header that you see selected by default will appear only at the very
01:57first page that gets printed, and will replace the normal Header on that page.
02:01The Header part, which is grayed out here because we've already selected one,
02:05will allow any layout object that's placed in that part to appear on the very
02:09top of every page that gets printed off of your layout.
02:12The Title Header, of course, will supersede that on the very first page; the same
02:17is true with Footers which are grayed out because we've already got one
02:19selected. That, of course, will allow any layout object that's placed in the
02:23Footer to appear at the bottom of any printed page or any page viewed in Browse
02:27mode, and Title Footer will do the same thing.
02:30It'll supersede the Footer and allow you to print only something on the very
02:33last printed or viewed page of your layout.
02:36The only non-summary part that leaves you with is then the Body.
02:40Of course, the Body is also grayed out here in this part Definition dialog
02:43because we already have a body in our layout.
02:46The majority of the layouts you are going to create will contain a Body, but
02:49there are some specialized, and somewhat intermediate techniques that involve
02:52having no Body part at all, so it's certainly not required.
02:56You can only have one Body part per layout in each object that you put in the
03:01body including any field object like a field, or text objects or even graphics,
03:05will appear once for every record in the Found Set that you create.
03:09We've seen that with list views when we create a very short or not very high
03:14Body part that will iterate itself over -and-over again, many different times
03:18depending on at what resolution your screen is set to.
03:21So if you create a Body part that has a smaller height, then you can create a List View.
03:25If you create a Body part that's the full height of your screen, you'll just see
03:28one record at a time.
03:30So if we hit OK to escape this option, you see that we had the Title Header
03:34selected, and it has now added the Title Header to our layout.
03:38Through the part Setup dialog, however, we can choose the Title Header
03:41either change it to a different part, or delete it completely, which we'll do in this case.
03:48You can also change the order of the parts, if you have multiple different parts
03:51together, by clicking on it and moving the handles.
03:54You see the locks here in this case because the Header cannot be moved
03:58anywhere, but at the top of the page, and the Footer can only be moved to the
04:01bottom of the page.
04:02So you really don't have any options to move these.
04:04But when you get several different summary parts involved, you might want to
04:07move them into different locations using the handles.
04:10And all the different selections that we've discussed will be made based on the
04:13needs of your specific layouts.
04:15We will be talking about the non- summary parts, like Leading Grand Summary and
04:20Sub-summary when sorted by, and Trailing Grand Summary, when we get over to the
04:24reports section, as they become vital components to creating subsummary reports in FileMaker Pro.
04:32Having an understanding of the different layout parts that are available to
04:35you will help you when you're planning and creating the different layouts in
04:38your FileMaker database.
Collapse this transcript
Understanding the new Inspector
00:00One of the most significant new features in FileMaker Pro 11, when it comes to
00:04working with layouts, is something that's called the Inspector tool, which can
00:08be used to view and modify settings for various different layout objects.
00:12You can access the Inspector tool by going from View into Layout mode, and
00:16you'll see now that there is a new button here that looks like a little i with a
00:20small circle around it.
00:22By selecting this button, you'll see a new palette appear onscreen, and within
00:28this palette, you see that there are three different tabs:
00:30Position, Appearance and Data.
00:33This is what's called the New Inspector palette, and it's brand-new to FileMaker Pro 11.
00:37You'll notice that since you have three different tabs, you can also invoke the
00:41Inspector multiple times.
00:43You can either hide it, showing your first Inspector, or if you go under View,
00:51you can also choose the check box next to Inspector, to show on, or you have a
00:55shortcut which is Command+I in Apple and Ctrl+I on Windows.
01:00You'll also notice, though, that you have this New Inspector option.
01:03Hitting the New Inspector will allow you to have two palettes onscreen at any given time.
01:08For example, you could hit Position on one, and Appearance on another,
01:12and you can also continue to add new Inspectors onscreen for as many different
01:17options as you'd like.
01:18So conceivably, you could have one on here for each of the three tabs that
01:21are available to you.
01:23What's nice about the Inspectors is they will stay open each time you access the
01:27Layout mode until you close them.
01:28You'll notice, if we go back in Browse mode, my Inspectors disappear.
01:32If I go back in the Layout mode, they'll reappear in the positions where I
01:36originally selected them.
01:39And if I close them now FileMaker remembers what that last position was.
01:43Many of the controls in the Inspector had previously been available via Windows
01:47or menu items in previous versions of FileMaker.
01:49For instance, you'll notice that the top sections of Position and Appearance
01:55tabs provide controls for an Object's Position, Size and Font attribute.
02:00These used to be in a separate object Info palette, which no longer exists in FileMaker.
02:05Many other applications follow the same palette concept, and now FileMaker has
02:09followed suit to make it easy to see nearly all of your object controls all in one place.
02:14We're going to be using the Inspector prominently throughout several of the
02:18movies remaining in this title.
02:20But if you wonder where some of the many controls from previous versions of
02:23FileMaker have gone, look first into the Inspector.
Collapse this transcript
Exploring the Status Area in Layout mode
00:00Once you've created layouts in your FileMaker Database, you'll want to start
00:03modifying them and making them more attractive and useful to your users.
00:07You may want to first make yourself familiar with the tools that you have
00:10available in Layout mode before you start making any changes.
00:13So, if we go into Layout mode, by going View > Layout mode, we'll notice that
00:18all the tools in the toolbar and all the icons will change when we go from
00:22Browse to Layout mode.
00:24We'll notice in Browse mode, we've got one Status toolbar, and in Layout mode
00:29we've got an entirely different set of tools.
00:31Starting in the upper left-hand corner, you'll notice that your Navigation tools
00:34now become the way that you navigate between the layouts in Layout mode.
00:38So, rather than giving you a full record count, you'll see the full number of
00:41layouts that you currently have in your system.
00:43You'll also be able to navigate between those layouts by using the Book icon.
00:48And if you click inside that field, and type in a number and hit Enter, it will
00:52navigate directly to the layout, based on its number.
00:55And you will see a button to the right of the Navigation tools, called the New
00:58Layout/Report button, which we've been using to create new layouts.
01:02Then you see a series of different tools, and by default you'll notice that the
01:06Pointer tool is active.
01:08That's what allows you to point and grab and select different items that are on
01:12your layout, and that's the most common one used, so that's why it's the default
01:16when you first enter Layout mode.
01:18And you'll notice that when you have the Selection tool active and you do click
01:22on something, that you can tell that a layout object is selected, because it's
01:25got these handles in all four corners.
01:29You'll see when I select something else, you'll notice that it has the handles available.
01:34Next, you will notice that we've got a Text tool.
01:36By clicking on this Text tool, it turns our Cursor into a crosshair and when we
01:41click into a certain area of the layout, it allows us to type in text that can
01:48then become part of our layout.
01:49So you don't have to just have text as field labels, but you can type your own
01:53text in when you are designing your own layouts.
01:55You can also double-click on any one of your field labels, and modify the text
02:00that displays for each field label.
02:02This, however, does not change the original name of the field.
02:05What might be a good idea is to make it more useful for users is if you go on
02:08and change some of your field labels, so that they have more user-friendly
02:12names, rather than the naming conventions that you applied when you were first defining them.
02:17You'll see a couple of examples of that here.
02:22To the right of your Text tool, you'll see that you've got several
02:25different drawing tools.
02:26For example, you can click on this Line Drawing tool to draw a line on your layout.
02:31You can also select the line with the Pointer tool and hit Delete to remove it.
02:35You've also got the ability to create a square, a rounded rectangle or an oval,
02:41by selecting one of these drawing tools and just picking the space on your
02:44layout and then releasing the Cursor.
02:47Next, you've got a series of layout tools that add different layout objects, that
02:51have different functionality to your layouts.
02:53We'll be using each one of these throughout the remaining chapters.
02:56As you will see, we've got Field Control options, the ability to add buttons
03:01and assign actions to them, create something called a Tab Control, Portals, Charts and so on.
03:07You'll notice another tool at the end, which is called the Format Painter.
03:11And if you select something using your Pointer tool, and then choose your Format
03:16Painter, the next item that you click will then adopt the same format as the
03:22original item you selected.
03:23This is similar to the Painter tools in other applications that you might be familiar with.
03:28If you are not already showing the Format toolbar, you can do so by clicking on
03:32the two As right next to the Revert button.
03:36This will drop down the ability for you to modify different text on your layout,
03:40much like this text that we have selected.
03:43We can change the Font, or even the Size, or even choose to Bold, Italic and
03:50choose different Alignment options.
03:53Clicking on this box allows us to choose a different color, as well.
03:57Here, you will see that we can choose different lines, whether it's a Line tool
04:00that we selected onscreen or the lines that are borders outside of our fields.
04:06And here you will notice some controls for lines.
04:09If you've used the Line Drawing tool in various different areas on your layout,
04:14you can choose the thickness of the line, the color of the line, and even any
04:21fill colors of any objects that are selected, and different effects and patterns
04:26that you can apply to either a line or different layout objects on your layout.
04:30And you can select them and delete them.
04:35Any changes that you make on your layout can be saved by simply clicking this
04:39button, or you can revert the layout back to its original design by hitting the Revert button.
04:44You can navigate back to Browse mode by hitting the Exit Layout button.
04:47You will also notice in your toolbar that you have a quick and easy way to get
04:51to the Manage Database, or managing any one of these other options instead of
04:55having to go into the File menu.
04:56I also have a couple of tips for you while you are in Layout mode, when you are
05:00using some of these tools.
05:02For example, if you want to select multiple objects at one time, you can
05:05drag-select, which means clicking down on your mouse and holding down the mouse
05:11as you drag, and you will see this dotted line appear, and you can select as
05:14many layout objects as you want,, and when you release, you see that they all have
05:18handles on them, allowing me to treat them as one object.
05:21So, for example, I can click and drag all these address fields down below the logo.
05:26Also, if I select a field while holding down the Ctrl key on Windows or the
05:34Option key on Mac, and while holding down those keys I drag, it will create a
05:40copy applying the same format into the field, but as I release, it will allow
05:45me to choose another field, with or without the label, to appear in that location on the layout.
05:53This is a good way for to be able to copy various different formats of the
05:57fields on your layout one after another as you apply new fields to your layout onscreen.
06:02You can also use the drag-select tool to select object and then hit the Delete
06:06key on your layout, thus removing it from the layout completely.
06:09Finally, you can also select the layout object, like a field, and when you see
06:14the four handles, you can choose one of the corners and then drag to resize the field.
06:21So here you see now, I have got a larger Notes field, allowing me to display more
06:25data in the Notes field than I had before.
06:27I'll be making some of the same changes on some of the other layouts in
06:30upcoming exercise files, but if you'd like, you can do the same on this file
06:34for more of a practice.
06:35All of these tools will become useful when making changes to the designs of your layouts.
06:40It's best to understand the tools that you have at your disposal before you
06:43continue on to make these layout changes.
Collapse this transcript
Managing layouts and layout folders
00:00A FileMaker Pro file can have dozens or even hundreds of layouts;
00:04therefore it's useful to organize your layouts in such a way that both you and
00:08your users of your database can easily find what you're looking for.
00:11There is a new feature in FileMaker Pro 11 that helps you accomplish this
00:15easier, and it's called the Manage Layouts dialog.
00:18You can access this newly designed Manage Layouts dialog in a couple of different ways.
00:22In Browse mode, you can go under File, to Manage, to Layouts, or you can
00:27also invoke the Manage Layouts dialog by using one of the quick keys like you see here.
00:32On Windows, you would do Ctrl+Shift+L keys together, and on Mac, you would do
00:38Command+Shift+L keys together.
00:42Also, when in Layout mode, you can go to the top of the Layout list and
00:47choose Manage Layouts.
00:49Of course, you do not need to be in layouts to modify this list. As you saw
00:53we are able to go to the File menu in the shortcut keys while in Browse mode as well.
00:57The Manage Layouts dialog box has been redesigned in FileMaker Pro 11 to be
01:02more useful, by allowing you to organize and navigate layouts in a number of different ways.
01:06First, you'll notice on the far left, there is check box in the first column.
01:11This indicates whether or not the layout will be included in the Layout menu
01:14while in Browse or Preview modes.
01:16This can be useful when you're hiding Utility Layouts that shouldn't be directly
01:20accessed by some of your users.
01:21To take a look at this in action, for example, we uncheck the Customer Envelopes,
01:28and go back into Browse mode and when we click on our list, we now see the
01:32Customer Envelopes are no longer available.
01:36However, if we go back into our Layout window and select the Customer Envelopes
01:43check box, we now see that available to us.
01:47However, when you're in Layout mode, regardless of whether or not you check
01:51one of those blue check boxes, all of the layouts will be available to you in the Layout list.
01:56This is how you can access them to make modifications, regardless if you can
01:59see it in Browse mode.
02:00You'll also notice in the Manage Layouts window that next to each layout you've
02:04got a double-headed arrow. Much like various other dialogs within FileMaker,
02:09this means that you can move your Layout Name, either up or down within the list.
02:13For example, if I want to move all of the Customer layouts together, I can
02:18select one of the layouts and while it's highlighted blue, I can click down on
02:22the handle and move it up until you see the blue line with the round head on it
02:28in the proper location.
02:29I can then release that, and you see that I have reordered the layout.
02:33Trying that a couple of more times, I will choose the Customer Envelopes and
02:39also the Customer List, and I put them now into a custom order.
02:44And one more time. We will just move Product List under the Product Layout.
02:48At the top of the Manage Layout dialog are two Filtering tools.
02:52One of these might be familiar to you if you've used other Apple applications
02:56because it's a pretty standard filtering tool. It allows you type in a keyword, and
03:02as you type, you can automatically see your list filtered to show only layouts
03:06that have that keyword in their name.
03:09You can hit the X to reset these.
03:11You'll also notice there is a dropdown menu to either Show All of the layouts or
03:15to see layouts in certain folders.
03:17But you see here, we don't have any folders defined, and that brings us down to
03:22the bottom left-hand corner, where we can define folders.
03:25If you hit the New button with the Plus sign, it's going to invoke the New
03:29Layout Report dialog, and you'll see that they have the same icon.
03:32But if you click the arrow next to it, it allows you to either invoke that
03:37window, or you can choose a new Folder or Separator.
03:40If we choose Folder, a window pops up, asking us to choose a name for out folder,
03:44and we will call them Customers.
03:48You now see a folder appear on your list, and it also has handles that allow
03:52you to select the line and then move the handles to the appropriate location on your list.
03:57Now putting a layout in a folder is a little bit trickier.
04:01You'll see here we have got the Customers Layout below the Customers Layout
04:04folder, and I am going to select the handles. And in this case I can click down
04:08and hold it and move it up, but right now by the position of the loop at the end
04:12of the line, this would only put it below the folder where it currently exists.
04:16But instead if I move it to the right a tad, and then you see the folder
04:20highlight, I can release it, and this now indicates, because of its
04:25indentation, that it's now contained within the Customers folder.
04:28We will try that again with the Customers List, and you see the folder
04:33highlight, and you release.
04:35Click, grab the handle, see the folder highlight, and release.
04:41You do that for each layout that you want to have contained within this Customer folder.
04:45I am going to create two more folders real quick, one is for Products, and
04:54you'll notice that this folder appeared on the bottom of the list.
04:58I will do that again and choose Invoices.
05:06Now this one appeared as a subfolder, which is not the desired effect, but the
05:10reason it did that is because we had a folder selected.
05:13So in this case, we can hit the Delete button on our keyboard to remove the
05:17Invoices folder, and instead make sure that that folder is not selected.
05:23Now we can define the Invoices folder.
05:27Of course, maybe we want to have a subfolder.
05:30For example, let's say we want to have one that's called customer reports.
05:33We can select the Customer folder, select Folder again, and type Reports this
05:40time, and then now move only our printable reports into that folder, in the same
05:48manner as we did in the first place, and we can even move the entire folder and
05:54its contents below the other two lists.
05:57And finally, you will see that we can collapse these, thus helping us clean up
06:03and organize our lists, and we can then move the folders into their appropriate
06:10locations using the same tools.
06:25Not only can you use these folders to help you organize your Manage Layouts
06:29window, but now you'll notice that your dropdown above allows you to just view
06:34certain folders at a time.
06:38But this also has an interesting effect when you go back into Browse mode.
06:42Now when you look at your Layout list, you see that you have got these cool
06:46dropdown menus that helps you make a more compacted list of layouts and direct
06:51your users to the appropriate groups of layouts.
06:58Back in Layout mode, going into the Manage Layouts window, you'll also see that
07:04when you select a layout, you can choose the Edit button to edit any one of the
07:09options in the four tabs in your Layout Setup dialog.
07:12Here we are just simply going to choose to rename these detail fields as
07:18Details; see how easily we can do that.
07:22But you'll notice, of course, that you can make any number of different changes,
07:31all from within the context of this Manage Layouts window.
07:35You'll also see that with a Layout or folder chosen, you can Duplicate, which
07:39would create either a new layout folder, or you can select a layout which then
07:43would duplicate the same layout and give it the name Copy at the end of it.
07:47Of course, with the layout selected you can then hit the Delete button, which
07:51will then delete whatever layout you have chosen.
07:54And the final point of navigation in this window is the ability to select
07:58a layout and Open it.
08:00You'll notice, in this case, it opens it as a new window over the original
08:04window that you had open, allowing you to navigate to these layouts in Layout
08:08mode, so that you can make modifications.
08:10With the number of your layouts and your solution constantly growing, it's a
08:13good idea to come up with a strategy for managing the layouts into folders.
08:17The new Manage Layouts window in FileMaker Pro 11 allows you one location to
08:22make any of the changes that your layouts require.
Collapse this transcript
10. Formatting Layout Objects
Arranging, aligning, grouping, and locking layout objects
00:00Layout Objects are the building blocks of layouts.
00:03Everything you place on a layout, be it a field or an image or a portal or a
00:07label, is considered an object.
00:09All objects have particular attributes that you can manipulate.
00:12However, you must be in Layout mode to be able to edit any layouts.
00:15So let's start there first.
00:17We'll go View > Layout mode.
00:20Once in Layout mode, you can group any combination of objects so that you can
00:24edit or move them together, or change the stacking order of objects to get the
00:28different effects when objects overlap.
00:30These are all done through Grouping tools.
00:32The Grouping tools can be found in your new Inspector.
00:35In order to invoke the Inspector, you can hit the i button, or what you'll
00:39probably get accustomed to doing is also hitting Command+I or Ctrl+I, while
00:43in Layout mode only.
00:45You'll see the Grouping tools can be found under the Position tab.
00:48We're going to be exploring all three of these tabs, but right now we're going
00:52to focus on the Position tab, and more specifically, the Arrange & Align set of tools.
00:57You see we can collapse all the other tools away, and just leave the Arrange &
01:02Align ones available to us.
01:03You'll notice there are several different things that we can do.
01:06We can Group, Arrange, Lock, Resize, Align or Space different groups of objects.
01:12For example, if you look in our Customer Detail layout, you can see that there
01:15is a series of fields that are not aligned properly.
01:18If we select all of these objects, we can use the Align tool to straighten them out.
01:22First, the best way to select a large group of objects is to click down on
01:26your mouse with your Pointer tool, and then drag-select all the objects that
01:31you want to work with.
01:33Here you can see that I'm fully containing all of the fields, so I'll release
01:37my mouse, and now I've successfully been able to select all the fields that I want to align.
01:42Now I could do this manually by using the arrows on my keyboard, and doing one at a time.
01:48But instead, I'm going to use one of the tools that I've got over here in my Inspector.
01:52In this case, we're going to use the Align tools.
01:54You see here by rolling over each one, you get a description of what each tool does.
01:59But I'm going to use the first one here, called Align left edges.
02:02By simply clicking that button, you see now that I've been able to exactly line
02:07up all of the fields that I just selected.
02:09Now we can do the same thing to the field labels.
02:11Since the field labels are not connected to the fields, let's drag-select those.
02:18Now you'll notice that we've got one that's overlapping the fields, but you can
02:21see that it still selected, because of the handles that appear.
02:25Now let's go into Align, but this time, let's choose Align right edges.
02:29Now you see that all of the fields have lined up to the right edges.
02:33However, they're not in the right position, because they still overlap the fields.
02:36This one is easy.
02:37We can just simply click the left arrow on our keyboard, and even hold it down
02:43until we get it all the fields to the desired position.
02:47This is the kind of thing that could have really taken a long time if we did
02:50them one after another.
02:51Now you'll also notice in the Company Name field, you'll see that the field
02:54labels are a lot higher than the field.
02:56Now this is something we could easily fix by just selecting the field label and
03:00using our arrow tools, or we could use one of our Align tools.
03:03I'm going to select both the Company Name field label, and I'm going to then
03:08select the field by holding down the Shift key.
03:11That's the same for either Mac or Windows.
03:13Once I have those two field objects selected, I'm going to choose the
03:18Align horizontal centers.
03:22Now you'll see those lines up.
03:23I'll do the same thing down here for Zip, holding the Shift key,
03:28horizontal centers.
03:29Of course, you can still finesse some of these arrangements by selecting a
03:34single object or objects, and just simply using your arrow keys.
03:39Another thing you may notice is that the CompanyWebsite field is a lot wider
03:43than the rest of the fields.
03:45This is probably more desirable, since the standard field size that we've been
03:48using probably doesn't fit a lot of the text that's going to be inside the field,
03:52like in Company Name, for example, or maybe some of the name fields, as well.
03:56There is a series of tools in the Arrange & Align section that will allow us to
04:00resize fields and groups the fields that are selected.
04:03So let's go ahead and select all of these fields again by clicking down, and
04:06drag-selecting, and then releasing.
04:10We see we've got all the fields selected now.
04:11You'll notice in the Resize, we've got a couple of different options.
04:16Resize to the smallest width, and Resize to the largest width.
04:20As you can see from the icons, depending on which one of these we choose, the
04:24field objects that we have selected will either constrain to the smallest size,
04:29which would mean the CompanyWebsite would be as small as the rest of them, or
04:33the rest of these would expand to the largest width, which is what we're going
04:36to do by selecting this button here.
04:39Now you see we've got much more manageable field sizes, all in the click of just one button.
04:44We might also want to use the arrow keys to select the CompanyLogo field label,
04:48and move it to more desired position.
04:50Now I'm going to demonstrate a Layout design technique that uses a lot of the
04:55Arrange & Align tools, but it's also going to use the Position tool that you see here.
04:59A lot of developers like to use the Shape tools that you see above, to be able
05:04to add a little bit of design to their layouts.
05:06For example, I can choose the Rounded Rectangle tool.
05:08You see my cursor becomes a crosshair.
05:12I can draw a border edge around all of the field objects that I currently have
05:19onscreen, just to sort of organize them all in the same place.
05:23Now one thing I want you to notice, now that we've expanded the Position
05:26section. You'll notice when we have an object selected or even a group of
05:30objects, we see several numbers show up.
05:33These numbers are actually giving us the measurement, or the size, of the selected
05:37field object or objects.
05:38In this case, you see that we've got a rectangle object that's 637 pixels wide
05:44and 427 pixels high.
05:47Now if in your copy of FileMaker you don't see px right here, which stands for
05:51pixels, and maybe you see something like inches, then just click on it like I
05:55just have, and it will toggle to the proper increments.
05:57But from my experience, I would suggest that you always use pixels since they
06:01are the smallest unit of measure.
06:03In most cases, on FileMaker layouts, you're really only moving Layout objects
06:06very short distances anyways.
06:08So toggle over to pixels, and then you can take a measurement as to how wide
06:13your Layout Object might be.
06:14You can move it around as well by hitting the arrow keys, and watch as these
06:19values change when I move this down just a tad.
06:22What this is giving us an indication is how far from the Left our Layout Object is.
06:27You see we're flushed to the Left, so it's 0.
06:30How far from the Top we are,
06:3122 pixels from the very Top edge of our window.
06:35How far from the very furthest right edge we are, as well as the distance from
06:40the Bottom of the selection to the Top of the layout.
06:43So this gives us a distance from here all the way to the Top.
06:48Now we might want to give a little bit of relief over on the left-hand side.
06:50So we can just click in here, and put a value in ,like let's say 5 or
06:55something, and hit Enter.
06:56You'll see it adjusts just a tad.
07:00We notice that one of our field labels is a bit off,
07:03so maybe we'll select this field label.
07:05Use our arrow keys to move it inside our new rectangle.
07:14Now we can see that once we no longer have an item selected,
07:18that we don't see any figures here inside the Position section.
07:21Now let's grab this oval.
07:22I'm going to show you another way to format a layout object.
07:25We're going to change its Color.
07:27Notice here in your Layout toolbar, we've got a section that says Fill.
07:33Once selected, you'll see that you get a Color palette.
07:35In addition to these standard colors, you can also click Other Colors.
07:39Now keep in mind that this is what the Other Colors window looks like on a Mac;
07:43on Windows it's slightly different.
07:44But I'm going to choose all the different options that I've got, until I find one that fits.
07:49Here we go. I'm going to use the Crayon one that's available to me in Mac, and I'm going to
07:53choose this color, and hit OK.
07:55Now you see my entire Layout object has changed color.
08:00Keep in mind that you can select several Layout objects, and apply color to them
08:03all at the same time.
08:05Now we're going to grab the Rectangle tool.
08:08We're going to draw a rectangle in the middle area.
08:15Now we see we have that selected.
08:17If we look, we see we've got the Width at 637, but let's select our
08:21Rounded Rectangle again.
08:22We see that we have the same Width there, but we notice that the Height is a
08:26little bit different.
08:27We've got 415 and 427.
08:32Let's say we make this one 410, and we'll type and hit Enter.
08:37We see that it just adjusted.
08:39Now let's align these lines up a little bit better by using our arrow keys.
08:43Make sure we've got square selected. Nudge it over.
08:49We see down here we can overlap just a tad.
08:54Let's move them down, so they're flushed with the bottom.
08:56We can also see that the 449 for the Square we drew matches the 449 for
09:02the Rounded Rectangle.
09:03Now we've got two layout objects.
09:04But what I'm going to do here is I'm going to select the Square, and I'm going
09:07to give that a different Fill Color.
09:10At this point, your Layout looks something like this.
09:13Now if I select both of the objects, and if you remember you can select
09:15multiple objects by holding down the Shift key,
09:18I'm going to use the Group tool to make them all one single object.
09:24You see that they've become one single object, because I've now only got
09:27four corners, even though I had all eight handles showing when both objects were selected.
09:32But the problem is that we can't see any of our field objects here.
09:35So we're going to use another one of the tool sets, called the Arrange, which
09:39allows us to move this layout object back or forward within what's called the
09:43stacking order on our Layout.
09:45At any given time, a Layout Object is either above or below other Layout
09:50Objects, with the original blank canvas background always being the furthest back item.
09:54So what we're going to do in this case is take our selected layout object, and
09:58select this option here called Send to back.
10:02Now that we hit Send to back, we see that all of the other field layout
10:05objects are presented forward, and now the users can see them and interact with them, as well.
10:11Finally, we can use the Lock objects,
10:13as you see here, to be able to lock this object, so that we can't
10:17inadvertently move it.
10:18This is customarily used for Layout design objects that you're done working
10:23with, that you don't want to mess up inadvertently while clicking on other Layout objects.
10:26You'll notice the difference between a locked object and an unlocked object.
10:30You can see when I select this field object here, I have the black handles, and
10:35here we've got gray handles, indicating that it's locked.
10:37Of course, you can simply unlock one of the objects by toggling the Lock icons
10:42within your Inspector.
10:44I'll be making the same changes to other layouts in the exercise file in
10:49upcoming Exercise Files.
10:50But if you want some additional practice, go ahead and do the same thing we've
10:53done here to your Customer Detail, Product Detail and Invoice Detail Layouts.
10:58Getting familiar with some of these tools is going to help you when you want to
11:00fine-tune the layouts that you've created inside of your FileMaker database.
Collapse this transcript
Placing and formatting objects, parts, and graphics
00:00When you're designing your layouts in FileMaker, in addition to being able to
00:04add Layout objects, like text or fields to your layouts, you can also add images.
00:08Now, images are normally found, contained within a field, like a container field
00:13on your layout, but you can just have images added as part of the layout itself.
00:17This will give you a little bit nicer design feel.
00:19Let's say, for example, you want to add a logo to your layouts in FileMaker.
00:23If we look inside our Exercise Files, we'll see that we have a file called Logo.jpg.
00:30Let's say we want to add this image in our Header inside of each of our
00:34layouts in our database.
00:36First, we'll have to go into Layout mode, because that's where we make all of
00:39our Layout design changes.
00:41If we want to add it into our Header, we notice that the Header part might be a
00:44little bit small to be able to fit any kind of a normally-sized logo.
00:49For example, if our logo is 50-pixels high, we're going to first need to resize the Header.
00:53So, you'll notice in our Inspector, and if you don't have your Inspector up you
00:56can hit this I button, or do Ctrl+I or Command+I, you'll notice that even when
01:01we select a part, we see that we can get measurements on the Height of the part.
01:07For example, the Header part right now is only 18-pixels high.
01:11So, let's say we want to make it larger.
01:13We can click inside the field that says 18-pixels high.
01:16We can type on our keyboard 55 pixels, and hit Enter.
01:19You see that automatically changes the size of our Header part.
01:24Now we can fit a logo, in this case a logo that happens to be 50-pixels high,
01:30into that Header part.
01:31So, now what we'll do is we'll choose Insert, and choose Picture, and
01:36we'll choose that Logo.
01:40You'll notice here that if you insert a picture, you can also store that only as
01:45a reference to the file.
01:46You'll notice this check mark's in the bottom left-hand corner.
01:49Now, that's only advised if the image that you're going to be storing is
01:52going to always live in the same location, as it pertains to where the
01:55database location might be.
01:57In this case, it's not going to be, because we're just using this as an image
02:00inside of a layout for design purposes.
02:03So, it's a good idea that we make sure, in these cases, that we uncheck the Store
02:07only a reference to the file, because otherwise, if we move that logo from its
02:10current location, we would have a broken image on all the layouts where we're
02:13using this for design purposes.
02:15So now we can hit Open, and we see the image appear on our layout.
02:20We can move it around, if we'd like, using our arrow keys, and find a
02:23desired position for it.
02:24You should keep in mind though, whenever you're working with images inside of
02:29your FileMaker layouts, you can use images that are the entire size of the
02:32layout, if you'd like to.
02:34A lot of times individuals like putting faded or watermarked logos or those types
02:38of things in the background of layouts.
02:40But keep in mind that whatever images you're adding, every time you add an image
02:44to one of the layouts in your FileMaker database, your FileMaker database will
02:47grow in size, proportionate to the size of the image that you just added.
02:52So, it's very important that you use smaller-sized images, or a good rule of
02:57thumb is to take Web-readied images, or if you're using an image software, you
03:01can save it for the Web.
03:03In that way, it's very small resolution, 72 dpi, those types of things.
03:07You're not going to really increase the size of your FileMaker file.
03:10For example, if you added a 1-megabyte logo to every layout in your database,
03:14let's say you have ten layouts,
03:16that's 10 megabytes in size that your database just grew.
03:18It's tough for FileMaker to render these layouts over a network, if you're in a
03:22shared or server environment.
03:23So, keep that in mind, when you're choosing images that you want to store on
03:27your FileMaker layouts.
03:28Once you have an image on a layout, it acts just like any other object.
03:31So, if you want to align it with other objects, like by selecting this image,
03:35and holding down the Shift key and selecting the Lock Layout object that we have here.
03:39We can use things like Align, if we want to, or line them up in the middle.
03:44So, FileMaker, as you can see, just treats it as just another Layout object.
03:49I'll be making these same changes on other layouts,
03:51you'll see this in upcoming Exercise Files, but you can do the same on these
03:54other layouts as well if you want some extra practice.
03:57Images are a great way to add some style or corporate identification to your
04:00FileMaker layouts or reports.
04:02If you find yourself working with graphics, use the tools that I've just
04:05described to get the desired look and feel on your FileMaker layouts.
Collapse this transcript
Formatting fields and applying field attributes
00:00If we look at our Customer Detail Layout, and we go into Layout mode, you'll see,
00:05just like is the case on all the other layouts in this database, that we placed
00:09several fields on the layout.
00:12Now when we place these fields on the layout, we don't necessarily have to
00:14settle for just their flat, plain-looking feel.
00:16You can use some Field Attribute tools to give them a different, and
00:19more professional look.
00:21So when you are in Layout mode, you can select any field.
00:23Let's say in this case, we're going to select the CompanyLogo field that we have
00:26in the middle of the screen.
00:27And then open the Inspector.
00:29If you don't have the Inspector open already, you can hit the i button, or
00:33Command+I on Mac ,or Ctrl+I on Windows.
00:36You can change the color of the field, for example, by going into the Appearance.
00:42So you've got several different options here for modifying the appearance of an object.
00:46We've got a field object, the CompanyLogo field selected, and we can change the
00:50color if we'd like, by selecting one of these colors,
00:53if we want to make it stand out from the rest of the fields on the layout.
00:59Or here we can just choose white, which makes it pop a little bit from the gray background.
01:04You'll also notice that the item next to it, although it is a selection of
01:08several different patterns, these first two here are the most useful.
01:11I'm pretty sure you're not going to use any of these patterns.
01:14But you might want to use this toggle here between having a Solid background or
01:20a transparent background.
01:22So you see even though we have a white color on this field and we apply the
01:25transparent background, you can see the gray color come through.
01:28In this case, we'll say Solid.
01:30That way, it cuts it apart from the rest of the fields in the layout.
01:34See, we can actually select a field, and hold on our Shift key, and do the same
01:43to all the rest of the fields in our layout, if we'd like.
01:45So I'll make that a Solid color.
01:50You see that we've now got contrast between the gray background and the field color.
01:56In addition, if we go back to selecting our CompanyLogo, we've got some effects.
02:00So by default, there are no effects on a field, or an object.
02:03But I could choose a Drop Shadow, for example.
02:06If you look very closely, you can see a small, little, 3D-looking Drop Shadow
02:11effect, which will get more dramatic if we go to this next line, and we choose
02:14Line, and pick, let's say, a thicker line point.
02:18You'll notice now that we've got this gray Drop Shadow effect behind it,
02:23we can change the Color of the lines to give it more contrast.
02:28So you can see there, it gives it more of a 3D effect, or it appears as it's
02:32kind of floating above your layout.
02:34Using these same tools, we can also affect the way the text appears inside of a field.
02:38For example, if we select the Notes field,
02:40you'll see that we've got an option here that allows us to display Text baselines.
02:45Those are these dotted lines here that show where each row of the text that's
02:48contained within the field will appear.
02:52We can choose to show Text baselines, give them different colors, if we'd like to.
02:58We'll just keep them as their default, as you see every one of your fields that
03:01contains non-container values has Text baselines by default.
03:05We can also make modifications to the text that appears inside the field.
03:09So, for example, I can choose a field, and then choose different fonts, if I'd
03:14like to, from the Text section of the Appearance tab on the Inspector, or even
03:18Highlight the values inside the field, Bold, Italics and such.
03:22I can also choose Paragraph Alignment.
03:24You're probably familiar with a lot of these text formatting tools from
03:27other applications.
03:28They all perform the same way here inside of FileMaker.
03:30So I can select a field, or a group of fields, and apply the same Text, or
03:35Alignment, or Line Spacing to them at the same time, or I can choose a text
03:39object, like the Customer Layout, and do the same,
03:41Toggle between Bold and Italic, those types of options.
03:46In addition to the way that a field looks when you are in Layout mode, you can
03:49also control the way that the data within the field is formatted.
03:52For example, if we navigate over to the Product Detail layout, and save our
03:57changes on this layout, you'll see that we have a series of fields that
04:01represent dollar values, like Price and Cost.
04:05When we select Cost, the Cost field was defined as a Number field, when we first
04:10set this up inside of the Manage > Database window.
04:12Therefore, it's going to contain numerical values, but more specifically here,
04:16it's going to contain dollar values, because it's the cost of a product;
04:20same thing with Price over here.
04:21So if we go into the Inspector and choose the Data tab, you'll notice at the
04:26very bottom, if we collapse some of these other sections,
04:29you'll notice that we've got a Data Formatting section.
04:32From here, if I drop down and choose Currency,
04:36it gives me various different options that I can use to apply towards the data
04:40that's going to be stored within these fields.
04:42So, for example, I'll choose Cost, I'll hold down my Shift key, and also choose Price.
04:46Now I'm going to choose Currency again, and it gives me several different
04:51options. Here I can choose Fixed number of decimals, and what the leading Symbol
04:56will be, whether or not I want to use a thousands separator, and some other
05:00international options that I can choose.
05:02If it's Negative, what Color do I want to show, those types of things.
05:09So now, if you go into Browse mode, save your changes, you can see that the data
05:14is stored in here as 2,787.50.
05:18But when it's formatted in the layout, we can see the Dollar sign and a
05:21thousands separator in the decimal places.
05:23We don't have a value inside of Price just yet.
05:25But this helps you format data appropriately based on how it's going to be handled.
05:30Now the thing to keep in mind is if there is another layout that also has the
05:33Cost field on it, we would have to apply the same formatting to it, in order for
05:37it to show this currency formatting,
05:40although I could just copy this field and paste it to another layout, and it
05:43would carry with it the formatting that I just applied.
05:46So keep in mind that applying formatting on the layout is only applying it
05:50towards that one field on that layout, unless you copy an already formatted
05:54field to another layout.
05:56Same is true for Date fields, by the way.
05:57It's not just for Currency.
05:59If you look at the Date Created field, you see that we can either format it
06:02as entered, or we've got some other options here to show different formats for dates.
06:07Now this does not change the underlining data in the database.
06:10If you remember, FileMaker is storing dates, for example, as an integer, the
06:14number of days since the year 1/1/0001.
06:17So it doesn't matter how you view it when you are looking at it in Browse mode,
06:21or when you are printing or viewing it in Preview mode.
06:24This is just simply a formatting instruction that you are giving it for this
06:27field on this layout.
06:29So, for example, if you save our changes as we go into Browse mode,
06:33you look, we could change this, for example, from the Standard Formatting to
06:39something like this.
06:43Now we go into Browse mode and hit Save.
06:45You see there are different ways. It doesn't change the underlining data or the way
06:48that it was entered,
06:49but you see where there are different ways that we can manipulate dates, as well.
06:53So there is a whole series of different ways that you can manipulate these.
06:56One other one I'll show you back on the Customer Detail is our CompanyLogo.
07:01If we go back into Layout mode, and choose CompanyLogo, you see that this
07:05last icon over here in Data Formatting allows us to give different
07:09instructions on how the images that might be contained within the container
07:13field will be managed.
07:15So here we can Crop to frame, for example, or Reduce the image to fit.
07:20So if you crop it, then an image that's any larger than, let's see, we've
07:25got 325 pixels wide.
07:27If you have an image that's let's say 500 pixels wide, it's just going to crop
07:30only 325 pixels portion of it.
07:34Reduce image to fit is probably the most general option.
07:38It's the default option.
07:39That's most likely what you're going to use, because no matter what the image
07:41size is that you're putting into your container field, you can make it fit
07:44inside of the size of the container field on your layout.
07:48Make sure you check Maintain original proportions, in that case ,as well.
07:51So here you can align images internally.
07:53So nine times out of ten you're going to say Reduce image to fit, Maintain
07:56original proportions, and align on your settings.
07:58I'll be making these same changes on other layouts in our Exercise Files, but if
08:02you're looking for some extra practice, feel free to go ahead and use this
08:05version of the exercise file to do the same.
08:07So you've got a couple of different formats that you can choose from there. Even
08:10though FileMaker stores data in specific ways internally,
08:13you can use the Field Attribute tools, and even some of the ways that you could
08:16format data inside your field to give your users a look and the feel that's
08:20appropriate to the data that's been stored, or the type of the field that you're
08:24placing on your layout.
Collapse this transcript
Setting field behaviors
00:00Sometimes when you place a field on a FileMaker layout, it's really just there
00:03for display, rather than to allow users to edit the data within the field.
00:07A good example of this would be our primary key for any given record in your database.
00:11The primary key that we have here, the Customer ID, is not a field that you
00:16want users modifying.
00:17As a matter of fact, if they do modify it, it could break any relationships that
00:20you've got set up between the customer table and any other child table.
00:23But as you see here, when I place this field on the screen, by default, it does
00:27allow entry into the field.
00:28This can be dangerous, since each record should have its own unique value and
00:32users should never change them.
00:34If you would like to control the way that the users interact with the data in
00:37your field, or whether or not you want to allow them to do so at all, you can do
00:40this through something that's called Field Behaviors.
00:43Of course, this all takes place in Layout mode, so let's go to Layout mode,
00:46into the View menu.
00:48And if we select our field, you'll notice under the Data tab of the Inspector -
00:53if you don't have the Inspector open, you can do Ctrl+I on Windows or
00:58Command+I on Mac, or hit this little I button here - you'll notice that there's
01:02a tab called Data, and in one of those sections in the Data tab is something called Behavior.
01:07By default, any field that you place in your layout will allow entry in
01:11Browse mode and Find mode.
01:13And what's interesting is that you can choose either one of the two modes.
01:16So simply put, you can choose whether or not you want your users to be able to
01:19click on this field when you're looking at it in Browse, which will allow
01:22editing, or allow them to enter the field in Find mode, which means that you can
01:26enter a Find criteria in the field.
01:28Now, the reason that they are separate is because entering data into a field in
01:31Find mode won't actually modify the original field's data, since there is no
01:35field chosen when you're in Find mode.
01:37So if you want to be able to search by a Customer ID but not allow someone to
01:40change one, then in that case what you would want to do is take the check mark
01:44off of the box next to Browse mode, but leave the one next to Find mode.
01:48Now, if we go into Browse mode and Save our changes, you'll see that we cannot
01:54click into that field on any of the records in our database;
01:58however, if we go into Find mode, you see that we can click right into that
02:03field, which allows us to enter criteria when we're doing a search.
02:06We'll cover more information on Find mode in an upcoming chapter.
02:10There's also a couple of other things you can control under the Field Behaviors dialog.
02:13Let me go back into Layout mode.
02:16You'll see that you can apply Visual Spellchecking to a field.
02:19So, for example, if you have your Notes field selected, you can choose whether
02:24or not to apply the Visual Spellchecking, which means as you type you can see
02:27a red line underneath it, whenever there's a word that does not match the
02:31spelling inside of your computer's dictionary.
02:34By default, it's left unchecked, so it's really up to you on whether or not you
02:37want to use that functionality.
02:38And you'll also notice that there's a Go to next object.
02:41We're going to cover something that's called the Tab Order in a later movie, but
02:45basically as you're tabbing, you will go from one field to the next, and that's
02:49traditionally, by default, done with a Tab key;
02:52however, you can change that behavior on any given field.
02:54So, for example, in order to be able to tab out of the CompanyName field, I
02:58could change it to the Return character, or Enter.
03:01One thing you should keep in mind, however, is that pressing the Enter key will
03:04commit changes in a field, so if you turn this Enter key on, it's not going to
03:08commit the changes in the field, but instead skip on to the next field that's
03:12not yet committed in the record.
03:13So you've got this concept of how you save something to FileMaker.
03:16If your users are used to just hitting the Enter key, which works on any other
03:20field by default in the system, then changing this around might be a little bit awkward.
03:24Although sometimes users that are used to working on different platforms might
03:27be used to hitting the Return key, which is a Return and Enter key on some
03:31keyboards, in order to be able to move on to the next field.
03:34So here you can allow Tab and Enter to move people on to the next field,
03:38because otherwise in FileMaker by default, if they hit Return, they are just
03:40going to add a Return character or an extra row of spaces inside of whatever field they are in.
03:45So I will be making these same types of changes on other layouts, and you will
03:48see these in upcoming Exercise Files.
03:49And if you want some extra practice, you can go into this file, the 10_04 file,
03:53and make these changes in other layouts yourself.
03:55Many fields in your FileMaker layouts will have their own independent
03:58usage roles, and working with the Field Behavior dialog will allow you to
04:01control these, one by one.
Collapse this transcript
Using the Tab Control feature
00:00The Tabbed User Interface is a popular design feature with many applications.
00:04FileMaker Pro offers you a Layout tool that allows you to create the tabbed
00:09interface in your layouts.
00:10And then when selected, each one of these tabs can display a unique set of
00:14objects and/or data, thereby allowing you to use the same section of layout real
00:18estate for multiple purposes.
00:20The term Tab Control refers to the entire Layout object.
00:23Each Tab Control in FileMaker can contain one or even more individual
00:27tabs called Tab panels.
00:28It's really not a navigation tool; rather, it's a layout organization tool used
00:33to selectively display different sets of fields.
00:35I am going to show you how to create a tabbed interface.
00:38If you open up your 10_05 Exercise File and navigate to the Customer Detail
00:42layout, you see what we have on this screen is a pretty classic situation of a
00:45cluttered screen, and way too much information all on one screen at a time.
00:49Now, if you could talk to your users and say, can I put these things into
00:53different sections on the layout?
00:55A lot of people might say that, yes, I could group these fields together.
00:58For example, we've already grouped some of the Address or Contact
01:01Information fields together.
01:02But you will see that these fall into different groups. If we look at, some
01:05might be Discount and Tax Rate, could be determined financial, for example.
01:09But let's say you do go back to your users and say, help me group these fields
01:14together, and let's say you come up with several groups;
01:16for example, you could have Contact fields, which could be your Address, maybe
01:21the Company Name, Web Site, Phone Number, those types of things, and then
01:24financial fields, Discount, Tax Rate. How about Notes?
01:28Maybe give the Notes its own Tab panel, so you can make it a lot larger, and it
01:31could take up more screen real estate.
01:32And the same thing with this logo, that seems to be occupying a great deal of
01:36space in the middle of our screen.
01:37Once you and your users have determined a plausible set of groups that your
01:41fields can fit into, what you'll want to do now is go into Layout mode, and
01:46you'll notice in our Layout toolbar, we've got something here called the Tab Control tool.
01:50Now, if we want to draw the Tab Control tool in the space that's currently
01:54occupied by the Fields, we'll need to make a little bit of room for it.
01:57So what I am going to do is I am going to suggest that we Drag+Select by holding
02:01down our Pointer tool, and when we Drag+ Select, we're going to grab all of the
02:07fields in the layout, and to put them into our Clipboard for a moment, we're
02:11going to hit Cut, which now gives us a clean slate to work with.
02:15We're then going to choose our Tab Control, which turns our Pointer tool to a
02:19crosshair, much like some of these other Tab Controls do.
02:22What we're going to do here is we're going to draw this Tab Control, and have it
02:26occupy the full space inside of our Customer Detail layout.
02:31Now what you see onscreen is something called the Tab Control Setup dialog.
02:35This is where it allows you to determine what number of tabs will appear in your
02:38Tab Control, and what you will name those Tab panels as well.
02:41And since we've determined that we've got four different groups of fields, let's
02:44create a Tab panel for each one of them.
02:47First, we will start with Contact, and hit Create. Let's see.
02:50We just type right into the Tab Name field.
02:54Financial, hit Create.
02:57Notes, and then Logo.
03:03Now, we've created all our Tab panels, but before we leave this window, there
03:06are some other settings to look at, as well.
03:08For example, which one of these tabs is going to always be in front whenever we
03:12land on this layout or navigate to the layout?
03:14Let's keep that at Contact for now, since Contact is where some of the main
03:17details are going to be located.
03:19You can also determine whether or not you're going to fully Justify to the Left
03:23all of your tabs, or they could be Center, Right, or Full;
03:26we'll just keep it as a standard Left, which will leave all the Tab panels
03:29drawing from left to right.
03:31The Appearance of the tab can either be Rounded or Square.
03:34We'll also leave that at Rounded, since these are all pretty common.
03:37And then finally we choose between the Tab Widths, and whether or not they can
03:40match the maximum Width of any of the label words.
03:43You see here that all our words are pretty much the same Width.
03:46So what we can choose to do here is give it a Label Width, Label Width plus an
03:51Additional Margin, Width of the Widest Label or the Longest Word, and give it a
03:57Minimum or a Fixed Width, which we can put in number of pixels or choose inches
04:00or centimeters, if we want to.
04:01But we'll just choose Width of Widest Label.
04:04Now when we hit OK, we see that we've got all four of our Tab panels appearing,
04:08and now we want to place the Fields onto our Tab panel.
04:11I am going to click inside the Tab panel with my Pointer tool, and we're going
04:15to go and hit Paste, and we see our fields come back onscreen.
04:19Some of them aren't going to fit, but we will make this work.
04:25So first, while we're working with this, why don't we grab the CompanyLogo
04:28label, hold down the Shift key, grab the CompanyLogo field, hit Cut, go into the
04:35Logo tab, and hit Paste.
04:38Move those inside the center.
04:40Go back to the Contacts.
04:42Let's do the same with Notes.
04:44Shift+Select Notes, hit Cut, go into the Notes Pane, click inside, and hit Paste.
04:53And let's give Notes a little bit more room.
04:55As a matter of fact, we probably don't need the field label anymore, since the
04:57tab can work as a field label.
04:59So let's hit Delete to get rid of that, and with our Pointer tool, we will move
05:03Motes up into the corner, grab the bottom right-hand corner, and let Notes
05:07occupy the entire area.
05:09Now, back in Contact, we've got two more fields down here.
05:12Discount Rate, Shift+Selecting these two field labels and fields, we will
05:18cut again, click inside the Tab panel, and hit Paste, position them right about here.
05:29Now, back in Contact, we've got a series of different fields that we can
05:32reposition inside the Contact Detail layout.
05:36One thing that might not be a bad idea is to take DateCreated, move that down
05:40into our Footer, RecordCreatedBy, move that into the Footer, DateModified.
05:49Maybe grab all of these by Drag+ Selecting, and if you recall, we've got a
05:54Inspector option under the Position tab and Arrange & Align.
05:59We can choose the Align on horizontal centers, and we see that those
06:04automatically sync up.
06:06So now we can take these other fields, just using our Pointer tool,
06:10Shift+Selecting where necessary, then we can move everything into position using
06:15some of the tools that we've already discussed.
06:30And finally, just the Address field.
06:32So here, we can put those right here, let's say.
06:37So now you see, when you go into Browse mode, you'll be asked to save your
06:41changes, which we will do.
06:43But now we've got the same layout, but much more room.
06:46We've got all of our contact information here is in the default Tab panel, and when
06:50we go into our Financial Tab, now notice that the First and Last Name field
06:55labels are showing up, even though those are placed over here.
06:57Well, this is an important part about fitting objects inside of your Tab panel.
07:01If you go back into Layout mode, you'll notice that these field labels actually
07:05extend off the edge of the tab.
07:08So if something extends off the edge of the tab, it's not going to be
07:10contained within the tab.
07:11So this is a very important note.
07:13So we will Shift+Select these options and then just drag their size smaller.
07:17So now when we go back into Browse mode, you'll see that the same thing is
07:22happening for Web Sites, so we will do that.
07:24So there's a little bit of finessing that's necessary, and you see everything
07:29else seems to be okay.
07:30So we go back into Browse mode, hit Save, and everything has got its own spot.
07:38You can also modify the appearance of Tab Control in several ways.
07:41For example, in Layout mode, if you double-click on one of the Tab panel
07:44names, you can reorder these in any way you want, by moving the handles around, if you would like.
07:53You can also nest a Tab Control within another Tab Control, which we will do
07:57in a later exercise.
08:00Just like any other layout object, you can change the Color or Appearance by
08:05using Fill options, Embossed, or Drop Shadow, change the line Widths,
08:09different things like that.
08:10A couple of things to keep in mind when moving and resizing controls.
08:12When a Tab Control is moved, for example, if we wanted to move this around, it's
08:18going to move all of its containing objects with it.
08:22But if you make a Tab Control smaller and the fields within it become
08:25exposed, they will need to be resized in order to still be contained within the Tab Control.
08:30So if an object no longer fits within a Resize Tab panel, much like we saw
08:33with our First, Last, and Web Site Field Labels, then it's going to pop out of
08:37the Tab Control and become part of the layout, thus appearing on every one of the Tab panels.
08:41I will be making some of these same changes on the other layouts in this
08:44database, and if you would like to get some extra practice, you can use the
08:4710_05 file and apply some of the Tab Controls to the other layouts yourself.
08:51The Tabbed User Interface is a popular design feature in many applications
08:55outside of FileMaker.
08:56So if you choose to use Tab Features in your own designs, your users should be
09:00pretty familiar with how they should operate.
09:02The Tab Control feature helps you easily create tabs to organize your fields,
09:06without having to ever create new layouts.
Collapse this transcript
Setting tab order
00:00A lot of computer users don't like having to take their hands off the keyboard
00:04when doing data entry.
00:05For example, one way that you can enter data into certain fields is to click
00:08into a field, make some changes, and then take your mouse and click into another field.
00:15But in most cases, users like to keep their hands on the keyboard and just tab
00:19from one field to another.
00:21An important aspect of creating an effective user interface is going to be how
00:24you manage how users move throughout the layout.
00:27That's really going to be a key to its usefulness to your users.
00:30The primary means for doing so is by customizing something called the Tab Order
00:34in order to create a smooth and logical progression, by which your users can
00:37then move from field to field, as well as from field to non-field objects.
00:42FileMaker creates a default Tab Order for each layout, according to the physical
00:45placement of the fields on the layout.
00:47So, for example, the order in which you've added the fields to the layout will
00:50determine what your default order will be.
00:52But that's not always going to be the most logical way that your users want to
00:55work with the fields.
00:56So if we go into Layout mode and go under the Layouts menu to Set Tab Order,
01:04you'll see a window appear called Set Tab Order.
01:07You'll also see that by each field and layout object, we've got arrows with numbers.
01:12And as you can imagine, this is the order in which the tabs features will work.
01:16And most of the time when you open up the Set Tab Order, you are already going
01:19to see numbers in these arrows.
01:20However, this sequence might not be the way that your users want to tab
01:23through the fields, and also, there might be fields that you don't want in your Tab Order.
01:27So the best way to set a new Tab Order is to go into your Set Tab Order window
01:31and hit Clear All, and then you see all the numbers are gone from the arrows.
01:35And then now what you can do is pick the order that you want to use by simply
01:38clicking, in order, into the Arrow Fields;
01:42you see here's 1, 2, 4, 5, 6, 7, and so on.
01:52And now I am going to leave these fields down below. Since users don't actually
01:55enter any data into them,
01:56we're going to leave those out of the Tab Order, and also we don't want
01:59users clicking into the Primary Key field anyways, so we will exclude that
02:03from the order as well.
02:04You'll also notice that number 2 is actually the Tab panel.
02:10So we've got the ability to tab from the CompanyName into the Tab panel, so
02:14that things like buttons or even this logo for that matter, we could have put
02:18into the Tab Order, if that logo happened to have a ScriptAction assigned to it, for example.
02:22When we're done with setting our Tab Order, we hit OK, and now we'll go back
02:27in Browse mode, save our changes, and we see we click into the CompanyName,
02:32and now we are going to hit the Tab key on the keyboard.
02:34You see it tabs over to the Tab panel, and now you'll notice I can go to
02:39different panels, if I want, by hitting the left and right arrows on my keyboard,
02:43and if I hit the Spacebar key, that will take me to that Tab panel.
02:47So you're going to need to instruct your users on how to use that.
02:51But now, if I hit Tab again, it goes into the fields in the order that we
02:55originally set it up, and then when it gets to the end, it starts all over again.
02:58But you will notice now if you go into Layout mode, and let's say we insert a
03:04new field, which we can do by saying Insert Field.
03:06We'll just pick one of these for an example, like Notes, for example, and if
03:12we place Notes somewhere else in the layout, and go into the Set Tab Order, we
03:19will see that what its done is it's automatically placed it at the end of the layout order.
03:24But we could manually go in and insert it in any one of these locations, if we want to.
03:29So, for example, we could say this would be 7, and this could be 8, that type of thing.
03:40So it will automatically add newly assigned fields to the end of the Tab Order,
03:44which makes it a lot more useful, but then you can go in here and either Clear
03:47All and Reset them, or just manually change a couple of them if you want to swap
03:51some of the fields out of the Tab Order.
03:53I will be making these same changes on other layouts, and you'll see those in
03:56upcoming exercise files.
03:58But if you want some more practice on Tab Order, feel free to go into the
04:0010_06 exercise file and go into Product Detail, or Invoice Detail to do the same thing.
04:06The order in which users can tab through fields can help make data entry a lot
04:10more efficient, and using this Set Tab Order gives you the control over how
04:14that's going to work.
Collapse this transcript
11. Finding Data
Using the basic find functions
00:00One of the key requirements of any data storage application is data retrieval.
00:04FileMaker provides this via its Find mode features.
00:07Now we've been covering a couple different modes throughout this title, and
00:10those of course can be found under the View menu. We've worked with Browse
00:13mode, which is the default mode, allowing you to enter data, edit data and just read data.
00:18Then of course, Layout mode, which helps us design our Layouts and make
00:21modifications to existing designs, and then there's Preview mode, which basically
00:25allows you to see what your prints are going to look like.
00:27What we're going to focus on in this chapter though is Find mode, and this is
00:30the mode where you perform Find requests.
00:33When you perform a Find request, FileMaker Pro searches through all the
00:36Records in a table, comparing the criteria you specify with the data that's in the table.
00:41Records with data matching the criteria become the found set, which is the
00:45subset of Records being browsed.
00:46Records that don't match the criteria are then omitted.
00:49So nothing happens to the total number of Records that are found in your
00:53database when you're searching.
00:54You're just getting any responses to your search as part of something that's
00:57called a Found Set, and the concept of found set is going to be very
01:00important moving forward.
01:01Once you have a found set, you'll work then with only those Records.
01:04For example, found sets can affect editing, sorting, printing, deleting,
01:09exporting, saving snapshot links; those types of things are all affected by a found set.
01:14So let's open this Customer List Layout in our Exercise File, and I'm already in
01:18Find mode, but in case you're still in Browse mode, there's a couple different
01:21ways you can get into Find mode, first of which of course is under the View
01:24menu, choosing Find or choosing Command+F, or Ctrl+F on Windows.
01:30Also, down in the bottom left-hand corner, you can choose and toggle between
01:34modes through clicking on, in this case it says Browse, so whatever the current
01:38name of the mode, is you just click on that and choose another one. Or you can
01:42enter Find mode by going into your Status toolbar and pressing the Find button.
01:47The first thing you'll notice is that everything onscreen goes blank, and this
01:50should not alarm you, or your users; all your data is still in the database.
01:54What this is doing now is clearing out all the fields, allowing you to type in
01:57search criteria into them appropriately.
01:59Once you're in Find mode, pick a field that you want to add criteria, and type
02:04values into those fields.
02:06Then when you perform a Find, FileMaker is going to search for any Records that
02:09match the criteria from the field that you just entered the data into, and this
02:13set of Matching Records will replace any previous found set.
02:16So let's take a look at this.
02:17So in Find mode, you'll also notice that in addition to the fields being empty,
02:23you've also got these little magnifying glass icons in each field.
02:26This is to further remind you and your users that you're in Find mode.
02:30This way users don't get confused in thinking they're in Data Entry mode,
02:33because of course when you hit New Record in Browse mode it also presents you
02:36with a blank Layout onscreen.
02:39So now FileMaker Pro is waiting for you to enter some criteria, and you'll
02:42notice that your Status toolbar has also changed to allow a Perform Find
02:46and Cancel Find button.
02:47Of course, if you hit Cancel Find, it'll take you back to Browse mode. Perform
02:50Find will initiate the Find based on the request you've entered, but first you
02:53have to enter some in.
02:54For those of you that are familiar with the Web, this sort of behavior might
02:57initially throw you, because instead of offering you a single search field,
03:00like in Google for example, and then having another page or a Layout that you
03:04can see your found set or results displayed, FileMaker simply allows you to
03:09use the fields placed on any given Layout and then perform searches based on those fields.
03:13So you'll see when you're in Find mode you can go to Customer Detail > Products,
03:18whatever you want to do.
03:19Any Layout that you've created in FileMaker can be used to enter Find Requests,
03:23which is actually a strength of FileMaker Pro.
03:25So now once you're in Find mode, let's do some practices here. Let's click
03:28into the City field.
03:30Let's type the word Los, and now we're going to hit Perform Find, and you'll
03:34notice that when we go back into Browse mode, you'll see something here in the
03:37upper left-hand corner on our Status toolbar; we see that we've now got 4/1523.
03:43This indicates that we've got 1523 Records in the database, and only 4 match the
03:48criteria that we just entered.
03:49So 4 are in our Found Set.
03:51You see that we can navigate through the 4 Records by using the book icon and
03:56also this pie chart-looking icon here indicates that our Found Set takes up
04:00about this percentage of space in the overall amount of Records in the database.
04:04Now the important thing to note here is just because I've created a Found Set
04:07doesn't mean that all the other Records in the database have disappeared.
04:09As a matter of fact, I can see all of the eecords that don't match any of the
04:13search criteria by going under Records and choosing Show Omitted Only, and now
04:18you see that our Found Set has become 1,519 Records out of 1,523, and our pie
04:25chart has changed so the light area, which represents our Found set, is now
04:29inverted from what we saw earlier.
04:30At any given time, you can reset the view by selecting this Show All button.
04:35There's also a Show All option that you see is currently grayed out now under your
04:39Records menu, but it's grayed out because all Records are showing.
04:43So now you see our Found set has been reset.
04:45Sometimes you may have more Records in your Found Set than can be seen on one
04:49screen at a time; in this case you may just have to scroll through the List View
04:52to be able to see all of them.
04:53This is also a big reason why you even have a List View in the first place,
04:57because the more Records you can see onscreen at any given time, the more of
05:01your Found Set you'll be able to work with.
05:03Now let's look at the way that the Find is actually working.
05:06Let's go back into Find mode.
05:07You saw when I typed in "Los" into the City field and hit Perform Find;
05:12let's take a close look at what's coming back as our results.
05:16None of these contain just the value Los, for starters. That's the first thing
05:20that we're noticing here. And also, even though the word Los is contained in
05:24Record number 2, only the characters Los, are contained in three out of the 4
05:28Records in our Found Set.
05:30So what it's doing is finding the Los part inside of each of these Records,
05:34and because what it's doing there is doing a search based on the field's
05:37Index. Click inside of one of these fields and hit Command+I on Mac, or Ctrl+I on Windows.
05:43You'll be able to see the Index.
05:45A field index is something that's created by FileMaker. Anytime you search
05:49inside of a field, what it does is goes and takes every single record in your
05:53database, and it grabs every unique value that appears inside that field and
05:58adds it to an Index.
06:00So, for example, if the city Acosta is in here 50 times, FileMaker is only going
06:04to add it to its index once, and it also is going to note which records actually
06:09have the value Acosta in those fields.
06:11That way if I type in Acosta, for example, it doesn't have to go check all 1500 Records.
06:17It can just go check its Index, and its Index will tell it which Records should
06:20be part of the Found Set.
06:21FileMaker does two different types of Indexes: first a Value Index, which just
06:26indexes all the characters up to the first 100 characters in your field.
06:30A Word Index is used in some other types of functionality within FileMaker, and
06:35that just breaks up the different words. But in a search we're using a Value
06:39Index, so Los just happens to be one of the characters in the 100 characters
06:43that it's indexing for any given field.
06:45So that's how it's finding matches for us.
06:48So let's do another search, for example. We'll clear these out by going into
06:51Find mode again, which gives us another place to enter data, and we'll enter the
06:55word Angel and hit Perform Find.
06:57Now you'll notice here that we get Los Angeles and Angels Camp, so what you're
07:01seeing is we're getting that Value Index again, the A-N-G-E-L is coming as part
07:06of the second word in Los Angeles and the first word in Angels Camp.
07:09This is something to keep in mind when you're working with FileMaker, or when
07:12you're training your users, so make sure to set these expectations with them, so
07:15they're not surprised with the results that they're getting.
07:17These are the basic ways to find data inside your FileMaker database.
07:21Keep in mind that in addition to FileMaker's ability to be able to create the
07:24data storage mechanism and provide a user interface,
07:27it also does provide this very powerful data retrieval tools, as well.
Collapse this transcript
Reviewing new requests in the Find mode
00:00We've taken a look at searching inside of one field by typing a value into the
00:04field while you're in Find mode, but what if you want to find multiple values
00:08from the same field as part of one search?
00:10Well, in those instances, you're going to need to be familiar with something
00:13called adding a Find Request,
00:14we're going to cover in this movie.
00:16So let's take a look at that, if you open up the Exercise File, and we're going
00:20to go to the Customer List Layout, and you see that we've got a series of
00:23records inside of the FileMaker database here, and each one of them represents a customer.
00:27So let's say my goal is I want to create a found set of customers in California,
00:31so I can print a report.
00:32So in order to do that, I'll want to enter Find mode by hitting the Find button,
00:36and type CA into the State field, and then hit Perform.
00:40Now you can also perform a Find by hitting the Enter button on your keyboard,
00:43which is what you're going to do 99% of the time as you get familiar with
00:46FileMaker, but we'll hit the Perform Find button. And we see here that we've got
00:5123 records out of our total of 1,523 records that match that criteria, and
00:55therefore, we've created a found set in FileMaker.
00:58So I could easily export these out, or print off this list, and it would just
01:02be all my customers in California, but what if someone has asked me to produce
01:05a list or an export of all the California and the Washington customers, in one list?
01:12Certainly I could do two different lists and print them out in separate pieces
01:15of paper, but if I want to combine those, I'll simply go into Find mode again,
01:19type in CA. But now, you might have noticed here that you've still got the book
01:25Icon in the upper left-hand corner, and of course, in Browse mode that helps us
01:28navigate from record to record within our found set. In Layout mode,
01:32it helps us navigate from layout to layout, but in Find mode, it's managing
01:35something called Find Request, and you also see that the New Record button has
01:38been turned into a New Request.
01:40So what does this New Request mean?
01:42If I hit the New Request button, you'll see another row has appeared.
01:46What this allows me to do is now enter another value into the State field,
01:50because if I had just gone like this and entered CA and WA into the same field
01:55and performed a find, I'm going to get no records matching that request, so this
01:58isn't a way that you add multiple criteria.
02:01You don't put like a comma to limit a criteria in the same field.
02:03You'll hit a New Request, and now I can have either records that match the
02:07California in the State field or Records that match Washington, and those will
02:12both be part of my found set.
02:13So let's take a look at what happens when we perform find, and sure enough we
02:16see we have 56 Records, which are a mixture of Washington State and
02:21California State Records.
02:22Alternatively if I go into Find mode again and create a request with State
02:27equals California, and now if I go into the Last Name field and I type Hanks and
02:33then hit Perform Find, FileMaker is going to give me back every Record that has
02:38the State of California and the Last Name Hanks, and because I put both of those
02:43criteria in the same find request, it's actually just limiting my found set to
02:47the two records where both of the criteria matched on the same record.
02:50If I did the same thing, back in Find mode, and hit CA and add a New Request and
02:56then type in Hanks, and now I perform the Find by hitting the Enter, you see
03:01that I've got a mix here.
03:02I've got everybody from California, but then I also have Hanks, including the
03:06couple that are in California.
03:07I also have Hanks from a record from Wisconsin, as well.
03:12So this was what's called an or search.
03:14This means, give me anything with the Last Name Hanks or State of California and
03:18combine those together into my same found set.
03:20Couple of notes here.
03:21When you're in Find mode you can continue to add New Requests, and then you can
03:25do that in unlimited number of times.
03:27However, you'll notice that after a certain number of requests, 10 to be
03:31specific, FileMaker pops up a very helpful message that says you're in Find
03:36mode and you appear to be entering new record date, are you sure you want to
03:38create a new find request?
03:40This is very helpful, because Browse mode and Find mode look the same, a lot
03:43of times users might accidentally enter Find mode and think that they're
03:47entering data into records.
03:49FileMaker only lets you get 10 Records into it before it says, hey, by the way
03:52you're in Find mode, because this could be disastrous information if it lets
03:55you create hundreds of these things and then you realize when you Perform Find
03:59you'll simply get no Records matching your requests, and none of those Records will be entered.
04:02But really, it's very rare that you'll have this many find requests in a search
04:07anyways, because if you combine the 'ands' and the 'ors' together, you're
04:10going to really have to have a lot of data in your database for you to even
04:14get records that returned after you get 10 different Find Requests added, but sometimes you can.
04:18You can have millions of records in your FileMaker database.
04:21Another thing I want to show you while we're searching.
04:23You've got this button here called Matching Records.
04:25Now by default, every time you go into Find mode and perform a search, the
04:29Include button is selected.
04:31That means that in the returning found set include any record that matches the
04:35criteria that I'm entering below.
04:37However, you'll notice that there's an option here called Omit.
04:40This means omit any record that matches the criteria below from my
04:43returning found set.
04:44So here if I say California, and I choose Omit, and hit Perform Find, we
04:49see that now it's giving me all the records in the database where State
04:52does not equal California.
04:53So depending on what you're looking for, you can do it as an Include, or you can
04:57do it as an Omit search.
04:59You can also use this with New Requests. So, for example, if we go into Find
05:02mode, and let's say this time we enter State California and we see on this one
05:06request it says Include, but now under New Request, I'm going to go in, and I'm
05:10going to type Hanks, but this time I'm going to change it to Omit.
05:14Notice that in the original request it is still Include, and on the second one it's Omit.
05:19This means that the Include or Omit option is Request-specific.
05:24Now when I hit Perform Find, what I'm actually getting in this case is only
05:28the Records that match California, but it's omitting anything that just equals Hanks.
05:32So even though there was one Hanks that wasn't in the State of California,
05:36that's been omitted from my Found Set.
05:37So you can see that combining the Omits and the Includes within your Find
05:41Request can also give you useful results.
05:43So in addition to just doing some basic Finds with the New Request or even Omit,
05:47FileMaker allow you to create both 'and' or 'or' searches when retrieving custom
05:51found sets of data from your FileMaker database tables.
Collapse this transcript
Establishing search operators
00:00When you're searching for data in FileMaker Pro, you don't always have to
00:03specify the exact criterion;
00:05for example, if I want to find all the invoices in my example file here, that
00:10were created between the year 2000 and 2010, I don't actually have to create 10
00:14new find requests each with a different year.
00:16For example, going into Find mode, I won't necessarily have to put in 2,000, then
00:23New Request, 2,001 and so on.
00:26And by the way, you'll also notice one example of this is I just put in the
00:30year 2000 and FileMaker recognized it, because I was in a date field, that will
00:35automatically reformat it to put in wildcard characters, and we'll get to those
00:40here just in a moment, but what I can do instead is use something that's called Search Operators.
00:45So back in Find mode, you'll notice in the Layout bar, next to the Matching
00:49Records Include or Omit, that I've got a draft on your called Operators.
00:52We have a list of different characters that FileMaker interprets when added in a search criteria.
00:57For example, let me show you some of the easy and more useful ones: find duplicates.
01:02If you just simply put an exclamation point into a field and nothing else
01:07and then Perform your Find, you can then find all the records that have the same value.
01:11Of course, it's going to find the original and the duplicate.
01:13This is something that a lot of users use to clean up their database.
01:17So, for example, if I put an exclamation point in the Invoice number field and
01:21hit Perform, we want it to come up with no records, because we would be little
01:24worrisome if there were duplicate invoice numbers in our database.
01:27So this is a good way to stay on top of the data that you have in your system,
01:31but putting that in the Invoice Date field like we had done before, in executing
01:35our find, gives us 64 records.
01:37What this actually tells us is that it's really 32 records with a duplicate.
01:41It's what that says. Or they could have multiple duplicates.
01:44It gives you the original and the duplicate, which is very useful when you're
01:47doing things like scrubbing your data, for example.
01:48You will also notice a very handy one back in Find mode, the equal sign that's a
01:54called match whole word.
01:56What that really means is that if you put in an equal sign ,it's going to find an
01:59exact match for any value that follows the equal sign.
02:03So let me give you an example of that.
02:04If I go into Ship Via, and I put it in an equal sign, right now what I'm telling
02:08FileMaker, because I haven't put anything else in there, isn't that I wanted to
02:12find every record with an equal sign in the Ship Via field -
02:15that it actually would not do - but instead, I'm saying find any record where the
02:20value in Ship Via is nothing.
02:22Why is it nothing? bBcause so far that's what I've got following the equal sign.
02:26So if you just leave it this way, this is the great way for you to find records
02:29that have empty values in certain fields, and that can be useful, again, when you
02:33are trying to clean up your data.
02:34So let me Perform Find here.
02:37You see that I have got five records out of my 146 that do not have a value in Ship Via.
02:42That's what the equal sign allows us to do,
02:45another excellent tool for cleaning up your data.
02:47And there are some more obvious ones,
02:49for example, less than, greater than, less than or equal to, those kind of things.
02:54Those will work on number fields and date fields.
02:57Keep in mind that in those cases, you still have ranges.
02:59For example, I could put in Invoice date less than 2009, for example, and
03:07Perform Find, and it tells me that I don't have any matching records, but that
03:10works equally well in a Date field as it does in a Number field.
03:14But speaking of ranges, you will see there is also a range option there, which is really just ...
03:19So you will notice that you don't even have to pick this dropdown menu.
03:22This is really just more of a legend, or a guide.
03:24You can simply just type these values in there.
03:26So, for example, if I went in to the Invoice Total field, which is a number
03:31field, and I type in 1000...1500 and hit Perform Find, you see I get seven
03:39records, and all those records have a value between 1000 and 1500.
03:44This one is even very close. It's 1490.
03:45In that case, it's giving me the range.
03:48I can also go into Find, into an open ended, 1000... range and hit Perform Find.
03:56It tells me that 80 of these records are either $1,000 or more.
04:00And there are a lot of things to choose from.
04:02Another one that's helpful is the zero or more characters, which is that asterisk.
04:05So let's say you are trying to find any record that actually has a value in a
04:09field. Just simply type and asterisk in there and nothing else and perform a find,
04:13and you will see now we get 141 out of the 146. If you remember when we did the
04:17equal sign, meaning anything that had empty value or no value in Ship Via, we got
04:22five, so this makes sense.
04:24This is the inverse of that.
04:25So you should really experiment with these to get familiar with how they
04:28work with your data.
04:29I think that not only will you find them useful, from a development
04:32perspective, but if you train your users on these, they will find them to be
04:35useful, but one special thing that you should be aware of, though.
04:38If you switch over to the Customer List layout, let's say I want to do a
04:41search in the Email field, and what I am looking for, let's say, are properly
04:46formatted Emails, which we would use this trick to say I want to search in this
04:50field for the At symbol character, and if I find records that don't have an At
04:54symbol in there, then I know that I don't have a real Email or a properly
04:58formatted Email in this field.
04:59Let's see what happens when I put the At symbol in this field, and then we hit Perform.
05:05You see I get No records matches criteria.
05:07Now that might not actually be true, because we could have some records in here
05:12that do not have any values.
05:14For example, if I go in and I take the At symbol out of this first record. All right.
05:19Now let's do that search again.
05:21Let's say At symbol, and I want to omit anything without the At symbol.
05:24So when I hit Perform Find, now it gives me everything.
05:27Why is it giving me all the At symbols and the not?
05:29Well, the reason for that is because FileMaker has the At symbol as one of
05:34it's Search operators.
05:35Unfortunately, they had this built-into the program before Emails were even around.
05:40So what this means is it's more of like a wildcard character, which means any one character.
05:45So if I am truly searching for an At symbol, or an equal sign, or an exclamation
05:49point, and I want it to be recognized just as the character, what I have to do
05:53there is wrap it in quotations.
05:55And anytime something in quotations, in this context, FileMaker will evaluate
06:00this as just the character that you are looking for, rather than the functions.
06:04So now you see it performs properly.
06:06I omitted anything that had an At symbol in it, and sure enough, we see this
06:11record here that matches that criteria.
06:13How is this At symbol used?
06:14Well that actually has its own valuable use for us.
06:17So, for example, if we go into Find mode again, and under City, if I type in
06:23L@s, and I Perform a Find, I am going to get Las, and Las, but that's because we
06:30put the wildcard in between L and the S, so these are the correct values that
06:33we are getting in return.
06:34So in addition of doing multiple requests, you can also insert different
06:37Search operators to assists you in locating data with minimal data entry in
06:41the search requests themselves.
Collapse this transcript
Constraining or extending found sets
00:00There are sometimes when you're searching for data within FileMaker Pro that you
00:03might want to start with a larger found set and then drill down within that
00:07found set, or expand that found set based on additional criteria.
00:11This type of technique is very useful if you're administering a database and
00:14you are troubleshooting, or you are just trying to clean up or maintain the data integrity.
00:18In these cases, you can use functions that are called Constraining and
00:22Extending found sets.
00:23For example, I will go into Find mode here, and I am going to do a search
00:27for California in State.
00:29You see that we've got 23 records in this case,
00:31all these people in California, but how many of them have the status of inactive?
00:36Now keep in mind it's of course less dramatic when we are dealing with record
00:39sets of 23, but imagine if you had 23,000 records in this case,
00:43how difficult it would be to visually see this information.
00:46So now in this case, I am going to go into Status, and remember now that I have
00:49already done a find. I just did a search for all the State of California
00:54records, and what you may not be aware of is that FileMaker is remembering what
00:58the last find was that you've just done.
01:00So, right now, as I'm putting in my next find request, FileMaker knew what the last one was.
01:05So now if I put Inactive in the Status field and if I go under the Requests
01:09menu, you'll notice that I've got some additional options below Perform Find,
01:13which is what we've been doing in all of our movies thusfar.
01:16If I choose Constrain Found Set, let's see what happens.
01:20You see I have got four records in my Found Set.
01:21I put Inactive in there, but if I go back into Find mode, you'll see I will get
01:26more than four records;
01:27I get 147 records if I search for it this way. But what constrain does is it
01:32instructs FileMaker to say, within the Found Set we just did, I want to further
01:37constrain those records based on the criteria that I'm entering inside the field
01:41or fields within the find request.
01:42So you can do it the other way, as well.
01:45So, for example, if I say find California, Perform Find, enter Find mode again,
01:51and this time inside the Status, I am going to enter pending, but now, I am
01:55going to choose Extend Found Sets.
01:57So if you remember before what we did under Constrain is that we took the
02:00original Found Set and then said within that Found Set, find everything with
02:04the status of Inactive.
02:05Now we are going to say take my original Found Set of 23 records with the State
02:09of California, and I want you to extend it, so to add into that Found Set any
02:14record that matches his criteria.
02:15So in this case we are going to have all the California and all the status pending.
02:19So now let's say Extend Found Set, and now you see we have 1,226 records, which
02:23make up our California records, as you see here, that doesn't have a status of
02:27pending, but also all of the other records that are not California that do have
02:31a status of pending.
02:32So these are ways that you can increase the size of your original Found Set or
02:36decrease the size of your original Found Set.
02:38The real power of this, of course, comes in when you have thousands of different
02:41records, and you can't see the results immediately onscreen.
02:45This will allow you to be able to drill up and drill down from certain criteria,
02:48because keep in mind, you can keep constraining and constraining and
02:51constraining and constraining because whatever your last Found Set is it's going
02:55to reflect the last constrain you did.
02:57So it's conceivable that if you are trying to drill into some data and prove a
03:00theory or look for trends in raw data, that you can just keep modifying your
03:04Found Set until you finally get a small subset that's just the perfect amount of
03:07information that you are looking for.
03:09Working with varying groups of records is always powerful, and you can easily
03:12view trends in your data, search for expectations or problems in the information
03:16that you have entered, or even import it into your solution, or quickly access
03:19specific records, all using either Constrain or Extending Found Sets.
Collapse this transcript
Finding records using date, time, or timestamp criteria
00:00Another one of the benefits while searching in Find mode is that the ability to
00:03be able to search within date and time fields.
00:06If you look inside of our exercise files, you see that we have got a couple of
00:08fields here, in the Invoice list, that are date fields and some that are time.
00:12So, for example, we have got Invoice date and ship time timestamp and then the ship time.
00:18In some of the more recent versions of FileMaker, there has been a lot of new
00:20improvements to date and time searching capabilities, and they are actually kind of cool.
00:24Each of the syntax that I will show here applies only to fields that are set up
00:28specifically as date, time or timestamp.
00:30So the same types of techniques won't work in number fields, or text fields
00:33or anything like that.
00:34So, first let's look at date fields.
00:36You see that we have got several different dates in our database.
00:39If we hit Show All, we see all the different dates: 2011, 2009, and so on.
00:44They are all formatted as dates with month, day, and year, and normally when you
00:48search inside a FileMaker field, you will be searching in the exact syntax
00:51that's contained within the field, because as with a date field,
00:54I try to enter a value in a new record
00:57in anything but this format, I would get an error from FileMaker.
01:00So normally you would probably expect that same type of behavior when you
01:03are searching in FileMaker, but that's not the case, and it has some
01:05interesting effects.
01:06So let me give you an example.
01:08Let's go in a Find mode and in the Invoice Date, I am going to enter in a value
01:12that's not formatted as a date.
01:14As a matter of fact, I am just going to try entering in 2010.
01:17What this demonstrates is that by typing in 2010, FileMaker recognizes that
01:21it's a four digit year, and it creates a wildcard search for you.
01:25So we have got a wildcard character, forward slash wildcard character, another
01:29forward slash and then the year.
01:30So really it's not searching on 2010 because, in fact, it does require
01:34date formatted fields.
01:35What it's doing is putting in wildcard characters on your behalf.
01:39So let's cancel this Find, go into another one
01:42and this time let's type in 6/2010.
01:46Now, in this case, what it will do is it will give us 6/*/2010.
01:52So the wildcard is going to be in the date.
01:54So what we will probably get in this case, if we hit Perform Find, is anything
01:59that has the month of 6 and the year of 2010.
02:02So in English, what that means is it's giving us any day within June of 2010.
02:07How about if we go into Find mode and we just simply enter in 6?
02:10Now, let's see who FileMaker handles it.
02:12We are just hitting the New Request because that allows us to see what happens,
02:15because otherwise, FileMaker does it so quickly.
02:17Well, if you are just enter in a single digit, or let's say you are enter in 12
02:20for example, it assumes that you are looking for the month, and it also assumes
02:25that you are looking for the month in the current year.
02:27So if I just go in and redo another Find, and put 6 in there, what I am going to
02:32get back are all of the records from 6 of 2010.
02:36Now keep in mind that the exercises that I am doing here involve current year,
02:40and at the time of this recording, it's 2010.
02:44So if you are looking at this with a computer date of anything but 2010, you are
02:47going to get different search results that I am getting here.
02:50In a previous movie, we talked about Search Operators and using ranges, but we
02:55can also use ranges with these abbreviated date functions.
02:58So, for example, by going here and I type in 4/2010...6/2010,
03:06now we are combining the wildcard search format with search operators.
03:11So in this case, what we are going to get are any date between April of 2010,
03:16including June 2010 and of course, May in between.
03:20So let's hit Perform Find, and sure enough, you see we have got April, May, June
03:24all peppered in there.
03:25But one of the most interesting ways to search in a date, timestamp or time
03:29field involves not entering in numeric values at all.
03:33So if we go into Find mode, and I go into a date field and I type in Friday,
03:38you'd think this would kick it out because it can't even reformat it - we do with
03:42a little trick of looking in New Request - all it does is change it to Fri, which
03:46is something that's built-into FileMaker to identify any date that was actually a Friday.
03:51So let's go back and just do one Friday and hit Perform Find.
03:57Now without there being a field that's says what day of the week any of these
04:01invoices were written up,
04:02FileMaker still knows that these 33 records represent a date that was a Friday on a calendar.
04:08So that could be very useful, if you are interested in doing some trending or
04:11digging through your data to try to find out when the most popular day for
04:14orders might be - something along those lines.
04:16The same techniques are true for time fields, as well.
04:19So you see we have got a field called Ship Time.
04:21If we go into Ship Time, and just type in 3pm and do a Perform, we see that we
04:27will get any record that was written up in the 3 o'clock hour. Irrespective of
04:31the date it was done, we do get everything from 3:04, 3:17, 3:15.
04:37You see you get it just there and also these types of things can work with our ranges.
04:413pm...6pm.
04:44Now this is any record written up within the hours of 3, 4, 5, or 6, and also
04:49we can just put in pm.
04:52So if you interested to see what kind of ordering you get at night or in the
04:55afternoon versus in the morning, you can just simply enter pm and FileMaker will
04:59go and find all of the records that have time that was in the pm instead of am.
05:04If you get familiar with the searching syntax, it's not only going to help you,
05:08but as you train your users, and possibly as you start to work with scripts,
05:12which we will cover later in this title,
05:13the syntax can help you more accurately find date, time, and timestamp date
05:17within your database.
Collapse this transcript
Using Fast Match and Quick Find
00:00FileMaker Pro 11 actually has two different ways that you can create a found set
00:04without even having to go into Find mode.
00:05Both of these occur inside of Browse mode,
00:08the first of which is a feature that was released a couple of versions ago, and
00:11it's called Fast Match.
00:12Let me show you how that works.
00:13Note that we are in Browse mode. We can see all of our data,
00:16but if I look at any field that has data that I want to search on, I could copy
00:21this value, go into Find mode, paste the value, and execute a Find. Or if I hit
00:28Show All to show all the records again, I could right-click into the field that
00:33has that value, or Ctrl+Click on a Mac, and you'll see this option in the
00:37contextual menu that appears, that's called Find Matching Records.
00:42I simply select that option.
00:43I never leave Browse mode, but I still end up creating the same found set.
00:47So this can be useful for you if you are just mining through some data and
00:51you want to find some information inside your database, without having to go into Browse mode.
00:55Those types of searches are based on the contextual menu.
00:58Now the contextual menu is the menu you find when you right-click, but in
01:01addition to Find Matching Records, you also see that we've got Constrain Found
01:05Set and Extend Found Set, as well.
01:07So, for example, I can find a record that has California, say Find Matching
01:13Records, and I could constrain it by a city, if I'd like to.
01:17So using the Find Matching Records in Browse mode is called Fast Match, and
01:20there are three Fast Match options:
01:22There is Find Matching Records, Constrain Found Set, and Extend Found Set, all
01:26of which can be performed in Browse mode.
01:28Another method for finding records while in Browse mode is brand-new to
01:32FileMaker 11, and it's called Quick Find.
01:34You'll notice that in the upper right- hand corner of your database, you will see
01:38that there is a familiar Quick Find data entry area.
01:41This is the same type of thing that you've seen in any other type of Apple
01:44application, like iTunes for example, and by simply typing a value in this
01:48field and hitting Enter, you can do searches on your data while still in Browse mode.
01:52For example, I could type in the value ca and hit Enter;
01:55not only does it find records that match the state CA, but it also finds records
02:00that have CA in the first name, possibly ca in the last name, even though they
02:05don't have values inside the State field for ca.
02:08So what's actually happening, in this case, is that you can go into your layout
02:12and configure which fields that you want to be part of the Quick Find.
02:15So if we go into Layout mode, you will notice these green icons, little search
02:20icons, on all the different fields in this layout.
02:22Well, if you select a field and open up the Inspector and go into your Data tab,
02:27you will see that you've got a check box here for each field that says Include
02:31field for Quick Find.
02:32By default, every field that you put on the layout has this option selected,
02:36so you can go in and deselect these options, so that they are not included in
02:40your Quick Find search.
02:42If a field is included, you will see what's called a Quick Find badge, or this
02:46little green magnifying glass appear.
02:49Keep in mind though that if you turn off Quick Find on the Customer List
02:53layout, that field will still be on if you go to any other layout that's based on customer.
02:58So you'd have to go and turn it off in all of the different fields in your
03:00database in order for the setting to be turned off in your entire database.
03:04You can also turn off Quick Find on a layout level.
03:07For example, if we hit this little pencil next to the Layout List, that will
03:11invoke the Layout Setup, and you will notice that there is a check box here in
03:14the bottom of the Layout Setup window that says Enable Quick Find.
03:17And if I turn that off, you see that all the green badges went gray.
03:21That means that if I turn it back on, they are configured to be included in
03:24Quick Find, but that we've turned if off for this layout.
03:27And if you make any changes to the default settings, you can hit the Reset Quick
03:31Find to make sure that all of the fields then have badges assigned to them.
03:36To improve the performance of your searches, you want to limit the Quick Search
03:39fields to only fields that contain data that you are searching for.
03:42For example, a table of songs might include the track number and artist's
03:45name for each song.
03:46You can include the artist's name in the search but exclude the track
03:49number, because it's not likely that someone would search for all the songs
03:52with the same track number.
03:53Those types of things will make your searches perform quicker.
03:56There are also different colored badges.
03:57You see the green ones, which indicate that the Quick Find setting is
04:00enabled for a field.
04:01We also saw the gray ones, which indicate the Include field for Quick Find option.
04:06There is another badge, as well.
04:07If we go under Invoice > Detail, you see that we have these yellow badges.
04:11These are what FileMaker determines not so Quick Find fields because they may
04:15be considered for removing from Quick Find, because they are un-indexed or they
04:19are related fields or they are values that will take a long time for FileMaker to search upon.
04:24So unless you really need to include yellow badged fields in your Quick Find, you
04:27might want to consider removing them to make your finds go a lot quicker.
04:31The idea here is that you might want to train your users on the different ways
04:34they can perform finds in Browse mode, because these are great tools for drilling
04:38down or drilling up in data that you are working with onscreen.
Collapse this transcript
Working with saved finds
00:00A third way to perform a Find in Browse mode uses a feature called Saved Finds.
00:05Saved Finds works through a new icon that you can see on the Status toolbar.
00:09However, if you do not see the icon on your Status toolbar, you will want to go
00:13under the View menu to Customize Status toolbar and pick Saved Finds and drag it
00:18to a location on your toolbar, and hit Done.
00:21And if you click and hold down on the icon or click on the arrow, you'll see
00:24that there are various different options that appear.
00:26First, you can see something called Recent Finds and then you see Saved Finds.
00:31A Recent Find is a find that you've performed during this database session,
00:34meaning while you had this file open.
00:37A Saved Find was a recent find that the user has chosen to save for future reference.
00:41So, for example, next time you open up the file, that Saved Find will still be
00:45there, unlike Recent Finds that clear out after your session clears.
00:48Sessions are specific to multiuser mode, so when a file is being hosted on a
00:52server, you get a session every time that you log in to the server.
00:56So, Recent Finds only exist for the life of that session; Saved Finds exist any
01:00time you use your user account to log into the database, and that's an
01:03important part here.
01:05This feature is specific to a user logged into a copy of FileMaker.
01:09So when you take a Recent Find and save it as a Saved Find, that's only going to
01:14be available to you.
01:15Others who log into their database will not see your Saved Finds.
01:19You should be aware of that as a developer because you might think, Oh!
01:22well I can create a bunch of Saved Finds for people and then my users can use them.
01:25Well, first of all, users can choose to not even have Saved Finds icon on their
01:30copy of FileMaker in the Status toolbar.
01:32And secondly, you have no control over what they do with their account.
01:35If you have various different users all sharing the same account, they will all
01:39see the same Saved Finds every time they log into the database.
01:42So let's take a look at how this works.
01:44If we go into Find mode and we click into the State field, type wi, hit Perform Find,
01:50now, under our Saved Finds we see wi listed there.
01:54Now, for example, if I want to go in, and I want to say Save Current Find, you
01:58see that I get a window here that allows me to add a more descriptive name, or
02:04even if I go and hit the Advanced button we see a window that allows me to
02:08modify the Find Request that I just made.
02:11I can add additional find requests to it, or modify the values that are inside of
02:15this field and so on.
02:16Now, if I have all records shown and I go under Saved Finds and I simply
02:20choose either a Saved one or a Recent Find, I don't even have to go into into Find mode.
02:25It just remembers that for me.
02:26So the idea here is now you're able to work with Finds in a manner that
02:29you'd never have before.
02:31But if you're working with a search that might be rather complex, it's something
02:34that you would normally make note of, now you can just save it inside of the
02:37FileMaker file for when your account logs into that file next.
02:40So, you can encourage your users, when you're training them, say if there
02:43are searches that you do every Monday morning, or there's something that you do everyday,
02:47like let me find how many records we created today,
02:50just have them put them in the Saved Finds, and they won't ever have to leave Browse
02:53mode to be able to perform those functions.
02:55Remember, however, that Saved Finds are specific to a single user in a database.
02:59So developers can't access these lists, nor can other users, besides the ones who set them up.
03:04However, that's not a bug, but rather features that prevent Saved Find confusion
03:08between multiple users of the same shared database.
03:10Saved Finds are a feature inside FileMaker that should really change the way
03:14that you're searching for data inside your FileMaker databases.
Collapse this transcript
12. Sorting Data
Sorting with one criterion
00:00In a majority of the movies so far in this title, we've been working
00:03with multiple records.
00:04But you'll notice, as you open up each file, that the records aren't in order that
00:07really doesn't have any kind of relevance.
00:09It's not in alphabetical order.
00:11It's not by customer, not by year.
00:13So what's happening is when you first open up a FileMaker file and look at
00:16multiple records, for example, in the List view, it's going to give you those
00:20records in the order in which they were added to the database.
00:23In cases of reporting, or printing, or exporting or even just viewing data, that
00:28might not always be the desired order.
00:29So in this movie, I am going to show you how to sort records in FileMaker.
00:33You might be familiar with sorting from other applications, but in FileMaker you
00:37can sort in any layout and by using a Sort dialog window.
00:41There are a couple of different ways to get to the Sort dialog.
00:44First, if you go under the Records menu, you'll notice that there's an option
00:48called Sort Records, and it also has quick keys next to it.
00:51On Mac, it's Command+S, and on Windows it's Ctrl+S. You'll also notice, in the
00:56Status toolbar, that we've got a default button called Sort.
01:00Clicking on any one of these will get you to the Sort Records dialog, and
01:03inside the Sort Records dialog you'll notice that there's always a sort
01:07criterion in from the last sort.
01:09If there hasn't been a recent sort, the dialog will be empty.
01:12But in the case of this file, you'll notice that we've got criterion in here for AddressState.
01:17This is helpful sometimes if you're going back and re-sorting something that
01:20you've done moments earlier.
01:22Then this way you don't have to do it again twice.
01:23But in our case, we are going to hit Clear All, so we can start fresh.
01:27As you see, Clear All removes any fields from the Sort Order window on the right.
01:33But the window on the left gives you access to all the different fields defined
01:36within your table, so you can choose them to be part of your Sort Order.
01:39Keep in mind that whatever field or fields you add to the Sort Order will only
01:43sort the records in your current found set.
01:45In this case, we've got all of our records in our found set,
01:48so all 1,523 records will be sorted.
01:50But if I did a search, and it returned 20 records, only those 20 records would
01:55have the sort order applied.
01:56In the window on the left in the Sort dialog, you'll notice that you've got a dropdown menu.
02:01This dropdown menu has a couple of different options on it.
02:03First, it says Current Layout, which is whatever layout you are currently on,
02:06of course, and also the Current Table, which is the table that the layout is based on.
02:12In the list under Current Layout, it only gives you the fields that are
02:15defined on your layout.
02:16This will make it particularly easy for just end-users because then they don't
02:20have to sort through all the different fields defined in a Table.
02:23But if you want to sort on something that's not on the layout, you just pick
02:27Current Table (Customers),
02:28you'll see every field defined in the table, regardless of whether it's placed in this layout.
02:33You'll notice that you can also sort by Related fields, but we'll talk about
02:36that in the next movie.
02:38Back up to our Current Layout, we are going to choose AddressState.
02:42Now, you can either double-click on this to move it to the Sort Order window, or
02:45select the Move button.
02:47But you'll notice that in addition to picking the field, you also see these
02:50little bars that almost look like cell phone reception bars, on the right.
02:54Those represent either Ascending or Descending order, and as you by default
02:58Ascending order is going to be your first option.
03:01If you wish to change that, you can just select the item in the Sort Order window
03:05and choose Descending order; you'll see those bars reversed.
03:08We'll also talk about sorting by Custom values, the third option, in another movie.
03:12Let's see what happens when we now hit the Sort button.
03:15We'll see that all of the records in our Found set, which are all the records
03:19in our database, have been sorted now by the State value, and they have been sorted alphabetically.
03:24The reason for that is because the field that we chose, State, is a text field,
03:29and therefore it's sorted alphabetically.
03:31If there was a number field, it would sort numerically, date field
03:34chronologically and so on.
03:36The other thing you'll notice is the very first two records were blank records.
03:40FileMaker will always put the blank records at the very top of a sort order.
03:45So this could be a good way for you to find empty values.
03:47You can simply sort by the field that you're looking for the empty values in,
03:50and they'll appear on the top of your layout.
03:52You should be aware that in order to set expectations with your users, that the
03:56blank records will always be on top.
03:58And that's behavior that you'd expect from FileMaker.
04:00So, if you are creating reports or instructing users on how to work with found
04:03sets, keep in mind that the blank records in the fields will always show up on
04:06top, and this is something that you not only want to take into account when
04:09you're sorting, but also at the same time it's good way to look for
04:12inconsistencies in your data, or find records that don't have any values in them.
04:16Another thing that you should know is that once your Sort Order is set, any
04:19changes that you make to the field and any of the records in your found set that
04:24would impact the sort order will automatically resort.
04:27So, for example, if I go into this State field and I say CA and I commit the record,
04:34you see now that it's been removed from the AA list, and you'll find it listed
04:44under the States of California.
04:46This is something that's called resort, or automatic resort, in FileMaker.
04:50This is something that, if you rely on it, you can build it into your programming,
04:53but also something good to let your users know about, so that they have that
04:56expectation when they are working with found sets.
04:59The last thing to note is the active record before the sort.
05:02Any active record will remain the record after the sort, as well.
05:06So, if you are on the first record in your list, and now you decide that you are
05:10going to sort by clearing this and hitting City instead, you'll see Evelyne
05:19Rutkin is still the active record, even though the sort order has changed.
05:24You'll notice that we are no longer at the top of the list of our found set, like
05:26we were before we did the sort.
05:28We are actually towards the bottom of the third of it.
05:31That's because FileMaker wants to keep the active record in focus.
05:34So keep that in mind when you're using sort orders against found sets.
05:39You can also unsort by going under the Records menu and choosing Unsort.
05:44It doesn't have a corresponding quick key towards it, but there is a script step
05:48that allows you do that automatically.
05:50So, keep this in mind when you're training your users, or when you're working
05:53with scripts as we'll discuss later in this title. Understanding how to work
05:57with sorts is going to help you manipulate data inside of Found sets, so that it
06:01can be more meaningful to you and your users.
Collapse this transcript
Sorting with related fields
00:00When you're looking at data in a layout inside of FileMaker, the layout that
00:03you are looking at is always going to be based on one table inside of your
00:06FileMaker database.
00:08So, that means that most of the data that you're seeing on the screen
00:10lives inside that table.
00:12A lot of times this is referred to as the context of the layout.
00:16We discussed this in the Relationship chapter. We'll also talk more about it
00:19later on in the title, but one of the things we'll discuss is how you can place
00:22related fields on a layout.
00:24Given that assumption, if you look at the Invoice List Layout in Layout mode,
00:28you see that we've got a field for Contact First.
00:35Although this layout is based on the Invoice Table, Contact First is a field
00:39that comes from the Customers table.
00:41We will talk more about related fields in the Using Relationships chapter, but
00:45what I want to demonstrate here is that when we have fields from two different
00:48tables on a layout, when it comes to sorting, we can pick fields from either
00:51the Current Layout, the Current Table, but also Related Tables, in order to
00:55create our Sort Order.
00:56So, let's go back into Browse mode and then go into Sort.
01:02You'll see that I already have a sort value in the Sort Order, but I'm going to
01:06click on that and Clear it.
01:09And where I got that from was in one of two places.
01:12Since I have the related field on the layout, I can choose Current Layout, and
01:16then you'll see, towards the bottom, I have a related field in my list, and that's
01:20indicated by a table name::
01:22and then the name of the field.
01:24That's how you can tell a related field from a native field.
01:27So, I can simply double-click on this or click it and hit Move and sort by that value.
01:32But a related field doesn't need to be on the layout in order to be able to sort by it.
01:36So I could have all these invoices here, and if I didn't have a customer first
01:40name or a customer company name on the layout, I could have easily just
01:43clicked on this dropdown and gone to the Customer Table and picked from any one
01:48of these related values.
01:49The field does not need to be on the layout to be part of the Sort Order, and
01:52that's true for non-related fields, as well.
01:54But now let's go ahead and hit Sort.
01:56We'll see now that all of our invoices are sorted by a related Customer First Name field.
02:03So that data doesn't even live inside of the invoice records, but we're able to
02:06use it as a Sort Order.
02:08So what we are learning here is that you can sort by any field, whether it's part
02:12of your layout or whether it's just part of the FileMaker file when you're
02:16setting up your sort criteria.
Collapse this transcript
Sorting with multiple criteria
00:00Often when you're working with FileMaker, and you have a large sets of records,
00:03you may just want to look at them in a certain order.
00:06This, of course, is where Sorting comes in to play.
00:08Sometimes when you're sorting, you may have multiple, different criteria that
00:11you need to sort by.
00:12For example, you see here we've got 1,523 records, and if I sort them all by
00:17State - first clearing out any previous order I move state over and then hit Sort -
00:26you see that we've got a lot of duplicate matches within each state.
00:30So what about if I want to see them by State, and then within State I want to see
00:34them sorted by City?
00:36That's pretty easy to do.
00:37Just go back into your Sort dialog as you saw moment ago,
00:41we can move another criterion.
00:43So now when I hit Sort, it's not only sorting within the State, as you see here,
00:48here's all that records for ME, and with each record for ME it's then sorting
00:53alphabetically by City, as well.
00:55You can continue to do this by layering multiple values on top of each other
00:59inside the sort order, but the order in which they appear is pretty critical to
01:03the way that it sorts.
01:04So first it's going to sort by State, and then only if they find matches within
01:08records in the State field, it will then sort those matched records by City.
01:13You can add another level here if you want, but the only time it's going to sort
01:16is if the State values match in records, the City values match in records, and
01:20then it will kick into yet another sort value.
01:23So in this case, we don't have a lot of duplicate cities, so it won't make much
01:26more sense to sort beyond just two values, but you certainly can.
01:30So in cases where you need to sort within a sort group, just use multiple
01:33criterion in your Sort dialog box.
Collapse this transcript
Sorting using custom values
00:00Many times when you're looking at records in a List View, you want to Sort them so
00:04that you can see them in a certain order.
00:05And as we looked at in previous movies, you can see that by adding either a
00:09single criteria or multiple criteria to your sorts, much like you see here, then
00:16you can Reorder them even at different levels of reordering.
00:20And what you'll notice is that, in any case, that depending on which fields you
00:22choose, you can either do them as ascending or descending, and all of these have
00:26different behaviors depending on the field type.
00:28For example, of it's a number field, we'll start at 1 or 0, and go all the way
00:33up to whatever the last number is.
00:34If it's alphabetical, it starts a-z. If we go in descending, it goes that goes z-a,
00:40and that I type of thing.
00:41However, that standard type of sorting might not always work in all cases.
00:45So let's say, for example, we cancel out of this window.
00:49You see that we've got the Status field, so we've got a few different Statuses in
00:52here and if we click in to it and hit Command+I on Mac or Ctrl+I on Windows,
00:57we can see the field Index.
00:59This gives us a non- duplicated list of all the values here.
01:01So we've got Active, Inactive and Pending.
01:04So if we Sort this alphabetically, it'll go in this order:
01:07Active, Inactive and Pending.
01:10But what if your organization would like to look at your data in the order of
01:13their Statuses are given, like Active, Pending and then Inactive.
01:16To address this, FileMaker does allow you to Sort by custom values.
01:20If we take a look at the Sort dialog, you'll notice that when we choose a value,
01:26in this case we choose Status and move it over to our Sort Order field,
01:30selecting it of course we can choose Ascending or Descending, but there's this
01:33third option here called, Custom Order based on value list.
01:37Now we'll be covering the concept of Value Lists in a later chapter.
01:41If you not familiar with them, what a Value List is is something that you can
01:43define inside your FileMaker Database, that's exactly what it sounds like.
01:47It's just a list of values and has various different uses.
01:50So if we're to set up a list of values in the order we want them, for example
01:55Active, Pending and Inactive, we could then use them in our Sort Order, but
01:59first we have to create this list of values.
02:02If we going to our File menu and choose Manage Value Lists,
02:06this is where you create, manage all your value lists, but we get into this more
02:09in the Value Lists chapter. But for now we just going to create a simple list by
02:12hitting the New button and naming this Status, and then in the window below we
02:18can create a return delimited lists in the Order that we want to Sort them:
02:23Active, Pending, Inactive.
02:30Now we hit OK and OK again, and now when we go into Sort, we'll still
02:36choose Status as the field that we want to Sort on, but this time we choose
02:39Custom Order Based on the Value List, and now we'll choose the value list we just created.
02:45And if we want to make modifications while we are still in the Sort window, we
02:48can invoke the Manage Value this window here, as well.
02:52But now we'll hit Sort, and we can see we've got Active, Pending and Inactive.
03:01What we learn here is that you're not just constrained to using your Ascending
03:04or Descending Sort order values when Sorting records, but instead you can
03:08create a Custom List of values and then Sort based on the order of those values
03:12in that list.
Collapse this transcript
Sorting using buttons
00:00FileMaker Pro provides a special interface for sorting your records.
00:04That can be viewed by clicking on the Sort icon in the toolbar, or through your Records menu.
00:09Sometimes for your users, they may not be as familiar with this Sort dialog box as you are,
00:14so instead of providing training for them so that you can view the records in
00:16their desired format, what you can do instead is put buttons onscreen for them
00:21so that they can sort on values by just clicking on certain layout objects.
00:25That way they never have to be bothered with the Sort dialog at all.
00:28The most logical way to do this, if you're looking at the List View, is to make
00:32your column headers clickable.
00:33For example, if we go into Layout mode, you'll see that the field labels are
00:40different layout objects than the fields themselves.
00:42The most logical way to do this, if you are looking at a List View, is to make
00:45your column headers clickable.
00:47You can see that in Layout mode the field label and the field itself are both
00:51separate layout objects.
00:53Later in this title will be a discussion on the concept of scripts in greater
00:56detail, but I'm going to introduce you to the idea of attaching an action to a
00:59layout object in this video.
01:01If you look at our Customer List in Layout mode, like we got here onscreen, you
01:05see that our Header part contains these various field labels.
01:09A field label is a layout object, and in FileMaker any layout object can act as a
01:13button and can have a script or script step assigned to it.
01:17This means that when you're in Browse mode and a user clicks on the layout
01:20object, the assigned script, or script step action, will execute.
01:24One of those script steps is the Sort Records action, and that's the action we
01:28will focus on in this movie.
01:29So, for example, let's say we click on the State field label, and now if we go
01:34into the Format menu, you see an option called Button Setup.
01:38That's only available when you've actually selected a layout object.
01:41You will notice in the Button Setup window, we've got a list of
01:45several different actions,
01:47almost all the actions you can perform manually within FileMaker, all available
01:51to us to be able to assign to the Button.
01:54You can also access the Button Setup by right-clicking, or on Mac Ctrl+Click.
01:59That will invoke the same window.
02:02Now you'll notice, if we scroll down to the section called Found Sets, you will
02:08see that there's an option here for Sort Records. Selecting this option shows
02:11other options in the right -hand side of the window;
02:14the first of which is whether or not to perform with dialog.
02:17That simply means when a user clicks on this, do you want to pop up the Sort
02:20Order dialog window?
02:22In this case, we don't want to bother the user with that interface,
02:24so we'll click the box.
02:26Then when we hit the Specify button, we're able to go in here, and we'll
02:32double-click on the State to add sorting by the State field. Then we hit OK, and
02:39now we'll see when we go into Browse mode, we'll Save that change.
02:44And now as you hover over the field label, you see that a little hand appears,
02:48indicating that this is in fact a button.
02:51So when we click on the button, we see that the records are all sorted.
02:55Now back in Layout mode, you'll see that I've got two little arrows next to the City.
03:01Each of these is an image that I've placed on the layout.
03:04Even images are layout objects that we can assign a script to.
03:07So I am going to right-click on this first one and hit Button Setup, and I'm
03:11going to scroll down to Sort and choose Perform without dialog.
03:20In this case, I'm going to say City, Descending order, because you see
03:30that's pointed down.
03:31I hit OK on that one, then right-click on the other arrow and choose Sort again,
03:43Perform without dialog,
03:44but this time City with Ascending order.
03:52So now when I go back into Browse mode and save my changes, I will see that when
03:56I click on the Down arrow, it will sort all the Cities in Descending order.
04:01If I click the Up, it'll sort them in Ascending order.
04:06So this is a great way, if you apply this to the rest of your layouts, to allow
04:11your users to sort without them having to work with the Sort dialog window.
Collapse this transcript
13. Value Lists
Reviewing Field/Control styles
00:00FileMaker Pro provides many tools in Layout mode for configuring the behavior of
00:05fields that make data entry easier and more efficient.
00:08Among these is something called the Field/Control Style, which enables you to
00:12define a value list for data entry and then format a field to display the value
00:17list as either a pop-up, Drop-down list, series of check boxes or radio buttons.
00:23And there are two primary benefits of formatting fields in this way.
00:27First, it allows for faster data entry by users, and second, it leads to greater accuracy.
00:32Anytime users manually enter data into a field, you run the risk of misspelling
00:36or inconsistent entry.
00:38Providing a list of values to choose from goes a long way towards ensuring
00:41consistent data entry.
00:43Users are generally accustomed to working with data entry devices such as
00:46check boxes and Drop-down lists from all the other applications and Web
00:50sites that they use.
00:52In this movie we'll be discussing how to set the Control Style for a field.
00:57Typically you'll apply a Control Style to a field that you already have added to a layout.
01:02Either way, you have to do so in Layout mode.
01:04So let's go into View > Layout mode, in our Invoice Detail Layout in our exercise file.
01:12To add a Field/Control Style, you'll actually have to select the field on the layout.
01:17It's also possible to add a Field Control while adding the field to the layout
01:21by using the Field/Control tool in the Status toolbar.
01:25This will allow you to add a field and apply this Field/Control at the same time.
01:28However, most likely you'll be adding a field control to an existing field in
01:32the layout, and in order to do so, you need to first invoke the Inspector window.
01:37Under the Inspector window, you can choose the Data tab.
01:40So let's choose the InvoiceDate field.
01:44Once we have the InvoiceDate field chosen, we're going to go under the Field
01:48section, which I have currently collapsed, but if I click on it, I open it up.
01:52Now we see that we've got the Invoices:: InvoiceDate field chosen, and I can also
01:58hit the Edit button to choose a different field, if I'd like to.
02:02But below the field that's chosen, you see there's a Control Style.
02:07There are several different Control Styles you can choose from, but by default,
02:10Edit box is chosen for any new field placed on a layout.
02:14Edit box simply means a field as it would normally look, allowing users to click
02:18inside the field and perform edits.
02:20You'll see there are other options available as well, for example, Drop-down list.
02:25This style allows the user to select an item from a value list, or to
02:28manually enter a value.
02:30So it gives them an option to either choose or enter in their own custom value.
02:35It's a good option when there are a large number of values to choose from; then
02:38the user may use the arrow keys to type ahead or jump to the particular
02:41sections of the list.
02:43This list also includes a handy vertical scroll bar when used, and then users can
02:47Shift+Click to see multiple values from the Drop-down list.
02:51You also have a Pop-up menu which also is like a Drop-down list of sorts, but in
02:56this case a Pop-up menu is presented that requires a user to make a selection
03:00from the menu, and they cannot overwrite it by clicking outside the field and
03:04then typing in their own custom value.
03:07This menu will take up as much screen as it needs,
03:09so Pop-up menus can be a bit awkward with larger lists. But if you want to make
03:13sure that a user picks only from your list, you might want to use a Pop-up menu
03:18instead of a Drop-down list.
03:19Checkboxes are a style that presents a value list as a set of check boxes that a
03:24user can toggle on or off.
03:26The selected items are then stored as a return delimited list in your database
03:30in the order that the items were selected.
03:32This is a good option when you want to allow your users to select multiple
03:35options in the same field.
03:37Radio buttons are similar to Checkboxes, except that they are mutually exclusive.
03:41Clicking on one Radio button causes the previously selected radio button to be deselected;
03:46therefore, only one value is normally selected at a time.
03:50This is something you'd use, for example, if you wanted to have a value list
03:53that's said Yes or No.
03:54You don't want the user to check both, which they could if there was a check box,
03:58but instead you'd apply a radio button.
04:00And the final one is what we're going to use on the InvoiceDate.
04:03It's called the Drop-down calendar.
04:05This Control style allows users to enter a date into a field using a small
04:08Drop-down calendar, similar to the ones that you might see online.
04:12This option, however, does not require a value list to be created.
04:15So let's apply this one under our InvoiceDate field.
04:18Now that we have that's selected, let's go into Browse mode.
04:21Hit Save for our changes.
04:23And now let's click into our InvoiceDate field.
04:25Now you see the Drop-down calendar appear, and you'll notice that the Drop-down
04:30calendar will navigate to the date, if there already is a value in the field, and
04:34if there is no value in the field then it will navigate to the current date.
04:38But if we go back into Layout mode, you'll notice when we select this field
04:43that we've got some options when we choose the Drop-down calendar.
04:46For example, we can say Include icon to show and hide calendar.
04:50Let's see how that changes the behavior when we go into Browse mode.
04:54Now when we click into the field, the Drop-down calendar doesn't pop-up, or if
04:58you tab into the field or click into it, you get the same behavior.
05:01But if you click on the icon, it will appear.
05:04So you might want to use this when your users might only need to use the
05:08calendar in some cases, and you have it just there as an option for them.
05:12You can turn off the icon if you want every user to pick from a
05:15Drop-down calendar.
05:17This is just one example of how each one of the Control styles may have
05:20different types of functionality for you to choose from, depending of course on
05:23the type of data that will be entered in the field.
05:26In the upcoming series of movies, we're going to create value lists and then use
05:29all the other Field/Control styles to apply those lists to a field.
05:33Providing a list of Control Styles and a list of values to choose from, in any
05:37of these options, will go a long way towards ensuring consistent data entry by
05:42your users.
Collapse this transcript
Creating and applying static value lists
00:01Several of the field control styles -
00:03Drop-down list, Pop-up menu, Checkbox, and Radio button set - require that
00:08you specify a Value List first for the values that will be presented to the
00:12user using those styles.
00:14Value Lists exist independently of field control styles, but they are
00:18closely affiliated.
00:19A given Value List can be associated with any number of fields in your file,
00:24even on a number of different fields in the same layout.
00:27Value Lists are defined in the Manage Value List dialog, which can be accessed
00:30from the File > Manage > Value Lists.
00:35And in this window, you see we've already got one from our sorting chapter.
00:39Here we'll select the New button to create a new Value List.
00:42You'll see, from the Edit Value List window, that we've got three different
00:46options for setting up a Value List in FileMaker.
00:48We're going to concentrate on the option called Use custom values, and that's
00:53commonly referred to as creating a static Value List, because here you'll just
00:56enter in some static values, of course, and that will make up your Value List.
01:00The rest of these options are more dynamic, and we're going to cover those in a later movie.
01:05In this example, we're going to create a Value List for the Shipping Status field.
01:09This field can contain either one of these three values:
01:12Pending, Processing, or Shipped.
01:15So first let's name our Value List something that will be easy for us to
01:21retrieve later, Shipping Status, and we'll type a return delimited text list
01:31in the order we want these to be presented. And we'll put Pending, Processing, and Shipped.
01:39Now, when we're done, we'll hit OK, and we'll see this list appear in our list
01:44of Value Lists, and we'll also see a preview of the values that we're assigned.
01:49Now, we can dismiss this window by hitting OK.
01:52If we go into Layout mode, let's choose the Shipment Status field, and then
01:57looking at our Inspector in the Data tab, we can see that we've got the Invoice
02:03Shipment Status field selected, but we can also click on a Control style, and in
02:08this case, we're going to choose Drop-down list.
02:11Once you choose Drop-down list, it requires that you choose a Value List.
02:16Here we can click on the Drop-down and choose Shipping Status, and you'll also
02:21note that if you haven't yet created a Value List, you can just hit the Pencil
02:24icon, and it will pop up the Manage Value List window for you.
02:29The Drop-down list style that we selected allows the user to select from an item
02:33from the Value List, or to manually enter a value if they don't want to choose
02:36one of your options, and this list will also include a handy vertical scrollbar,
02:40so it's best used for very long Value Lists.
02:43You'll notice the option to Include arrow to show and hide list will affect the
02:47display of the field, and determines whether clicking into the field will
02:50trigger the list to appear.
02:51So let's look at it first without this option selected.
02:55We'll go into Browse mode and hit Save to save our changes.
02:59And now we notice that we can either tab into a field or click into the field,
03:06and you see by clicking into the field, it invokes this Drop-down list.
03:09But also notice that if I click outside the field or click twice into the field,
03:13I can still add my own value.
03:16That's one of the features of a Drop-down list.
03:18If I go back into Layout mode, select the Shipment Status again, you see we have
03:24two different options:
03:25Include arrow to show and hide list, and also I'm going to choose Allow
03:29editing of value list.
03:31Back in Browse mode, after we've saved our changes, you'll notice now that by
03:35just clicking or tabbing into the field, it doesn't invoke the Drop-down list.
03:39When the icon appears, the user will have to click the icon, and now you'll see,
03:44in addition to having our three fields from the Value List that we chose,
03:48there's also an Edit option.
03:50When a user clicks on the Edit option, a window pops up allowing them to edit
03:54the Value List that was created.
03:57You want to be careful when you select that.
03:59Possibly you don't want users to add values to the Value List, because what
04:03you're trying to achieve is data entry consistency, and they may make the same
04:07mistakes when editing your Value List as they would by just adding values to the field.
04:10You'll probably only show the icon if you want the Drop-down list to be an
04:15option, or sort of a helper option of different values, rather than a required
04:19value to select from.
04:20So let's go into Layout mode and quickly add another type of a Value List.
04:26Let's say, for example, we click on the Taxable field, and we're going to go
04:31into a Control style here, and we're going to choose Radio button set.
04:36But we don't yet have a Value List to choose from, so we're going to click on
04:39the Pencil icon and hit New, and we'll call this one Yes No, and we'll just
04:46choose Yes, Return, No, and hit OK, and OK again, and now we see that that's
04:53been applied to the Taxable field.
04:55If we go into Browse mode, Save our changes, we'll see now that a Radio button
05:00has mutually exclusive options.
05:02A user can either select Yes or No, but not both at the same time.
05:07By creating a Value List, you can provide your users with the options to choose
05:10from, rather than have them try to figure out what data to enter into the field.
05:14You'll want to use a static Value List when the values you wish to present to
05:17users will barely ever change.
Collapse this transcript
Creating and applying dynamic value lists
00:00We discussed creating a static value list containing a preset range of values,
00:05but there's another way to populate the values in a Value List, and it's called
00:08creating a Dynamic Value List.
00:10Dynamic Value Lists are automatically created on the fly, based on data
00:14that's already in a field.
00:16This way the value in the field will be automatically updated each time a new
00:19record is added, or the chosen field is updated in an existing record.
00:23Then an alphabetized and de-duped list of values will be available in the Value Lists;
00:28these Value Lists use something that's called a Field Index to create the lists.
00:31For example, if you click into any field in Browse mode and choose Command+I on
00:36Mac, or Ctrl+I on Windows, you can see a field's index.
00:40So this way, even if you have multiple records that all have the value of
00:44Pending or Shipped, for example, the word Pending will only show up once in your Value List.
00:49So when you use this field's index as your Value List, in the case of a
00:54Dynamic Value List, you will only see these values once, and you'll see them alphabetized.
00:59Now, in the Invoice Detail Layout, what you'll notice is that every record in
01:03the Invoice Detail is the child record from a Parent Customer.
01:07If you'll recall from the Creating Relationships chapter, a child related
01:10record needs to have the Foreign Key field populated with the key field from the Parent.
01:16If you need a refresher, it's not a bad idea to go watch those videos again.
01:20So in each Invoice record, we would like to show a dropdown of all of the
01:24primary keys of the customers stored in our Customers table.
01:27This will allow a user to go into the Invoice Detail Layout, create a new
01:31record, but still associate this child record with the parent by choosing the
01:35right Customer ID and placing that into the Foreign Key field.
01:39In order to show a dropdown of all of the primary key values from the Customer
01:43table, we would need to create a Dynamic Value List.
01:47Value Lists are created in the Manage Value Lists dialog, which can be accessed
01:52under the File menu, to Manage, and Value Lists.
01:57In this case, we'll hit the New button, and we're going to name our Value List.
02:02Let's call this one Customers.
02:04Now, instead of choosing the default Use Custom Values, which would create
02:09a static value list, we are going to choose the first option, Use values from field.
02:13When we select it, we see a new window appear called Specify fields for the
02:18Value List "Customers".
02:20Now, in this first window, you see this dropdown will contain a list of tables.
02:24Once we choose a table, we're going to choose the field that we want to base our
02:27dynamic value list on.
02:29So in this case, since we want to show a list of all customers' primary key
02:33values, we'll select Customers.
02:36But you see I can choose from any one of the tables in the database.
02:40Now we're going to choose the primary key field.
02:43Let's see what that looks like once we assign this to our field.
02:47We'll hit OK, OK, OK again, and in Layout mode, we will select the
02:53fkCustomerID field, because this is a local foreign key field defined inside
02:58of the Invoice record, and it needs to contain a primary key value from one of
03:03the Customer records.
03:05So when we select it, we see in our Inspector, in the Data tab, that we do have
03:10the fkCustomerID's field chosen, but now we are going to select a pop-up menu, and
03:18now we choose the Value List we want to show, and we'll say Customers.
03:22And you see the pop-up menu has the option to allow entry of other values, but
03:28that's not going to make sense for the task that we are trying to perform here.
03:31So now in Browse mode we hit Save to commit our changes, and now we see, when we
03:37click in the field, we get a list which represents every primary key from all
03:42the customers in our Customer table.
03:44The problem is your users aren't going to recognize a customer by their Customer
03:48ID, so there's a way that we can modify this Value List to make it more
03:52intuitive to the users.
03:53If we go under File, to Manage, to Value Lists, and either double-click on, or
04:00click and hit the Edit button on, the Customer Value List we created earlier, we
04:05hit Specify Field again, and now you'll notice on the right-hand side, we have
04:10the option to Also display values from a second field.
04:14What this allows us to do is not only display all the Customer Ids, and by the
04:19way, when a user selects one of these options, the value in the left-hand
04:22window, or in this case the primary CustomerID key field, will actually be the
04:27value that gets populated into the field.
04:29However, if we want to give users sort of a guide, we can pick another field
04:34from that same table, let's say CompanyName, and allow the user to see those as well.
04:41We also have the option below to show values only from the second field, or to
04:47show the values from both fields but then choose which one to sort by.
04:51Since the users really don't need to know the IDs, we'll just select show values
04:54only from second field.
04:56Now we hit OK, OK again, and then one last OK, and now we see, inside of the
05:02field, even though the value of the field is actually the ID, what it's showing
05:07us is the value of the second field.
05:09Also, when the user clicks on the Value List, all you are going to see are the
05:13names of Customers, instead of the IDs.
05:17In this case, you'll notice that our list is a lot shorter, and that's because
05:20there are only two records in our Customer table that actually contain
05:23Customer Name values.
05:26So if we wanted to show all of the customers, we want to make sure that for
05:29every record that has a primary key in it, it also has a customer name.
05:34Now you'll notice by toggling between the two choices, that the related fields
05:39that we have on this layout change values.
05:41We'll talk more about related fields in the chapter on using relationships.
05:46By formatting a field as a dropdown menu based on a Dynamic Value List, you can
05:51still allow users to enter new values, but at the same time allow them to choose
05:54from previously entered values.
05:56The way that a new value could be entered in this dropdown is by navigating over
06:00to the Customer List and creating a new record,
06:04making sure of course that the new record you create has both the primary key
06:07value and a company name.
Collapse this transcript
14. Printing and Saving
Previewing pages and print options
00:00One of the benefits of FileMaker Pro is that you can print any layout that
00:03you can view onscreen.
00:05So this way you don't have to have any special print layouts, but there are some
00:08ways to approach printing that can help you get better results.
00:11If you use some of the tools that FileMaker provides to you to visualize what
00:14your layouts will look like when you print them, you can then design your
00:17layouts to look more like print layouts.
00:19The first tool that you can use is called Preview mode.
00:22We've been talking about the various different modes -
00:24Browse, Find, Layout;
00:26there's also a mode called Preview mode, which can be invoked while in Browse
00:29mode by hitting this Preview button.
00:32I'll show you Preview mode in just a second, but the first step that I want you
00:35to take is to go into Layout mode, and when in Layout mode, I wanted to bring to
00:39your attention this little dotted line here that we see.
00:42This line is what the page edge is going to look like while we're still in Layout mode.
00:46The idea here is so that you can see where you're printing will cut off and
00:50therefore develop around it.
00:51You also have a line in the bottom of the screen where the height of your page
00:55will end based on the print driver you have selected.
00:57If I were to print this, it would cut off half of the Shipment Status field value.
01:02It's also important though to look at where these lines come from.
01:05These lines are coming from the print driver that I have selected on my computer.
01:09Since all print drivers are different, the size might fluctuate a little bit,
01:12even if you've designed your layouts based on the print driver you have
01:16installed as a developer.
01:17This isn't a platform issue, so it's not a Mac or PC thing;
01:20it's a driver issue.
01:22So in a perfect world, you want to make sure to include all of the print drivers
01:25on your development machine that will occur in your user's environment.
01:29Generally, you can get an idea where things may print and where they won't
01:32print, because really they're all kind of based on an 8.5 x 11 document, for the
01:36most part, and that serves as a good guide.
01:39Also, you'll notice, if we go under the File menu and we go to Page Setup, and I
01:43choose Landscape instead of Portrait, you'll see that the line has moved.
01:47Of course, in that case, the print edge will change because we are printing in Landscape.
01:52So it's important that you make sure, before you design all your layouts, that you
01:55choose Portrait or Landscape, so you can design around those sizes.
02:00Back in Browse mode. If you want to see what something is going to look like
02:04when you print it, you'll press the Preview button.
02:07Hitting this button enters you into Preview mode, which can also be achieved by
02:11going under the View menu.
02:13When you switch to Preview mode, you see the layout as it appears on the printed page.
02:17You cannot enter or edit information in fields while in Preview mode, nor can
02:21you click any of the buttons that you have onscreen, but it's just solely here
02:24to preview what your printed document will look like.
02:27Also in Preview mode, you'll notice, in the upper left-hand corner, that where we
02:30normally have Record navigation or Layout navigation or Found Set navigation, we
02:35now have navigation between the number of pages that will print based on the
02:38current Found Set that you've chosen.
02:40It's important to remember that anytime you invoke a Print, a Save as Excel, or
02:45Save as PDF from within Preview mode or Browse mode, FileMaker will always print
02:50the records in your current Found Set.
02:52So this way Preview mode gives you an idea how many printed pages it will take
02:56to print your Found Set.
02:57Variable information supplied by FileMaker Pro, such as page numbers or the
03:01current date like we use here, may not be available in Browse mode, but will
03:07definitely be available in Preview mode.
03:09In the case of current date, it's available in both.
03:12You can also use Preview mode to see things like Mailing Labels, which
03:16have multiple columns.
03:17Of course, in Browse mode they will only show one record, but in Preview mode
03:21you'll see all the columns wrapped appropriately.
03:23When you print a layout, which you can do in many different ways, you can
03:27either hit the Print button that's only in the Status toolbar when you're in
03:30Preview mode, or you can go under the File menu and choose Print, or you can use
03:35the Quick Key option, which on Mac is Command+P and on Windows is Ctrl+P. Once
03:41selected, you'll see the Print dialog box appear.
03:44Keep in mind that the Print dialog box is going to look different on every
03:47computer that has a different print driver installed.
03:50Some of the features are going to be the same, but it will be organized in a
03:53little bit different fashion.
03:54Besides just selecting the printer you want to use to print, you can also choose
03:58the copies and number of pages for your document.
04:01And then you'll also notice that you'll have a FileMaker Pro option.
04:04It will be located in various different places, depending on your print driver,
04:08but once selected, it will allow you to choose your starting page and then give
04:12you three important printing options.
04:14You can choose from the Records being browsed, which means your current Found
04:17Set, or you can choose Current record, which means that no matter how many
04:21records you have in your Found Set, it's only going to print the active record,
04:24or you can just choose a Blank version of the current layout that you're on - no
04:28records, but just the fields.
04:30And a lot of times this might be useful if you have a form or something like
04:33that that you want to print and allow people to fill out by hand, for example.
04:37On both Mac and Windows, you can choose from a variety of other settings common
04:41to all application Print dialogs, as you can see some of those here.
04:44There are very few areas where FileMaker performs differently in Mac or Windows,
04:48but print setups are one of them.
04:50For example, if you choose the Page Setup icon in the toolbar, which is also
04:56available under the File menu, you'll see the Page Setup dialog appear.
05:00Now I am working on a Macintosh computer right now, so the dialog is actually
05:04called Page Setup; however on Windows, it's called the Print Setup.
05:09Inside of a Mac and the Page Setup dialog, you have the ability to choose the
05:13scale of the document you'll print; that is, for example, 100%, 75, 50, that
05:18type of thing. But on Windows, only some, but not all of the print drivers will
05:23have the ability to scale the document you want to print.
05:25FileMaker Pro initially uses the Windows default Printer and Paper options as
05:30its default, but you can specify a different default Printer and Paper options
05:33when you print in FileMaker Pro.
05:34The default Printer that you choose in FileMaker Pro is an application setting.
05:39So all files that you print in FileMaker will print to this printer, unless you
05:43choose a different one.
05:44The Paper and Orientation options that you choose in the Windows Print Setup are
05:48going to be file-specific settings;
05:50therefore, when you need to, you can choose different Paper and Orientation
05:53options for each different FileMaker Pro database.
05:56However, in the case of the Page Setup dialog on a Mac, FileMaker Pro prints
06:01to the Mac OS default printer, unless you specify a different printer when you print.
06:06For the most part, printing in FileMaker Pro is similar to printing in any other
06:10application; however, getting familiar with some of the unique printing tools and
06:13options in FileMaker Pro can help you take all the guesswork out of the way your
06:17layouts will look when they print.
Collapse this transcript
Printing in different views
00:00When setting up layouts to print in FileMaker, you really have two different
00:03options on how you're going to print the data.
00:05You can either print it as one record at a time, or you can print it as
00:08multiple records at a time.
00:10FileMaker Pro automatically defaults to printing all records in the current
00:14found set when you're printing.
00:15The most common way to print multiple records at a time is through a List View.
00:19If you recall, for each primary table in our database, we've already set up a List View.
00:23For example, you see I have got the Product List View, where as you see in Layout
00:29mode, we've created all the fields in one row and made the body only the height
00:33of the field's height.
00:35But in addition to creating the layout of the style, we also need to make sure
00:39we've got the View as a list chosen.
00:41So if you look at this list in Preview mode, you see that all the records in our
00:45Found Set will print. In this case, we're getting multiple records on a printed
00:49page at any given time.
00:51The more records you can get onscreen usually makes the more
00:53efficient printing.
00:55For example, if we go into Layout mode and we select the body part, we'll notice
01:00in our Inspector, under Position, that the Height of the part is 18.
01:04However, if we change that to 35 and hit Enter, then go into Browse mode, saving
01:11our changes, if you see in Preview mode, you'll notice that the number of pages
01:15it takes to print the same amount of records is 3 pages.
01:18But back in Layout mode, if we shrink up the body to just above the height of the
01:24field, in this case 18 because our fields are 14 pixels high.
01:31Now if we go back into Preview mode saving our changes, you'll see that we only
01:37have to print two pages and just barely two pages.
01:41Make sure you're designing these List Views efficiently, so that when you print
01:44them, it still uses little paper as possible but get as many records on a printed
01:48page as you possibly can.
01:49Now let's navigate over to Browse mode again and choose the Product Detail Layout.
01:57So in cases where you want to create a layout for just one record at a time,
02:01you'll go under the View menu and make sure that you've got View As a Form;
02:05you can also choose that in your Layout toolbar, and as I mentioned before in the View menu.
02:10Now if you go onto Layout mode, you'll see that the body is much larger in this case;
02:14instead of 18 pixels high, it's 434 pixels.
02:19The idea behind this is if you go into Browse mode, this way only one record can
02:23be seen onscreen at a time.
02:25But you want to make sure that you are viewing as a form; otherwise, if you go to
02:28print this record, you'll get more than one record fit onto one page, as you'll
02:32see if I change it to Viewing As a list - not the desired effect.
02:37So since FileMaker allows you to print any layout that you can view, you want
02:41to make sure that you set these layouts up, so that they are only showing one
02:44record at a time if it's a Detail View, or many records at a time if it's a List View;
02:49this will have both when you're browsing records, but also, additionally, when
02:52you're printing them.
Collapse this transcript
Sliding objects
00:00When you're considering allowing your users to be able to print off layouts that
00:03you've created in FileMaker, there is a couple of things that you might want to
00:06take into consideration.
00:08First off, you know that you can print any layout that you can see onscreen.
00:11You can also prevent objects on a layout from printing, and you can also remove
00:16blank spaces between objects on your layout when you print.
00:19This way you might have graphic objects, or buttons, or different things for
00:22users to work with during data entry in Browse mode, but you can remove those
00:26when they are printing.
00:27To do this, we're going to use something called Sliding Invisibility.
00:30You'll notice this option when we go into View > Layout mode, and we'll see our
00:36Inspector, and in the Position Tab, you'll notice, on the bottom, the Sliding
00:40Invisibility section.
00:42You can set an object to be omitted entirely from printing, which, for example,
00:46allows you to put buttons or print instructions on a layout that won't appear on
00:49the actual printout.
00:50Let's say, for example, we've got this logo that we don't want to have printed
00:55when we print this Product List View.
00:57By simply selecting the logo or any other layout objects, you go under the
01:02Sliding Invisibility and choose the very bottom, Hide when printing.
01:08Now, when we go into Browse mode - Save our changes - we see the logo here in
01:14Browse mode, but when we go into Preview, it's no longer there.
01:17So you can put anything you want on a layout, or you can take every layout
01:21that's in your FileMaker database and go and hide all the items in case your
01:25users decide to print from that view.
01:26This is going to allow you to get rid of really busy objects that might normally
01:30print if you haven't chosen this option.
01:32Notice how the white space isn't used efficiently from record to record.
01:35Many times on the List View this could be okay, but let's say we want the Cost
01:38to butt right up against the end of the Product Name.
01:41So after every Product Name will be the Cost, regardless of how long the Product Name is.
01:47The problem is when we go into Layout mode is that we can only choose the
01:52positioning of the fields based on the field names, not by the field values.
01:56However, if we select all of these fields and their field labels, by drag-
02:02selecting, you'll notice in the Sliding Invisibility, we have an option for Sliding Left.
02:08Let's take a look at how that option will affect us in Preview mode.
02:11We go to Preview mode and hit Save, and now we notice that all of the options
02:16will slide left, as far left as they can until they run into another value.
02:21But that the space between the two fields in Layout mode is still honored.
02:24So this is a good way to dynamically line up all of your values from left to right.
02:29So now let's select all three of our fields.
02:34I'm going to drag-select those three fields, and while they're selected, I'm
02:38going to choose the option under Sliding Invisibility, called Sliding Left.
02:43Now when we go back into Preview mode and Save our changes, we see that the Cost
02:48is butted right up against the name of the product,
02:50and also that the distance in our Layout mode that we've given between the
02:54Product Name and the Cost is still being honored.
02:57This way we can dynamically move fields against each other, thus
02:59preserving white space.
03:03You should also be aware that if you have records stacked top to bottom, for
03:06example on a Detail View, you can also use the Sliding Up selection to
03:11eliminate white space top to bottom in your layouts.
03:14You'll use these options on the Inspector tool if you want to prevent layout
03:17objects from printing or control white space on outputs from your FileMaker
03:21system, so that you can create cleaner and more professional-looking reports
03:24and printouts.
Collapse this transcript
Printing merge letters
00:00One very popular request from FileMaker users is the ability to print letters.
00:04And much like other applications, like Word, for example, FileMaker Pro
00:08supports Merge fields.
00:10If you navigate over to the Customer Welcome Letter, I'll show you an example of
00:14how this Merge field technique works.
00:17First, we'll need to go into Layout mode, and we're going to take a look at this
00:22layout and how it's set up.
00:23You see this layout has a standard Header/Footer part, but inside the Body we
00:28just have one big text area, which was created, initially, by choosing the Text
00:33tool and just picking an area onscreen and beginning to type.
00:38You'll notice we've got a couple of areas here where we've left blanks because
00:41we want to actually show field data.
00:44One way that we could do this is to drag a field, which we can do by choosing
00:48the Field tool and dragging the field right next to the area that we want to
00:53display the name, like so.
00:58And certainly that could work;
00:59as a matter of fact, if you look at it in Browse mode you can see that a value can show up.
01:03But what happens when we want to put information in between other text, or
01:08list data inside the Letter area and have it expand and contract based on how long the data is?
01:14Well, then these fields aren't going to work.
01:16And plus, even in this case, they'd be a little difficult to work with.
01:19I'm going to go ahead and delete this field here, and I'm going to click inside
01:23the text area, and double-click on it so I can put my cursor in there.
01:29And instead, what I'm going to do, I'm going to go into the Insert menu, and at
01:34the very bottom you see there is a section here for Merge Field.
01:38When you select Insert > Merge Field, you see the familiar Specify Field window
01:43which allows you to pick a field from any table that's related to the current
01:46table that you're on.
01:47When I hit OK we see now that the entire name has been placed inside of the
01:52text area, with double brackets on each side of it, which is a common way to
01:56denote Merge Field.
01:58Going back into Browse mode, saving our changes, we now see, as we move from
02:06record to record, that the first name Field data has been put inside of this, that
02:12the data from the first name field has been placed right next to Hello, and
02:16what's nice is it dynamically moves the position of the dash forward and
02:21backward, depending on the length of the data in the field.
02:24Now what's nice about a Merge Field is we can treat it just like it's text.
02:30So, for example, if I wanted to select this and add some formatting to it, I
02:36would use the same formatting options as I do for formatting any other kind
02:40of text on the layout.
02:41Let's take a look at a couple of other areas where we can insert some Merge value.
02:45Let's put in the CompanyName here and get rid of some of these spaces.
02:57And then down here, we're going to actually add the address, since that's what it indicates here.
03:02I want them to verify their shipping address.
03:05So we're going to treat it just like text, but we can say AddressStreet, and
03:10I'll hit Return, Insert > Merge Field, City, and now because it's like text,
03:17very similar to the one we are creating our label layouts and our envelope
03:20layouts, I can put a comma and a space, and I can insert another Merge Field
03:26after that for State, put another's couple of spaces and insert Zip.
03:35Now when we go onto Browse mode and we cycle through the different records, we
03:41can see the addresses and the names update.
03:43But we don't see anything where we have the customer name.
03:47So if we go into Customer List and Find Matching Records, Show Omitted, it will
03:58give us a found set of records that have company names.
04:01Now we can go back and preview and see how those look.
04:04Thank you for signing up, and then we've got the name, and you'll notice that no
04:08matter how long the name is, it's actually wrapping the entire text from that
04:13paragraph around to the next line, which is a nice way to do this.
04:20But also, we can apply some formatting, so we choose the name here and hit Bold.
04:26I can also maybe add other character there and go into Browse mode, and you see
04:33now we're able to create smart-looking, professional letters with dynamic data
04:39that's populated by a found set that we created in our customer table.
04:42So it's a good idea, when you're creating letter layouts, that you always use Merge fields;
04:47however, Merge fields can also be used anywhere else in a layout that you want a
04:50field value to be treated as text.
Collapse this transcript
Saving as a PDF or Excel file
00:00FileMaker Pro has built-in functionality for saving data as either Microsoft
00:04Excel or Adobe PDF files.
00:07You can see these options when you go into Preview mode in any one of your
00:09layouts, because we've got icons in the Status toolbar for Save as Excel and Save as PDF.
00:15You can also find these options while you're in any layout, in any mode, under
00:20the File menu, under Save/Send Records As.
00:24The Save/Send Records As Excel functionality makes it easy for a user to export
00:28FileMaker Pro data from the current layout and current found set, and work with
00:32it in Excel's Spreadsheet.
00:34Note also that FileMaker Pro 11 supports both the .xsl and .xslx formats
00:40for Microsoft Excel.
00:42So the Save as Excel option is great for you if you want to share data
00:45that's stored in your FileMaker database with someone who doesn't have
00:48access to the database;
00:49however, it's not intended to be an alternative to storing the data in your database.
00:54You should never create an Excel Spreadsheet and then make modifications to
00:57the data, because you'll just end up with data with different versions in
01:01different locations.
01:03So make sure this is only for sharing subsets of data and not for
01:06making modifications.
01:07But in fact, if somebody contacts you and says -- let's say, for example, an
01:11accounting person says they want some information that's stored in FileMaker.
01:14This is an excellent tool for being able to share that data, and it's really easy to do, too.
01:18So if you are asked to do an Export as Excel, you could of course go into
01:22the File Export option and choose Excel, which in that case it allows you to
01:29pick various fields.
01:31But when you're doing the Save As Excel, it's a little bit easier to do, because
01:34it's just a single button press.
01:36But just remember that the layout that you're on is going to give you the
01:39fields that it'll Export.
01:40So basically hitting Save As Excel will give me these three fields,
01:43the ProductID, Product Name and Cost, and it will give me the number of records
01:49that I currently have in my Found Set.
01:50So if we look here, I have all 40 records showing.
01:54But if I were to create a subset of those, that's what would Export.
01:58So back in Preview mode, if I do want to create the Save as Excel, all I have to
02:02do out of Preview mode is hit the Save as Excel button, but keep in mind that in
02:05any mode you can go under the File menu and choose Save/Send Records As Excel.
02:13In the Save Records As Excel dialog window, you'll choose the name of your
02:17Excel file, as well as the location where we're going to save it, and you can
02:20choose which type of Excel Workbook you want to create, and then you also have
02:24an option to choose whether its going to be the records being browsed or the current records.
02:28Now remember, we had 40 records in our found set, so that means if I
02:32choose records being browsed, it's going to give me all 40 records as part
02:35of the spreadsheet Export.
02:36If I choose Current Record, it's just going to give me whatever the active
02:40record was at the time that I pressed Save As Excel.
02:42So we'll keep it as Records being browsed.
02:45You see we have a couple of options here.
02:47Automatically open file, which I have checked, will open up the file in Excel
02:51for me to preview it.
02:53I'll make any modifications if I need to, but just to help me take a look at it
02:56which I will do in this case, and also a really handy option to Create an e-mail
03:01with the spreadsheet as an attachment.
03:02So like in the example before where someone in an accounting department, for
03:06example, has asked you to send this information over to them.
03:09Well, you're going to e-mail it anyway, so why not just hit this button,which
03:12will open up a outgoing e-mail on your default mail program, with this
03:16spreadsheet attached.
03:17We'll just keep the Automatically open file option open right now.
03:20Then we hit the Save button.
03:23You see now that the spreadsheet has been saved to the location where we told it.
03:26In this case we've actually got 41 records, and that's because of course, Excel
03:32uses a row to use your column headers.
03:35And you'll notice also that the column headers inside the spreadsheet will be
03:39the name of the field.
03:41So sometimes you might want to open this up and maybe just change these
03:44around, so instead of the naming convention that you used, you can make it to
03:47say ID, for example.
03:49And if you've ever use related fields, you'll actually see the table name colon,
03:53colon in the field names.
03:54So that's definitely something you want to clean up before you share this with anybody.
03:58Just like with Excel, FileMaker allows you to output your layouts as a PDF document.
04:03It's actually quite easy to do. First just navigate to the layout that you want to create.
04:08Let's say we go to our Welcome Letter, and instead of printing out a hardcopy
04:13of the Welcome Letter, let's say this time we want to just generate a PDF and
04:18send it over to one of our customers.
04:20So now that we've navigated to this layout, we can take a look at what its
04:24going to look like in Preview mode, and of course, Preview shows us the
04:27margins and the spacing for not only a hardcopy output, but also what the PDF
04:31is going to look like.
04:32And we're in Preview mode now, so we see we've got the Save as PDF button, but
04:36of course, in any mode I can go under the File menu, choose Save/Send Records As and choose PDF.
04:41It will give me the same Save Records As PDF option, and here just like with
04:46Excel, name the PDF, pick the location where you want it to be saved, and choose
04:52whether or not you want the Records being browsed, which is going to be all of
04:55the records in the found set.
04:56This time, though, we just want to print the one active record that we're on.
04:59So that's going to be the Current record that we see onscreen.
05:02Also, though, with a PDF you have the option to choose a Blank record.
05:06This means, for example, if you have a form that you've created in your
05:09database for data entry, you can print off a PDF version of it with no data in
05:13the records, or fields, and then have somebody hand-fill that out and use that for data entry.
05:17Just an option here that you have, because of the PDF's write-in capabilities
05:22in FileMaker Pro 11.
05:24We'll choose Current record.
05:25We also see by hitting the Options button that
05:27you have all the regular Adobe output options,
05:29so you can name the document something.
05:32You can even put a password into the document.
05:34These are all options that you might be familiar with if you use Adobe Acrobat anyways.
05:39And of course, you see in the bottom, we've got the Automatically open file or
05:42Create e-mail with this file as an attachment, just like with Excel.
05:46We'll open it up with whatever reader you have, or open it up in an outgoing e-mail.
05:51So let's hit OK, and let's hit Save.
05:56And now you see the PDF on our desktop, and you see the PDF option, which is a
06:01nicely-formatted letter opening up inside Preview on my computer.
06:05So both of these are really great tools for FileMaker, for sharing information
06:08on the fly, as either Save As Excel or Save As PDF, both of which will allow
06:13you to save out in formats that you can then share with those that don't have
06:16access to FileMaker Pro.
Collapse this transcript
15. Reports
Building simple reports with summary fields
00:00One of the most powerful and useful capabilities of any database system is its
00:04capacity to output, or report, on the data that it's storing.
00:09And if you look at this List View that we have here, the Invoice List View in
00:12our Exercise File, you see that it's a list of 146 different Invoices.
00:18Now certainly by creating different found sets, we can create compelling report-
00:22like Outputs in our database.
00:24Now this is great; the information looks just like it does when the user has
00:27entered it into the system however, but with one simple change we can turn this
00:31List View into a Report.
00:33So, for example, if we go into Layout mode, you'll notice that this Layout has a
00:38footer part on it, and by just entering one special type of field into this
00:42footer, I can make this List View a report.
00:45The type of field I'm discussing is called a Summary Field, and this is the only
00:49type of field that we haven't yet discussed in this title.
00:52So let's take a moment to define what a Summary Field is.
00:55If you open File > Manage > Database, you'll see that the very last option is
01:02something called the Summary.
01:04Unlike the other types of fields we've already discussed - the Text, Number, Date,
01:07Time, Timestamp, Container and Calculation - the Summary Field is unique in that
01:11it isn't a field that contains data, but it's rather a field that aggregates
01:15data across a found set.
01:18The value in a Summary Field will be different based on the Records in a
01:21user's current found set.
01:23So unlike a Text Fields, or any of these other types of fields which will just
01:27display the data for a specific Record, a Summary Field is going to give us a
01:31total value based on a found set of Records.
01:36So let's create a Summary Field to see one in action.
01:38We're going to type into the Field Name, we're going to call it TotalSummary,
01:43and we're going to choose the Type Summary, and we're going to hit Create.
01:46Now you'll see the Option for the Summary Field dialog box gives us some
01:50interesting choices.
01:51You see here we've got a bunch of aggregate options, since what we're doing is
01:56aggregating against a current found set.
01:58We can do things like Total a series of values across the Found Set, Average, Count,
02:04provide Minimums, Maximums and so on.
02:06So you'll see what we have here are available fields, but you should note that
02:10some of the fields are grayed out, making them unavailable.
02:13Depending on which aggregate option we choose, we're going to have different
02:17fields available to us.
02:18So, for example, Total of allows us to total Date or Number fields; most
02:24commonly you're going to be using Number Fields.
02:26Average only allows us to choose Number Fields and Count allows us any field,
02:31because what it's going to do is literally count every record in the found set.
02:35Minimum and Maximums work on Numbers or Date fields.
02:40In our case we're going to choose Total of, and we're going to choose Invoice Total.
02:45So what we're instructing this field to do is to determine all of the records in
02:49a current found set and then go into the InvoiceTotal fields and all those
02:54records in the found set and provided a total of all the InvoiceTotals.
02:59When we hit OK, we can see these field in action.
03:01Now you see that a field has been added to the bottom of my layout.
03:05Your preferences may be different.
03:06If so, you can go under the Insert > Field option and drop the TotalSummary on the layout.
03:11What I'm going to do is I'm going to Shift+Select both of these values, and I'm
03:16going to drag them just under the InvoiceTotal.
03:23I'm going to reset the size of my body part.
03:25And while I've got the field selected, since I'm already in Layout mode, I'm
03:29also going to go into the Data tab of the Inspector.
03:32And I'm going to choose Currency,
03:34because I happen to know that this field is going to contain currency values.
03:38We'll choose a fixed number of digits, Currency dollars and thousands separator,
03:45and then maybe make it just a tad bit longer.
03:47So let's go into Browse mode and take a look at how this works. Save our changes.
03:51So now if you look at the value on the bottom of the layout, it gives us $418,390.60.
03:58What that is is the total of every Invoice across the 146-record found set.
04:04What if I went in and I chose only Shipped records by using our fast match in
04:09the contextual menu?
04:11Now you see we only have 19 Records, and our total has changed to $57,266.75.
04:14So you can see here evidence that every time we change our current found set,
04:21this total will change.
04:23So this is a great way to create a very simple report, because now you can
04:26feed it all sorts of different found sets, and all the while it's going to give
04:30you different totals.
04:31So this simple List View has now just changed into a simple report.
Collapse this transcript
Creating subsummary reports
00:00One of the most powerful and useful capabilities of FileMaker Pro is its
00:04capacity to group and summarize data in a report format.
00:08This allows you to do things like, aggregate, organize and otherwise just
00:11manipulate data that users have already entered into your system into reports
00:15and outputs that give visibility of data you wouldn't normally have.
00:19The most powerful type of report in FileMaker is something that's called
00:22a sub-summary report.
00:24In general, a sub-summary report is a way to present a list of data that's
00:28grouped by a certain variable.
00:29Let me give you an example of this inside of our Invoice List View.
00:33A sub-summary report is based on a Layout part that's called a sub-summary part.
00:39Let's take a look in Layout mode, and we'll see the layout that we currently
00:44have has a Header, Body and Footer.
00:46We can also see that by going under the Layouts menu to Parts Setup.
00:50But now I'm going to introduce you to the summary parts.
00:54First, we're going to hit the Create button, and we see we've got our
00:57Part Definition window.
00:59We see that Header, Body and Footer are already grayed out, because we already
01:03have those parts in our layout, and we can only have one of each.
01:05But I want to introduce you to the Sub-summary when sorted by part.
01:11It's quite a mouthful of a name, but it does contain a very specific and
01:14important piece of information, and that's the, when sorted by; we'll get
01:17to that in a second.
01:18What a aub-summary when sorted by part allows you to do is group data based on a
01:23certain break field, and the break field is something that you're going to
01:27introduce, and it's also something you're going to be sorting by.
01:30The way you introduce the break field is by selecting the sub-summary Part and
01:34then choose a field from the window on the right.
01:38So in plain English, what this really means is Group by.
01:42So we're choosing a Grouping Part, and we need to choose the field by which
01:46we're going to group.
01:48So we've got 146 different invoices in our Invoice Table. Maybe it might be more
01:53helpful to look at these if we group them by Customer name.
01:55However, we don't have a Customer name field defined in the Invoice Table,
02:00because it's related to the Customer table.
02:01So why don't we click here and choose the related Customer Table and just simply
02:06pick the CompanyName field?
02:09So, FileMaker asked us what do we want to group by? And we said we want to
02:13group by CompanyName.
02:14So now we hit OK, and we see we're being asked where we want to print the Part.
02:19In this case it's just really asking us, do we want the Part to be above the
02:23Body or below the Body? And in this case we're saying Print Above.
02:27So now let's hit Done and do a little bit of cosmetic changes to our Layout.
02:33First, let's get rid of the ContactName. Select both of those holding down the
02:39Shift Key and hit Delete. And now let's move the Invoice number field over to
02:45the right - just a little cosmetic touch-up - and you'll notice now that we've got
02:49this new part, the Sub-summary Part and if you go into the bottom left-hand
02:53corner here and toggle, to click to display the Parts, you'll see that it gives
02:58more description: Sub-summary when sorted by Customer's CompanyName.
03:03So what we want to do is place a field here that's going to show up in our
03:07layout that will represent each group.
03:10In this case, we're just going to pull in the break field, which we determined
03:13was the related CompanyName.
03:15So let's say Insert > Field > choose Customers. We don't need a label on this
03:21case, and we'll say CompanyName.
03:23Insert > Field > Customers > CompanyName.
03:24So let's drop that part in between the Summary field, which we need to make sure
03:28it's totally encased inside that summary field, and now let's go back into
03:33Browse mode and hit Save.
03:37Nothing too spectacular yet, because as a matter of fact, we haven't
03:40changed anything inside the Layout, by the looks of it, but there's one
03:43little secret here.
03:44If you remember, when we defined the Sub- summary Part, there was also something
03:48else in the name of the Part where it said sub-summary when sorted by.
03:52So let's see what happens when we sort by that break field.
03:56Of course, we remember the break field was from the Customer Table, and it was
04:01CompanyName, so let's see what happens now in Browse mode when we hit Sort.
04:06Now you see we've got the List View, but the orders are grouped by each
04:11customer, and if we do Show All and Sort again, thus triggering the groups,
04:19let's take a look at what happens at the top of our list.
04:22Now you see we've got a customer and all their customers orders, the next
04:26customer, all their orders, so on and so on and so on.
04:29If we go into Layout mode, we can make just a couple of cosmetic changes.
04:34For example, if we choose the Summary Part, give it a little fill color, choose
04:41the CompanyName, maybe make it bold and also transparent, and you can see this
04:48will really make our Layout pop.
04:53Now we have a report that groups by Customer, very clearly, and then gives us
04:58all the individual invoices for each one of those customers listed below, and
05:02one more thing to really make this a report. In Layout mode, remember the
05:06TotalSummary field.
05:07Well, here's something interesting.
05:09If we go into Layouts > Parts Setup > and hit Create, let's add another
05:15Sub-summary Part when sorted by - that's right, you guessed it - CompanyName, but
05:22this time let's say Print Below.
05:24So now you see it's created a Sub-summary Part below the Body.
05:29So now what we're going to do is Shift+ Select both the TotalSummary field label
05:36and field, hit Copy, and now we're going to paste.
05:42So let's use our arrows to move this just above the other.
05:48Now it's the same field; we just put it into sub-summary Part.
05:51So what happens when we go into Browse mode now?
05:56We'll notice that the same Summary Part is now giving us a Total for each
06:01customer and then moving on to the next customer, and so on and so on, until
06:06finally, at the bottom, it's giving us a total of all customers.
06:14So what's actually happening here is that we're creating mini found sets
06:18using sub-summary parts, and the data within the found sets is being
06:22summarized by a Summary field, because of course Summary fields summarize
06:26data within found sets.
06:28So what a sub-summary part does is not only group information, but create mini
06:32found sets of that information for us to use in our reports.
06:36So in just a few minutes, you can take any List View, add a couple of Summary
06:40Parts to it in a Summary field and end up giving yourself a group report, which
06:44will allow you to aggregate, organize, synthesize or even manipulate data that
06:48other users may have already entered into your database.
Collapse this transcript
Creating subsummary reports in Table view
00:00In previous movies we've discussed how in the New Quick Table View in
00:05FileMaker Pro 11, you can add and manage fields, and that you can also add and manage Records.
00:09In this movie I want to show you how we can add a part or at least the
00:12functionality that's produced by a part.
00:15Specifically speaking, we're talking about Sub-summary Parts, similar to how we
00:19added a Sub-summary Part in our previous movie in order to create a report.
00:23You can allow your users to go into any Layout that's in Table View and create
00:28a Sub-summary Report.
00:30For example, here in Customer List, you can see that we're in Table View, and now
00:34we can decide on a field that we want to use to group all our Records.
00:38We see here that we've got an AddressState field.
00:41Let's say that we want to group all our records by the address, and we've got
00:45about 1523 records here and we want to group them each by State.
00:50So what I can do is hover over all the different column headers, and as you see
00:54as I hover over each, a little dropdown arrow appears, but I'll choose the field
00:59that we want to use as our break field, or our grouping field, click on the arrow
01:04on the dropdown, and now you see we have various options here, most of which
01:07we've talked about already, Sorting, Field Types, Field Options. But if you look
01:12here we've got the ability to Add a Leading Group by AddressState, or Add a
01:16Trailing Group by AddressState.
01:18If you're familiar with reporting inside of FileMaker Pro, you know that you can
01:22set up a Part that's called the Sub- summary Part, and when you create it you're
01:25asked whether or not you wanted to place it above or below the Body.
01:29That's essentially what these two options are: Do you want this new part to be
01:34above or below the Body Parts?
01:37So what we're going to do is we're going to choose Add Trailing Group by AddressState.
01:41So now you see what we get is a part after each State that has a default gray
01:49value, and also FileMaker has already sorted all of our records by the break
01:55field, which in this case is State.
01:57So also you see when we right- click into this area, we can change the
02:03part color, and make it pop a little bit more, and now we've got all of our
02:07records grouped by State.
02:09Let's say we want a subtotal by State.
02:11Well, if you first look under File > Manage > Database, we'll see that we don't
02:16have any Sub-summary fields defined inside the Customer Table. But if we go
02:22back into the column header for AddressState, you'll see we've got a couple other options.
02:27So you see we've got this option for creating Trailing Subtotals.
02:32Now again, we don't have a Summary field in this table, but we can choose
02:36Trailing Subtotals, and either do a Count or a Running Count, and the reason we
02:40only have these options available to us is because AddressState happens to be a Text field.
02:45If it was a Number field, or even Date field, we'd have some of these other
02:48options like Total, Average, Maximum and Minimum available to us.
02:52Well, let's just choose Count for right now, and now you see it's included a
02:56count after each group. And in addition , what it's done, if you'd look under File
03:06> Manage > Database, is now it's defined a new Summary field for us based on the
03:11Count of AddressState, like we indicated here in Browse mode.
03:14Not only can you create the report in Browse mode in Table View, but you can
03:18also create the supporting fields in Browse Table View as well.
03:21Creating Group Layouts in Table View helps you turn simple Lists in Table View into reports.
03:27With FileMaker Pro 11, you can now easily create grouped Layouts on the fly,
03:31using the New Quick Table View features.
Collapse this transcript
16. Calculation Essentials
Defining calculations
00:00So far in this title, we have been talking about the three core areas of any
00:03successful database application, and they are building a proper architecture,
00:08which we discussed when we built the tables and the fields, and then allowing
00:11users to input data effectively which was done through developing layouts.
00:15And then we've also touched on output in the form of printing and exporting.
00:19Output isn't just specific to reporting, or being able to export data; Output
00:23also means that you're putting certain data into the system, and then it's
00:26aggregating that data, and that's the role of Calculation fields. And the
00:30results of calculations are also considered output.
00:33A calculation allows you to derive information from values of data.
00:38If you're defining a Calculation field in FileMaker, you're using either fields
00:42or data that you're feeding into the Calculation formula that will then
00:45produce the desired result.
00:47Calculations are also known as formulas, and mathematicians often call them expressions.
00:52But in FileMaker, you call them a Calculation Formula.
00:55Calculations will always return a result.
00:57That's really what their job is.
00:59So that means you have to feed some information into a calculation. Then it'll
01:02return some other value for you. And the information that you are feeding into
01:06the formula can either be static text, or in most cases it's going to be in the
01:11form of parameters that you designate as fields.
01:13You are probably already familiar with what calculation syntax might be.
01:16For example, if we just created a calculation that set the text values 2+2, that
01:22calculation would always return the number 4.
01:24Now, if we put a calculation field together that had the word "Amount" plus the
01:29word "Tax," that would return the sum of two fields in a database that were also
01:34named "Amount" and "Tax," if, of course, those two fields have the same name.
01:38And then as you flip from record to record, the value in the Amount field will
01:42change, and the value in the Tax field will change, and so therefore the value
01:46returned from your calculation will also change from record to record.
01:50Calculations are very important because there are many different uses for
01:53calculations in FileMaker Pro.
01:55For example, the most obvious is that fields can hold and display the results of a calculation.
01:59But beyond that, if you remember when we set up our fields, we could also
02:03validate based on a calculation, and then we could also do autoentries that were
02:07based on calculations, where we would assign initial values to a field based on a
02:11calculation formula.
02:13And you'll also see, when we get into our movies on scripting, that we can use
02:16calculations to help us run scripts in a dynamic way.
02:19So since calculations are so important to the output of data in FileMaker, and
02:23they are also used in so many other areas, it's going to be very important for
02:26us to understand and get to know calculations and their functions.
Collapse this transcript
Exploring the Calculation dialog box
00:00The first step in understanding calculations in FileMaker is getting familiar
00:04with the Calculation dialog window.
00:06The Calculation dialog appears in a wide variety of places within FileMaker
00:10Pro, and it's really one of the primary areas where actual programming comes into play.
00:15So in this movie I am going to show you the mechanics of the dialog, so later
00:18you'll have the understanding needed to write some initial formulas.
00:22The most common place that we'll find the Calculation dialog is under the Manage
00:26> Database window. And if we create a field, let's say we just call one Calc,
00:35and choose the field type Calculation, after hitting the Create button, we'll
00:40see the Specify Calculation window.
00:42So let's take a quick tour of this window,
00:44so you'll know what all the elements are onscreen.
00:46The window in the upper left-hand corner allows you to view fields from your database.
00:51This is important because nearly every calculation is going to use field data,
00:55so from here you can choose fields from the current table, as you see selected,
01:00or from any other related tables.
01:02You can also mix those fields together within your formula.
01:06Remember that you are just using field names as placeholders, but when they are
01:09evaluated, FileMaker Pro will put the values in those fields and then evaluate
01:13the values record by record.
01:15So really what you're picking are placeholders.
01:18In addition to placeholder fields, you can also choose from a wide variety
01:21of operators, as well.
01:23That's what all these items are in the middle.
01:25Just to give you an idea what these are, hitting just a button will place one of
01:29these characters into your Calculation window.
01:31And the ampersand in FileMaker allows you to concatenate, or group, two different
01:36fields or two different functions together.
01:39So, for example, if we want to create a simple formula, let's get rid of that
01:43ampersand, double-click on one of our fields, and if we wanted to have first
01:49name and last name together to create a full name value, we could take the field
01:54name for first name, concatenate that, and then we'll use our second button.
01:58This button allows us to put literal text, or in this case, by hitting our
02:03Spacebar allows us to put a space in between two fields.
02:08But any time you're connecting a field value and text values, you need to
02:12include an ampersand in the middle to connect them.
02:14So the ampersand is used to connect different values.
02:18So this is an example of our first Calculation formula that uses both the
02:21ampersand and the quotes.
02:24This next button inserts a Return character, which is popular inside Text functions.
02:29And on the right-hand side, you see all the mathematical functions.
02:32The top button is used for Division, and the reason that we have a forward
02:36slash inside of our formulas is because you don't have a divided-by sign on your keyboard.
02:41Below it, we have an asterisk, which stands for a multiplier within FileMaker
02:45Pro Calculations, and the reason for that is because if we used an X,
02:49FileMaker would be confused as to whether or not that's actually the text for
02:52an X or a Multiplier.
02:55You also see operators that include statements, like equals, meaning does this
02:59field equal that field or not equals, greater than, less than and so on.
03:04And on the very right-hand side is a very important window.
03:06This is where we list all of the Calculation functions that FileMaker can interpret.
03:10We will be talking about these functions in detail in the upcoming movies, but
03:14this is where you can find each one.
03:15You'll notice, as you select and double -click on any one of these functions,
03:20they'll appear down in your Calculation writing area below.
03:26Clearing those out, choosing another one will drop not only the function into
03:32our formula entry space, but it gives you words in a certain format.
03:36These words, like you see here, field, are what are called parameters.
03:42They act as placeholders for a field, or a value that matches that type of data.
03:46So FileMaker is giving us instructions here to say if you're going to use
03:49this Calculation function, you need to put a field here. Or, for example,
03:54here, if you're going to use this function, you need to put a date field here, specifically.
04:00Every function will have at least one parameter, and you can see why FileMaker
04:04warns you if you try to name a field with the same name as a function, or as a
04:08number or a character, because it can get confused as to whether or not you
04:11meant a field name or a function that it evaluates.
04:15Imagine if you had a field called ampersand, forward slash, asterisk. That
04:21might be very confusing for FileMaker in the formula entry space.
04:24The formula entry space is where you're going to author all your
04:27FileMaker formulas.
04:28And the other pieces that you'll need to be familiar with, on the bottom of the
04:31Calculation dialog, are the result options.
04:34So here, you'll say that a calculation we'll need to results in either a Number,
04:38Text, Date, Time, Timestamp or Container.
04:41These are all different types of fields.
04:44Even though the type of this field is Calculation, its result has to be another
04:48specific type, so that FileMaker knows how to handle it while it's storing that
04:51information in the database.
04:54So given the wide range of uses for calculation formulas within FileMaker Pro,
04:58establishing a solid familiarity with the Calculation dialog, as well as the
05:02function parameters themselves, is essential in becoming a professional
05:05FileMaker developer.
Collapse this transcript
Using number functions
00:00In this movie, I am going to introduce you to a couple of the most useful and
00:03common functions that FileMaker offers for manipulating numeric data.
00:08You will also gain some additional experience using functions in the Calculation
00:11dialog window, as well.
00:12That Number functions are used to manipulate and perform functions with numeric
00:17data, and as a class, they are relatively easy to learn because most of them only
00:21have one or two parameters.
00:22We'll talk again about what parameters are.
00:25So this is a pretty good starting point for learning calculation functions, as
00:28they all just produce the numeric results, and you may be familiar with some of
00:31these due to some of their mathematical properties anyways.
00:34So let's open up our Exercise Files, and we are going to navigate to the
00:37Invoice Detail layout.
00:39To get us warmed up, we are first going to create a couple of mathematical
00:42equations that actually have a numerical result.
00:44They don't necessarily use numerical functions, but we're going to talk about
00:48results and numerical results in particular.
00:51So first, we've got a Field.
00:54If we go under File > Manage > Database, and it's a field called Sales Tax.
01:00Right now, it's a number field, but we are going to change it to a calculation.
01:03You can create calculations by either creating a field and choosing the
01:08Calculation as the type in the first place, or you can change existing fields
01:12over to Calculations, which isn't quite as common, but for our purposes, that's
01:15the example we are going to use.
01:17So now I choose Calculation, and I am going to hit Change, and FileMaker
01:21just makes sure that I want to do that, because if I had any data in the
01:25Sales Tax field already, it's going to now override that data since we are
01:29creating a calculation.
01:30Calculations don't actually store their own data;
01:32they just take data from other sources and produce results.
01:35So I am going to hit OK, and here we see the Specify Calculation dialog window.
01:40Now, in this example, let's say the Sales Tax amount, it's going to be a pretty
01:43standard operation here.
01:45It's going to be the result of the InvoiceTotal multiplied by SalesTaxRate.
01:50So that's a pretty familiar mathematical operation.
01:53It's going to involve a couple of different fields, and remember, we pick fields
01:56from the list here in the left-hand side, and remember, they act as placeholders
01:59for the data that's inside of those fields within each record.
02:03In order to get a field down into our formula entry space, we will select one
02:08from a list, and the first one we want to select is InvoiceSubtotal, and we are going
02:13to double-click on it.
02:15Now, we see that that field has appeared in the entry space, and what we want to
02:18do is multiply InvoiceSubtotal by a SalesTaxRate.
02:22If you remember in our operators, we have the mathematical operators here, and
02:25the asterisk indicates a multiplier.
02:28Now, you could type this in on your keyboard, and after awhile, when you get
02:30familiar with these functions that's what you'll do.
02:33Now all we need to do is bring in the SalesTaxRate value, and we'll
02:40double-click on that.
02:41So this is a pretty simple mathematical operation, but what we'll notice down
02:44here below, is that for every calculation, it's going to create a result. That's the key;
02:50a calculation creates a result, and the result is what your users will see, and
02:54that's what gets displayed or printed or exported in the FileMaker database.
02:58But just like other fields, a result has to have its own type.
03:02So we want to make sure that this result has a Number type because then we can
03:06then use the results of the sales tax calculation and yet another calculation, if we wanted to.
03:11Now, we are going to hit OK, and we see our Calculation underneath the Options
03:15and Comments column.
03:17Now, we hit OK, and we will see that we have a Sales Tax Rate, and I wouldn't want
03:24to live in this particular county, but now you see the sales tax calculated, and
03:29you'll see that it's different for each record because we've got a Subtotal times a Tax Rate, boy!
03:37Times are tough with these tax rates, aren't they?
03:40That's how we create a calculation with a numeric result.
03:43Now, another quick example here.
03:45You'll notice that we've got a field called Invoice Total.
03:49Right now, there's no value inside the Invoice Total, but we are going to use a
03:52calculation to create this value.
03:54So let's go into File > Manage > Database, and select InvoiceTotal, and let's
04:01change that to a calculation as well, and we are going to do another quick
04:04mathematical operation.
04:05I'll hit OK, like we did in the last example and in this case, we are just going
04:09to do the same type of math;
04:11any kind of total is going to be Subtotal minus the InvoiceDiscount, plus the
04:17SalesTax that we just created, plus Shipping Costs.
04:23Pretty standard stuff, but here, I am just going to show you a couple of the
04:26mathematical operators and again, the result is going to be Number.
04:29We hit OK again, and now we see each record; the important thing here is that
04:33each record has its own value.
04:36So the calculation has taking all the numbers in these fields and performing the
04:40mathematical operation per the instructions that we just gave it.
04:43Back in the Manage Databases window, what I am going to do now is show you the
04:47Calculation dialog and some of the different numeric functions.
04:50We are going to look at how each one of them uses fields as parameters.
04:54The field that we are going to use is a field that's already created;
04:57it's a Number field that I've already created in the database here.
05:00So if we go and create a new field, called NumberCalc, let's make that a
05:05Calculation field, and we'll hit Create,
05:08you'll see that we've got an empty Specify Calculation dialog.
05:12The first thing I want to show you is over on the right-hand side; this is where
05:15all the functions live.
05:16So if we click on this dropdown menu, you see that they could be viewed by type,
05:20or you see the different categories.
05:21So we are going to focus on Number functions, and you see in almost every case
05:26of the number functions, they are all one, single parameter which says Number,
05:29which means put either a number or 90% of the time, you are actually going to
05:33put a field that's a field type of number.
05:36A couple of them have two parameters, but most of them just have the one.
05:40Most of these number functions you won't run in to unless there are specialty
05:43circumstances, and some of them you might be familiar with just from your own
05:46experience with math.
05:47But there are some that are pretty popular, and I am going to show you a couple of those.
05:50For example, we've got Round.
05:51This is one of the mathematical functions with two parameters in it, and when you
05:55double-click on a function, it puts it down into your entry area.
05:59The other thing it does is it highlights the parameters, because again, FileMaker
06:02is reminding you you have to put something in there;
06:05it can't just run with these values on its own.
06:08So, for example, we have a field that also happens to be called Number.
06:13We are going to double-click on that to put it inside of our function.
06:17Now, in the case of a Round function, what it requires is a numerical value, or
06:23a field that represents a numerical value, and then the precision that that
06:26needs to be rounded to.
06:27So if we want to round it to two places, for example, we would just put a number
06:312 in here, select the word "Precision," which is just an instruction or a
06:35placeholder, keep our Calculation result as Number, and let's hit OK.
06:41So now you see we're back in our layout, but if we go into Layout mode, we are
06:44going to add our new field underneath the NumberCalc, and one way we can do this
06:49is hold down the Option key on Mac, or Ctrl key on Windows, and then release, and
06:57FileMaker will allow us to choose a new field.
06:59So in this case, we'll choose the NumberCalc.
07:02We'll go under Browse mode, saving our changes.
07:04So now we see we have an original value of 123.4567, but when we applied the
07:10number with the precision of just two decimal places, you see that it has
07:15rounded it to 123.46.
07:18There's another function that would truncate this that would make it 123.45, but
07:23in this case, we've asked it to round.
07:24So it changes the 5 to a 6 based on the next value, which is a 6.
07:29Let's take a look at that truncate.
07:31If we go Manage Database > NumberCalc to Options, we're going to change it
07:37this time to another number function called Truncate, and we'll do the same thing here.
07:45Put the Number field in there, and of course, we have to put the Precision.
07:51We'll say 2, hit OK, hit OK, and now we see a change, 123.45.
07:59So looking back in the Manage Database, you can see how creating a calculation
08:04that has a function in it and then applying that function to another field
08:08that contains a number gives different results depending on what function that you use.
08:12So those are just a couple of quick examples, but let me show you some others,
08:15and some that you can see, for example, in the NumberCalc are Floor because
08:23there's Floor and there's Ceiling; they are the opposites of each other.
08:28Also, there's an Integer, which is somewhat similar.
08:30So if I choose Floor, what it's going to do - let me put Number in there and hit
08:35OK - is it's going to give me the next lowest integer.
08:39There's one called Ceiling that will give you the next highest integer, and
08:42then there's one called Integer, which is just going to extract the integer from your number.
08:45So there's a couple of different ways that you can use those.
08:48Now, in the case of the Integer function, let's try creating the calculation in
08:53a tad bit different way.
08:54For example, let's go back in the Manage Database, and again, we've got
08:59our number functions.
09:00Some of them are pretty advanced. Now, certainly not within the scope of this
09:03entire training to expose you to every one of these Number functions, but I
09:07would strongly recommend that you go into the FileMaker Help, and just look
09:10under Calculation functions where you are going to find some very helpful tools,
09:15as you see here, to allow you to get familiar with FileMaker functions.
09:21This is probably the best guide that you can have.
09:24It's called the Function Reference, and here's a category list.
09:27You see you can go through every type of function that's available.
09:34When you find one that you like, you can just click on it and get a good description.
09:40So that's a good "what's next?" for some training for you here.
09:43But back inside our exercise File > Manage > Database,
09:46we are going to use a calculation in a different way.
09:49This time we are going to choose the number Field, and we are going to hit Options.
09:53You'll see that we've got the Auto- Enter tab selected, and we talked about this
09:56in one of the early movies in this title.
09:58But if you look down here, you'll notice that we've got the Calculated value
10:01autoentry option with the Specify button.
10:04So let's hit this button right there, and you see we get the same
10:07Specify Calculation dialog.
10:08In this case, we don't have to select what the number is because it already
10:12knows it needs to be a number because this is a Number field.
10:14So if you remember, in autoentry calculations, we're giving FileMaker
10:18instruction on what value to put into the field whenever the record is first created.
10:23With this trick I am going to show you, this is a way that we can take the data
10:26that the users have typed in and then apply a function to it before it actually
10:30gets committed to the database.
10:32So let's say we only want users to enter in raw integers.
10:35We don't want any decimal places or anything;
10:37we just simply want the integer that they're entering.
10:39So instead of training them, and reminding them to do that; instead, what we can
10:42do is pick a number function -
10:46this one is just called Int or integer - and then in this case, we're going to
10:50reference ourselves here. We are the field;
10:54we're going to reference ourselves.
10:55So if you see here, we are doing Int(number) and this is in the field Number.
11:00So what that's going to do is say, instead of it being a placeholder for a field
11:04value, it's going to be a placeholder for the field value before it gets
11:07committed to the database.
11:09So whatever the user types into this field, we are going to then apply the
11:12formula to it, and then it gets entered in.
11:14There's one other option that we need to check to make sure that that works.
11:17You see there's a default check box here, Do not replace existing value of field (if any).
11:22Well, that means don't replace the value in the field if the function is coming
11:26from another field reference.
11:28But in this case, we are referencing ourselves.
11:29So essentially, what this is saying in English is don't apply this formula to
11:34the value that I'm typing into the field when I create a record.
11:37That's not what we want to do here;
11:39we actually want it to apply the formula.
11:41It's some strange language;
11:43FileMaker does have a couple of cryptic dialogs, but this one basically is,
11:46do you want to apply the formula that we just put in there against the value or not?
11:50In this case, we're going to uncheck it because we do want it to apply the formula.
11:55So now we hit OK and we hit OK again and now, if we go and create a new record,
12:01we are going to type a value in here,
12:04so you see we've got a value with some decimal places, but we have yet to commit the record.
12:11So I am going to click outside the field to commit it, and now you see what
12:14it's done is it's actually applied our formula to the original field, and of
12:18course our number calculation is referencing that field, so it ends up with the same value.
12:23So in this movie, we focused on a couple of core number functions that are used
12:26most frequently, or that could be the most useful to you.
12:29So it's best to become adept with these functions without needing to refer to a
12:33reference as a source.
12:34So practice and apply these functions as often as you can, for example, as an
12:38autoenter data entry option.
Collapse this transcript
Using date and time functions
00:00In this movie, I am going to introduce you to some of the functions that allow
00:03you to manipulate date, time, and timestamp data.
00:06The Date, Time, and Timestamp functions are among some of the easier ones to
00:10learn because the syntax are really simple.
00:12These functions can fall into one of two categories.
00:15First of all, they could be functions that are going to extract a bit of
00:18information from a date or time, and then there're those that actually construct
00:22date, time, or timestamp from bits of information that are going to be provided
00:26inside your calculation.
00:27Let me show you what those look like.
00:29Again, back into the File > Manage > Database, and you see here, we've got a
00:34field that's currently DateCalc, but we're going to change that to Calculation.
00:40So we select field on the list, choose a new field type of Calculation, and now hit Change.
00:46After FileMaker warns us, we say OK, and here we are again in the
00:49Specify Calculation dialog.
00:51Take a look at the Date functions up in the upper right-hand corner.
00:54You will see we've got a series of them.
00:58They all really have a single parameter, except for the construction ones where
01:02we can pull YearNames or the fiscal week of the year.
01:06You'll see they break into the two categories,
01:09if we just look at the date ones here. These are all the functions that will
01:13extract a piece of information from a Date field.
01:17This is the field that will construct a date from three different fields.
01:21So you see the parameters that we've got here, or if we pull in a value that's
01:25supposed to be for the month, one for day, one for year, then that will create a
01:30Date field and then of course, we'd want that result to be date ,and then
01:33FileMaker will store it and handle it internally as a date value.
01:38But the more common date functions are the ones that you see above.
01:41So, for example, let's try the one that's called Day.
01:46Double-clicking on the function, of course, puts it into our entry area.
01:49Now FileMaker is reminding us, we need to replace the date parameter with a date field.
01:55So let's choose InvoiceDate, because we know that that field is the field type of Date.
02:00Now, we are going to choose the result, because before we finish our
02:03calculations we need to determine what result this output is going to be.
02:06In this case, the output is going be a Number, because what we're really looking
02:10for is a numeric day.
02:12So we choose Calculation result:
02:13Number, we hit OK, we hit OK again.
02:17Now, on our layout in Browse mode we see we've got the DateCalc, which is right
02:21next to the InvoiceDate.
02:22What it's doing is extracting the day from our date.
02:25So we see we've got 3/16, we've got 7/7, it gives us a 7, we've got 20 in
02:32this case and so on.
02:33Now back into Manage > Database.
02:36If we manipulate this calculation a bit, instead of giving us a day either 1
02:41through 31, we can choose DayName as another option, InvoiceDate.
02:49In this case, our calculations result is going to be Text, because we are
02:52looking for the name of the day, which would be Sunday, Monday, Tuesday, and so on.
02:57Hitting OK a couple of times.
02:59Now we see that FileMaker is evaluating the fields and determining what day
03:03of the week that was.
03:05This is a good example of how some of the date functions pair up.
03:11You'll see, in the Date functions list, that we've got Day, DayName, Month,
03:15MonthName, and we've got WeekOfYear, which gives you a numeric value.
03:20Year just pulls a numeric value for the year, and YearName is actually something
03:24that's used in Japanese versions of FileMaker.
03:27Now when it comes to Time, see that we've got a calculation already created here
03:34called TimeCalc that's currently Text, but let's make that a Calculation field.
03:37Hit Change, dismiss the dialog and quickly look at the Time functions.
03:43These are very easy.
03:44These will either do one of two things:
03:45extract a numeric hour, a minute or seconds from a Time field or construct a
03:51time with three different parameters, one representing hour, of course, then
03:55minutes and seconds.
03:57So real quick, what we'll do is we'll pull the Hour. We have a field here called
04:02TimeCreated that represents a time value,
04:05so we are going to use that one.
04:08Double-click on TimeCreated, and in this case our Calculation result is a
04:11Number, which is going to extract the hour from our TimeCreated field.
04:16So we'll just keep it a Number, we hit OK, then OK.
04:19Now we see for each one of the times, it just gives us a numeric integer that
04:23represents the hour in each one of the TimeCreated times.
04:28All of these have 10, which represents the time created, 10:42 AM.
04:32The Timestamp fields are very similar to these two.
04:34They just combine the two components together that we saw in both Date and Time.
04:40So this lesson we just focused on a core number of Date and Time functions, and
04:44as you see in the case of Time and Timestamp functions, there's really only a
04:47few of them to learn.
04:49But in the case of date, these are the ones that are the most useful,
04:51so it's best to become adept at using these functions without ever having to
04:55need to refer to the functions as a source.
Collapse this transcript
Using text functions
00:00The largest groups of calculation functions in FileMaker Pro pertain to
00:04investigating and manipulating text.
00:07Unlike some groups of functions in which only a few are used on a regular
00:10basis, I'd say that nearly half of these text functions are of primary
00:14application and importance.
00:16So in this movie, I'm going to introduce you to the syntax of some of the
00:19core text functions.
00:20Let's get started right away by going into File > Manage > Database, and you'll
00:26see that we've got a field in here that's called TextCalc.
00:29It's already set up as a Calculation, but let's hit Options and clear out our
00:34Formula Entry window.
00:36We can isolate the text functions in the upper right-hand corner by selecting
00:40Text Functions from the dropdown, and here you'll see we have quite a few of
00:44these functions at our disposal.
00:47These really break into a couple of groups.
00:49The first group is one that measures text and provides back a numeric output.
00:55So, for example, we've got one here that's called Length, and you see it's just
01:00got a single parameter.
01:01So you see I've got Length and then of course, the text parameter is highlighted.
01:06So let's choose CompanyName because we know that's a field that is a text
01:11field, and now in the case of Length, this is actually going to give me a
01:14numeric value of the Length, or the total number of characters of the data
01:19inside the CompanyName field.
01:20So we want this Calculation result to be a Number.
01:22So we're going to hit OK and OK again, and now you see here we've got TextCalc
01:29on our layout, and in Browse mode we can see that it's dynamically evaluating
01:36the different values.
01:37We see up here is the CompanyName and we see the number being calculated
01:42differently for every record.
01:43So it's important to understand that when you're creating this Calc, it's just
01:45evaluating the value inside the fields that you're using as placeholders in your
01:49formula and only doing so on the current record.
01:53The other thing that's important to note with length is that FileMaker considers
01:57spaces a character.
01:59So when you see something like 13 characters here, it's counting this comma and
02:04the space and the period in front of Inc.
02:07Keep that in mind when you're setting your own expectations for what you
02:10calculation's results will be.
02:12So back in the TextCalc dialog, hit Options again,
02:17another one I want to show you is Word Count.
02:19We'll go back to Text functions. So you see here we've got Length will give us
02:26the total number of characters and likewise, we've got WordCount will give us
02:33the total number of words in a string.
02:35So let's try CompanyName again, and of course, that's going to give us the number
02:40because it's counting the number of words.
02:42So let's hit OK, and if we go all the way back to Record #1, you see we've got
02:47one word there, but this is important here.
02:50I wanted to show you this one;
02:51we've got a Radley & Friends, but how many words does it count?
02:55Well, it counts two words there.
02:57So in the case of words, it doesn't count delimiters like ampersands and things like that.
03:03Now, if you're doing word counts on a Phone Number field, it will recognize
03:07the fact that there's a number on each side of one of these delimiters, in this
03:11case, a dash, and it's going to recognize this as numbers.
03:15It does that for dates and phone numbers.
03:17So in this case, if we put in here, it would give us one word.
03:21But because this is text, and it's using an ampersand in this case, it's
03:24considering that two words.
03:26So a little something to keep in mind there on how FileMaker treats those word delimiters.
03:31So you see we've got a couple of examples of functions that count either
03:38characters or words, and I'm going to show you another one that is pretty popular.
03:43This one is called PatternCount.
03:45So this one also counts, but instead of counting words or counting
03:49characters, what it's going to count is a string of values that you're
03:53putting into this parameter.
03:55So first, we're going to pick, let's say, CompanyName again, and now it says
04:01here put in a search string parameter.
04:03So what we're going to do is we have to put in some kind of text that we're
04:06going to look for within the CompanyName, and it's going to count how many
04:09times it sees that.
04:10This type of calculation is used to nest inside of other calculations, which
04:14you might find useful as you get into more intermediate or advanced
04:17calculation writing.
04:19But just to give you an idea, from an accounting perspective, here we have a Search
04:23string, and we're going to wrap this in quotations because anytime you put any
04:26text values in a calculation function, you have to denote them as text by
04:30wrapping them in a quotation.
04:32Here I'm going to put R and leave it as number, hit OK, and let's go back
04:37into our values here.
04:40So no letter R's, back in Browse mode, and here you notice we have 2.
04:46So one thing I wanted to point out here is that we've got 2;
04:49one of them is a capitalized R and one of them is a lower case r.
04:52It still counts R so as you can see that particular function is
04:55not case-sensitive.
04:56There are some functions that are case-sensitive; PatternCount is not.
05:00So you want to take that into account sometimes you might be just trying to
05:03isolate specific case-sensitive patterns, and then you would have to use
05:06other functions for that.
05:07Now, keep in mind we just put in an R in this case, but what we could have done
05:11is put in a whole word, for example, So really it's whatever string you want
05:19to put inside there.
05:20Now you see we're finding that one word in both of those occurrences.
05:25Now there's another function you might find useful, and we're going to use this
05:28in another area where you see a calculation dialog appear.
05:32If we go into the CompanyName field, notice here we've got the Calculation
05:39Value option chosen. We hit Specify.
05:41That's because we've got a calculation in here, and this one is called trim,
05:44which is just another one of the text functions, and what trim's role is just to
05:49take any leading spaces or trailing spaces and trim them out and just leave
05:53whatever text is left that's not spaces.
05:55It doesn't leave anything in between words or anything like that but just
05:57leading or trailing. And because we've got this set up as an Auto-Enter
06:01calculation and also because we have removed the check box from the default, Do
06:05not replace existing value, and again, that syntax is a little cryptic, but what
06:10that means is do we want the formula that we just put inside this dialog to be
06:16applied to the values that we're typing in the field, or do we not?
06:20So in this case, we do, so we leave it unchecked.
06:23If we do not, then we check it.
06:24What kind of functionality does that give us?
06:27Well, if you go inside the CompanyName field, see I've got my curser there,
06:34if I put a bunch of spaces after it, and the reason this might be useful is
06:38because if you ever import data in from another source, other non-FileMaker
06:42database applications will have minimum character length so you've got the
06:45data, and then it'll add a bunch of spaces on to the end of it and sometimes
06:49even at the beginning.
06:50And this might not really jive for you the data inside your database.
06:53So as you see here, I've added a bunch of spaces, and now I'm going to commit
06:56the record, but now when I click back in, you notice that FileMaker's has shaved
07:00all those spaces off the end.
07:02So that's how the Trim function works, but at the same time, it's a useful thing
07:05to use inside the Auto-Enter Calc dialog.
07:08And finally, I'm going to show you him to show you a series of functions
07:11inside the text family that deal with extracting words or characters from
07:17other text values, or fields.
07:19If we first close the window and look, notice that all of our records have a Full Name field.
07:24This is kind of a common occurrence; sometimes you might be importing in from
07:27another source and a common mistake that some developers, rather application
07:31designers, make is that they don't break down the data into the smallest bits of data possible.
07:36So a lot of times people will just say, oh name, okay, we're going to put full name.
07:39The problem is you want to break that it into First and Last Name because let's
07:43say you were writing a letter and you want it to say, Dear Joe.
07:47Well unfortunately, you don't have any data, and your database at this point, you
07:50just have to call him Dear Joe Smith, and that doesn't really work.
07:53So what we're going to do is we're going to come up with a couple calculations
07:56that will extract the first word out of the full name and put it into the First
08:00Name field, and we're going to take the second word out of the Full Name field
08:03and put that into the Last Name.
08:05Now I'm going to show you another area where the Calculation dialog can be used,
08:09and that is under the Records menu,
08:11you see there's something called Replace Field Contents.
08:13Now this is a great tool to apply batch updates to whatever fields you have in
08:17your current found set.
08:19You see here that we've got 1,523 records.
08:22Well, before you choose any kind of Replace Field Contents, you want to make
08:26sure that you're choosing the fields first that you want to apply these batch updates to.
08:30So we click the First Name field, go back under Records to Replace Field
08:35Contents, and I could just have it replaced the value from the record I'm
08:39currently in, throughout all of the different records in the Found set,
08:43but we're going to fastforward down here to the Replace with calculated
08:46result, because we've got a Specify button which of course invokes the
08:50Specify Calculation Dialog.
08:52So in this case, I want to show you couple of functions real quick here.
08:56You see this whole family of Left, LeftValues, LeftWords.
09:00You also have Middle, MiddleValues, MiddleWords and then Right, RightValues and RightWords.
09:06All nine of those together make up a pretty huge chunk of all of the different
09:09text functions, and if you understand how one of them work, you'll understand how they all work.
09:12So let's take a look at how Left would work.
09:16So in the case of Left, you have two parameters.
09:18Put in the field that's going to have the text value, and then you tell
09:23FileMaker how many characters you want to extract from the Left.
09:27So in this case, I could say Customer Full Name and give me 1234.
09:30The thing is I don't know how many characters are going to be in this
09:34person's name each time.
09:35So in addition to have been able to extract characters using Left, Middle or
09:39Right, I've also got LeftWords, which is perfect for our task here.
09:45So I select Customer Full Name and add that as my text parameter.
09:49Then I tell it what number of words I want to extract from the Left, and
09:52then I'm going to say 1.
09:54So we hit OK, and now what the Replace Field Contents function will do, after I
10:00hit the Replace button, is it's going to go through every record in the Found set,
10:03one at a time, and it's going to perform this function.
10:05So essentially what it's going to do is extract the first name out of the Full
10:07Name field and put it into the First Name field.
10:10So let's hit Replace, let it do it thing, and you see now every record in the
10:14database has a First Name.
10:17And similarly, we can do the same thing to the Last Name field, but what we have
10:23to do is make sure in the first record of our Found set because that's where the
10:25Replace Batch function is going to start.
10:27We want to include them all.
10:29So quickly we'll go in here, Text Functions, and then this time, we're going to say it Right.
10:35So in case of Right, we're just going to pull.
10:40This would give us right number of characters.
10:42Of course, we could count those out.
10:44But we're going to instead use words because then we don't have to worry about
10:47how many characters, and we'll simply say Full Name, number of words, and we're
10:55just going to pull one for the Last Name, so now we hit OK.
10:58Hit Replace again, and now we see all of our records have extracted both
11:02first and last names.
11:03So you see here you can use any calculation function, but in these examples we
11:07used text functions, in both the Auto- Enter Calculation dialog and also under the
11:11Replace Records using the replace records with calculated results that also use
11:16the Specify Calculation dialog.
11:19So it'll be good to get familiar with these functions because they're going to
11:21be used in quite a few areas within FileMaker Pro.
11:24In this movie we focused on really the core text functions, the ones that are
11:27used most frequently.
11:29But it's best to become adept at using these functions without needing to refer
11:32to the reference as a source.
11:34So the more you can write these things free flow or the more experience you get, the better.
11:38So do your best to apply these functions as often as you can throughout
11:41your FileMaker solution.
Collapse this transcript
Using get functions
00:00Get Functions are a rare breed of function because they pull environmental
00:04information, either about the session that you're in, the application that you're
00:07using, or information from your operating system.
00:10It can be really helpful if you need to extract this type of information for
00:13calculation fields, or even within your scripts.
00:16Let's take a look at how this function works.
00:18Go to File > Manage > Database, you see we've got a GetCalc function.
00:25We'll hit Options, and we'll clear out the values that we see inside the field.
00:28Now, let's take a look at the Get Functions.
00:32See here, they're all grouped together, and these are pretty easy to understand.
00:34They only have one parameter, and they'll pull information from your operating
00:38system, or in this case from FileMaker, so we've got some session-based ones
00:43here I'll show you first.
00:44First, Get (AccountName) will simply extract the name of the user's account
00:48that's logged into the FileMaker Pro database.
00:50So, that's based on session, and we can pull information from your computer,
00:54for example, Get (CurrentDate) will pull information from the operating
00:58system and whatever your clock setting is at that time. Same with some of these
01:02that will do -- Get (GetCurrentHostTimeStamp) will pull the timestamp from
01:06the FileMaker Server that's hosting the file. CurrentTime, CurrentTimeStamp,
01:10same kind of thing there.
01:12You could even get Paths, if you want.
01:13You can get the path between your copy of FileMaker Pro and your Documents
01:18folder, which helps you when you're creating locations to save things, for
01:21example, If we look at one called Get (FoundCount), that also pulls some
01:27information from our session.
01:29We'll use this one in our example and we'll change it to numbers, since it's going to
01:32give us a numerical value of how many records are in our Found Set.
01:36Also, this one will take into account Storage Options.
01:38You see this button over here. We haven't talked about it yet, but every
01:42calculation can either be stored or un-stored.
01:45Really, what that means is once you create the calculation, if you decide to
01:49store the value, that means that at the moment that you created the calculation,
01:53it's going to evaluate whatever it is that you've told it to evaluate, and it's
01:57going to keep that result in there, in perpetuity.
02:00However, if you choose to not store results, that means it's constantly in this
02:05state of evaluation, and if any of the factors that are inside the calculation
02:09change, then it will change as well.
02:12Most of the time you're going to want to keep your functions not stored.
02:16But if you want to use them in a relationship, or as a key field, or if you want
02:19to index them or something like that, they can't be stored.
02:22So, that's why you wouldn't normally have every single one of them in there.
02:24So, that's something to pay attention to.
02:25So, if we hit OK, and OK, you see we've got the GetCalc result appearing here in Browse mode.
02:34We've got 1,523 records in our Found Set.
02:36But let's modify our Found Set.
02:38You see, now, we've got 26 records up here, and 26 records below.
02:42Now, if this was a stored calculation, then it would still say 1,523.
02:45We'll do just another example here, by modifying our GetCalc.
02:51Let's go to Get Functions, and you can see things we can do like Get
03:00(LayoutName , Get (PrinterName), different things like that, all sorts of
03:06information that might be helpful for you to use. Especially in scripts, if you
03:10want to check some environmental factor and determine which way you're going to
03:13go with the script or an action from there, that's where Get Functions come into play.
03:17But let's just pull in ApplicationVersion.
03:20This one is actually going to read what version of FileMaker Pro we're using at the time.
03:25You see, here it gives us Pro 11.0 Version 1.
03:30So, if you ever need to pull information about your FileMaker application,
03:33anything within a session, the components of FileMaker, your window
03:37environment, layout, operating system stuff, anything like that, these are great tools.
03:42In this movie, we've been focusing on the core Get Functions, but it's best
03:45become familiar with these functions without needing to have to keep referring
03:48back to the function list as a source.
03:51Get Functions are pretty easy, since they've only got a single parameter, but
03:54the more you get familiar with what types of things you can extract using a Get
03:57Function, the more useful these will become to you.
Collapse this transcript
Using logic functions
00:01In this movie, I'd like to focus on some of the functions that are known
00:03as logical functions.
00:05The Logical Function group contains some of the most interesting and powerful
00:08functions available in FileMaker Pro. And unlike some of the other categories of
00:12functions that we've been reviewing, in which several functions are often
00:15similar in syntax and behavior, these logical functions are a collection of
00:19unique, and sometimes complex functions.
00:22So they really break up into two different kind of categories, and I'll show
00:25you examples of both.
00:27The first of these categories within the logical functions are used for
00:30performing conditional operations, and they're extremely popular when used
00:34either in calcs or in scripting.
00:36So, let's take a look at a couple of these first.
00:39If we open up the File > Manage > Database window,
00:45you see that we've got our Invoices Table showing, and what we're going to do is
00:48create a new field called Commission.
00:51This is going to be a field that helps us determine how much commission each
00:55salesperson gets on a sale.
00:57So, let's go into the Field Name, type in the Field Name and choose Calculation,
01:05and then hit Create.
01:06Here we are in our Specify Calculation dialog window.
01:10Now the popular and useful logical function I want to introduce you to is
01:13called the If function.
01:15You see that when we isolate all the logical functions, there's not a whole heck
01:19of a lot of them, but they're all pretty useful.
01:22Let's focus on the one right in the middle here, If.
01:25So you see it's got a few different parameters.
01:29The If is the most basic type of logical function that there is, in that it just
01:33says if this test is true, then do this result, but if this test is false, then
01:37do the other results.
01:38For example, if we did a plain English version of this, and we said something
01:42like, if it's raining, which would be our test there, then bring an umbrella -
01:47so that would be true - or if it's not raining, which would be false, then
01:51don't bring an umbrella.
01:52Our brain works in this way, and that's why these functions are called logic,
01:56because really an If where it looks at a test and says if it's true or false is
02:00really part of the definition of what logic is.
02:03I'm going to show you an example, back in this Commission field that we're working on.
02:07So let's say that what we want to do is create a field that conditionally
02:10determines what the Commission rate on an invoice would be for a salesperson.
02:13Let's say that we're going to say one commission price for a salesperson every
02:17time they create an invoice would be 5% on any order over $1,000.
02:23So, you see this is where the condition comes in. It's a test.
02:25It says, if the InvoiceTotal is greater than $1000, then you get 5%;
02:31otherwise, you don't get anything.
02:32So our test is whether or not the value is over 1,000, and if that's true, then
02:38we come up with a mathematical formula that determines 5% of the total.
02:43And if it's false, we just say nothing.
02:45So in our parameters, what we do is we enter in the test, which in this case is
02:49going to be InvoiceTotal > and we'll just type in 1,000.
02:57So, that's our test.
02:58Is the InvoiceTotal value greater than 1,000?
03:00And the first result is the true, really, should say resultTrue and resultFalse,
03:04but if you can remember which is which, it gets pretty easy.
03:08So, inside resultOne, we don't have to just put a field in here or a value, we
03:12can put a whole mathematical formula.
03:13So in this case, I'm going to say InvoiceTotal*0.05, which of course, would give
03:21us 5% of the overall total.
03:23That's if the result is true.
03:25What if the result is false?
03:26Well, they get nothing.
03:28And this result, of course, is going to be, well, a number. We'll keep it as a
03:32number, and we'll hit OK, and OK again.
03:38Now, let's go into Layout mode, and you see we've got the Commission field
03:43that's been added to the layout.
03:44I will hold down the Shift key and select the field, and the label.
03:48If yours did not appear at the bottom of your layout, in your exercise file,
03:53that's just because your FileMaker Preferences are set differently.
03:57So, you can go ahead and insert the field, if you'd like.
03:59But now that we've got the field on our layout, and by the way, we know it's
04:03Number field, so let's go into our Inspector and choose Currency, just to make
04:09this one a little bit easier to read.
04:12So let's go back into Browse, Save our changes and take a look at what we've got here.
04:18So, we see we've got an invoice here that is certainly over 1,000. It's 32,000.
04:23So that means that it gives the 5% commission for this salesperson of $1,611 and some change.
04:30But you see that this order is less than 1,000, it's only $493, so the salesperson,
04:35Marie, gets $0 commission.
04:37You see that it's evaluated record by record.
04:42So that's how we can apply a condition to a certain field.
04:45So, it's a very useful function in that regard.
04:47Let's go back to the Calculation, and I'm going to introduce you to something
04:54that could be described as a cousin of the If function.
04:57It's probably used just as often as the If function, and between those two
05:01functions there, they're used more than any other logical function in FileMaker,
05:04and this one is called Case.
05:08Now, let me back up a second.
05:10Let's say that the commission structure has now changed.
05:14So instead of it being if it's over $1,000, you get 5%, and if it's not, you get zero.
05:19Let's say now there's several tiers to it.
05:21For example, you just got a memo that says the commission structure has changed.
05:25In this case, rather than just being, if it's above $1000 you get 5% or if it's
05:29not then you get 0,
05:31there's going to be some different tiers to it.
05:32Now the problem here is though, as you see, that we've got four
05:36different evaluations.
05:37It could be, if it's under $500, it's 5%.
05:39If it's between $500-1199, it's 7.5%.
05:44Well, now we've got multiple tests.
05:46So, instead of an If function where we just have the one test and then the
05:49two results based on whether they're true or false, now we have the problem of multiple tests.
05:54So, the way that we rectify that is by using the very powerful Case function
06:00that you see here at the top of the Logical Function list.
06:04You see anytime there are parameters inside the curly brackets, those are what
06:08are called Optional Parameters.
06:10So we're going to ignore those for a second here.
06:12Now, what you'll notice, in the Case function, is we just have a test and a result.
06:16But what's cool about the Case function is you can have as many tests as you
06:19want with their own corresponding results.
06:22That's going to be perfect for what we're doing here.
06:24So let's apply that new tiered structure to our Commission field, using Case.
06:29The other thing I want to point out to you is that you'll notice that I am
06:34clicking and hitting the Return key, and creating some white space for me in my
06:40calculation entry area.
06:42White space is ignored when FileMaker evaluates your calculation, but it's very
06:46helpful when you're programming these functions to be able to see things in a
06:49little bit more organized fashion.
06:51So, let's put in our first test.
06:52And based on the memo, it was whether or not the InvoiceTotal was less than $500.
07:01InvoiceTotal<500, and if the InvoiceTotal<500, then what would be the result?
07:09If it's true, then we're going to say InvoiceTotal*0.05, which gives us 5% of the total.
07:17Now, you notice we have the tests, and then we have the first result, if it's true.
07:21What if it's false?
07:22Well, then what the Case statement does is it moves on to the next test.
07:28So, if it's true, it stops right here.
07:31That's the first very important thing to understand here is it's just got kind
07:34of a cascading effect.
07:35That means is a Case function will stop the moment that it evaluates and finds a true result.
07:41It doesn't bother going and evaluating the rest, and we'll see how that's
07:43significant here as well.
07:45But to delimit the different tests, we're going to put a semicolon in here,
07:49which is a very common delimiter in FileMaker functions.
07:53Now, we could save ourselves some time by copying and pasting these different tests.
08:00So, the next one is if the InvoiceTotal < 1,199, then it's InvoiceTotal*0.075.
08:13Then we could do the next one.
08:14Now notice what I've done here.
08:15I'm doing less thans all the way across the board, and so the reason is that
08:20let's say something comes in at 700.
08:23Well, 700 is not less than 500, so it passes this test, but it is less than
08:291,199, so it stops right here.
08:31So, since I'm using less than in a cascading fashion, which I'm going to have to
08:35continue doing here on this next one, then that means that any number will fall
08:38within one of these tiers.
08:40And if you do them in the right order, then you'll get the right result.
08:43But if I, for example, do InvoiceTotal > 2,000, we'll look at these all
08:52together here in a second. It's 0.1.
08:57So now I'm missing one more tier. I've got the <500.
08:58It'd be 5%, between 501 and 1,199 would be 0.075, which is why we've got the
09:07two less thans in the tier, but we've got one more that we can add, which would
09:12be if the InvoiceTotal is less than 2,000, that gives us 0.1, and if it's
09:22greater than, it's 12%.
09:24So now, well we've actually got our ranges, 0-500, from 501-1,199, from
09:331,200-2,000, and anything greater than 2,000.
09:37So that's what having these in a cascading fashion gives us.
09:39Of course, that result is going to be a Number, and we hit OK, and now we see
09:46-- so the first record is over 2,000, so that's 12%, giving us a total of 2,684 and some change.
09:53Next record is under 500, so that's 5%, 15.74, and you get the gist. Now, the next
09:58record is over 1,199 but under 2,000, so that makes it 10%, giving us $121.23.
10:04So you see, it's evaluated differently and conditionally, based on every record.
10:10So those were just a couple examples of the logical functions, but the most popular one.
10:14So, if you're going to learn any of them, learn the If function, and the Case
10:17function, because you'll use those all throughout your FileMaker Application.
10:21Couple things just to remember that we've noted here, that anytime you're
10:24putting text inside your functions, make sure you wrap them in quotations, and
10:29you should always remember that you don't always have to choose the function.
10:32Sometimes it's a great way to get familiar with the syntax by just typing it out
10:35inside your f