navigate site menu

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

FileMaker Pro 10 Essential Training
Richard Downs

FileMaker Pro 10 Essential Training

with Cris Ippolite

 


From organization comes efficiency, and with efficiency, creativity can flourish. To help users create more efficient workflows, Cris Ippolite introduces the new features and basic functions of FileMaker Pro 10. In FileMaker Pro 10 Essential Training, Cris explains why this desktop database application is used by everyone from Fortune 500 companies to individuals. He demonstrates how databases work, how to manage information and understand its relationships, and how to work with calculated fields. Cris also shows how to import and export information, share results, and build interesting and attractive reports. Exercise files accompany the course.
Topics include:
  • Touring the interface Managing records and fields Formatting information with layouts Working with the Web Viewer function Building reports using the new Dynamic Reporting feature Learning the new Script Trigger function

show more

author
Cris Ippolite
subject
Business, Databases
software
FileMaker Pro 10
level
Beginner
duration
8h 14m
released
Jan 05, 2009

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:00(Music playing.)
00:02Hi, I am Cris Ippolite. Welcome to FileMaker Pro 10 Essential Training.
00:05FileMaker Pro is the leading database software popular for its ease-of-use,
00:10that's used by everybody from Fortune 500 companies to individuals who just
00:13want to be a little bit more organized, and I will be your guide through the
00:17starting steps of the new features of FileMaker Pro 10.
00:20For the past 10 years I have been President and Founder of iSolutions,
00:23a Los Angeles based custom software and design firm and I have worked with literally
00:27hundreds of clients, solving small issues or setting up big infrastructures, and
00:32the biggest question I always get is how can I save time and money? Well,
00:35that's what I am going to show you in this course. How FileMaker will save you
00:40time and money, allowing you to be more productive in less time.
00:43In FileMaker Pro Essential Training, you'll learn the basics behind how a
00:46database works, how to manage various types of fields, how to work with layouts
00:52and how to look at your data in a number of different ways. I will show you how
00:55to build interesting and attractive reports including subsummary reports and
00:59dynamic reports that you can change on the fly. We will even look at the Script
01:03Triggers feature and show you how to add the ability to trigger events in your
01:07new or existing database.
01:09Throughout the course I will be providing guidance and examples based on my
01:13experience with my clients and we will be working with the bunch of integrated
01:16data based around a mythical travel company that will act as the example for all
01:19our needs. And now without any further delay, it's time for us to dive into
01:23FileMaker Pro 10 Essential Training.
Collapse this transcript
Understanding the FileMaker family
00:01Before we get started with our exercises, I would like to take a moment to
00:04introduce you to the four different products in the FileMaker 10 product family.
00:07First, there is FileMaker Pro 10. This is the product that we are going to be
00:11using throughout this title. It's the standard user version of FileMaker Pro
00:15that allows you to create your own databases, modify your databases, basically
00:20do everything that we are going to be talking about in this title.
00:22FileMaker Pro 10 Advanced has all the functionality of FileMaker Pro 10, but it
00:27also has some additional tools that developers find useful like Script
00:31Debuggers, the ability to create Custom menus, allows you to create runtime
00:35versions of your FileMaker Pro applications and that type of thing. It costs a
00:39little bit more, but if you want that extra functionality, if you are going to
00:41be maintaining databases using FileMaker, this is really the product that you should have.
00:46Then there are two different FileMaker server products. FileMaker Server 10 is
00:51an application that gets installed on a dedicated server machine and it's used
00:55to be able to share all the different files that you create in FileMaker to
00:59many different users all at the same time. So for example, you can have your
01:02FileMaker databases shared for up to 250 consecutive users who are all using
01:07FileMaker Pro or FileMaker Pro Advanced and you also have the ability to
01:10publish your databases to the Web using either XSLT, PHP, or publish out your
01:15data as raw XML. All of that's built right into FileMaker Server 10.
01:19Now if you'd like to be able to share your databases using a technology that's
01:23called Instant Web Publishing or if you want FileMaker to be the host for any
01:27kind of ODBC or JDBC connectivity, then you will need to purchase the FileMaker
01:3210 Server Advanced upgrade.
01:34So you can see that we have got product here for the FileMaker end user,
01:39the FileMaker developer and then also different options for deploying your
01:42application whether it's just be on a network or deploying it out to the Web or
01:46even be in the host of a ODBC or JDBC connection, but the product that we are
01:50going to be using moving forward is FileMaker Pro 10. So let's take a look at
01:54FileMaker Pro 10 staring off with the FileMaker Pro Quick Start screen.
Collapse this transcript
The FileMaker Quick Start screen
00:00The first thing that you will see when you open up FileMaker is what's called
00:04the FileMaker Quick Start screen. So the first thing that you want to do is
00:07launch the FileMaker application. I am using a Mac, so I will go into my
00:12Applications folder and I will find FileMaker. And if you are on Windows, you
00:20can go under your Start menu to Program Files and choose FileMaker Pro 10.
00:24And you see the FileMaker Quick Start screen. You can go ahead and close your
00:29Applications window.
00:31Now the FileMaker Quick Start concept has been around in various different
00:34versions of FileMaker, but in this new version, there is a couple of new useful
00:37features. The button that you will open up to by default is the Create Database
00:41option. You see that you have three different options, but under the Create
00:45Database option, you can start by creating an empty database and then of course
00:49you'll just hit OK and it prompt you for creating a name in a new empty
00:53database. Or you can create a database from an existing file and this is
00:57something that's new to FileMaker Pro 10. Specifically, you can use the
01:01following files as sources for creating a FileMaker database: an Excel 95-2004
01:07workbook or .xls file, or an Excel workbook in 2007-2008 which has the .xlsx
01:15suffix, and of course tab-delimited, comma-separated text files, a Merge file,
01:20and then also this is something that's new to FileMaker 10, you can create a
01:24FileMaker database using a Bento database as your source file.
01:28In each one of these cases it really works just like either importing one of
01:32these files or dragging the file on to FileMaker Pro icon like you could in
01:36previous versions and then it will convert that into a FileMaker file and
01:41prompt you through the different options that you have to set up in your
01:43FileMaker database.
01:45So you can either create an empty database, create a database from an existing
01:48file, or create a database using a Starter Solution, which we will cover in an
01:53upcoming video. The other option that you have is to open up an existing
01:57database. You will see here that FileMaker will remember your most recently
02:00open files and when you select the Recent Files options you see them all listed
02:04here. And if you have a lot of different files here, you can use the Filter to
02:07filter down just the file that you are looking for.
02:11Also you can set up Favorite Files either locally or on remote servers. This is
02:16where FileMaker Server would be hosting up the file, and also you can simply
02:20browse the files. Of course this will look a little bit different between Mac
02:23and Windows, but in both cases you will see a Remote button found on the window
02:27that will allow you to pick the different FileMaker server that you are looking for.
02:31For the last item on the Quick Start screen are the different resources that
02:36FileMaker's providing to you to help you learn and understand FileMaker.
02:39You'll see that it's broken down it into See It, Use It, Learn It, and More. Under
02:44See It you will see a video that is basically an introduction to FileMaker; Use It,
02:49a hands-on tour of some of the more vital components creating and using a
02:52FileMaker database; and then Learn It, expanding your skills with some in-depth
02:56tutorial that they provided to you. And then of course More allows you to
03:00connect to the very useful FileMaker Resource Center.
03:02So all of these here are at your disposal when you open up the FileMaker Quick
03:06Start screen. Now of course I'd recommend using this when you are first getting
03:09used to FileMaker, because it's good to have all these options at your finger tips,
03:12but once you start getting more used to it you probably not want to have
03:15this screen pop up every time and in that case you can just simply go and check
03:19Do not show Quick Start again, and then the next time you open up FileMaker
03:22Pro, it won't present this one screen.
Collapse this transcript
Using the exercise files
00:00If you are the premium member of the lynda.com Online Training Library or if
00:04you are watching this tutorial on a DVD ROM, you will have access to the
00:08exercise files used throughout this title. The way that the exercise files are
00:11laid out as they all come in one folder and each folder is broken into
00:15different chapters and you can find the appropriate exercise files by looking
00:19for the folder with the name of the movie number.
00:21So for example, if you are watching the movie in Chapter 01 movie number 04,
00:25you'd go to 01_04 and simply double click on the FileMaker file. Each of the
00:29movies has its own dedicated FileMaker file, so you can start from any point in the title.
00:34If you are a monthly subscriber or an annual subscriber to lynda.com, you don't
00:38have access to the exercise files, but you can follow along from scratch on
00:42your own files. So let's get started.
Collapse this transcript
1. Getting Started
What is a database?
00:00Before working with the database, it's important to understand what a database
00:04actually is. The definition of the database is the collection of like
00:07information with underlying attributes. You are actually already familiar with
00:11databases and you may not even know it.
00:13You have probably seen databases in the form of things like Address Books in
00:16your computer or one record equals one individual whose information you are
00:19trying to store and in this case the like information that you are storing
00:23would be different individuals in different context and the underlining
00:26attributes are actually things like phone numbers, email, instant message,
00:30address, street address, that type of thing.
00:32You are also probably familiar with the databases from your web experiences.
00:36For example, lynda.com is just a huge database system. It's a database of
00:40products that allows the user to search on those databases and give them
00:43information that they might find necessary. The role of the database is
00:47twofold. First, the database itself physically stores the data and is stored along
00:52with the database files so that all the data lives together in one place.
00:56But in addition to storing the data, it also contains the information on how to
00:59identify the data within the storage mechanism. A good example of this is a
01:03spreadsheet. If we take a look at the spreadsheet here, we see that this one
01:07stores individuals or customers and in this case each piece of information
01:11that's stored in the spreadsheet is an attribute. For example, First Name, Last
01:15Name, Start Date, Title, or Status. These are all in attributes of a customer or a person.
01:21You will also notice that when we look at a spreadsheet the information is
01:24organized in columns and rows. You will see columns for example, First Name,
01:29Last Name, Start Date, Title, and Status, and rows one through four. Now the
01:35spreadsheet itself stores the data, so as I move this spreadsheet around,
01:38the data will travel along with it. So that's how it works as a storage mechanism.
01:42But in addition to that it also explains or describes the information that's
01:46contained within it. You will see that the first row is really just the
01:49description of the data that's being stored in each of the following rows. We
01:53can tell this intuitively by looking at this spreadsheet that Estrella is in
01:56fact the Last Name, because it comes under the column Last Name.
02:00Now when it's comes to FileMaker databases, the rows are actually
02:03represented as records and that's the terminology that I am going to use
02:06throughout the rest of this title. So then a record is a grouping of a bunch
02:09of different pieces of information or attributes that all describe one
02:12instance of the information that's being managed.
02:15So in this case this iteration or instance is a customer and all these
02:19different pieces of information describe that one customer. The columns in
02:22FileMaker, we call these attributes fields and each piece of data describes one
02:27of the records. So at any intersection we see that Estrella is actually the
02:30Last Name of the fourth record in this database. So hopefully a little
02:34background on databases that you are already familiar with will help you
02:37understand the concepts discussed later in this title.
Collapse this transcript
Flat files vs. relational databases
00:00What makes an application like FileMaker different than a spreadsheet?
00:04There are actually many different ways you can store data on a computer, in a word
00:07processing document or an Excel spreadsheet. These are examples of what are
00:10called, in the database circles, Flat files. That's where it's just one single
00:14table that stores information and it's independent from all the other tables
00:18that may have even related data. But a true relational database is designed to
00:22make it even easier to enter and retrieve general purpose data.
00:25Imagine if the customer spreadsheet had more than just these five records.
00:29Imagine if it had 5 million. It wouldn't be very easy for us to manipulate,
00:33extract, and work with the data and turn it into reports in just a spreadsheet
00:36form. Another one of the main goals of the relational database is to eliminate
00:40redundant date entry and in database storage.
00:42So for example, if I enter in Dennis Copley's information, I want to enter it
00:46into the system once, so that if I have to go back and write a letter to each
00:49individual customer in the database, I don't have to type in Dennis Copley's
00:52information again. I write in the address once and it propagates throughout the
00:56system as it's needed, and that's just one of the advantages of what's called
01:00relational database system. Let's now take a look at FileMaker Pro and start
01:03working with some databases.
Collapse this transcript
How FileMaker works
00:00I would like to show you some reasons why FileMaker is such a great application
00:04for developing databases. First off, as you can see here, we can store
00:07information within our application, we can create new records if we'd like to,
00:11we can delete records or even search for records that we're storing inside the
00:15tables. What's nice about FileMaker is that it's a relational database, which
00:19means that we can store related values.
00:21So for example, if this individual is linked to other contacts in the database,
00:25you see that we can link those two records together, and if the contact has
00:29multiple addresses for example, we can link one contact to multiple addresses,
00:33which is really the essence of having one table related to another.
00:36What's key about this is that all these different tables can fit into one
00:40FileMaker file. So you don't have to manage multiple different files like, for
00:43example, when you have to create a new spreadsheet every quarter or something
00:46like that. All the files and all the data can just be tagged appropriately and
00:50stored in one easy-to-share FileMaker database.
00:53In addition, FileMaker has all sorts of cool functionality, like being able to
00:57add content from the web into your FileMaker layout, as you see here with
01:00websites and mapping. You can work with your data in a bunch of different ways
01:05and organize data and even media, like images, video or music.
01:09But the strength of FileMaker is that it provides the ability to create a
01:11database very easily. Probably one of the easiest database creation
01:15environments around and also Windows and Mac FileMaker Pro users on the
01:18same network can access the same database file simultaneously.
01:22With the advanced security model that comes with FileMaker, you can determine
01:26what your users can do and see. Then up to 250 different users can share the
01:31database simultaneously, all having their own session and all being logged into a server.
01:35You can even publish your FileMaker database to the web. You can use several
01:39different technologies that FileMaker is compatible with like instant web
01:42publishing or PHP if you've heard of those, and you can share data from other
01:46applications.
01:47So for example, if you've got accounting software and you want to link that to
01:51your FileMaker database, you can do so. FileMaker also comes with a complete
01:54step-by-step tool on how to take records in your database and export those out
01:59as either Adobe PDF or Excel files. All sorts of different things you can do
02:03with FileMaker.
02:03We're going to cover a lot of these in this title. But for those of you that
02:07have never worked with FileMaker before and you're thinking okay, what is this?
02:10You get that it's a database. But what you've really got here with FileMaker is
02:13the ability to create a fully functional and powerful database application
02:16using FileMaker Pro without having to know anything about databases or computer
02:20science or anything like that.
02:21By the time you're done with this title, I assure you that you'll be able to
02:24create FileMaker Pro databases, deploy them, share them with people, understand
02:28their limitations, build reports, and all sorts of different things like that.
02:32So let's get going with learning a little bit more about this great database application.
Collapse this transcript
Essential preferences
00:01The first time you launch FileMaker, it's probably a good idea to get familiar
00:04with the different preferences that are available to you. You can open up your
00:07Preferences under the FileMaker Pro menu if you're a Mac user, or if you're a
00:12Windows user, you'll find it at the bottom of your Edit menu.
00:15So opening up the Preferences, you'll see that you have five different tabs,
00:19the General, Layout, Memory, Plug-Ins, and Fonts. And I'll just be touching on
00:23just a couple of the important preferences here for you.
00:26So first you see the General tab and all the options here are selected as
00:30defaults and you can toggle these if you would like. One that you might want to
00:34turn off would be the Show FileMaker Quick Start Screen. It's a good idea to
00:38show the Quick Start Screen the first couple of times that you open up the
00:41application, and then it's up to you whether or not you want to show recently
00:44opened files, but it can be pretty handy to open up files that either are
00:48hosted on the server somewhere and not has to dig around for those.
00:51The other thing and this is really kind of specific to Mac users is the User
00:55Name. This is the user name that FileMaker uses to identify who you are, and
01:00we'll talk about that in later movies. But there also is the information that's
01:04put into the User Name field when you have to log in to a FileMaker database.
01:09So by default, it puts whatever your name is or the system name, but a good
01:13idea is to change that. You can choose other and type in Admin, as we'll talk
01:19about in the Security chapter. That is one of the default accounts in each one
01:23of the FileMaker files. So just a little tip to select the other option, type
01:27in Admin. Keep in mind though for the Windows users that you don't have the
01:30ability to do that.
01:33Then on Layouts, you'll notice that there is only one that's selected and
01:36that's Add newly defined fields to the current layout. What that means is when
01:40you define a field in your Manage Fields dialog window, it's going to
01:43automatically appear on the layout that you currently have on screen. It's
01:46probably a good idea when you're in the middle of creating new files, but if
01:50you're just maintaining files, you probably want to turn this option off.
01:54Memory, you can leave everything as a default. This is an area that you'll
01:57probably never have to touch. Plug- Ins, you'll see that there is just one
02:01default plug-in installed and that's AutoUpdate. That will actually allow
02:04FileMaker server to push out plug-in updates to your application, but a plug-in
02:08is something that a third-party manufacturer creates, and it's something that
02:11you would install and then you would get some instructions on how to configure
02:15those plug-ins from that manufacturer.
02:18Under Fonts, you can specify the default font. And if you use any international
02:22fonts, this is where you can manage those as well. So like with many other
02:26applications, preferences are something you probably want to check out the
02:29first couple of times you open up the application and then you can really leave
02:31them set as you start to work with the databases themselves.
Collapse this transcript
Touring the interface
00:00Once you have FileMaker installed and you've done a quick look at the
00:03Preferences, it's now time to start working with the application. And the first
00:07step is going to be to look at the interface in the different modes that
00:09FileMaker uses.
00:11Specifically with FileMaker 10, because one of the big improvements in
00:14FileMaker 10 is the change in the way that you look at the files, most
00:19specifically in the Layout toolbar.
00:21If you have worked with FileMaker Pro in previous versions, you'll notice that
00:25on the left-hand side of each one of your files, you had something that was
00:28called the Status Area. Additionally across the top, you used to have something
00:31that was called the toolbar, and in FileMaker 10, those two concepts have been
00:36merged together into something that you see on the top of the screen here,
00:39which is called the Status toolbar.
00:41Additionally, it's got all sorts of great new features and different ways of
00:45looking at the information on screen that it did not have before. And it should
00:48be noted that this is the first time that the interface has been updated in any
00:52version of FileMaker in 10 versions. So this is pretty exciting.
00:54If you look on screen, you'll notice in the Status Area section of the Status
00:59toolbar. You'll see that this is an area where you can manage the different
01:02records that you've got and we'll look at these in the various movies that we
01:05go through, most specifically when we talk about finding and searching for
01:08groups of records. But this is where you can use this Book icon to navigate
01:14from record to record. If you're looking for a specific record, you can just
01:17click in here and then type in that number.
01:18We'll work with the pie chart a little bit more when we talk about working with
01:21found sets. Additionally, there are some default icons on screen, like the New
01:26Record and the Delete Record icons. Those of course, are available under your
01:30Records menu. Additionally, the ability to enter Find mode can be found here
01:35and under Sort.
01:36Now, these aren't the only options that you've got available to you in the new
01:39Status Area. In fact, what you can do is go under your View menu; you'll notice
01:44that you've got similar menus from previous versions of FileMaker. But under
01:48the View menu, you'll see that there is an option here for customizing the
01:51Status toolbar. This is brand new to FileMaker. You notice that in addition to
01:56the Show All, New Record, Delete Record, Find and Sort, you've got all sorts of
02:00different options that you can use here. You can put any one of these on your
02:04toolbar if you'd like to and you can show just the icon or the icon and text,
02:08and it's as simple as dragging and dropping.
02:10So for example, if I wanted to put the Manage on my toolbar, I can just drag it
02:14in the toolbar area and release. If I wanted to take it off, I just drag it
02:18down and you get that poof effect on the Mac, but the dragging and the dropping
02:22are cross-platform.
02:24So as you get more familiar with some of these features, you might want to
02:26place them up on the Status area of your file and this is where you can
02:30actually customize each one of those.
02:32Additionally, you'll see that there is an option for even showing the Status
02:36toolbar. So you can hide the Status toolbar, which is sometimes common in
02:40applications that are deployed amongst multiple users. But make sure that
02:44you're providing that same functionality on screen. You see here you would have
02:47the New Record, the Find Record, and Show All, in this case.
02:51You can either hide or unhide the Status area by pressing this button down here
02:55in the bottom left-hand corner as well. You see now that gives me more space
03:00vertically. Finally, you'll see that under the View menu, you also have a
03:04Layout bar and a Formatting bar, which are the two other areas of your
03:07interface here that you should be familiar with.
03:09But first in the Layout bar, this is where you can choose from the different
03:13layout that you'll be seeing on screen. Simply, clicking this drop-down menu
03:17will provide a list of all the different layouts that you've created in your
03:19file that are available to you and allow you to toggle between each one.
03:23One of the improvements from the previous version is since the Status area was
03:27only 30 pixels wide, it would truncate the names of your layouts and you would
03:31usually only get to see the first word or so. Now, you've got a lot more room
03:35to work with and it will fit more information in a larger space.
03:39Here are the different ways that you can view your records. You can view them
03:41in what's called Form view, which is one record at a time, List view, which is
03:45multiple records in a continuous list, or as a table, which makes it look a lot
03:50like a spreadsheet.
03:51Also, you can get to your editing of the layout by going on the far right here
03:55for the Edit Layout button, which brings you into Layout mode. Then you see the
03:59Formatting bar which can be toggled by either selecting this button here or
04:03de-selecting the button, which when you're working with different pieces of
04:06texts, you can change the font style or font color if you would like to. So
04:12that's really for your text formatting almost exclusively.
04:15The other thing you should be familiar with about FileMaker's interface is that
04:18there are different modes within FileMaker. Under your View menu, you can see
04:22that there is Browse, Find, Layout, and Preview mode.
04:25Browse mode is what we're looking at right now and that's the mode that
04:27FileMaker uses to add and edit records. This is what your Status toolbar will
04:32look like in Browse mode. But each one of these modes, the Status toolbar takes
04:36on a different look and feel. Of course, it can be customized in each one of
04:39these modes as well.
04:39So let's quickly look at what it looks like in Find mode. Find mode allows you
04:43to enter in different search criteria for you to create found sets of data
04:47that's been stored in your FileMaker database.
04:50So as a result, you see the buttons have changed. Instead of new records, you
04:53see there is one called New Request and New Request is one of the groups of
04:57criteria that you would create and we'll cover this more in the movie where we
05:01discuss finding data. You also see the buttons for Perform Find and Cancel Find
05:05have been added to the toolbar as well.
05:07The other thing to make note of is Including and Omitting, and then the
05:11Operators, which are now added to this top Status toolbar, and we'll discuss
05:14those in a later movie also.
05:16The next mode is Layout mode. Layout mode is the mode that you will be in when
05:21you're creating or modifying your layouts within your FileMaker database.
05:25So therefore, you have a lot of tools that are specific only to creating and
05:28modifying. Like for example, the Text tool, which allows you to select
05:32different text on screen or type different text into your layout. And Drawing
05:35tools for anything from Lines to Rectangles to Ovals and so on and we'll be
05:40using some of these as we go through the different movies.
05:43Also, the ability to add the Field Control which allows you to select a field
05:47and then add different properties to it. We'll be covering that later as well.
05:51Adding a button, adding something called the Tab Control or a Portal or a Web
05:55Viewer, all are going to be items that we cover in later movies.
05:59Then these options here allow you to drag new fields onto the layout by just
06:04selecting and dropping, and new parts, which we'll talk about in the reporting
06:07section. You can toggle out of this layout by selecting the new Exit Layout
06:11button that you see on screen.
06:13This will prompt you to either save your layout or revert back to the original,
06:17and you'll also see that there is two new buttons there to do so. The Revert
06:20button represents the Don't Save option and the Save layout represents the Save option.
06:25So now that we're familiar with what everything is called on screen and where
06:28we can find it, it's time to start using some of these tools by creating some
06:32FileMaker databases.
Collapse this transcript
2. Database Creation Essentials
Creating databases from templates
00:00Once you're familiar with the application and how to set it up and a little bit
00:04of information on the interface, you're going to want to start creating
00:07databases, and the easiest way to create a database is either by importing a
00:11different file format and having that create a database for you and then you
00:15can add fields, layouts, and such to it, or just by using a template. FileMaker
00:19ships with these things that are called Starter Solutions.
00:23They're meant to be fully functional FileMaker solutions that can just be
00:27created, saved, and then you can start adding data to them. Let me show you
00:30what I am talking about there.
00:31If you open up FileMaker and go to New Database under the File menu, you'll see
00:39your Quick Start screen again. And you have three different options for
00:42creating a database. The third option as you see selected here is Create a
00:46database using the Starter Solution.
00:48Here, it lists all the different Starter Solutions that are available to you
00:51and you see that they're grouped logically in sort of business units. You've
00:54got finance related ones, project management related ones, and even some for the Home.
01:00But if you pick anyone of these, for example, Contact Management, and hit OK,
01:06you'll be prompted to save this and we'll save this one to the Desktop. Up on
01:13screen comes the Contact Management Starter Solution. You can just start by
01:18creating new records as is and use all the different fields that they've
01:23created for you, or you can go inside the File and you'll learn the different
01:28ways throughout this title on how you can modify a FileMaker database. But it's
01:31wide open for you. You can go in and modify tables, fields, relationships, add
01:35layouts, modify things on screen, all sorts of new stuff here.
01:39One interesting note is in FileMaker 10, this is the first time that FileMaker
01:43has updated these Starter Solutions since they started shipping them with
01:46version 7. So now, they take advantage of some things that didn't exist in
01:50version 7. Like the ability to resize the file on screen, as you see here,
01:56different things like Web Viewers, which are now integrated, and different
02:00management of container fields.
02:03So 13 of the Starter Solutions have gotten a complete rebuild and the others
02:07have gotten this new look and feel that also, by the way, takes advantage of
02:11the new Status toolbar, because a lot of their Starter Solutions had New
02:15Record, Delete Record, and Find Icons installed in them. Now, of course you
02:19don't need that if you're showing the Status toolbar area.
02:22Most importantly if you're using one of the Starter Solutions is you should
02:25understand and be comfortable with the fact that you can go on and modify this
02:29in anyway that you would like. If you're using a 30-day trial version of
02:33FileMaker, keep in mind that you can make modifications to the Starter
02:36Solutions that ship with that trial version and those don't expire with the
02:40application.
02:41FileMaker gets a lot of questions on that and you should feel free to go ahead
02:45and modify these Starter Solutions as you wish, knowing that those changes will
02:49be saved with the file moving forward.
02:51So Starter Solutions are a great way to get familiar with FileMaker without
02:55having to do any programming. So I encourage you to go take a look at a couple
02:58of different ones and see which one suits you best.
Collapse this transcript
Creating databases from scratch
00:00There is a couple different methods you could use to create a FileMaker
00:03solution. The first of which would be to use one of the templates or Starter
00:08Solutions that we discussed in a previous movie and they are prebuilt for you.
00:11You can just go on and make modification but they're pretty much ready to roll.
00:15The other option, which is actually a lot more popular, is to create one from
00:18scratch or to build all the components from the ground up. That's what we're
00:21going to talking about in this movie. So creating a FileMaker database from
00:25scratch will always start in one location and that is under the File menu where
00:30you can go to File > New Database, which will pop-up the FileMaker Quick Start
00:34screen. And in this case what you are going to do is you're going to select the
00:38Create an empty database option.
00:39You will notice the first thing that you are prompted to do is to name your
00:44database. You'll see that all FileMaker databases end with .fp7. That is the
00:49file format suffix for FileMaker Pro, and we'll call this one Test and just
00:55save it to our Desktop. And you notice now that it's created a FileMaker file
01:00for us and it's prompted us with the Manage Database window. This allows us to
01:06manage things like tables, fields, and relationships and it has already taken
01:10us to the Field tab.
01:12The reason for that is because if you look under Tables, it's created a default
01:17table. The logic there is that you can't define any of these things called
01:21fields or even create different relationships or layouts unless you first have
01:25a table. And a table inside of FileMaker database is where you store all your
01:29data and you can have multiple different tables inside of a FileMaker file. So
01:33here's where you can add all those and make modifications to those if necessary.
01:37You'll also note that the first table name has taken on the name of our file.
01:41Traditionally, the name of your file won't necessarily be one of the tables
01:45inside of it but FileMaker takes the name that you have provided for the
01:48FileMaker file and uses that to name your initial table. But you can go in here
01:54and type over this and hit Change to make that modification. You can do this at
01:59any time as well.
02:00Once you have created tables, you can then create the different fields and you
02:04can have multiple tables within your file, which will allow you to then create
02:08relationships between these tables. And these are all things that we're going
02:11to be talking about in later movies. But a FileMaker Pro database like any
02:15other database is presented to the database developer as a collection of these
02:19tables. Each of them are going to contain some numbers of fields as you see
02:22here. And by the way if you've worked in other database environments before you
02:26may be accustomed to the term columns instead of fields but it's the same
02:29concept here.
02:30So, FileMaker database can contain a single physical file or be composed of
02:34multiple physical files that are all linked in internally using FileMaker
02:37relationships. And those relationships are managed here in the Relationship tab.
02:42So now that you have your database created or the shell of the database created
02:46you can start adding things like fields, layouts, relationships and all the
02:50different things that we cover in the upcoming movies.
Collapse this transcript
Creating databases from existing files
00:01If you are creating a new FileMaker solution there is a couple of different
00:03methods that you could use. The first of which would be to use one of the
00:06existing templates or Starter Solutions that ship with FileMaker or to create
00:11one from scratch or build it up from the ground up. And then the third option
00:15is if you are managing data in another application, you can use the files from
00:19that other application as the starting point for creating a FileMaker solution.
00:23And in that case you would be creating your database from an existing file. And
00:26that one is really easy. You just go into FileMaker and you'll go under the
00:29File menu to New Database. And in this case you're going to choose the option
00:35that's called Create a database from an existing. And then of course you choose
00:39which file format.
00:40So here are the different file formats that can be used to create a new
00:44FileMaker database. There is the Excel 95-2004 format, which is the .xls, or
00:50the new 2007-2008 format .xlsx. And then any other application that you might
00:57have your data currently stored in no matter what it is you can most likely
01:00output that data to either a Tab Delimited text file or a Comma Separated .csv
01:05file or even a Merge file for that matter.
01:07And we'll look at a couple of these options. But also what's brand new to
01:11FileMaker 10 is the ability to use a Bento Source to create your new FileMaker
01:16database. So if you've been working with Bento, which by the way is a Mac OS X
01:20Leopard only application. So let's take a look at a couple of these options.
01:24Let's say we choose the Tab Delimited text file. When you select that option
01:28and hit OK, it's going to do the same thing as if you took a Tab Delimited file
01:32and dragged it on top of a FileMaker icon which will do the same thing, create
01:37a FileMaker database based on this data.
01:40So, if you choose inside the chap02 02_ 02 folder and choose Adventures.txt and
01:47hit Open, you'll see that we've got some options for First Row, how we want to
01:51handle that. And then it asks us what we want to name this new file and
01:54traditionally it will just take the previous name of the file and add the word
01:57Converted on it. Then we hit Save and you see here FileMaker has created a new
02:02database shell for you.
02:03You've got your one table in here and you can go in and modify the name anyway
02:08that you would like. Add new tables to it. And then you see that there are some
02:12fields that are already defined, one field for every column in the source file.
02:18And the table is here so that you can actually create relationships between the
02:22different tables.
02:24You'll also note that you've got two different layouts that are created for
02:26you. One is a detail or Form view, which just shows one record at a time and
02:31allows you to cycle through each one of the records that you just pulled in.
02:34And then the other one is a Table view, which allows you to review all the
02:39different records in the database. But this is a great way to get started if
02:43you just have some raw data. But the new feature in FileMaker 10 for the Mac
02:48users is Create a database from an existing Bento Source.
02:51So you'll see the dialog window for selecting a Bento Source. And you'll notice
02:56that there are various different Libraries and in this case I happen to have
03:00the Libraries that are shipped by default with Bento. So here you see the
03:04Projects library. And when you select the library, you can select the
03:08collection within the library. And if you're interested in more information on
03:11what things like Libraries and Collections and even Bento might be, feel free
03:15to check out my Bento Essential Training course on the lynda.com online
03:18training library.
03:19But all you need to know for this is that a Bento database is organized into
03:23Libraries and Collections. And so here you can choose anyone of the Libraries
03:27and the Project library is the one that Bento ships with. And inside that
03:30library it will have different collections and here we can select Entire
03:34Library and hit Continue. It will ask us what we want to name the file and
03:39where we want to save it and just like before it will pull all that information
03:43into your FileMaker database and allow you to modify the FileMaker database it
03:48built on top of that structure.
03:51You also get the standard Form view and the standard List view. But the thing
03:56that I find most interesting about the ability to create a FileMaker database
03:59using Bento as a source is the file name. If you create a new database select
04:05your Bento Source, look closely at the Select Bento Source window. You'll see
04:10the Address book, iCal Events and iCal Tasks as Libraries that are available to
04:15you to as an import source. What this basically allows you to do is select the
04:19Address Book on your Mac and import all that data in as a FileMaker table with
04:24just a couple of clicks which is great.
04:25You can do that also for iCal Events and iCal Tasks. So you see if I pick
04:29Address Book and Entire Library, I am a couple clicks away from essentially
04:35converting my Address Book database into a FileMaker database along with all the data.
04:40So no matter how you want to create a FileMaker database whether it's from one
04:43of the existing templates or from scratch with your own specifications. Or if
04:48you got some data that you want to convert into FileMaker and build from there.
04:51FileMaker allows you various different choices when it comes to creating a
04:54FileMaker database solution.
Collapse this transcript
3. Managing Fields
Managing the Fields window
00:01A FileMaker database is really a combination of various different tables and
00:05fields and layouts, all combined together to make one FileMaker solution.
00:10Any given FileMaker file can hold an effectively limitless number of tables and
00:14each of those tables can have an effectively limitless number of fields defined
00:18within them. The fields and the table definitions are handled in something
00:22that's called the Manage Database dialog. That dialog can be found under the
00:26File menu, under Manage and then Database.
00:31You will see here that the tables are the first tab and these are all the
00:36different buckets of information. So you will have a different table for each
00:39type of information that you are storing. Here we see we have got adventure,
00:42trip, customer, booking and guide. All discreetly different types of
00:45information and therefore they all get their own table.
00:48A field in FileMaker Pro is a slot in the database table that can be used to
00:52hold information that's specific to a single database record. For example, you
00:56see that we have got this one record for Chris Dorvillie, which is in our
01:00Customer table, and we have got all these different slots that are defined for
01:05us to be able to store information. And each field is defined independently of
01:09each other and all those are done under the Manage Database window as well.
01:13These are all the things that you should spec out before you start building
01:15your project. So, for example, you might want to know what types of information
01:19you are going to store and then what are some of these attributes of that
01:21information so that they can be turned into tables and then corresponding
01:25groups of fields. The attributes will become fields in your database and each
01:29field in a FileMaker database must have a specific field type. Choosing an
01:33appropriate field type for a field is going to allow FileMaker to decide how
01:37best to store the data in a field and then also how to retrieve that data when necessary.
01:42And although FileMaker does have some flexibility as to what kind of data can
01:46be stored in fields of specific types, it's really essential to choose the
01:49appropriate field types based on your database design. Again something that you
01:52are going to want to determine before you are going to start creating your database.
01:55Now an overview of all these different FileMaker field types will follow but
02:00here are those types of fields as a list. You can see those over here next to
02:03the Filed Name in the Type dropdown menu. The first and most common is the
02:08Text, then we have Number, Date, Time, Timestamp, Container and then the
02:13Calculation and the Summary fields. It's important that you first have an
02:17understanding of where you go within FileMaker to define these fields.
Collapse this transcript
Using text fields
00:01When building a database solution, it's important to spec out what types of
00:04fields will be necessary inside your database. In this case you see that we
00:07have got a first name and a last name field. You manage fields under the File
00:12menu, under Manage > Database and select the Fields tab. The most common type
00:18of field is the Text field. You would type in a field name and then select Text
00:23as you type and hit Create.
00:24The Text field type is appropriate for any sort of data that can be stored as
00:28Text and it does not need more specific handling. Numbers and Dates for example
00:33can be stored in the Text field but in doing that they are going to lose their
00:36number-ness or date-ness and can only be addressed as plain text in those
00:41cases. Couple of things you should be aware of about Text fields, they may hold
00:45up to about 2 gigabytes of information which is roughly the equivalent of about
00:49a billion characters or the entire book of Moby Dick into one field.
00:54Now the question of course should be why you would want to do something like
00:57that. It's really just a statement about how much storage capabilities you have
01:02within any given field in FileMaker. Unlike other fields in FileMaker, Text
01:06fields can store formatting information as well as the raw data. So this
01:10includes things like color, type face, point size. But it can also include
01:14basic paragraph level formatting such as indents, tab stops and return characters.
01:19Text fields are going to be the most common types of field that you will use
01:22because you can fit all sorts of different types of data within the Text field.
01:25You could use a Text field to store things like billing address, city, state,
01:30zip or even an E-mail address for example, because it can store any type of
01:34data that you can type into a field that does not require any special handling.
Collapse this transcript
Using number fields
00:01Deciding on what field type to choose when you are defining fields in your
00:04database is always very important. Sometimes you are going to define a field
00:07that requires special handling. For example, like in a Number field. You will
00:11want to use a Number field in any case where data needs to be treated as a
00:15number, pretty obvious. As you see when you go into your Manage Database
00:20dialog, you can choose a Number over a Text field. Now in a Text field you can
00:24store numbers, but they lose their number-ness if that makes any sense.
00:28For example, I could store the number 1 in a Text field and the number 2 in
00:34another Text field and try to add the two of them together and they won't be
00:37recognized as numbers and therefore I couldn't get the result of 3. So if I did
00:42want to do some math against data that's stored in a field, I would decide to
00:46use Number as my field type.
00:48So, for example, if the field needs to be sorted in numerical order, first part
00:52of the mathematical equation, you are always going to go with Number fields.
00:55A Number field can store up to 800 digits of numeric precision, which is 400 to
01:01either side of the decimal point. Now you may not actually need that level of
01:04precision, but even if you just need to have a number, a Number field is going
01:08to be a critical choice for you.
01:09FileMaker Pro won't prevent the entry of non-numeric data into a Number field
01:15and unless of course there is some validation and we will talk about that in a
01:18later movie. So you can enter text characters in, they will just simply be ignored.
01:22So, in general if you need to enter mixed numeric and alphabetical data into a
01:27field, you should consider using a Text field. But if the data that's stored
01:31inside a field requires any special numeric handling then you should always
01:34select a Number field.
01:37So, in general if you need to enter mixed numeric and alphabetic data into a
01:41field you should consider using a Text field. And if you need to store data in
01:45a field that may possibly be used in a mathematical equation, it's always a
01:49good idea to choose the numeric filed type.
Collapse this transcript
Using date fields
00:01When you are deciding on a field type when defining fields inside of your
00:04FileMaker database, some fields may require special handling much like the Date
00:09field. FileMaker Pro's date handling is actually quite flexible and it's able
00:13to store and retrieve any date between the year 1/1/0001 and 12/31 of the year
00:204000.
00:22So it recognizes a date as long as it fits within that range. Internally
00:26FileMaker stores the date value as an integer or a whole number that's going to
00:30represent the number of days elapsed since 1/1/0001 or the very first date of
00:37calendar time. So even though FileMaker stores this information as an integer,
00:41it can look a little bit different to your users.
00:43So, for example, let's create a Date field by typing a field name, in this case
00:49I will just say Date in the Field Name and under Type selecting Type. Hitting
00:54the Create button and hitting OK. We see that this date is shown up on the
00:59bottom of my layout and I can type in 1/1/2009 and this is now that I have
01:07committed the record to the database, after I hit commit its actually just
01:11storing the integer into the database and FileMaker does all the handling from there.
01:16And if you go into Layout mode, so View > Layout and select your Date field and
01:22go under the Format menu to Date, you will see that you can leave the data
01:27formatted as entered or you can select Format as. And these are all the
01:31different formats that FileMaker displays to the user even though it's only
01:35storing integer internally.
01:37So as far as your user is interacting with the data, this is the way that you
01:40can control the format of the data. But since it's an integer that's stored
01:45within your database, it's just a number. That means that you can do things
01:48like add one date to another date giving you 30 days from today's date for
01:54example. Or the elapsed time between a hire date and a fire date for example,
01:59can give you the total number of days elapsed or even timecards, the day that
02:05they punched in on project versus the day that they closed the project and give
02:08you elapsed time, those types of things.
02:10So, well FileMaker supports a wide variety of the date entry as far as
02:14formatting is concerned it always will display these internally as an integer
02:18allowing you to not only store date data but also use it in its own type of
02:22mathematical equation. So when you are deciding on what field types to choose,
02:27if you are going to be entering information that's specific to the date or that
02:30needs to be used to determine elapsed time, then you will want to select the
02:34Date field type.
Collapse this transcript
Using time/timestamp fields
00:00When you are defining fields inside of FileMaker database, you are going to
00:04have to choose what type of field you want to define. There are a couple of
00:08different field types that accommodate special handling of data that's stored
00:12inside the fields. And two of those are the Time and Timestamp field types.
00:18When you are defining a field under the Manage Database dialog, you will see
00:22that each field has its own type and here we have one that's called Departure
00:25Time, which is actually a Time field. And so when the Time type is selected
00:30even structured FileMaker just stores the data to represent either a time of
00:34day or duration of a specific time.
00:36So, for example, you see I have got Departure Time, I could type in 4:15 pm and
00:43FileMaker would store that information or I could type in 4, which would just
00:47simply mean a duration of 4 hours. Internally FileMaker is storing the time
00:52value as an integer representing the duration of seconds from 12 o'clock
00:55midnight. So if I put in the value 12: 01 am, the value that's actually stored
01:02inside of the field internally in FileMaker is the number 60 representing 60
01:07elapsed seconds in the day.
01:09This can be useful if you are trying to determine elapsed time, like you have a
01:13time that you are storing in a database field for the check in time versus the
01:17checkout time, you can just subtract the check in time from the checkout time
01:22integer which will give you the number of elapsed seconds. And then you can
01:25just multiply those by 60 to either determine how many minutes, how many hours
01:29and so on have elapsed in that time period.
01:31A Timestamp field combines the functions of both the Date and the Time date
01:35types. You see an example of that here, you see I have got the date and I have
01:40a time both together. Now this is also stored as an integer internally within
01:44FileMaker so that you can determine elapsed time over the course of several
01:48days if need be. And this is actually stored as a number of seconds from
01:531/1/0001, so from day number one in calendar dates stored as the number of
01:59seconds from midnight on 1/1/0001.
02:03So, if you are going to be determining elapsed time or storing in times of day
02:07or even date combinations with those times as well, you are going to want to
02:10choose the Time data type or the Timestamp data type.
Collapse this transcript
Using container fields
00:00When you are defining fields inside your FileMaker database you have some
00:03choices on what type of field that you want to create. Many of the fields are
00:08pretty self explanatory like Text fields and Date fields and Number fields, but
00:12there is a special kind of field that is somewhat unique to FileMaker database
00:15that's called a Container field. FileMaker Pro's Container field is a versatile
00:19data type, in that it can store any sort of binary data. Binary is just a
00:24generic term for data that can't be represented just as text. Container fields
00:28in FileMaker can be used to hold binary data in four broad classes. Images, so
00:34for example if you wanted to have a field, like you see here on this layout, a
00:38Container field where I store an image, you can store QuickTime files, any
00:43movie, sound or any other type of file that's capable of display in the
00:47QuickTime Player. In OLE object which is a Windows platform only or files of
00:52any type, really like PDF files, Excel files or any type that you can imagine,
00:57really all they are just 1's and 0's of data that are represented its either in
01:01image or moving pictures but at the core they are just small, tiny pieces of
01:05data that you are storing inside a FileMaker field.
01:07Let's take a look at a couple of these. You will see under File > Manage
01:12Database that we have a field that's called Photo. We have chosen Container as
01:18the field type and then if I go into View > Layout Mode I have placed the Photo
01:25field on my layout and you see that it looks a little bit different than the
01:27rest of the fields in your Layout mode. Back in Browse, if I select the field
01:33and choose Insert, I can select Picture and I will choose this picture and you
01:40see now that I can store an image inside the Container field and so that means
01:44that anyone on my database records I can have a corresponding image.
01:47Now if I want to have multiple images I can just define more Container fields
01:50per each record or if I want to store multiple images as one package then I can
01:55zip them up and I can store the Zip file in here. Clicking inside the field and
01:59hitting Delete or Remove that and now just to show the versatility of the field
02:03I am also going to store a movie or a QuickTime movie in this case, right
02:09inside the field itself. The interesting thing about playing either a movie
02:13file or a sound file inside of a container field is when you are in Browse mode
02:16viewing the record that stores the data, you can also play this. As you see
02:22here, I have a moving video playing inside my FileMaker database record the
02:26same would be true for an audio file, you can here the audio of this file
02:29playing. I can select that and hit Delete and Remove the file completely.
02:35I can also store file types, PDF files, Excel files, in this case I have a text
02:39file, see I can also right click in here and select Insert > File and unlike
02:45the image or the movie what actually shows up is the Files icon.
02:49Now the other thing that's interesting about Container field is not only can I
02:51store the information in this field, the Users can also navigate to the record
02:55and then extract the data out of the field as well. So if I was a user and I
03:00landed on this database record I could click inside the field and right click
03:05and choose Export Field Contents and now it will then save this file that's
03:09been stored inside the database to my desktop or whatever location that I choose.
03:14When you are choosing the files to store inside of the record, keep in mind
03:17that the database will increase in size by exactly the size of the file that
03:22you place inside the container. So in English what that means is that if you
03:27have a 2 megabyte image, let's say and you store that inside a container field
03:32on a record your database file has just increased by 2 megabytes in size. So
03:36this is something that important that you keep tabs on even though you can
03:39store up to 4 gigabytes of file size inside of one of these fields, it is
03:43probably not recommended that you do that.
03:46Binary objects can be embedded directly into the Container field like you saw
03:49me do here or stored as a reference. So for example by going and say Insert >
03:55Picture and I choose the Author notice down here it says, Store only a
04:00reference to this file, if I choose that and hit Open it still displays the
04:04image in the same resolution and quality as it would have if I embedded it but
04:08in this case it's just storing the path to the location of the image in using
04:12the QuickTime engine to display the image itself.
04:15Now this is a much more efficient way to store images just as a reference or
04:20for that matter movies or files or whatever you store inside the Container
04:23field, keep in mind that the moment to that path breaks so will be display of
04:27the image. So if you have the static location for files that you store in the
04:31Container field, it's a great idea to start those as a reference instead.
04:35So storing object by reference leaves the object on some external storage
04:38device such as a server or hard drive and creating a link to that storage
04:41location, this can save considerable space but necessitates that the external
04:45volume always be accessible to all users of the system if this is shared on the
04:49network and that the file's location not be changed without updating the reference.
04:53So there are some unique circumstances where you would store it as a reference
04:56versus embedding but as you can see FileMaker Provides you with the really
05:00unique and interesting type of field, a Container field that allows you to
05:04store all sorts of things, Files, Data, other FileMaker files, Images, Movies,
05:10Sound, really an unlimited amount of media and file storage.
Collapse this transcript
Using calculation and summary fields
00:01You can choose to define various different field types within your FileMaker
00:05database, as you can see under the File > Manage > Database dialog. So for
00:09example, you see we have more traditional types, like Text, Number, Data, Time,
00:14Timestamp, and even the Container field that stores media, but you will see
00:18that this list even has a separator that keeps the Calculation and Summary
00:22field types independent from the regular fields. That really has to do with the
00:25fact that all the other field types, besides calculations and summaries, really
00:29just store data.
00:30A calculation is a data value that gets computed based on a formula that's
00:35defined by the database's developer. Now calculations are pretty critical to
00:38FileMaker database development and have their own chapter later in this title,
00:42but let me show you an example of the calculation field that's already defined
00:45in this database.
00:47Note here under the field Type, we have Calculation and this one is full name.
00:52Here when I click on Options, you see that I get a special dialog that we'll
00:56cover later in this title, but here you see that I am able to take the first
01:00name field and the last name field and using some supported characters,
01:04concatenate the two of those together.
01:08If I take a look at that by going in to Layout mode, dropping a field on the
01:16layout, choosing full name, and then going back in to Browse, you will see that
01:27it dynamically presents the data based on the contents of the two fields that
01:33are referenced.
01:35A Summary field doesn't necessarily work with data in different fields but it
01:38works with the number of records inside of a table. So for example, if you
01:42switch over to the List view, you see that we have got a series of different
01:46contacts in our customer list that are all listed here in list form, but what
01:52if we want to know, how many of these records we have at any given time?
01:55Well, in that case, we can go and create a Summary field. So let's choose
02:01Summary, we will create a field here called CustomerCount. When I hit Create on
02:09summary, you will notice that it says what do you want to do here? You want a
02:12total, an average, a count, minimum, maximum, these are all the different
02:15options of summaries, but what I want to do is a Count of and then I can pick
02:20any one of these values. Now I have told it to count the number of ids that it
02:25encounters. This is a field that will give you information based on a found set
02:29within your database. So for example, if I hit OK and we give in to Layout
02:34mode, and if we take this CustomerCount and using our Arrow keys after its
02:40selected move it down to the footer, and we go back in the Browse mode and hit Save.
02:46You see now that it tells us that there are 1,523 records, which actually
02:51matches our total that you see in our Status toolbar. So the more you
02:56understand about calculations, which you can learn later in this title, the
03:00more robust your FileMaker application can become.
Collapse this transcript
Modifying and organizing fields
00:00When working with fields inside FileMaker it's important to have an
00:03understanding of how you can make modifications to those fields. In the same
00:07place that you add fields to your FileMaker database which is under the File >
00:11Manage > Database window, it's important to note that you can use the same
00:15window to manage and maintain existing fields in your FileMaker database.
00:20First thing to understand about this window is that you can organize the way in
00:23which you are seeing fields displayed inside the window by clicking on either
00:28the Type or Field Name header to sort the different fields. So if you are
00:32looking for a specific field, it's going to be a lot easier for you to locate
00:35it if you sort it by Field Name first.
00:37A lot of times developers will put things like Zs, or underscores, or spaces in
00:44their field name, just so that it shows up in a specific order when they are
00:47selecting the sort value. You will notice that you can choose how you view your
00:51fields by either field name, the order in which they are created, the field
00:57type, which groups them into the different types, or even by a custom order
01:01that allows you to move these things around on screen.
01:04So if you are working with a group of fields you might want to move those all
01:07down into one section then you can access all those or view all those in one
01:11spot using custom order; or if you want to look at a field that you just added
01:15to a database, you can see on the bottom what the most recently added fields are.
01:19Now the Options and Comments, it appears that though the data is disappearing,
01:23but actually what you are doing is you are toggling between the Options and the
01:27Comments fields.
01:28When we talk about calculations, you will see a little bit more information
01:32about what these options are, but there are also different field options when
01:36it comes to storage and serial values that we'll discuss in later movies. And
01:41that information gets displayed here as well.
01:44The one important thing to take a look at is the field comments. It's always a
01:48good idea to comment your fields. So for example, if you have a field that's
01:52called id, it might make sense to you, but if you ever pass this on another
01:56user, if somebody else wants to maintain the database, they may not know what
02:00id means when they first look at it.
02:02So one of the things you can do is type -in values into the Comment field and
02:12then you can save these with the field itself. There we go. I have just saved
02:17it. So now you see that the Comments, if I click on the Comments instead of
02:21Options, you see that information displayed. It's helpful for you because quite
02:25frankly you might define a field and a database and then knock it around to it
02:28for another year and you might not even know what's thought process you were
02:31using when you created these. So it's always a good idea to comment as many of
02:34your fields as possible.
02:35You should also know that you can select existing fields and duplicate them if
02:40need be, or even select those fields and delete them using the various buttons
02:45that you see here down on the bottom of the screen. And another good developer
02:49practice is to print backup copies of your field list for each table. And you
02:56simply do that by either selecting a field and then hitting Print, or selecting
03:01all the fields and hitting Print. You will see then what this gives you is a
03:06backup of all the fields that you defined in your database. This is a good
03:09idea, if you are about to do a lot of changes, you at least have a record of
03:13how the fields were defined in the database before you start to making all your
03:16modifications.
03:18So it's a good idea to get familiar with the Manage Database Fields tab and all
03:22the different buttons here, so that you know how to maintain your fields moving
03:26forward in your database.
Collapse this transcript
4. Auto-Enter Field Options
Understanding auto-entry field options
00:00When you are defining fields inside your FileMaker databases, you have a couple
00:04of decisions to make. The first of which is the type of field that you are
00:07going to be defining and the next would be any additional options that may be
00:11necessary for that field.
00:12So before you can make those decisions, we'll need to get you familiar with the
00:16different options that are available when you are defining a field.
00:18So first if you open up File > Manage > Database, this is where you get your
00:23Manage Database dialog window where you see all of your fields listed.
00:26Selecting any one of the different fields will allow you to change the field
00:30name or type or add comments and then hit Change, or you will also see that
00:34when you choose a field, you can then choose the Options button. Pressing on
00:38the Options button reveals the options for Field and whatever the field name is
00:42that you've selected.
00:43The first tab you see addresses Auto- Enter options. FileMaker Pro allows
00:48developers to specify a range of different options for automatically populating
00:52the contents of a field. So on screen here you see the Auto Entry tab of the
00:56options for Field dialog.
00:58What Auto Enter means is that when a new record is created in the database, it
01:03will automatically enter a value into that field on your behalf. There are
01:07various different options that you can choose to select which type of data gets
01:10entered into the field automatically.
01:12So a FileMaker field can automatically track information about when a record
01:16was created or last modified for example. That's what you see here at the top
01:20of the screen.
01:21So the first two that we are going to look at are Creation and Modification.
01:25Now, you will note that each one of these has a drop-down menu where you can
01:29select what type of data gets put into the field automatically when the record is created.
01:35Now, in our case, you see that I have selected the Departure Time field and it
01:39only gives me the options to choose time, and the reason for that is because I
01:44have chosen a field with the field type of time. Same thing is true for number,
01:48if I select days and hit Options. You will see now that it allows me inside the
01:52Number field. I can put a Date, which is actually stored as an integer, so it's
01:56a number. Same with Time and Timestamp also stored as integers. But also, I can
02:01store the Name and Account Name inside of any one of these fields besides the
02:05Time field if need be.
02:07Text also allows us to store any one of these field values, but the idea behind
02:12this is that when a new record is created, you want to store information on
02:17when it was created, at what time it's created, who created, that type of
02:21thing. These are necessarily fields that you are going to display on your
02:23layout, but these are fields that are going to be helpful as housekeeping fields.
02:27You will notice that we have a couple of those already defined inside the
02:30database. If you look down here and scroll all the way down to the bottom, you
02:34see that these are z_, which allows us to sort everything by the fields and
02:39have all of our housekeeping fields grouped together.
02:42But you will notice that in the case of Creation Account; this is going to
02:45store the information on the person who was logged in when the record was
02:48created. You see that we have got the Creation check box selected and Account
02:53Name is chosen. Let me first note the difference between Name and Account Name.
02:58First of all, Name represents the computer name or the name of the computer,
03:02which you are using at the time that the record is created. Account Name is the
03:07name that you use to login to the FileMaker database or your credentials for
03:10that database.
03:12So the idea is you can have a user that can access the database from multiple
03:15different computers and their Account Name will show up in every record that
03:19they create. But if you want to see where, as far as a location is concerned,
03:23is to where the record was created, you can choose Name, which you will store
03:27in the computer name.
03:27So let's say you have a shipping computer or an accounting computer, those
03:31types of things. You can get information from both the computers or locations
03:36and the individuals as well.
03:38The same is true for modification. If you look down here z_modification account
03:43or timestamp. When I hit Options, you will see that Modification and then
03:47Timestamp is chosen. This is a very common one.
03:49This means that whenever anybody goes into your database and modifies any of
03:53the values on the record; it will automatically change the value that's stored
03:57inside the Modification field.
03:59These are great because some developers find it useful to have a set of
04:02housekeeping fields that are defined for every table they create. For example,
04:06Creation Date and Time or simply Creation Timestamp, Modification Date and Time
04:10or Modification Timestamp, a Creation Account Name, Modification Account Name;
04:15those are all common set. You see those represented here in the sample file.
04:19As I mentioned earlier, these aren't necessarily field values that you are
04:21going to display on a layout, but when you are troubleshooting problems within
04:24the system or trying to isolate pieces of bad data, it's going to be immensely
04:28helpful for you to have these values stored on the fields, so that you can
04:31drill down into specific sub-sets when trying to troubleshoot a problem.
Collapse this transcript
Using the auto-enter serial options
00:00FileMaker allows various different field options when defining fields inside
00:05your database and one of the more commonly used ones is what's called the Auto
00:09Enter Serial number. You will notice if you go under File to Manage and
00:13Database, you will see that for example in the Adventure table, we have an ID
00:18field that's defined and if you press the Options button, you will see that
00:22under the Auto-Enter tab, it has a check-box under Serial number and you see
00:26there is a few different options that you can choose here. But let's just stop
00:29for a moment and take a look at what's actually happening.
00:31What this indicates is that when a record is created, it's going to give it its
00:34own unique value and since we are choosing the Auto-Enter option for a field
00:38that means that FileMaker is going to manage what that value is. And that will
00:42allow us to guarantee the uniqueness of the value that's being created in this field.
00:47This is going to be key when we talk about relationships later on in this title
00:50because each field will need to be uniquely identified in order for
00:54relationships that would be created between tables and records.
00:57In this case, you see that Auto- Enter Serial means that when a record is
01:00created, it will automatically enter a serial value and it will continue to
01:04manage the next value in the Increment Level. So let's take a look at that. If
01:08I say OK, and OK, and if you go to View and Layout, this is the mode which
01:14allows us to add new fields to the layout if we want to.
01:17I will select this option up on the top of the screen; the Field tool and I
01:22will just drag it to the layout and then specify the ID field and now we will
01:29go back into Browse mode after hitting Save and we are going to create a new
01:33record. So the new record shows a number 1. If I create another new record, it
01:38shows a number 2, number 3, and so on. I can delete these records as you will see,
01:44and hitting a new record goes to 4.
01:49So it doesn't matter if the records exist. It just has a tally going that it's
01:53storing internally that knows what the next value is going to be. That way you
01:56are always guaranteed to have unique values.
01:58There is a couple of options for you to choose from though. If you go into
02:01Manage > Database, ID, Options, you will see that you can choose whether
02:07or not you generate this value on the creation of a record or on the commit of a record.
02:12Now, the concept of committing a record is the action that actually makes the
02:17data save to your database. Now, FileMaker essentially is an auto-save
02:21database. So any data that you put inside of a field gets automatically saved.
02:25But there is a brief moment in time between when you add the data in the field
02:28and when you click outside of the field that that data has not yet been saved.
02:32So if for some reason you want to manage very closely the serial values,
02:37you can change to On Commit and we will check out how that behavior is different.
02:42So now, let's say we are on number 4 there, so we'll delete number 4. Now, the
02:48next record would be number 5. Now I can click into this field and I can type a
02:52bunch of data into it if I'd like to. All the while, I haven't yet committed
02:57this record to the database, but if I click outside the field, that commits the
03:01record therefore saving the data and then you see it gives me the number 5.
03:07Or if I hit New Record, typed a bunch of values in here, and now I wanted to
03:13delete the record that I have, the next serial value has been maintained so I
03:17can use it on this upcoming record. For example, if I take Record, it will say
03:216 and so on and so forth.
03:24Really ID fields or serial values defined in your database should not be
03:29something that the users are necessarily seeing, to be something that's stored
03:32internally inside the database. So most likely the default is going to be
03:35generating on creation and storing the next serial value from there.
03:39There is one area where this could trip you up, however, and that is when you
03:43are importing data into your database. Let's say you have got records in your
03:47database already and the FileMaker database is managing what the next serial
03:51value is going to be to ensure that you never get duplicates. It's the
03:54FileMaker file that is actually storing the data on the next value.
03:58So if you import more data coming from another source, let's say another file
04:02into this FileMaker database, it needs to be able to know that it should update
04:07the next serial value. I will show you how we can do that. It's a pretty easy function.
04:11So let's do an example of going File > Import and we will choose Tab-Separated
04:18files and choose Adventures. Then again, we will talk more about importing but
04:22the idea here is we are going to bring in 16 new records to the database and so
04:26what we wanted to do is increment our next serial value by 16 and we had it on
04:30number 7 prior to this.
04:32So I will just select Import and this window that pops up is the one that's
04:36important to the success here. If you do not have Perform Auto-Enter options
04:40while importing selected, it's not going to reset your serial number. This
04:44means that even though you have added 16 records to the database, the next
04:49serial value could potentially be a duplicate.
04:52This is important if you are installing different builds of a solution and you
04:55are importing your data into them. It might mess up your internal serial values
05:00if you are not managing these properly.
05:02So the trick here on managing these is simply to check this box, hit Import,
05:06and you see 16 new records have been added to the database. Let's go onto File >
05:10Manage > Database, Options and we see now instead of a number 7,
05:16it's automatically updated the next value in the shell to a number 23.
05:20So of the Auto-Enter options, the Auto-Enter Serial Number is an excellent
05:24option for being able to uniquely identify records within your database table.
Collapse this transcript
Using the auto-enter calculated values
00:00One of the more useful Auto Enter options for defined fields is the Auto Enter
00:05by Calculation option. You look under File > Manage > Database in the
00:10Lucky_You_Tours_04_03 Exercise File. You will see that we have a field that's
00:15called Amount Due.
00:17If you select Amount Due under the Booking table and hit Options, you will see
00:21that under the Auto-Enter tab, we have a check box next to the Calculated
00:24value. Now, in order to see the calculated value, you have to hit Specify.
00:28Anytime you are in Auto-Enter, it means that when a new record is created, put
00:33this value into the field. So here, in this case, what it does is it takes
00:37values from other fields and it just says, after running a calculation, give me
00:41the result of this calculation and put that into the field.
00:44So here you see Amount Billed minus Amount Paid will equal Amount Due. Now, you
00:49might think to yourself, why not just create a calculation for this field?
00:52Well, the idea of an Auto-Enter calculation versus an actual calculation field
00:57is that like any other Auto-Enter, when you create a new record, it's going to
01:01take a snapshot in time as to what the data is at the moment that record is
01:05created and then insert that into the field. A calculation value will
01:09constantly update as time goes by.
01:11So let's say in our example that on Monday of this week, the amount billed for
01:20any particular customer was $1,500. But on Tuesday of that week, the amount due
01:26as of that date was $1,750. Well, that means that this value is going to change
01:31inside this field as each day goes by as the amount build value changes. But if
01:35all we care about is what amount billed minus amount paid was on the day that
01:40we created this record, then we use an Auto-Enter Calc.
01:44The other thing about Auto-Enter Calc records and by the way if you hit OK and
01:49create a new Record, you see if I put an amount billed as 100 and amount paid
01:55is 50. When I commit the record by clicking outside of it, the Amount Due
01:59automatically shows up as 50.
02:00The other thing that's nice about the Auto-Enter Calc versus the regular
02:03calculation is I could go in here if I'd like to and I can override that value
02:09and change it to whatever value that I like.
02:11So when you are interested in taking snapshot values from various different
02:14fields and those certain database records, it's always a good idea to use
02:18Auto-Enter calculation option when defining your field.
Collapse this transcript
Setting field filter options
00:01In a previous video, I discussed the field option for Auto-enter Calculation
00:05and now I would like to show you a technique that's based on Auto-Enter
00:08Calculation. We call this one field filtering. If you open up your file,
00:12Contact_04_04, you will notice that what we have is a contact database that
00:18has, for example, a social security number field and a phone number field.
00:21One of the common issues with data that's been entered into a database is that
00:26users will enter data into a field and enter it in various different formats.
00:31So for example, instead of social security number, they could just enter it in
00:34as 324 without dashes and then maybe they do slashes. The phone number one
00:40makes more sense in that, users can enter in 888-212-5489 or (888) like you see
00:48here with the space, but if you just want your data to be uniform there is a
00:52way that you can change it as it's been saved to the database.
00:55Let's take a look at how that works. If you go into File > Manage > Database,
01:00you see the phone number field has the Auto-enter Calculation value chosen. So
01:05we can access that by going into Options and here we are at the Auto-enter tab.
01:09So when you open up the Specify Calculation dialog don't pay too much attention
01:13to the calculation itself, because this is kind of a tricky calculation.
01:17We will cover the logic of this later in the Calculation chapter but for
01:21whatever it's worth, you can actually copy and paste this right into your
01:24database solution and it will have the same effect. So what this actually does
01:27is that it will strip out all the first three numbers and wrap those in
01:31parenthesis, put a space and then take the next three numbers, follow that by a
01:36dash and then it will display the right four numbers.
01:41So basically, your users are going to enter in all these numbers in succession
01:44without any dashes, without any parenthesis and when they tab out of the field
01:47and hit Enter, it's going to reformat it. The key to this technique, this
01:52filtering is that the field that we are actually applying the Auto-enter
01:56Calculation formula is the phone number field. But in the definition of the
02:00Auto-enter Calculation, you see that in various spots, we are referencing itself.
02:06So to take a moment, to explain what's going on there, what's actually
02:09happening in this formula is that it is saying the value that the user
02:13originally entered into the field is what's represented by these placeholders
02:17in their calculation. So if the user just enters in a stream of ten different
02:22values without any dashes or parenthesis, that's the pre-commit value that you see here.
02:28So the value before it is saved is what's represented in this calculation. And
02:33then you notice here, the key to making this all work is that you see that
02:37there is a checkbox, which is one of the options for the Auto-enter Calculated
02:40value, which is called Do not replace existing value (if any). So let's try and
02:44see what happens if we check this value.
02:47The syntax of this message is a little bit difficult to comprehend. It really,
02:51instead of saying Check means Do not replace with existing field, it should
02:55just say Replace with a checkmark or not. So in this case, let's see what
02:58happens if we type a value into the field with the Do not replace existing
03:03value checked. So I will go and I will create a new record and I will go into
03:07phone number.
03:08Now keep in mind, we haven't committed this record to the database yet. I
03:11haven't hit Enter. So therefore, it has not yet been committed is what the
03:16terminology is there. So I will just enter in and you can see I have just
03:22entered in 8882124620. So I have just got the ten characters in there and now I
03:28am going to click outside the field and commit it and you see what it has done
03:31is it has simply applied the same value that the user entered in, into the
03:36field itself after it was committed.
03:38Now the reason that it did that is because I said don't replace an existing
03:42value in the field. So the existing value here is the value that the user typed
03:46into the field. But if I uncheck this and I allow the calculated value to
03:51replace any existing value. So that means, the value that the user is typing in
03:54before I commit. That means at on commit it will apply this calculation to the
04:00value that I put inside the field.
04:01So, Do not replace existing value, we use it, as is. Pre-commit and post-commit
04:06but leaving the value not checked will apply the calculation formula to the
04:11value that I entered in Pre-commit and then reveal the filtered value,
04:15post-commit of the record. It's easier if I show you. So let's take a look. OK
04:20and we will Delete this record, Create a new one and I will type in, 8882124620
04:28and now I click outside of this and commit and you see now, it has applied the
04:32formula to the field and it automatically formatted in the way that I have
04:35instructed with the calculation formula.
04:37The same is true by the way for Social Security and you see here, we have just
04:44put dashes in there, so it formats it properly and this technique is commonly
04:48called field filtering.
Collapse this transcript
Looking up values from other fields
00:00One of the Auto-enter Options available to you when you are setting up a field
00:05inside a FileMaker is something that's called Auto-enter Lookup and you will
00:08see if you go inside the Lucky_You_ Tours_04_05 file under File > Manage >
00:14Database. You go into Tables and select booking, double click on that. You will
00:20see that we have a field here that uses the Auto-enter Lookup option. It's
00:24called amount billed and if we go into Auto-enter Lookup and hit Options,
00:30we'll see that it's a number field but as with any other Auto-enter Option, when
00:34the record is been created, it's automatically going to enter some value into
00:38the field. So in the case of the Lookup value, it's using a relationship
00:42between two tables. Now keep in mind, if you haven't gotten familiar yet with the
00:47relationships, the concept of relationships, you can go checkout the chapter on
00:51relationships but the idea is that two different tables,
00:54in this case there is a trip id and a booking id, meaning one trip can have
00:58many bookings, and they are related together using the Trip id as the unique
01:02value. So with that in mind, let's take a look at how the Lookup value would
01:06work. Well, if you hit Specify, these are the options that you are going to
01:10choose. You say I am starting in the Booking table, which is the table that
01:14this layout is based off of and I want to lookup a value from the Adventure table.
01:19So the Adventure table has all these following fields and so in here I say
01:25I want the price coming from the Adventure table. So we will say OK and OK again
01:31and so in order for this to work. What it's going to do is populate the amount
01:35billed with the price of whatever the chosen trip is. So first I need to
01:39manually select. I will say as far as adventures are concerned, we will say the
01:44Irish Adventure. So I will go in and I will copy the id.
01:47Now this is just the unique value, you see that every one of these trips has
01:50its own value. So that way, it knows go find the record that matches 1001 and
01:57then put the value of price, which is 1235, into the amount billed field. So
02:03let's try this out. We hit a new record and I am just going to manually paste
02:07in here 1001, which is the trip id. Now keep in mind that there are all sorts
02:12of more sophisticated methods I am creating related records and populating
02:16these key fields.
02:18But for this example, we will paste in 1001 and we will click OK and now you
02:23see it has automatically looked up what the price was in the related value,
02:271235, 1235 and placed it inside the amount billed and of course, amount due,
02:35see now what's happening there. Amount due is actually an Auto-enter
02:39Calculation that does amount billed - amount paid.
02:43So that would actually be 1235-0=1235. So the Lookup are used in very specific
02:51cases because you could easily create a calculation field that just shows amount
02:55billed based on the related value and that's quite common. But the reason that
02:58you wouldn't do that is because when you use an Auto-enter Calculation or a
03:03Lookup, what it's doing is taking a snapshot of a piece of data at a moment in
03:08time that the record is created.
03:10So the idea here is this. I am creating a booking and all I really care about
03:15is how much this trip cost at the moment that I booked it, because let's say a
03:20year later this trip then gets changed to, instead of 123,5 it becomes 1435.
03:31Does the value on the booking change? No, but if this was a calculation field,
03:36it would change. It would continue to change as time went by.
03:39So you don't want that in your data all of the time. Sometimes you want it to
03:42retroactively update all your data and it's very common when it comes to
03:45pricing on products or services or in this case, trips. You only want to know
03:50let's say the price at a moment in time when the record was created. So if you
03:54ever need to do that, just grab a related value at a moment in time, at the
03:58moment that the record is created.
04:00You can use an Auto-enter Lookup and additionally, what's nice about this is
04:03you can make manual changes if you needed to, unlike your calculation where if
04:07you went in, it would tell you it's not modifiable. Here I can go in and I can
04:11modify the value in any way, shape or form that I like. So again, if you are
04:14interested in pulling in a related value via a relationship at the moment that
04:18a record is created, a net field, define it as an Auto-enter Lookup.
Collapse this transcript
5. Validation and Storage Field Options
Setting field validation and custom messages
00:01When you are making decisions about what fields to add to your database, you
00:03may also want to apply some rules about the data that's getting entered into
00:07those fields. This concept is called field validation.
00:11If you open up your file Lucky_You_Tours _05_01 and go to the Manage > Database,
00:16and then the Table for Customer, you will see a series of fields inside the
00:21database. Now, the concept of field validation probably isn't as foreign to you
00:25as you may think.
00:26If you've ever been on a website before and you have been filling out
00:28information and then you try to advance to the next page and it came back and
00:32said the Email field is required before you can proceed. That is a form of
00:36field validation. In that case, they applied a rule that said that this field
00:40must not be empty. You can apply those same types of rules to fields within
00:44FileMaker databases.
00:46Let's take a look at an example. Let's say you want to make sure that the user
00:49does not leave the Email field empty when creating a record. That is just a
00:54field option or a field validation option that you can apply by selecting the
00:58field, hitting the Option button, and then clicking over to the Tab for Validation.
01:03You will see here that you have a series of different options that are
01:05available to you. For example, if we take a look at these, we have got strict
01:09data type meaning it can either be numeric only, make sure that it's a four
01:14digit year and your date or make sure that it is a properly formatted time of
01:18day. That's what strict data type option would be, or you could make sure that
01:22it's not empty. We will check that one here in this example.
01:26So in this case, the user will not be able to proceed with their activities
01:29until they have entered a value inside this field. You could also choose unique
01:34value or existing value. Additionally, you see that you can make the user
01:38choose from a range or even some sort of calculated value that would result
01:43itself in either a true or false statement that you can apply towards a
01:46validation. So really you can apply whatever type of validation rule that you see fit.
01:51In this case, we will keep it pretty simple and we will say just make sure that
01:53the value is not empty. So we will say OK and then we have email, and I am
01:59going to enter a value in to the fields and I am going to click outside the
02:04field. Now you notice a message popped up that said email, the field, is
02:09defined to require a value. Do you want to allow this field to remain empty?
02:13And as the user who is entering data, I can either say Yes, leave it empty, or
02:17No, do not leave it empty or revert the record back to pre-committed versions.
02:23If I try again, you will notice that if I put an email address in this time and
02:32now commit, I get no errors. So that's all enforced by the email field having
02:39an option for validation to require it not to be empty.
02:43Now, one of the things you may have noticed here is that it allowed the user to
02:46override this. So you can take sort of a hard or soft approach to how you are
02:50enforcing this rule. If it's really just a suggestion, then you can allow the
02:55user to override during data entry. But if this is a hard-fast rule and you
03:00want to make sure that the user adheres to this before proceeding, it's a good
03:04idea to uncheck this check box.
03:07That way when you create a new record, it says, email is defined to require a
03:13value. You must enter a value. Now, you see it doesn't allow me to revert to
03:16the previous value and it doesn't allow me to override that. I just say OK and
03:20it goes right back to email. No matter what I do, I get that message.
03:24So if you have a really hard rule on data entry and it's not just for creating
03:28new records. This validation applies when a record is modified as well. So for
03:33example, you see when we enter that value in, we are okay there. But if I go
03:39back and pick one of these and I edit it, and I pull that value out of the
03:43field, you see that I get this even though the record is a previous record that
03:47has this value associated.
03:48The only thing that might be a little confusing is email is defined to require
03:52a value. You must enter a value. Users might not respond to that so well. So if
03:57go into Manage > Database-- you see it's very strict. It won't even allow you to
04:03proceed into Manage > Database without a value in there.
04:05If you go in, you will notice that you have the ability to change the message
04:09that pops up. So for example, here I can say -- you could even give it a little
04:17personal touch. Now, oops! You must enter a value in the Email field. That
04:28might make a little bit more sense to a user and now you can proceed from there.
04:31So let's take a look at another example. If I go into the Adventure Detail,
04:36you will notice here that we have got a Days and a Nights field, which is just a
04:42numeric value. We can enter in the number of days and number of nights.
04:46The thing is that it doesn't make sense for you to have more nights than days.
04:50For example, you are always traveling on one of the days, so you are going to
04:52have one extra day no matter what. So we want to make sure that users that are
04:56entering these values into the database don't mess up and accidentally put for
05:00example 17 into that field.
05:03Let's take a look at how we would modify that. Let's go into Manage > Database
05:08and if we go towards the Nights field, that is here. So we say that Nights less
05:20than Days. Let's take a look at what happens now.
05:28So if I enter in 18, you see that it says Nights is defined to contain a value
05:34something that's really not that descriptive to the user, but here I can revert
05:37the record back to the original amount. But instead, this is probably a great
05:42example of where I might want to put in a custom message that says, Number of
05:49nights must be at least one less than the number of days. Try again.
05:59We are not going to let them override it. We will just say OK. So now a user is
06:05entering in. Says number of days must be at least one less than the number of
06:10nights. Let's try again, revert record, back to the original. If I say 13, now it saves.
06:16So there is a couple of different options for applying rules to the data entry
06:21either as soft suggestions or as hard rules that can be enforced by using
06:26Auto-Enter validation on your field options.
Collapse this transcript
Understanding always vs. data entry validation options
00:00In the previous movie, we discussed applying validation rules to your field
00:05options when setting them up inside FileMaker. This will allow you to control
00:09the data that's either being entered into a new record or modified in an
00:12existing record, and applying rules to it to make sure that you don't get data
00:16in there that you don't want. In the example that we discussed, we looked at
00:19the Nights field.
00:21We go to File > Manage > Database and we look at Nights. You see that there is
00:27an option here that says, Make sure that nights is always less than days and if
00:32not, show this option that says, Oops! Nights must be one less than days. Let's
00:39see what happens if it doesn't pass. It says, Oops! Nights must be one less
00:43than days, and it gives you an opportunity to change that.
00:45So one of the things that you may not have noticed and it's important to take
00:49into account is under Nights, you notice up here that we have got the ability
00:54to control whether or not we are going to validate this data in the field
00:58always or only during data entry.
01:00Well, what's the difference between those? Well, you may not think there is a
01:03difference unless you knew that there are other ways that you can get data into
01:06a field or modify data that's in a field.
01:08So for example, one of those would be via a script or during an import or if
01:12you are doing batch replaces of groups of records, or even doing something
01:16that's called a re-lookup. When the default option of Only during data entry is
01:20selected, this means that only when a person is sitting in front of the
01:23application and changing those values in a data entry environment, will this
01:28validation be applied.
01:29That's generally what you want, because in most cases when you are importing
01:33data in or when you are creating a script and modifying data in a script,
01:36that's an environment that's controlled by a developer or someone that can sort
01:40of restrict or enforce those rules on their own. But let's take a look at how
01:43that would work.
01:44If I switch this over to Always, this means that no matter what, whether I am
01:48importing, or running a script against this record or a user entering a value
01:52into the field, I am going to get an error if the validation rule is not passed.
01:59Let's see how that performs using the example of importing records. We will go
02:02to File > Import Records, and we will cover more about importing records in the
02:06Importing chapter. But to follow along this exercise, you can go onto 05_02 and
02:10select the adventures.txt, open that up, and then hit Import.
02:16Now, in the Import Summary, you notice that it says, total records added or
02:20updated 18. But out of those 18, 11 of them were not added to the database
02:24because they violated some rule.
02:26So what this indicates to us is that they've violated one of our validation
02:29rules which means that the Nights value was greater than the Daysm which is
02:34probably a good idea in this particular example to enforce that rule. But if we
02:38delete those records and try this again, we will note that if we go to File >
02:43Manage > Database, down to Nights. I am going to say only during data entry. So
02:49in this case, bypass this rule if the user is going to do an import like we are going to do.
02:54So we say File > Import Records > File, 05_02, Open, Import, Import and
03:03now you see that all 18 records have been added to the database. One thing you
03:07should be aware of however is that if you go in and try to change any of these
03:12values, the validation rule will be applied.
03:17So if you ever want to have some control over only data entry, then you would
03:22select only during data entry. Otherwise, you can apply an Always that data can
03:27get updated within your FileMaker database records.
Collapse this transcript
Reviewing storage options (global fields)
00:00When you are defining fields inside a FileMaker database, after you've defined
00:05the fields type, you can choose different field options like auto-entry and
00:08validation criteria; all of that is done through the Manage > Database dialog.
00:14But you will also notice that there is another option if you select a field and
00:18select options.
00:19In addition to Auto-Enter, in addition to Validation you will see that there is
00:22one that's called Storage. And on this tab, this is where you can determine
00:25whether or not a field will have global storage. Let's first talk about what
00:29Global Storage is.
00:30For those of you that have worked with FileMaker in previous versions, versions
00:34that were prior to version 7, you probably remember that there used to be a
00:39field type that was called Global. And what a Global field is, or in current
00:44incarnations of FileMaker what a field with Global Storage actually is, it's a
00:49field that has the same value for every record in the database. Let's take a
00:53look at how that would actually work.
00:56Let's define a new field that's called Global. I am going to select Text and
01:01hit Create and I will hit OK, and this field shows up on my layout if I go to
01:09View > Layout mode. I am going to select this and say Cut and go into Adventure
01:19List. Okay, so let's put that value on screen.
01:24Okay, so right now it's a regular text field, so I can put Value, value2,
01:31value3, all I have done is just define a field that has its own value for each
01:36one of the records in the database. It's the same thing as the firstname field
01:39or the lastname field or email or whatever, nothing different there.
01:42So in this case, if we look at the field Global, it is not set to Use global
01:47storage, so that means it's just like every other field, so every field by
01:51default is set to not have global storage. Let's take a look at what happens
01:56when I switch this from Not Global to Global Storage. Database > Global >
02:04Options and I am going to check this box.
02:07The first thing you see is it says, Turning global storage on or off will cause
02:10all existing data in the field to be lost. So, for example, those values that I
02:14typed into the field these will be lost if I toggle over to Global. I am going
02:17to say OK, OK again, and now notice that all my field values are gone. When I
02:24type a value into the field and then hit OK, notice that every record in the
02:28database has now grabbed that value. Global Storage is used really for a
02:34temporary storage location for scripts. So it's really like a field that's
02:37defined inside a table, rather than a field that's defined inside of a record,
02:41and the reason I got rid of global fields as a field type was because right
02:46around that same version, which was around FileMaker 7, FileMaker had
02:49introduced Script Variables, which is something that we will talk about in the
02:53scripting section, but it did away with the need for having to define a global
02:57value. But global values, you are just looking at storing one value inside of a
03:02table, meaning that there's not going to be a separate value for each record.
03:05You can create a whole series of global fields. You can store user preferences.
03:09For example, you can have a global container with global storage. And the other
03:13interesting thing is that these are session-based values. So that means that
03:19each time I login, I can have my own value in the database, meaning they are
03:24going to have a different experience. An important behavior of these globally
03:27storage fields is that in a multiuser environment like I just described, global
03:31values are specific to each user session.
03:33So when a FileMaker Pro or even an instant web publishing client connects to a
03:37hosted database, they are going to inherit the values that were in use when the
03:41file was last physically opened on a local computer. Any modification of those
03:45initial values during that session will persist only for the duration of their
03:50session. So that's why using global fields might be a good idea for storing
03:53user preferences or even session preferences, or just temporarily storing
03:57information that a user is working on in the middle of the script because all
04:00those things are specific only for the duration of that session. Now if the
04:04client then closes and then reopens a file, all the global fields will be reset
04:08to their initial values.
04:09I think the best way to look at this is you will know when you need a global
04:12field, and if you are looking for global fields and you don't know where they
04:16are because you used to work with versions prior to 7, keep in mind that it's
04:20an option now rather than a field type. So you go inside Text Fields > Options
04:25and you can turn on Global Storage, or turn that off as well.
04:30So although you may never need a field with global storage and you can build an
04:34entire solution without using it. In case you need it, understand that instead
04:38of it being a field type, it is now a field option.
Collapse this transcript
Indexing options for fields
00:00One of the final decisions that you have to make when you are defining a field
00:04in FileMaker database is whether or not you are going to index that field. But
00:08in order for you to make that decision, you first need to know what an index is.
00:11This option can be found under Manage > Database, under the Options in the
00:20Storage tab, and you see down below here you've got the ability to choose None,
00:23Minimal, and All. So what does this mean exactly?
00:26Well, FileMaker has the ability to index the values that are inside of a field,
00:29so it can be used for certain functions like searching, or sorting, or creating
00:34value list, or more importantly generating relationships between tables, but in
00:38order for that functionality to work effectively FileMaker needs to have a full
00:41inventory on what data is found in any given field inside this database.
00:46So if you use the analogy, if you got your yearbooks when you were in high
00:49school, you used to get these big yearbooks, and you used to say to
00:51yourself, okay, I want to find the pictures of me in this yearbook. Now one
00:55option that you could have done is page through one page at a time, looking at
00:58every single page and writing down which page numbers have photos of you in
01:02there. But most likely what you did is you went right to the back to a section
01:06that's called the Index, and in that Index it had a list of names; next to each
01:10name were the page numbers where those individuals could be seen photographed.
01:14The idea there is that it should only take you a minute or so to find the page
01:18that you are looking for in the analogy of the yearbook, rather than having to
01:21go through every single page and do the inventory yourself. FileMaker follows that same logic.
01:26So let's say you are searching for the word climbing. If I go into Find and
01:34hit climbing, you see that it came back and tell me that 21 records match that
01:38criteria. And the reason it came back so quickly, even though there are only 44
01:42records in this database, you could have 44,000 or 444,000 in your database and
01:47it will still come back very quickly, and the reason for that is because when
01:50Indexing is turned-on, FileMaker will create an inventory of all the values
01:54that are found inside of a certain field.
01:56That way when you put in search criteria in this example, it goes and it looks
02:00against that index; it doesn't have to go to every single record in the
02:04database and compare your criteria to the criteria that's in the field. It's
02:08also helpful to take a look at the fields index to get a little better
02:10understanding of how that works.
02:12If the Field Indexing is turned on on a field, you can click inside of a field,
02:17and if you are a Windows user you can hit Ctrl+I or a Mac user you can
02:22Command+I, and up pops the View Index window. What this is saying is in the
02:26Title field in this database, here are the following values that can be found
02:32inside the field in this version of the database. So you see that they are all
02:36listed here in alphabetical order.
02:37Not only are they indexed, but you will notice that in the case of there being
02:43two records with Kilimanjaro and Safa in there, you will notice that
02:46that's only listed once. So it is a non -duplicated list of unique values that
02:52are found inside this field. It's important that this happens because you may
02:56have done a search before where you've waited for ever and ever and ever and
02:59you get this progress bar on screen and it goes so slow that you can't figure
03:03out why this is taking so long. That's because that field is unindexed.
03:06So once the field is indexed, it will go quicker. It initially does have to
03:10create the index and this usually happens when you are defining a field, or you
03:13are turning Indexing on, or you are searching in it for the first time. Then it
03:17will go and create that index once the index is created, then everything goes a
03:20lot quicker afterwards. An unindexed search, for example, is significantly faster.
03:25Now the other thing that you can see here is that there are actually two types
03:28of indexes. There is a Word index and a Value index. And what we are looking at
03:32right here is the Value index, meaning, it doesn't discern whether or not there
03:37are several words like Australian Rock and Water, instead it just says this one
03:42value exists inside the field.
03:44Now a Word index instead of a Value index, you can see that by checking the
03:49Show individual words and here you see each individual word that exists inside
03:54the field. Now that's how we ended up coming up with climbing, because when I
03:57did a search for climbing and photography, you will notice that climbing
04:02happens to be one of the words. But also if I did Climbing/Photography would
04:07also match as a value match, because searching does both word matches and value matches.
04:12In addition to searching, the Value index is also used for relationships, value
04:16lists, and auto-complete field control options, and unlike the Value index, the
04:21Word index that you see here on screen includes only the first 100 characters
04:26of a field. So the Word index contains every entry for every word in the field
04:30regardless of how much text is entered into the field. This index is used when
04:33performing searches on text fields. You'll probably get a better idea when you see this.
04:39So here is the Value index of this big paragraph field. So this is saying,
04:43every one of these lines is a different paragraph that was created, but if I
04:46want to break that down into the individual words, you can see that there is a
04:51lot more unique words inside of this large description fields.
04:56So if we go back into the setup of the field, Manage > Database, really pick
05:00any one of these fields and hit Options. And you will notice that the default
05:04is Automatically create indexes as needed. So when you first create a field,
05:08that will say None and say Automatically create as needed. And if you ever do a
05:11search inside the field, then it's going to trigger the creation of the index.
05:17If you have this unchecked and say None, it will never trigger the creation of the index.
05:22So by default, Automatically creating these will turn it to Minimal or All. All
05:27is only in effect when it comes to text fields so that's where both a Value
05:31index and a Word index will be created. A Minimal is just when a Word index is
05:35created. So then you might think, why not just turn Indexing on, on all my
05:39fields? I want them all to run very quickly, I want to be able to use them in
05:42relationships and value lists.
05:43Well, there are actually a couple of downsides to Indexing that you have to be
05:46careful about. First, all this information that you see here actually has to be
05:53stored somewhere. So in addition to the data that exists inside the field
05:56itself, all this data has to be recreated in the index and that gets saved
05:59inside the cache of the FileMaker file.
06:01A heavily indexed database can be almost twice as large as one with no indexes
06:05at all. I personally have seen databases go from 10 megabytes in size to 300
06:10megabytes in size just by indexing all the fields. It all depends on how many
06:14records that you've got, how much data goes inside of any particular field, and so on.
06:18And the second, once a field is indexed, the index must be maintained as data
06:22changes are made. So this is going to introduce performance issues for
06:25operations that may modify data on large sets, such as imports or the deleting
06:29of sets of records. So if you are sharing your database with multiple users,
06:33you are now pushing that much more data, not just the data in the field and
06:36the changes that you made, but now you have to push out the updated index to
06:39all your users as well.
06:40So to really approach this in the best fashion, you want to make sure that you
06:44are taking full advantage of indexing, but your best bet is to just leave the
06:49default value of Automatically create indexes on is needed. This way you will
06:53get all the performance, get all the storage of indexes without having to incur
06:57all of the pitfalls of indexing all of your fields.
Collapse this transcript
6. Working with Records
Creating and duplicating records
00:00The main function of a FileMaker database is to store data. In this movie we
00:04are going to be discussing how to add data in the form of creating records.
00:08If you'll pull up the file Lucky_You_ Tours_06_01, you will notice that it has
00:12one record of data and we know that because in the upper left hand corner in
00:16the Status toolbar, we see that there is a total number of records of 1 and we
00:19that we are on that first record.
00:21A record in the database is an instance of whatever we are storing in the
00:25database. So in this case this is the Adventure Detail table and we are storing
00:29information on one of the adventures. It's a lot like having a row inside of a
00:33spreadsheet. There's different ways that you can add records to a database and
00:37the most common are going under the Records menu where you will see the New
00:41Record option. Selecting this option will automatically create a new record in
00:44your FileMaker database.
00:46You can also use the buttons that are found in the Status toolbar, you see by
00:50default you have a New Record button here. Pressing this button will allow you
00:54to also create one of these new records. When you do create a New Record, you
00:58will notice that everything on screen goes blank. Now it's important that both
01:02you and your users understand that you haven't deleted anything by hitting that
01:05button, but instead you have created a new blank record that will allow you to
01:08enter new data into your database. You'll see that all of the fields on the
01:12screen are blank, except for this field right here. This field has been setup
01:16to do what's called Auto Enter.
01:18If you are interested in more information on that, take a look at the movie I
01:21am setting up Auto Entry options for your fields. When you click inside of a
01:24field, you will know which field is active, because the outer edges of the
01:27field are highlighted and your cursor is blinking. This will allow you to add
01:31New Information into the field. So, after you have selected all the appropriate
01:37information, you can click outside the field and now it is automatically saved.
01:42And it's important that both you and the users of your database understand that
01:45by just typing in information into these fields after creating a new record,
01:49it's going to automatically save that data to your database. There is no Save
01:53button in FileMaker because of the database and a lot of users who use other
01:57applications aren't used to this because in most cases you have to hit Save to
02:00commit any of the changes that you have made, but in the case of FileMaker and
02:04other databases, you just type the information into the field and do what's
02:07called committing your changes to the database. In the case of FileMaker you
02:11can just simply tab out of the field or click into an area that doesn't have a
02:14field and now your information is saved in the database.
02:18Another way to add records to the database is to do what's called Duplicating a
02:21Record. So if you already have a record in your database and most of the
02:26information for your record is going to be the same, you can save yourself some
02:29data entry by just duplicating this record. The commands for duplicating the
02:33record can be found in the same locations as adding a record. For example,
02:37under the Records menu, you see Duplicate Record. You also see the
02:41corresponding quick keys, which are Command+D, or Ctrl+D.
02:45So in this case I will use the Quick Keys option, and when I create this New
02:48Record, take a look at what happens on screen. You see that now I have three
02:52records, whereas I had two before. You will also notice that all the
02:56information in this record is exactly the same as the original, except for this
03:00ID field. Because this ID was setup as an Auto Enter Serial Option, it has just
03:06advanced the ID number to the next value. However, everything else in this
03:10record is available for editing, so we can go in and type in a new value and
03:16then of course commit our changes.
03:18This is how you create records, which is of course the building blocks of
03:21creating a database.
Collapse this transcript
Editing and locking records
00:00Once you have added records to your FileMaker database, or if you already have
00:04records in your FileMaker database, you have the ability to edit the data
00:07that's in the fields. You can control whether or not users, or even certain
00:11users can edit values inside your database through accounts and privileges, and
00:15if you want more information on that checkout the videos in the security section.
00:19But assuming that you have allowed users to make edits to the data that is in
00:22your database, all they will need to do is click into one of the fields and it
00:27puts a border around the field showing that it's the active field available for
00:30editing. You will also see that the cursor is blinking and in each field that
00:35has data that you want to edit, you can either click in and here I am hitting
00:39the Delete button to make adjustments to the data that's in the fields.
00:43Once you have made a change and you click outside of the fields, you have now
00:46done what's called committing the entry and once a record is committed, it's
00:50automatically saved to the database. So you can instruct your users that they
00:54don't have to hit File > Save or anything like that to actually save the data
00:57that they have just changed. Probably there is one way in a text field, if the
01:02user goes in and makes a change, let's say here they have hit Delete, you can
01:06go under the Edit menu and say Undo Delete. And you can Redo Delete as well.
01:11You can do this multiple times, as long as the user has not committed the change.
01:15So for example, if I make another change, you will see that I can do Undo
01:21Delete two different times, but once I commit the record, you will see now that
01:26I cannot undo. Those options are grayed out. The other important thing to note
01:30about editing records is that only one user can be editing a record in the
01:34database at the same time. It's very common to share your FileMaker databases
01:37on a network, so in that case you may have multiple users that are all
01:41interested in working with a single record.
01:42Let's take a look at what that will look like. I am going to open up a new
01:45window, which is basically just another copy of the same layout that I am
01:51currently on. Now let's say I am a user here that has clicked inside the field
01:56that not only clicked inside the field, but has begun to edit. As you see here
02:00now I have made a change.
02:02Now if I am another user that sharing the same file and attempt to make to an
02:06edit, you see that on screen it says, this record cannot be modified in this
02:09window, because it has already been modified in a different window. Now that's
02:12the message that appears on screen if you have two windows open of the same
02:16file. But you will see a little bit more description if it's another user
02:19that's sharing the database.
02:20For example, you'll see their information, their account name, so in that case
02:24you can possibly contact that person and say hey, are you editing this field,
02:28can I get in there when you are done? And this isn't a bug or anything to work
02:31around in FileMaker, it's actually in there by design, because this way if two
02:34users are trying to edit the same record, only one of them is aware that their
02:37changes have been saved, so the other person is restricted from doing so, so
02:41that there isn't any confusion as to who got the last change.
02:44This is something that will need to be taking into consideration when you are
02:47training your users. So not only can you add records to FileMaker database, but
02:51it also allows you easy ways to make these edits. It's just important that you
02:54understand when the changes are saved to the database.
Collapse this transcript
Deleting records
00:00Deleting records out of your FileMaker database is pretty easy to do. And
00:04actually may be a bit too easy. I will show you how to delete data out of your
00:08FileMaker database and talk to you about some ways that you might want to
00:11protect your database against accidental deletions.
00:14First, just like with creating and duplicating records, you can create a new
00:18record by going either under the Records menu and selecting Delete Record,
00:23or you can also use the quick keys, which on Mac would be Apple+E, or on Windows
00:27Ctrl+E, and you will also see that there is a button in the toolbar that's
00:31called Delete Record. So selecting any one of those options will delete the
00:34record that you have.
00:35You see here that we have got three records in the database, so if I go to this
00:39record and hit Delete, FileMaker will prompt you with the option of whether or
00:42not they actually want to delete the record, which is a nice failsafe. And the
00:45default of course is Cancel. But if they hit Delete, you will see now that we
00:49only have two records in the database.
00:50However, if you didn't intend to do that, you will notice that you can't undo
00:54the deletion of the record. Just like when you create a record or edit a record
00:58in a FileMaker database, deleting a record is final. You should also be aware
01:02that under the Records menu, right below Delete Record is Delete All Records.
01:07This doesn't have a corresponding quick key luckily, but your user should be
01:10aware that if they accidentally select this option instead of Delete Record,
01:13they will see that it will include the total number of records in the database
01:17with the words Delete All, instead of just Delete. They should be cautioned
01:20during user training not to hit Delete All, unless they absolutely need to.
01:24So, in the event if someone accidentally deletes your database, this is
01:27probably a good time to talk to you about backing up your data. You can create
01:30copies of your database and store them outside of wherever you are having the
01:34database hosted, or if you use FileMaker Server, you can read the documentation
01:38on how to setup schedule backups. But it's very important since the data is
01:42usually the lifeblood of an organization that you have some sort of backup plan in place.
01:47So, in working with databases, everyone is bound to make mistakes. So FileMaker
01:51allows you the ability to delete records so that you can correct your mistakes
01:54and therefore maintain the integrity of your database.
Collapse this transcript
Committing records
00:00I would like to take a moment and talk about the concept of committing a
00:03record. I have mentioned it a few times in previous movies but I wanted to
00:07concentrate on it here. First of all, FileMaker will auto-save any new records
00:11that are created or any changes to existing records. Since it stores the data
00:15and it's not a working file environment any changes that you make will
00:18automatically be committed to the database.
00:20Committing is quite useful as a matter of fact if you note the movies under
00:23Auto-Entry options for your fields, you'll see that many of those are based on
00:27records either being committed or created so this concept is in place on
00:31purpose. The idea of committing works like this. If you click inside of a
00:35field, currently right now that field is on hold with FileMaker, it allows you
00:40an environment to make a change and it won't actually commit that change to the
00:45database until you do a number of different things that will commit the record.
00:49Of course, before you do any of these you still have the ability to undo
00:52whatever changes you just made.
00:54So what are some of the things that commit the changes to the record? First of
00:57all, pressing the Enter key on your keyboard and you'll notice that the record
01:00is now committed because the highlighted area around the field that you were
01:03just editing has gone away, but also if you switch different modes, for example
01:07switching from Browse mode to Find mode, that will commit your record. And also
01:12if you switch Layout.
01:13So if I click into this field and I switch over to the Adventure list you'll
01:19see that that change has been committed. And also creating a new record in the
01:22database, so if I go into this field and I hit Stadium and now I create a new
01:28record, you'll see that the original field value has been committed. Also if
01:33you are in the middle of editing a record or adding data to a record and you
01:39close the file, or if you close the window directly that will automatically
01:44commit the record. So committing the record will automatically save the data to
01:47your layout.
01:48So if this type of environment is maybe a little unusual to your users there is
01:52one way that you can add one more fail-safe before the data is committed to the database.
01:56If we go into View > Layout and then go under the Layout menu to Layout Setup
02:03you will see that there is an option here that's called Save Record changes
02:06automatically. By default any new layout that you create will have this option
02:10checked. However, if you go in and uncheck this option and hit OK and go back
02:15into Browse mode you'll notice that users will now be prompted to save the
02:21changes to their record before they proceed. So I can say Don't Save and it
02:25just reverts the record back to its original state. Or I can say Save, which
02:31then commits the change to the record. This type of experience might be a
02:34little bit more familiar to your users so that option is always there if you need it.
02:38So it's important to understand what the idea of committing records means in
02:41FileMaker and how you can control whether or not items are automatically saved or not.
Collapse this transcript
Recovering files
00:00In this movie we're going to talk about the concept of recovering files.
00:04Recovering of file isn't something that you do as regular maintenance, as a
00:07matter of fact; it's an emergency procedure to allow you to extract your live
00:11data from a file to import it into another copy of your file that has not
00:15experienced problems.
00:16There are various things that will cause damage to the FileMaker file and it's
00:19actually quite uncommon, but most of it involves interruption in your database.
00:23So for example if you are hosting a FileMaker database on server and the server
00:27happens to crash in the middle of a procedure, or if somebody loses connection
00:31to a database while they are running a pretty involved task, these are the
00:34types of things that could cause damage in your FileMaker files.
00:37So in the unlikely event that you experience recovery most likely what you'll
00:42see is when you open up the file you'll see an error that pops up when you are
00:46trying to open the file that looks like this. It will say something along the
00:49lines of warning: consistency check has been detected with problems in this file.
00:52And when you run into that it won't allow you to open the file or it'll close
00:56the file if it's partially opened, and keep in mind that you'll never see this
01:00on a server hosted file because FileMaker server has a consistency check built
01:03into it and if the file does not pass the check it won't allow it to be open
01:07for hosting, this will prevent any further damage.
01:10So most likely you're going to run into this error when you are just opening up
01:13a file off of your desktop or just opening something up locally in a copy of
01:16FileMaker. When you do experience that error what you want to do at this point
01:20is extract the live data from that file so you can put it into a backup.
01:24The way in which you do that is by running the Recover command. You can find
01:28the Recover command by opening up FileMaker Pro, going under the File menu and
01:33selecting Recover. At this point it's going to ask you to select the damaged
01:36file and choose RecoverMe, you can select a file to go right into recovery at
01:43this point or you can just perform a consistency check manually here. This is
01:46the same check that server performs when it opens up a file to be hosted.
01:51Here you see in this case I have run a consistency check that didn't find any
01:54problems, but most likely if you've gotten the error it will find some problems
01:58in the form of bad blocks and if you want to take a look at a little bit more
02:01detail what if found you can open up the log file and this is just a simple
02:06text file that's saved after you perform the recovery and this can be opened up
02:10inside FileMaker and you can create a database out of this if you'd like.
02:14But if in fact you do find consistency check issues then just select the file
02:19you want to recover by hitting the Select button and you can just run the
02:22recovery now. Now it's important to understand what's actually happening here.
02:25The Recover function is actually going to generate a new database using the
02:30shell of the damaged database and then it's got some options to rebuild some of
02:34the scheme and structure. But keep in mind that you are not actually doing
02:37anything to the original.
02:38When an original database is damaged, it's done; you don't want to use it
02:42anymore. Unfortunately I have run into issues with clients where they've had
02:46mysterious things going on with their FileMaker files and it's because they've
02:50recovered and then put the recovered file back up on the network, very bad
02:54thing to do there, what you want to make sure that you're doing is recovering
02:57the file just to extract data from it, and then take a backup of the file, a
03:01backup that passes a consistency check and import all that data into it. That's
03:07an important thing to know in case if you've ever run into any damage.
03:09But when you are recovering the file you have the couple of more options in
03:12FileMaker 10 than you used to. If you select the Use Advanced Options button
03:17you'll notice that you can choose to copy the file block as is, which means
03:21just give me a copy but don't make any changes to it. Copy the logical
03:25structure which will give you everything but the data, so to create a new shell
03:30for you which probably isn't going to help you much if you are trying to
03:34extract your data, or the default option, Scan blocks and rebuild the file,
03:38this will drop any invalid blocks and blocks are just elements inside the
03:42database that FileMaker is keeping track of when it's performing these
03:45consistency checks.
03:46But this is going to give you the best bet for recovering the data out of your
03:50damaged file. And what it will do when you hit OK and then Save, it's going to
03:55ask you where do you want to save the recovered copy. Go ahead and do that and
03:59you see that it's created a new file for you and created a recover log, which
04:02again you can open up and see what's been done. See there are quite a bit of
04:06things that are being rebuilt, everything from files to fields, to layout
04:09elements, all sorts of different things.
04:13And now you can dismiss this and hit OK. Now what you want to do is take the
04:16recovered version, open it up and then go in here and export the data, save
04:24your data on some kind of compatible format and then you'll go find a clean
04:28version of this file and import the new data into it.
04:31So the important thing here is that although some file damage may occur, it's
04:36important that you never put a recovered, damaged file back onto your network
04:41because this just could create even more damage down the road. So any event
04:44that you ever do get a message about recovering your file, make sure you follow
04:47these important steps and you'll be able to get your file back in no time.
Collapse this transcript
7. Creating Layouts
Creating layouts
00:01Anybody developing or maintaining a FileMaker database solution is likely to
00:05spend a good portion of time in what's called Layout mode. This is the mode in
00:08which you create layouts, reports or basically anyway that you want your users
00:12to interface with the data that's been stored inside your database. The way
00:15that you can access Layout mode is by going under View to Layout Mode or either
00:22doing Apple+L or Ctrl+L on your quick keys, and also you can access it down on
00:26the bottom left-hand corner of your screen by toggling over to the Layout option.
00:31Now you see it takes the active layout and puts you into the mode that allows
00:35you to make changes. You can exit Layout mode by pressing the button in the
00:39upper right-hand corner or save any of your changes or revert any of the
00:43changes that you've made by pressing these buttons right next to the Exit button.
00:47You can delete existing layouts if you like, or you can duplicate existing
00:51layouts and use those as a template for making modifications. All of those
00:55options are found above. You'll see here if you go to Layouts > Delete Layout
01:01you'll be prompted to make sure that you wanted to delete this layout. If
01:04you've intended to delete the layout you can hit the Delete button at this
01:07point or just hit Cancel.
01:09Also you can hit Duplicate Layout which will create a new layout as you see it
01:13here in advance from 15-16 because unlike when we are in Browse mode and this
01:17gives us the number of records, here it's actually telling us how many total
01:21layouts there are. And also you can see all of the existing layouts in your
01:24database by clicking on this Layout drop-down menu. You'll notice that there
01:28are more layouts in here in some cases than there are in Browse mode because
01:32you have the ability to turn off the visibility of the layout. We'll be
01:35discussing that in the later movie.
01:36But most importantly you can create new layouts for your databases and you do
01:41so by selecting the New Layout Report button while in Layout mode or going
01:45under the Layouts menu to select New Layout Report or using Apple+N or Ctrl+N
01:50quick key. And this will prompt the Layout Assistant.
01:53And in the next movie we're going to discuss some of the options available to
01:57you when using the Layout Assistant to create a new layout in your database.
Collapse this transcript
Using the Layout Assistant to create forms, lists, labels, and envelopes
00:01Creating layouts in FileMaker is the basis for being able to provide interface
00:04for users to work with your data and in order to create layouts, you will first
00:08need to be in Layout mode which you can access by going into View and Layout,
00:14at which point you can now use the Layout Assistant. You can invoke the Layout
00:18Assistant while in Layout mode by pressing either the New Layout Report button
00:22or going under the Layouts menu, to New Layout or Report.
00:27And when you do so, you will be prompted with this window that's called New
00:29Layout/Report and this window gives you several different options for creating
00:33new layouts,. We will look at a couple of them here but I will explain the rest.
00:37First you will see that you have to make a choice. You have to choose what
00:41table inside your database this layout is going to be based off of. So every
00:46layout in the FileMaker database has to be based off of a certain table. That
00:49provides context for the fields that you will be adding to the layout.
00:53You see here in this example, we have got five different tables and we will
00:57just choose the Adventure option and then next FileMaker gives you a generic
01:02layout name, but you will want to add your own name. When users see it in the
01:08Layout menu, they will know exactly what this layout is based off of.
01:12And also you can choose whether or not you want to include it in the Layout
01:14menu because some layouts that you create don't necessarily need to be seen by
01:19users and some of them are just there to be use inside of scripts but in most
01:22cases, you will want to create layouts and allow them to be seen and accessed
01:27through to Layout menu while in Browse mode.
01:30And then that leaves you with the type of layout that you want to create. You see that
01:34FileMaker provides you with some templates. And we will take a look at creating
01:38a standard form and even a list/ report but you also have options for Table
01:42view, which will create a spreadsheet- like view of your data. There is also the
01:48ability to create labels. This is a pretty easy one, this allows you to pick
01:51certain fields that you want to appear in a label and then you can pick different
01:55Avery label layout numbers and it automatically create label layouts for you.
02:00The same is true for Envelopes. You can pick different envelope size numbers.
02:04A couple of the default ones are included in here and those will take the
02:08envelope style numbers and then add whatever your desired fields may be. And
02:13lastly you can create just a Blank Layout, which allows you to start from scratch.
02:18But going back up to the Standard Form, you will notice also when you click
02:21into each one of these you get a preview on the right hand side and a little
02:25description down below here, so you see for Standard Form, this will show one
02:29record at a time.
02:30By hitting Next, it allow us to pick which field that we want to show up on a
02:34layout, so let's pick a couple of different fields and you can either click on
02:38this and hit Move or you can double- click on the field or you can choose
02:45multiple different fields by holding down the Shift key and then hitting Move
02:50or you can hit Move All to move all the fields in your database over, and if
02:54you have made any kind of mistakes, you can just hit Clear All.
02:58So in this case, we will double-click on a couple of fields and now once the
03:07fields are over in the Layout Fields window, you can change the order in which
03:11they appear on your layout. So I can move title to the top by holding down and
03:15dragging, and now we will know the order in which the fields will be placed on
03:19the layout after we are done with the assistant.
03:22Hitting Next takes us to the pane where we choose the new theme that we want to
03:26apply. You don't have to choose a theme; you can hit default which will just
03:30give you white backgrounds and then you can add your own manually or you can
03:34use some of the ten new themes that FileMaker has added to FileMaker 10.
03:40FileMaker 10 has adopted some of the themes that you may have seen if you ever
03:44used Bento, if you are a Mac OS X user. And ten of those themes, for
03:49example, Orange Mist have been added to FileMaker 10. If we take a look at some
03:54of these, you see that they have combinations of font styles and colors, header
03:58color versus body colors, and different things that they match the desired layout.
04:03These have been updated from previous versions of FileMaker and these are some
04:08of the older ones that FileMaker had, which aren't quite as desirable. So let's
04:11pick Breeze and then we will hit Finish.
04:14Now you would see that it navigates you to the layout that you have created and
04:19you will also see that the new layout that you have created is now available
04:22on the dropdown menu and if you have chosen to see that in the Layouts menu in
04:27Browse mode, you will also see it here.
04:32Let's go back in the Layout mode and create a List View. New Layout/Report and
04:37we will rename it, choose List, hit Next and as you will see when we cover
04:43creating sub summary reports, you can also use a Layout Assistant to create a
04:47sub summary report or a report with grouped data.
04:50In this case, we will choose Columnar List Report and you will hit Next and
04:55again choose the field that you want to have show up. Hit Next again, and in
05:03the case of a List View when the user navigates over to this view, they may
05:07want a default sort order. So I can pick Country and it will then sort these
05:14values in the List View based on country.
05:17You can find more information on sorting in the movies on sorting records,
05:22and the next option is to pick a theme. We will choose Earth, in this case. This is
05:28information that can appear inside either your header or your footer and these
05:31are totally optional but sometimes desirable when creating a layout.
05:35You see here that they can appear either in the top left, top right, or in the
05:38center, and the same goes for the bottom and you can choose either to insert
05:42the page number, the current date, layout name, custom tags, small custom tags,
05:47or even a logo, if you would like to.
05:49Here we will pick the current date and at the bottom right, we will do the page
05:54number. Now we hit Next and the reason it asks us if we wanted to choose a
05:58sort value so you could save that inside of a script. You could learn more
06:02information about scripting in the movies on creating scripts in FileMaker.
06:07Here without even having to know how to create a script, FileMaker will create
06:10one on your behalf and allow the user to navigate to the layout you have just
06:13created and apply the sort order.
06:17But here we will say do not create script, which then gives us the option to
06:21view this either Browse mode or Layout mode. Let's say Layout mode and we hit
06:26Finish and now we can see that the current date is actually just represented in
06:32layout mode is a slash slash, so you could add some of these
06:36manually to your report that you created on your own.
06:39And the same is true for page number which is just number sign, number sign. So
06:43now a couple of things to know, you will see here that the new report has been
06:48added to the Adventure list and you see the table that it's based off of.
06:52You can also see the names of the fields and you can either revert to the
06:56changes that you just made-- in this case, I have resized that page layout--
06:59or save them. And once I have saved them, I can Exit Layout which will take me back
07:03to Browse mode and at this point I can see all my records and today's date
07:08and then page numbers and you will notice that we have a question mark under
07:11the page numbers. And that's because in Browse mode, it doesn't yet know how
07:14many pages it will actually create when we print it.
07:17So what you can do is go into Preview mode or select the Preview button.
07:22The Preview button will allow you to see what your pages will look like when they
07:25are printed and also will allow you to generate page numbers. So creating
07:30layouts for your FileMaker data is the way that you will allow users to be able
07:34to be interface with the data that's been stored in the database. One of the
07:37easiest ways to do that is by using the Layout Assistant.
Collapse this transcript
8. Working with Layouts
The Layout Setup dialog
00:01Once layouts are created, you have various ways to configure them. In this
00:04movie, we are going to discuss the different options available for configuring
00:07layouts. First, you will need to get into Layout mode. You go under the View
00:11menu and choose Layout Mode or you can use your quick key option. Here you see
00:15its Command+L; on Windows it's Ctrl+L.
00:17Once you are in Layout mode, you can then access the Layout Setup dialog, which
00:23we will be discussing in this movie. You go under the Layout Option and select
00:28Layout Setup; you will see this dialog appear on screen. Also you should note
00:34that next to the Layout list, you see a little pencil icon and when you select
00:39on that, you also get the Layout Setup dialog.
00:43So either one of those two areas will get you to this dialog. The dialog is
00:47made up of four different tabs and on the first tab, the default tab, you see
00:50it's called General. This is where you can change the name of the layout if you
00:55want to and this is the layout name that will appear in the layout list.
00:58You can also toggle between including or not including this layout in the list
01:02of layouts and also you can choose to change the table that the layout is based
01:08off of, and by default each layout is set to save the record changes
01:12automatically. If you want users to be prompted with a message when they try to
01:16make changes inside the fields, then you can uncheck this option to allow that to appear.
01:21Show field frames and records are active will allow users to see what field
01:25that are currently editing by highlighting the borders of that field. And then
01:29you see you have menu Sets and these would be probably set to default.
01:33The next tab is the Views tab. Each layout that you create can be seen in up to
01:38three different views. The layout that we are looking at here has only the Form
01:42View selected and that means we go in back in the Browse mode and save those
01:48changes, you will notice under the View menu, not only can you toggle between
01:52the different modes but also you can toggle between the different ways to view a layout.
01:56But you see in this layout, we have only got View as a Form checked, so if we
02:00go back in the Layout mode and go into Views, if we choose List View and Table
02:07View which we will get back to in a second and hit OK, we can then save these
02:12changes. And now when we go under the View menu, you see that we can view this
02:16either as a form, which is one record at a time, or a list, which is the same layout,
02:21but now you see that it's giving us multiple records. Not necessarily desirable
02:25when you creating this detailed view type layout. Or a table, which is really
02:30meant for administering the data on layout but it gives you the ability to look
02:33at things in a spreadsheet type view.
02:36Back to Layout mode, however, and you will notice under Views you can see you
02:40can toggle these on or off. By default they're all going to be turned on. So
02:44you will have to come in here and remove this setting, if you only want to be
02:47viewing a certain area and it's good practice to have detailed views, one
02:52record at a time, only viewable in Form View. And then the multiple record
02:56views only available in List View to avoid confusion from the users.
03:00The Table View or the spreadsheet type view has a properties button next to it.
03:04When you select the Properties button, you see that there is different options
03:06for how you can choose your grids. So we can view our data both horizontally
03:11and vertically and if we wanted to we can come up with different styles here,
03:15but generally most people keep this at default.
03:18And by default, having a header part, which you see here, there is a header or a
03:22footer, which is what's on the bottom, are not included in a Table View.
03:27Sometimes you may want to put some information in the header, in addition to
03:30the header that's already included and in that case, you would select the
03:33include header part and you can do the same for footer.
03:36There are some functions here that are available when you are in the Table View
03:40that allow you to resize columns, reorder columns, and sort data when selecting them
03:44and if we take a look at those, when in Browse mode, we will go view as a table
03:49and you will see that when turned-on, it allows the user to resize the columns,
03:54they can click on any one of the columns to sort it appropriately and you can
03:58even click down and drag over to reorder the columns.
04:04This can also be accessed when you are in Browse mode by hitting the Modify
04:07button and then you can move these around in different orders however you
04:12desire. And in this case, you can even add new fields onto the Table View that
04:17will not actually show up in Layout mode but will just be in the view itself.
04:21I'll go back into Layout mode, hit the Layout Setup dialog. The next tab you
04:29will see involves printing. By default, you will have fixed page margins which
04:33have no value selected and if you have custom page margins for printing,
04:39you can insert those here.
04:41Also if you have a Label layout, this will be active so you can either wrap
04:47your multiple layouts across first or down first. And this is where you can
04:51toggle in between those two options.
04:53In the last tab, Script Triggers, will be covered in the Script Triggers chapter
04:58later in this title. So if you are interested in more information on these
05:01options, please go take a look at the videos in the Script Triggers chapter.
05:07So each layout that you create has several different options, all of which that
05:11can be configured using the Layouts Setup dialog.
Collapse this transcript
Layout parts overview
00:00When you are working with layouts in FileMaker, you'll notice that they are
00:04divided up into several different parts. For example, if we go into View to
00:08Layout Mode, you'll notice on the left- hand edge that there are two parts here:
00:13one of them is the Header part and one of them is the Body part.
00:16In this movie, I am going to describe the different roles of these parts and
00:19how you can manipulate the parts that are currently on your layout.
00:22First of all, you should know that each layout must have at least one part. And
00:26layout parts can contain fields, portals, buttons, text and any other layout
00:31object. The dotted horizontal lines that you see here mark the division between
00:36layout parts and the part label appears at the left end of the divide line.
00:41Also you notice how this is a vertical part name instead of a horizontal. You
00:47can toggle those on the bottom left- hand corner of the screen down on this
00:50button and you'll notice then that you can read them across Header and Body.
00:56Lot of developers like to get those out of the way by toggling them on the
00:59left-hand side, unless they are actually working on the layout.
01:01Layout parts are broken into two groups : Non-summary parts and Summary parts.
01:07Let's take a look at the Non-summary parts. First you should know that under
01:11the Layout menu you can go to Part Setup. If you select Part Setup, you'll see
01:17the different parts that are currently available on your layout. If you hit
01:21Create you can see how you can add those parts and looking at the Part
01:25Definition dialog, we'll go through each and I'll provide you a definition of their role.
01:30The Title Header that you see selected here appears only ones at the top of the
01:34very first screen or page and replaces the normal header only on that page. So
01:40if you have a Title Header specified on your printout, you'll only see that
01:43header on the first page and not any of the other pages. You can have only one
01:47Title Header in a layout.
01:49And one thing about the Title Header is if you put any fields in the Title
01:52Header, you should know that they will only preview and print data from the
01:55very first record in your found sets. So you really don't want to put any kind
01:59of data on there because it will be hard for you to know which record it's
02:02pulling from each time that the report is generated. So generally in the Title
02:05Header you are putting things like name of the report, maybe a logo, or some
02:09graphics, or even a title page if you make it large enough.
02:12Conversely, the Header which you see we've already got on the screen so that
02:15it's grayed out in Part Definition dialog, it will appear on the top of every
02:20screen or page, unless of course you get the Title Header which supersedes the
02:23header on the very first page.
02:26You use this for titles, for common headings, for example, on a column or
02:30report, you might put the column names here and you can only have one header in
02:34a layout as well. That's why you see it grayed out.
02:37Just like with a Title Header if you put any fields in the header, when you
02:41preview and print them it will only show the data from the first record on that
02:44page. And on the very bottom you see that we've got a footer, which acts just
02:49like the header except these appear on the bottom of the page.
02:53Then the same is true for the Title Footer which bit acts just like the Title
02:57Header, excepted only appears ones at the bottom of the first screen or page
03:02and replaces the normal footer as specified.
03:04You can have only one Title Footer on the layout and just like with the
03:07headers, if you put any fields in the Title Footer when you preview or print
03:11them, it will only show data from the last record on the first page. That
03:15leaves you with the Body. You can only have one body part inside of your
03:18layouts and each object that you put in the body including fields, or text
03:23objects, and graphics will appear ones for every record in the found set.
03:27So if you create a body that's of this size and you are looking at in list view
03:31it will repeat this entire size probably many times you have records in the
03:35database. Generally body parts that are this large are made just for detail
03:39views. If you are creating a list view, for example, on Adventure:lists, you
03:45will notice that the body part is smaller because when viewed in Browse mode it
03:51repeats for every record that is in the found set.
03:54Back in to the Layout mode and the Part Setup, there are also Summary parts,
03:59which we'll be discussing in the report section. Those generally facilitate
04:04group reports or sub-summary reports.
04:06There are different ways to add parts to your layout. For example, we've looked
04:10at hitting the Create buttons so the Part Definition dialog pops up, and you
04:14can select the different options and then hit OK and they will be added to this
04:18list, or you can go up to the Status toolbar and you'll notice about right here
04:25called the Part tool. And if you click on it and drag it you'll notice that it
04:29will plays a part at the desired location and then prompt you to choose what
04:33type of part that you like.
04:35You can also change the arrangement of the parts, as you see here the Header
04:41and the Footer are locked at the top and the bottom, respectively but if you
04:44have other items inside you can just roll over them, click down and move them
04:48up or down to change the ordering which the parts are listed.
04:51Having and understanding of the different parts that are available to you will
04:53help you when you are planning and creating your different layouts.
Collapse this transcript
Exploring the layout tools and Status toolbar in Layout mode
00:00Ones you have created layouts in your database, you can edit a layout by
00:04working with the objects on a layout, by positioning or arranging them or even
00:07resizing them and making other changes to their appearance.
00:09You'll do so in Layout mode and with the use of the tools that you'll find in the
00:14toolbar. So if we go into Layout mode by going to View > Layout Mode, you'll
00:19notice that the tools in the toolbar or all the icons will change when you are in
00:23Layout mode. I like to tell you what each one of these do, so that you know
00:26what tools that you have available to you.
00:28First you'll see that by default, you have the Selection tool active. That
00:33allows you to select different items on your layout and you can see that an
00:38item is selected because it gets the four corners around it, the four blocks
00:42around each corner. And once selected you can move these and resize them and
00:47reposition them through out your layout.
00:50Next, you see that you've got this T, which is actually your Text Drawing tool,
00:55so when you click down on the layout, you can see that you can add text that
01:01isn't connected with the field for example.
01:03And these next four items are Drawing tools. You see here that you've got a
01:07Line Drawing tool, a Rectangle Drawing tool, a Rounded Rectangle Drawing tool
01:15or even an Oval. And you can these in conjunction with the fields and colors
01:20and different layout objects to create your desired design for your FileMaker layout.
01:26Next you'll also see that there are a series of five different buttons that
01:29allow you to add new layout objects to your layout. The first is the Field
01:34Control tool, which we'll be covering in a later movie. This is the Button tool,
01:39which allows you to create a button that you can assign with the script.
01:42We'll cover that in the scripting movie.
01:44The Tab Control allows you to add a tab control which is with this is right
01:48here. We'll cover that in the tab control film, and also the ability to add
01:53Portals and Web Viewers, both of which will be cover in their own movie.
01:57Also you can add a new field to a layout by clicking on the Field tool dragging
02:02and then releasing on to the layout and it will pop up and allow you to pick
02:05the table and then the field that you want to add.
02:08The same is true, if you happen to choose the Part tool. One thing that you
02:12should be aware of is the Format Painter, which is this paintbrush here. If you
02:16want to apply the same types of formats like coloring or fonts or font size for
02:21example, you can select an item that has the format assigned to it. Click on
02:25the Format Painter and then click on the next layout element that you want to
02:30apply that format. As you see here, I have applied that to the Yes, No field.
02:35I can then undo that formatting if I don't want that to be committed to the layout.
02:40The couple of tips when you are in Layout mode using some of these tools. If you
02:44want to select multiple objects at one time, you can drag select. Right now I am
02:49holding down my mouse key and then dragging and then now releasing, and you see
02:54that it's allowed me to group all of these together as one selection.
02:59Also if I select a field and while holding down the Control key on Windows or
03:05the Option key on Mac and while holding down those keys, I drag and it will
03:09create a copy, applying the same formatting into the field but allowing me to
03:13choose a different field. And also Shift +Dragging. If I hold down the Shift key
03:19on Windows or the Option+Shift on Mac, it will constrain an object to move on a
03:24horizontal or vertical axis in relation to its starting position.
03:28On the Windows platform, Shift+Ctrl+ Dragging will both constrain and duplicate,
03:33and on the Macintosh you would Option +Shift+Drag for the same operation.
03:38Last, you can find the size of the different objects. If you see here you have
03:41this palette that's floating over here, which is called the Object Size
03:45palette. You can also go under View, to Object Info to get this palette to appear.
03:52You'll notice that all these are set to zero until I select an object on
03:56screen. This will allow me to size everything at the exact same size if that's
04:00what I am desiring to do, or allows me to figure out what the width of
04:05something would be or the height of the something or its location based on the
04:09left edge, the top edge, or the bottom edge of the screen.
04:13You'll also notice that I can toggle between pixels or inches or centimeters,
04:18although pixels seems to be the most desired unit of measure when working with
04:22FileMaker layouts.
04:23These are the most useful tips when you are working in Layout mode, getting
04:27familiar with them will allow you more flexibility when fine-tuning the
04:30layouts that you have created in your FileMaker database.
Collapse this transcript
Arranging and aligning layout options
00:00In Layout mode you can group any combination of objects so you can edit or move
00:04them together, or change the stacking order of objects to get different effects
00:08when the objects overlap. You can even rotate or align things or resize them
00:12accordingly. All of this happens when you are in Layout mode. If you go to View
00:17> Layout Mode, take a look at some of the options that you have here in your
00:21Layout bar. First of all on the Layout bar, you can see the Customer Detail
00:25happens to be the active layout and if I click on this I can see all the
00:28different layouts that are available to me.
00:30I can get to the Layout Setup dialog and see the table that this is based off
00:34of, and either revert or save any of the changes that I am working on. But if
00:37you look over here, you will notice that we've got two buttons here, one that's
00:40called the Arrange Palette and one that's called the Align Palette.
00:44If we take a look at the Arrange Palette first, you see that a palette pops up
00:48on screen, and by the way you could drag this to the top of your screen and
00:52have this here permanently if you'd like, or if you want to save the real
00:55estate you can have this just floating around or you can reposition it as you
00:59desire. But what this will do is allow you to pick certain items.
01:03If you look here, this Show All button is actually several different items that
01:08are all -- what's called grouped together. Now you will notice here, these two
01:12buttons, I have got one for Ungroup and one for Group. Group is grayed out,
01:15because this is already grouped together. But if I select Ungroup, you notice
01:19now because you see that there are different selected corners on here, they
01:23have doubled in this case. That means that this icon is now independent from
01:28the text, but when designing a layout, sometimes you say okay, I've got these
01:32in a position where I want them. I don't want them to ever be separated from
01:35each other by either drag- selecting or holding down the Shift key and
01:39selecting multiple items and then choosing Group. Now you can move them around
01:44as one piece. This is a pretty common layout technique.
01:49Also, once you've got something into a position and you want to keep it that
01:53way, you can select the Lock option. When selected, you will able to see when
01:58something is locked, because you will see that the four corners are grayed out.
02:03This means that you have selected it but there isn't anything that you can do
02:05to move it around or make any changes until you unlock that layout piece.
02:09It's a good idea to sometimes lock some of these things in place, so that if
02:14you accidentally run across while making other changes you don't affect your
02:17original layout.
02:18Also, if you have got multiple items layered on top of each other, you are
02:21going to want to have some control. So sometimes when you have more than one
02:25object layered on top of each other, you want to control, which of those
02:28objects is in the forefront. You see here that we have got, Bring to Front,
02:33Bring Forward, Send to Back and Send Backward.
02:35Here I have got a layout object which is a rectangle and on top of it I've got
02:41the Show All button, and if I select the Show All button and say Send to Back,
02:46you see that it's still selected but it's now behind the gray bar which of
02:49course isn't the desired effect in this case. So I can select the Bring to
02:54Front button, which will then layer this on top.
02:56So this controls the back and forward of each one of the layers and it allows
03:00you to either send something all the way to the back or step it through the
03:04different layers depending on how many that you've got.
03:06Also, you can move layout objects around on screen, if you'd like by selecting
03:10one and hitting the Rotate. This is sometimes common if you want to have a
03:16Columnar Report and you want to have your field labels show up vertically
03:19rather than horizontally, or if for some reason you want to have something show
03:23up completely upside down or 180 degrees.
03:26Now you will notice also that we have got a bunch of fields on screen here, but
03:30they are not lined up properly and you could go into each one of them and use
03:35your object info to try to align them up properly by using your Up and Down
03:38arrows or your Left and Right arrows to position it the perfect pixel location,
03:43or you could select your Align Palette which again can be used as a permanent
03:47toolbar or you can reposition it in a floating palette and this will allow you
03:52a bunch of different options.
03:53So for example here, let's say we want to align these two up, I can either
03:56align Left Edges, the Centers, the Right Edges, Top Edges, Vertical Centers or
04:01Bottom Edges. And by the way all of these options that appear on these palettes
04:05can also appear under the Arrange. And you see here under Align, if I say
04:10Bottom Edges, it automatically aligns up the Bottom Edges of these two fields.
04:15So now I want to line-up the rest of these, and a good idea when you are
04:18aligning up multiple fields is to pick one of them to be an anchor. In this
04:22case, I will pick the Anchor as the first name field and I will go under
04:25Arrange to lock. That way this position won't move, but then as I either
04:29drag-select or hold down the Shift key and do multiple selections, I can now go
04:35and line-up all of the Left Edges and you see they all fit toward the Anchor
04:39location as its furthest left edge.
04:42In addition to that you will notice a couple of these fields like for example,
04:45this one here looks a little bit taller than the rest of them. If I want to
04:49make those uniform, I can select on the one that I want to copy and I can say
04:54over here it tells me from the very top to the bottom edge its 23 pixels. I can
04:58then select this one, select it and type 23 and hit Enter, and you see that it
05:03has given it a uniform height.
05:05Also you can control the spaces in between. If you don't want to have to
05:09measure all the spaces in between but you want them to be distributed evenly,
05:13you can again drag-select or Shift- select all these options and then go to
05:18either the Distribute Horizontally or Distribute Vertically option. I select
05:23that and you see that it adjusted the Home City and I can do the same
05:27horizontally as well, and it will distribute the space in between each one of
05:31these. And when I have a group of these selected, I can also use my up arrows
05:36to position them manually if I so desire.
05:38So getting familiar with some of these tools is going to help you when you want
05:42to fine-tune the layouts that you have created in your FileMaker database.
Collapse this transcript
Managing layouts
00:01When you are in Layout mode in a FileMaker database and you get there by going
00:05to View > Layout Mode, you will notice that on the Layout toolbar, when you
00:10click on it you see that there are several different layouts. If you have many
00:13different layouts you see them all in a specific order, and you will notice
00:17also when you go into Browse mode that some of those layouts can be seen in
00:21Browse mode and some of them cannot.
00:24In order to be able to manage that you will need to go into the Manage Layouts
00:28window. There are few different ways to get to the Manage Layouts window and
00:32most of these are new inside FileMaker 10.
00:35The first way is to go under the File menu, choose Manage and then Layouts, or
00:41you now see it as the very first option in your Layout list under Manage
00:46Layouts, and then also if you have the icon in your toolbar for manage,
00:50clicking on it will take you to the Manage Layouts option, and then presents
00:54you with this window.
00:55The window allows you to change the order in which the layouts are displayed as
01:01you see here by clicking down and holding it, and also I can check or uncheck
01:05whether or not this will be viewed in Browse mode.
01:08So for example, we have the Adventure Detail now visible in Browse mode, and if
01:13we double-check that we will see Adventure Detail, and now I will go into
01:19Layout mode and hit Manage Layouts and uncheck that box and hit OK. Go back
01:26into Browse mode and now we see that we cannot get to that.
01:30So sometimes you may create layouts that are just report layouts or generally
01:34layouts that you will navigate users to via a script or some kind of stored
01:37routine. So in those cases you might want to hide them in Browse mode, and you
01:42will do so by using the Manage Layouts dialog window.
01:47You will also notice that you can click on a layout and hit Layout Setup, which
01:50will navigate you to all the different layout setup options. So all of these
01:53things can be accomplished through the Manage Layouts window.
Collapse this transcript
9. Formatting Layout Objects
Formatting text
00:00When designing layouts in FileMaker sometimes you might want to manipulate text
00:04that you've placed on a layout. I am going to introduce you to a couple of
00:06tools that will allow you to do so.
00:08Navigate to the TPS Report layout and go into Layout mode. You see here that
00:15we've got a piece of text that's in the center of the layout. I will introduce
00:18you to a couple of tools that will let you manipulate the size, color, font, and so on.
00:22So when you have the text selected, you can go to Format and then under the
00:26Format menu choose Text. This will allow you to manipulate the font, the size,
00:32the color, and even the style of the text that you have on screen.
00:36So for example, let's say in this case we want to make this a Bold, 24 point,
00:43Red font, and I will hit OK and you see that it's made that change.
00:49Additionally, you can go into the Format menu and individually choose the Font,
00:53the Size or the Style. You also have options in here for aligning text. In this
00:57case, let's center it a bit, and you can also do Orientation or you choose your
01:02color independently as well.
01:05There are different ways to place text on a layout. For example, here what I
01:08have done is I have just typed a piece of text into the title header so it
01:12shows up as the opening page of a list view report. I did so by clicking on the
01:17Text tool and simply clicking into the area where I want the text to appear and
01:22typing the text. I will hit the Delete key to delete that when it's selected.
01:26I can also place other types of text on screen. If I choose the Field tool and
01:32select the Create label option. After choosing a field you will see that the
01:36label appears as text that I can then go and manipulate. Drag-select those and
01:42delete them.
01:44Also you will see that there are other types of text, Current Date, Current
01:47Time, User Name, those all appear as text on your layout as well. And lastly,
01:52you can actually insert a field that appears as text. So if you select Merge
01:57Field and choose one of your field options, you will see it comes over as text
02:03that you can then manipulate using the regular text tools. But it will actually
02:09show the value of the field when you are in Browse mode. So if we take a look
02:13at Browse mode, you see that that turns out to be a field value as we go
02:21through each one of the records in the database.
02:23So back in Layout mode. Even though, this is text it can still be treated as an
02:27object. So for example, objects can have Fill Color applied to them, and you
02:32will note if you select this and right- click, you will see that you can apply
02:36Fill Color or a Pattern, different effects, Pen Color, Pen Pattern and Pen
02:44Width. And just like we talked about with fields, when you have a text object
02:49on screen you can select other text objects and for example, lock it. Go down
02:57here and Shift+Select today's date and go under Arrange and Align > Centers.
03:05So when text is placed on a layout it can be treated just like its own object.
03:09So sometimes when you are working with your layouts, you might have text
03:12independent from the data contained within fields and the tools that we have
03:16just discussed will help you format those appropriate to the layout design.
Collapse this transcript
Placing and formatting objects and graphics
00:00In addition to layout objects, texts and fields you can also add images not
00:04contained within container fields to your layout. Navigate to the TPS Report
00:08layout. If you go into Layout mode you will see that we have some text with the
00:14formatted fill color and that's in the title header, and then the body, you see
00:19we've got some fields and some text in the footer as well.
00:23When you view this in Browse mode, it will give you a cover letter and then in
00:30Preview mode you can see how it will print. You've got cover letter on the
00:33front page and a list of context on the subsequent pages.
00:37Let's say we want to add a logo to this layout. We will go back into Layout
00:41mode and I will go to Insert and we will say Picture, and we will navigate to
00:4709_02 and pick the LuckyLogo and you see by simply placing it on the layout.
00:57And then now going back into Browse mode after saving the layout, you see now
01:01that our front page now contains that graphic image as well.
01:06Back into Layout mode you see that we have some functionality here to control
01:09how the graphic is displayed. First, if we delete this you will notice that if
01:14you insert a picture you can also store only a reference to the file. Now
01:19that's only advised if the image that you are starting to reference to in the
01:22file itself are going to always live in the same location, but if you are going
01:25to be hosting this in a shared environment this is probably not going to work for you.
01:28Keep in mind though that you should always use caution when working with images
01:32on FileMaker layouts, and the reason is because of file size. If you have a
01:35FileMaker file that's let's say 1 megabyte in size and you place a 1 megabyte
01:40image on one of the layouts, you now have a FileMaker file that's 2 megabytes
01:44in size. So you can mitigate that by storing as a reference, but if it's a
01:47shared file, you won't have the opportunity to do so. So then you might just
01:51want to format the file down to a resolution that's more reasonable.
01:55Once you have an image on your layout, notice that you can go under Format to
02:00Graphic and you can control how it actually fits within the frame. So for
02:07example, you see that I have got a text frame that is now twice the width of
02:12the image, and going under Format to Graphic allows me to either maintain the
02:17original proportions, align to Center, align to Center and so on. But in this
02:23case, we will do Undo Formatting to keep it in its original look and feel.
02:27Once you have an image on a layout, it just acts like any other object. So if
02:30you want to align it with the text objects, you can hold down your Shift key,
02:37select both of them, and I can use my Align tool to align the centers, and just
02:44like any other object you see I can align it appropriately with other objects
02:47on screen. I can also control the size. For example, here I can type-in 150 and
02:54hit Enter, and I can increase the height of the image size if I so desire.
02:58There are other ways besides going into Insert that you can place images on
03:02layout. You can simply copy and paste, copy the image from another application
03:07and paste it on to your FileMaker layout, and if your OS supports it, you can
03:12drag images from other applications like browsers right on to your FileMaker
03:16layout. You just need to be in Layout mode.
03:19So if you find yourself working with objects and graphics, use the tools that I
03:22have just described to get the desired look and feel on your layouts.
Collapse this transcript
Formatting fields and applying field attributes
00:00When you place fields on a layout you don't have to settle for just their
00:03flat, plain look and feel. You can use some of the Field Attribute tools to give
00:07them a different, more professional look. Navigate over to the Trip Detail
00:10layout. In Layout mode you will see the different fields that we have got on
00:14this layout. If you select one of the fields and go up into your Layout bar and
00:20select this button here with the two A's it will reveal the Formatting bar. And
00:25here you have got a couple of different options. For example you can control
00:28the color of the line of the border of the field. So in this case you see that
00:33it's selected as blue, but if we give it a black you will see it will match the
00:38rest of the them or I can click any other colors that I would like, just to
00:42give it a highlight if necessary.
00:43Also I can control the thickness of the line depending on what it is that you
00:47are trying to accomplish, but we will go back to a hairline or either one point
00:54and remove the color and just make it black. Also, you can fill in the
00:58background of the field with a color. If I click on the Fill button I can
01:04choose a color and give it a little bit of a hue, let's say we do this and
01:11sometimes you can highlight different fields that require data entry or that
01:14type of thing by using a fill and lastly, there is an effect that you can use.
01:18If you select a field, go under Effect, you can go to add a drop shadow and
01:24that gives a little effect that you can see when you are going into Browse
01:27mode. I am just going to Browse mode and save the layout and you can kind of
01:30see here that we have got a bit of a fill color, you can probably see it better
01:34if we remove the fill and increase the line. Now you can see a bit of the Drop
01:42Shadow effect or you can do what's called an Embossed, which makes it look like
01:54it's risen up from the rest of the background. O back in Layout mode you can
01:58select this and you can do an Engrave, which gives it the opposite effect,
02:02sort of a sunken effect.
02:05And if you come up with a group of attributes that you would like to apply to
02:11the field you can apply them to the rest of the fields in your layout by either
02:15doing one of two things. You can select all of the different fields like I am
02:20doing here and go and choose one of these attributes. Of course, you would have
02:24to do those one at a time or you can select this item and go to your Format
02:29Painter and you can then select the Format Painter to apply these to the rest
02:35of the fields on your layout if you like. If you double click on the Format
02:38Painter you see that it will allow you to click multiple fields and you can
02:42apply the same format to each.
02:47Some fields do not have field borders and you can control that by first
02:51unlocking your Format Painter, clicking on the Select tool and selecting a
02:56field and right-clicking and going to Field Control > Borders. This is where you
03:01can determine whether or not you are going to have a Top, Left, Bottom, Right,
03:06whatever combination that you would like and then you can apply those or remove
03:11those on the field using the right- clicking and going to the Field Borders.
03:16Another option that you have is having a different color of the field fill from
03:20the background and we looked at that when I went in here and I selected that
03:23color but also what you can do-- one trick to make sure that your fill color
03:28exactly matches the background color is selecting one of these fields and then
03:32you will see here that you have got next to the Fill, you have also got a Fill
03:35Pattern. Now I will be honest with you and tell you that you are probably never
03:38ever going to use any of these fill patterns. As a matter of fact, you won't.
03:43And what you do notice here is you have got two that are in the upper left hand
03:46corner of this grid. The first of which indicates that you are going to have a
03:50different color than the foreground color and so that means that you are going
03:54to have a contrasting background versus fill color. But if you select this
03:58option to the left, you see what it does is it makes the fill color of the
04:01field transparent. So if you want to just have your fields match the background
04:06color you can Shift+Select all those and go into Fill and hit Transparent if
04:12you like. Sometimes that might be the effect that you are looking for.
04:16So in addition to the way that a field looks when you are in Layout mode you
04:20can control the way that the data within the field is formatted. So for example
04:24if you choose one of these fields down here that are number fields, Days and
04:29Nights, I will Shift+Click and select both of those. I will go under the Format
04:34and choose Number. This will bring up the number format for selected objects.
04:39And when you going for a number you have a couple of options at your disposal.
04:42For example you can just leave the data formatted as entered or you can choose
04:47a decimal and this is where you can control how many decimal places.
04:50So for example if you have data that is coming in, let's say it looks like this
04:55right here, I could go on and do a fix number of decimal digits and it will
04:59round it for you. And also if it happens to be dollars in Currency or any
05:03currency for matter you can choose Use notation, Currency and then you can do
05:08Trailing/Outside or even a percent if you would like to. Both of those are
05:12options for displaying this on your layout. You can also decide not to display it
05:17if the number is 0 or to have it show up as red if it's below 0 and of
05:24course, black if it is above 0. And lastly, if you anticipate having thousands
05:28you can use the thousands separator by just choosing Use thousands separator.
05:33Now you should be aware that this will only apply for this field on this
05:37layout. This will have no effect on this same field on any other layouts.
05:41If you want to actually change the data that's inside the field no matter where it
05:45appears in your FileMaker solution then what you will have to do is use Text
05:48Formatting functions. You can find out more information about that in the
05:52Calculation chapter. Just like there are options for Number fields you can
05:58choose a Date field and go under Format, you see now that Number is grayed out
06:02because it recognized the field type, and in Date it's got its own values.
06:06Now just like with numbers, in the case of dates this isn't actually changing
06:10the data inside the field. It's just changing the way that it views on this
06:14layout. So let's first look at how this data shows up in Browse mode. So
06:207/11/2006. If we go back in the Layout mode, select that field, let's say we
06:30change it to the format that shows the day of the week as well and hit OK,
06:35View, save, you see now that these are a little bit different. Here is
06:40that data that's actually entered into the field, but you see if we had enough
06:43room, of course, that the data would show up in a different format.
06:48So you have got a couple of different formats that you can choose from there.
06:53Even though FileMaker stores data in specific ways internally you can use the
06:57Field Attribute tools to control how users view the data.
Collapse this transcript
Setting field behaviors
00:00Sometimes when you place a field on a FileMaker layout, it's really just there
00:04for display rather than to allow users to edit the data within the field. A
00:08good example of this would be the ID for any given record in your database. Lot
00:13of times this is not something that you want the users to be modifying, but you
00:17do want to have it on screen for reference. But as you see here, when I place
00:20the filed on screen, by default, it allows the user to click inside and make
00:25any modifications that they like to.
00:27If you want to control the way that the users interact with the data in your
00:30field or not, you can do that through field behaviors. What you see here is we
00:35have some fields that we want users to interact with and some that we don't all
00:38on the same layout. We go into Layout mode and select the field and either got
00:45to Format > Field/Control > Behavior or right click on the field, Field/Control
00:51> Behavior. This dialog window pops up for you.
00:54Here simply put, you can choose whether or not you want to see this field in
00:58Browse mode or in Find mode or neither or both. Why would you want to have
01:04something in Browse mode but not find? Well, if you don't want the user to
01:07modify the value, then don't allow them to see it in Browse mode. If you want
01:11them to be able to search on that value when in Find mode adding criteria for
01:15search, but not modifying the actual data and any records, then allow them
01:19access in Find mode.
01:21By default, each field that's placed on the layout is accessible on both Browse
01:25and Find mode, but as you'll see here, when we uncheck the Browse box, hit OK,
01:30go on to Browse mode, save our changes. Now as I click, you see that I cannot
01:37click into this field, but when I go on to Find mode I can enter criteria.
01:44There is also a couple of other things you can control under the Field
01:50Behaviors dialog. If we go back into Layout mode, we'll just take a quick look at those.
01:54Right click on the ID field, go to Field/Control > Behavior and you will see
01:59that you can apply visual spell checking. If you do not want to have visual
02:04spell checking in a field, then you would check this box, but if you do want to
02:07allow visual spell checking, you might want to leave it unchecked.
02:11Visual spell checking is something where, when you are in Browse mode, users
02:16can see these little dotted lines underneath some of the words. Sometimes
02:20that's useful during data entry to allow users to correct the values that they
02:23have put inside of a field. Here you can just right click on one of the
02:27underlined areas and see Suggested Spellings. When you are in Layout mode, you
02:33can right click on a field and turn that off if you would like to.
02:38The final item that you see here is Go to next object using and then either the
02:43Tab key, Return key or Enter Key. What that does is it controls how users are
02:48tabbing through each field on the layout. You will see in an upcoming movie
02:52where we can set the Tab Order for the fields on a layout and by default, what
02:56allows users on their keyboard to tab from field to field is the Tab key. But
03:00you can have one certain field on your layout or several of them, Tab using a
03:05different key, or all three of these keys.
03:07One thing you should keep in mind however is that, pressing the Enter key will
03:10commit the changes in a field, so if you turn this Enter key on, it is not
03:15going to commit the changes in the field, but instead skip on to the next field
03:18that's not yet committing the record. If that's the effect that you are going
03:22for, this is one of the ways that you can control that.
03:24Many fields on your FileMaker layouts will have their own independent usage
03:27roles and working with the Field Behavior dialog will allow you to control those.
Collapse this transcript
Using auto-complete
00:00If you or your users are familiar with using Web Browsers, you might be
00:04familiar with the feature of typing ahead. So for example if you click into the
00:08Country field in the Lucky_You_Tours 09_05 file under the Adventure Detail
00:12layout and delete the data, type in the letter G and you will see what happens
00:19here is that the rest of the word, reenland, types ahead for you. That way you
00:24can just tab outside the field and it will automatically pull in an existing value.
00:29This feature in FileMaker is called using Auto-complete on a field. Now, I am
00:33going to show you how to do that in this video. If you go onto Layout mode, you
00:38can pick a field on the layout that is eligible for Auto-complete. Now it's
00:42important to know what types of fields are eligible for Auto-complete.
00:45First it has to be a Text field and you have to be able to index it and if you
00:49want to learn more about the rules of indexing, you can see the video on
00:52indexing. But mainly it has to be its own text field and not be a calculation
00:57that contains related or global values. Once you've identified an eligible
01:01field like County, you can select that field and go to Format > Field Control
01:07setup and you can also get to there through right-clicking on the field and you
01:12can check the Auto-complete using Previously Entered Values option. It's just a
01:16simple check-box in this case and when it's not selected and users try to
01:20navigate into the field, you can see in a New record, it will just allow me to
01:27types as normal.
01:29However, if I turn that back on, now what it's actually doing is typing ahead.
01:41Now here you see that we've got a field, we've got an option for UN and United
01:45States. What it's doing is it's finding all of the different values within that
01:49field's index and presenting you matches based on the couple of characters that
01:54you've already typed in. Those values are coming from the field's index, which
01:57you can take a look at by clicking into the field and doing either Ctrl+I or
02:01Apple+I. What you see here is if I type in or for example if I go in here and I
02:08type in just the letter I, you see what it does is it finds the matches that
02:13have the same starting letter that I have already typed in. It's not exactly a
02:17dropdown list, but it's just a matching values options list.
02:21So I can choose anyone of these and it will automatically add that value to the
02:24field, commit the record and then tab me over into the field that follows it.
02:29You can also do this in combination with a dropdown box. We'll talk more about
02:34dropdown boxes when we talk about value list. If you right-click on the Country
02:38field in Layout mode and go to Setup, you will see that Auto-complete can be
02:43used in conjunction with this dropdown list which in this case looks similar
02:52but as you see when you have a dropdown list applied, it will show all the
02:55values in the field's index from your value list.
02:58However if you apply both the drop down and the Auto-complete, you see you will
03:07get both functionality applied to the same field. So here I can choose from one
03:11of the available options or I can bypass that and type in I. I can get a
03:17listing of all the different fields that all start with the letter I or
03:20whatever value it is that I am typing in. for example here I could bypass
03:24dropdown and pick B and we have result.
03:28Since the advent of the web, a lot of people are getting familiar with this
03:31Auto-complete feature. And when you're used to using Auto Complete as a field
03:35control option, you will be able to integrate this into your own FileMaker layouts.
Collapse this transcript
Using the Tab Control feature
00:00You may have noticed a tabbed interface style in a lot of the exercise files.
00:04For example over here in the Guide detail. This would be a tabbed interface.
00:10It's a very popular method for saving space and getting more data onto one
00:14screen all in one layout. So you see here as I click through all these three, I
00:18am actually staying right on the Guide Detail layout.
00:21Well, I am going to show you how to create a tabbed interface. If you will open
00:24up the file Lucky_You_Tours_09_06 and navigate to the Customer Detail, you see
00:29what we have on the screen is a pretty classic situation of a cluttered screen
00:33and way too much information all on one screen.
00:35Now you could talk to your users and say can I put these onto different layouts
00:39but a lot of people like to have a dashboard feel and have everything right at
00:42their fingertips all on one spot. So I am going to show you how to use a tab
00:45control to get all this information into one layout and not have to scroll and
00:50look in different areas of screen to find it.
00:52First, what you'll do is go into Layout mode since the tab control is a layout
00:56object and once you're in Layout mode, you are going to want to make room for
01:02your tab control. So let's do this. If you want to click down and drag select
01:07over the series of fields so they are all selected like you see on screen and
01:11just to temporarily put them in our clipboard for a moment, go to Cut and now
01:16we've given ourselves some space right in about this area where we can put in
01:20one of our Tab controls.
01:22The way you insert a tab control is by going into your Layout toolbar and
01:26clicking on the Tab Control tool and you'll see that your cursor changes to a
01:30cross-hair which will allow you to draw the specific size of the tab control
01:36that you want to use.
01:38Now you can also go to Insert and you see Tab Control but this will not allow
01:46you to control the size of the tab control. So we'll go back to the Drawing
01:50tool and take this area here and release and up pops the Tab Control Setup
01:56dialog. This is where it allows you to determine what number of tabs will
02:01appear in your tab control and you can name them as well.
02:05So if we look on screen, we've got a Photo, Notes, Contract Information, Trips
02:13and Billing Info. So let's say Contact, hit Create, and we'll say Notes, Create
02:25Billing, Create Trips. That should be enough tabs for right now. And if you
02:33look on the right-hand side, you'll see that you can pick the Default Front Tab
02:37meaning when you navigate to this layout, which one is going to be the one
02:40that's showing.
02:41So we'll say Contacts and that's where some of the main details are going to be
02:44located. You can also determine whether or not you are going to justify to the
02:48left which is the default or the center or do right or full justification.
02:52We'll leave it on left and the appearance can be either rounded or square.
02:56We'll go with the rounded option and then the tab widths can either match the
03:01maximum width of any of the label words. In this case, it would be the width of
03:05the word Contact or the minimum width of and you can put in a certain amount of
03:11pixels along with a fixed width and we'll just stick with Label Width and you
03:17can also put a margin in if you'd like to as well, but we'll just say OK here.
03:20Now you see that we've got all our different tabs. Now, when you are in Layout
03:24mode, you still have to navigate to the different tabs. So here, we'll navigate
03:30to Notes. Drag+Select notes and place these values here and as long as we stay
03:36within the parameters of the Tab Control, I can use all of the space within the
03:40Tab Control and if I go back into Contact, I will go to Paste and it looks here
03:47like I need a little bit more room. So I'll do Undo paste and we'll say we'll
03:53drag that size out by selecting it. So you see it's selected and then dragging
03:56one of the corners.
03:58I will click inside the Contact tab, hit Paste and now I can fit in all that
04:04information into one tab and now the Notes has its own tab, Contact has its own
04:08tab and we can go into Billing and if we scroll over here for a Billing info,
04:16let's cut that, and Paste, and we can work. I am using the Arrow Keys now to
04:28move all of this around as one big object. And then finally, we'll go to Trips
04:35and I will Drag+Select this entire portal and fit it -- if I hit Undo Move, you
04:42notice that I didn't get it all the way inside the Trips. So it just layered it
04:46behind the tab control.
04:48So it's important that I fit the width. There we go. Drag+Select. Drag and then
04:58drop and then now that you see that it's fully contained within the tab that
05:02all of this information is visible. You see now that we've got this Photo here
05:06too, why don't we go ahead and add another tab, well how do we do that. Well,
05:10when you're in Layout mode, you can select the Tab Control and double-click and
05:14up pops the Tab Control Setup again and I can say Photo and Create, hit OK,
05:21click over to Photo, drag the photo and then resize the photo.
05:27If I want to be more precise about it, I can select the size of the Tab Control
05:31and see that the Width is 397 and I can make this let's say 390 and then nudge
05:40it over using my Arrow keys to completely fill the Tab Control.
05:44Now, let's take a look at this in Browse mode. So we'll go View > Browse, hit
05:50Save and now where we had a very cluttered screen, now we have one screen where
05:55users can gain access to all the related information, all by clicking on a
06:00separate tab. This way this leaves plenty of other screen real estate for other
06:04information in case we want to add it.
06:06A couple of notes when you are in layout mode when you're dealing with the tabs
06:10is that like any other layout object, you can select these and you can change
06:16the color of the text, you can change the fill color by going into your Layout
06:22format. Here's your fill color and you can make this let's say a lighter color.
06:28You can change all of them to the same color if you'd like to or remove the
06:32color completely or give a different effect if you like.
06:41So anything that you do inside of a layout can be done inside of Tab Control as
06:45well and if you are looking at some of the other layouts, you see that they
06:47have got different styles. So we save this and go onto Browse mode. Now you see
06:52that you can have specific colors based on what the tab is if that's something
06:55that you care to do.
06:57Finally, you can add another tab if you desire and inside this tab then add
07:09Nested, yet another tab. So here in this case, you could say for example here
07:17are all the trips and then you could put another tab inside here that says Work
07:21Trips and Personal Trips that type of thing. So there's no limit as to how many
07:25you can nest, although there is some level of control involved.
07:28But you can have a Tab Control be the entire layout and have those tabs go
07:32across the top and that way, really what you're doing here, you can use the Tab
07:35Control which is a really cool layout feature. It's going to allow you a great
07:39deal of control over the screen real estate without having to create all these
07:43multiple different layouts.
Collapse this transcript
Setting tab order
00:00A lot of application users when doing data entry like to not have to take their
00:04hands off the keyboard. So, for example, one way that you can data enter into
00:08certain fields is to click into one field, make some changes, and then take
00:15your mouse and click into the next one and so on. But in most cases users like
00:19to keep their hands on the keyboard and just tab into one field after another.
00:23By default, FileMaker Provides a Tab Order that is the order in which the
00:26fields were applied to your layout. That also provides the ability to set the
00:31Tab Order while in Layout mode. Let's take a look at that.
00:34If we go under View to Layout Mode, and if you go under the Layouts menu,
00:39you will see that there is an option called Set Tab Order. Many times when you open
00:44up the Set Tab Order window or view, you are going to see numbers that are
00:48already in all of these objects. First thing you will notice is not only our
00:52field is eligible to be in the Tab Order, but you see that buttons with scripts
00:56attached to them are also part of the Tab Order. You will also notice that the
01:00Tab Control feature can also be part of the Tab Order.
01:03So how do we set these? Well, there is a couple of ways that we can do this.
01:06First of all, if they are all blank, you can select Clear All to give yourself
01:10a new starting point, and then at that point you just click into this first
01:14field, second field, third, fourth, maybe I'll skip these, and so on. I can
01:24also then click into the Tab Control. I can even allow the buttons to become
01:28part of the Tab Order also.
01:31Once you are done, you can hit OK and there is a couple of ways that you can
01:36include these. You can say show me only the fields and Add. As you see here,
01:43it's now automatically created a Tab Order for all the different fields. I can
01:46clear all and say Objects and hit Add, and you see all layout objects, fields
01:52and buttons have not automatically been given their own numbering sequence.
01:56What these are, are the order in which the values are placed on the field.
01:59But most likely what you will want to do is just reset by hitting Clear and
02:04manually create your own.
02:09Now, one of the new features in FileMaker 9 allows you to insert a field within
02:14the Tab Order without having to redo your entire tab sequence. Let's take a
02:17look at how that works.
02:19First when we go into Browse mode, you will see the effect of a Tab Order by
02:23clicking into the first field, and now I am hitting the Tab key on my keyboard,
02:28and you see now it follows a logical order based on whatever you think the
02:31users might find most useful.
02:33But now if I go into Layout mode, and as I mentioned earlier, FileMaker allows
02:40me to insert fields by dragging on the fields and dropping it. Let's say I pick
02:47the language and I am going to fit the language field, clicking on those fields
02:55and using the Arrow key to resize, and I'll move language underneath and now
03:05I'll go into the Tab Order again.
03:08You see that even though I want this to be number 12, you see that it's kind of
03:12in a strange order, but that could be easily remedied by clicking onto the
03:16number 13 in this case and typing 12. When I commit this change by hitting OK,
03:22you will see that what it actually saved to the database is it reorders the values.
03:28So you could go 1-13 and insert a new field into that order and have it reorder
03:33all those fields for you appropriately. This is a feature that's brand-new to
03:36FileMaker 10. You may have tried to work with Tab Orders in other versions of
03:41FileMaker and notice that you had to manually go in and reset the entire order.
03:44Not the case anymore. You can insert that in and use a number that's already
03:48been used and then FileMaker will intelligently go and reset that Tab Order.
03:52The order in which users can tab through fields can help make data entry more
03:56efficient. So using that Set Tab Order gives you control over how that will
04:00work. You will find out that the order in which users can tab through fields
04:03while data entering can help make the data entry more efficient. So the Set Tab
04:07Order functionality gives you control over how this Tab Order will be set.
Collapse this transcript
Resizing layout objects
00:00Many times when you are creating layouts for FileMaker solutions that will be
00:04shared by many users, your users might have different screen resolutions to
00:07work off of. This layout that you are seeing on screen on the Layout Resize is
00:12designed for users with a lower resolution screen. However, there may be other
00:17users that access the very same layout that might want to make use of the open
00:21space on the right hand side of the layout.
00:24In that case, we can use a feature that was introduced in FileMaker 9 that
00:27gives us the ability for layout objects to resize as the window is resized. Let
00:31me show you an example of this at work.
00:32If you go under Window to New Window and then choose Resize, what you will see
00:38is the exact same layout objects as the layout on the left, now have auto
00:42resizing applied to them. So this way, when you fill up the layout, you will
00:46see that they will dynamically adjust to whatever screen resolution or window
00:50width that the user desires.
00:52So the way this is controlled is in Layout mode, so if you go back to the
00:56original Window > Resize and go into View > Layout Mode, you will see that we
01:00have something that's called Object Info Palette, and if you don't see your
01:04Object Info Palette on screen, you can go under View and then select Object Info.
01:10If you have used the Object Info Palette in the past and haven't used it since
01:14FileMaker 9, you will notice these four anchors here in the bottom. This
01:17object, the Tab Control, for example, has been anchored to the top and to the
01:22left, which is the default for any new object that's placed on the layout. You
01:26control how an object resizes by anchoring it to various sides of a window, and
01:30since a window has four different sides, you have four different anchor
01:33positions to choose from.
01:35The object that I have selected on the screen now, the Contact tab control, has
01:39the top anchor and the left anchor chosen. When the anchor at both the top and
01:43the left are chosen, this is when you don't want the object to move or resize.
01:47Since we read from the left to the right and the top to the bottom, this will
01:50always keep the object that you have selected in the upper left hand corner of
01:54your screen, and as you grow the window, it won't necessarily change.
01:57Anchoring an object dictates that the distance from the object's edge to the
02:01window's edge will be kept constant as the window resizes. The default behavior
02:05for a new object is to have their top and left anchor set, as you see here with
02:08this object, which also reflects the behavior of all layouts and versions of
02:12FileMaker prior to FileMaker Pro 9.
02:15Objects that are set with opposing anchors, that is, either top or bottom or
02:18left and right pairs, will resize horizontally or vertically. In this case,
02:22let's choose both the top and bottom, hit Save. Go into View, into Browse Mode,
02:27and you will see that when we resize the window, the bottom edge will follow to
02:31the bottom edge of the window.
02:32Now there are two things that you will notice here. First that it never goes
02:37all the way to the bottom edge of the window, and also you see that this button
02:40object here is been overlapped by the tab control when it resizes. The reason
02:45for that as we will see when we go into Layout mode is that there is this white
02:49space between bottom edge of the tab control object and window. So the tab
02:52control will never overlap that space and will always keep that space as a buffer.
02:56So when you are designing your layouts and selecting auto resizing options,
03:00keep in mind that this white space will never shrink, so it will always
03:03maintain that white space; on the left hand side, the top, and the bottom in
03:07particular. On the right hand side, it's the edge of the margin to the edge of
03:11your object. So the white space to the right of the margin will not necessarily count.
03:16Let's take a look at the layout that's called Resize Test. On this layout you
03:21see that we have just one layout object with margins on the bottom, left and
03:26top. You also see the margin on the right that's dictated by the page margin
03:30and the right edge of this layout object. If I select the layout object, you
03:34see it's got the default resize of the top and the left.
03:38If we go under Browse mode, we will see how this behaves as we resize the
03:41window. You see that the object does not move because it has the top and left
03:46anchors selected. If we go back into Layout mode and now if we select just the
03:51left and the right and go under Browse mode saving our layout, we see now that
03:57what it does is it hugs to the right edge and resizes vertically while still
04:03maintaining the white space on the left. In Layout mode, if we go and change it
04:07to the top and the bottom instead, and now go into Browse mode, we will see
04:16that it resizes top to bottom while maintaining the margins.
04:21One thing you will notice that it will shrink below its original size. Its
04:27minimum size is dictated by the size that you create on the layout. But another
04:33interesting combination is if you select the object and you give it a bottom
04:36anchor but not a top one, going back into Browse mode, we hit Save, and you
04:41will notice now that it follows the bottom and it never shrinks up the white
04:46space on the top of the screen.
04:48Finally, one more way to take a look at resizing is if you have no resizing
04:53applied and go into Browse mode, you will then see that the object will
04:58maintain the center of the screen at all times while still honoring the margins
05:03on the left, right, top and bottom.
05:05There are a couple of things you should be aware of before you apply auto
05:08resizing. First of all, we have been working with Form Views, but your database
05:12may also have List Views. You should be aware that auto resize settings have no
05:16effect on layouts displayed as a Table View, but on layouts displayed as a List
05:21View, the top and bottom anchors have no effect, because expanding the window
05:24vertically simply displays more rows. You can; however, adjust the horizontal
05:29anchoring of objects in the List View layout so that they move right or stretch.
05:33Also, as we have talked about, there are minimum sizes for objects. Objects can
05:37never be reduced to less than their original size, and that's something that
05:41you want to take into account when you are determining what the minimum size is
05:44going to be on the layout. Also, when it comes to printing, horizontal anchor
05:48settings apply to Preview mode in printing when the page size is wider than the
05:52size of the layout being viewed or printed.
05:54So you see here, when I look at it in Browse mode, it looks little bit
05:57different than Preview mode, but it's still hugging the left edge of the
06:01screen. So you can apply auto resizing to both manipulate the way that items
06:06look on screen as well as the way that they are printed.
06:08So using the Auto Resizing feature in your FileMaker layouts will allow you to
06:12create one layout to be displayed by users regardless of their screen
06:15resolution or window size.
Collapse this transcript
10. Web Viewer Essentials
Introducing the Web Viewer layout object
00:00One of the coolest features in FileMaker Pro is the ability to add something
00:04that's called a Web Viewer object. Web Viewer objects can be added to FileMaker
00:08layouts that allow you to display web pages.
00:11For example, if you open up the Web Viewer Example file and click on Search,
00:16you will see the layout that I have on screen. Now this may look to you just
00:20like a regular browser window, but actually it's a FileMaker layout.
00:24You see when you go into Layout mode, you will see that these are all FileMaker
00:27fields and they all are storing data, one record at a time, but going back into
00:34Browse mode, you can navigate through the multiple records. As you go from
00:39record to record, you notice that on the bottom of the screen something is
00:43changing and that's the data that's been displayed in this area of the layout.
00:47What you are seeing there is what's called a Web Viewer Control. All this is is
00:52just another type of object that you put on a layout, similar to a container
00:55field or ever a field, but instead of displaying data, it's displaying a
00:59webpage. But it stores its own data, in this case, what's happening here is
01:05that the data that you find inside of the company field is what's being put
01:10automatically into the search bar. So watch as we go from record to record. You
01:15see that this value here changes inside the Google search bar. You see that
01:23automatically change and as I commit the record, it automatically redraws.
01:30So simply put, you can allow Google searching right inside your FileMaker
01:34database, based on values that users are entering inside of a field.
01:38Additionally, you can add shipping tracking. So if you have orders inside of
01:42your FileMaker database, you can have a field that stores the tracking number
01:47and then when a user clicks on a button, you can see it load FedEx Tracking.
01:52This is one of the templates that ships with FileMaker due to an arrangement
01:55between FileMaker and FedEx. It allows you the ability to track FedEx packages
01:59live within a layout in your FileMaker database.
02:03Another example would be the ability to map addresses inside of a FileMaker
02:07layout. So, for example, here you see that I have got an address 5201, Patrick
02:12Henry Drive, in Santa Clara, and you see that when I put that value inside the
02:16field that automatically draws it inside the Google Maps. You will see, as I
02:22update that, it updates the information in the bar.
02:26Not only does it draw the webpage for you, but your users can interact with the
02:30webpage. For example, here I can toggle between the Map and Satellite view and
02:37I can even send this link via email or link to it from another webpage. As you
02:42see when we scroll down, I can even do directions to here and from here. So
02:47basically, all you are doing is linking to a webpage that already exists and
02:51then you are handing off to the webpage for them to provide all the additional
02:54functionality.
02:55FileMaker also ships with the MapQuest searching and mapping tool. So since you
03:00can display anything in a Web Viewer that can be viewed in a web browser, you
03:04can also other types of things like PDFs. So you see here, I have a Web Viewer
03:10that's set up in this layout that simply points to not a URL address on a web
03:19server somewhere, but as you see in the Setup Tab, it just goes to a location
03:24on my computer where there are certain PDF documents stored.
03:28You will have these same documents on your machine, because what I am doing
03:31here is pointing to documents that have been installed as part of the FileMaker
03:3510 installation. So you will see when we go into the Document View, I can
03:38toggle between the different PDFs and I can have them displayed on screen.
03:46So now, not only have I added web browsing functionality inside my FileMaker
03:50layout, I can also add the viewing of entire PDF documents into my FileMaker
03:54layouts. This is great for help systems or support systems.
03:58Speaking of which, here is an example of a support system, in this case, the
04:01FileMaker Support Center integrated right into a FileMaker database. You can
04:07also link to the help pages that ship with FileMaker Pro or any other help
04:12page, possibly even the help page or the support system to your own
04:15organization.
04:16So here you see in the QuickTime layout, you can go into the Setup Tab and add
04:21the title of a QuickTime Movie and the path to it being hosted on the web
04:24server, and then you can display it inside of a Web Viewer.
04:28Keep in mind that you can do this same thing with the container, but in the
04:30case of a container, you need to embed the entire video inside of the FileMaker
04:34file, thus, increasing the size of the FileMaker file. In this case, all you
04:38are doing is embedding a link and letting FileMaker display the video. So web
04:42viewers can also be a very great alternative to container fields.
04:46So a lot of the functionality that we have discussed here is based on templates
04:49that ship with FileMaker. Now that you have seen some examples of what you can
04:53do by embedding web pages into your FileMaker layouts, let's take a look at the
04:57steps that it will take in order to add web viewing functionality into your
05:01FileMaker databases.
Collapse this transcript
Adding a Web Viewer to a layout
00:00FileMaker Pro allows you to add Web page content directly into your FileMaker
00:04layout. This is done through something that's called the FileMaker Web Viewer
00:07layout object. Web viewers are layout objects that allow you to display
00:11information from websites that are based on data that's right here in your
00:14databases or inside fields in your databases.
00:16For example, if you look at the record on screen, we could take a web viewer
00:20and calculate a URL or a web address for a map website that will be based on
00:25information that's inside the address and the city fields. Then as we browse
00:29from record to record, the web viewer that we will put down here in the Tab
00:32Control area will display a map of the location specified in the current record.
00:37So let's take a look at how we do this. First we will go into Layout mode
00:40inside the tab for the Map; we will draw a web viewer. There are two ways that
00:46you can insert a web viewer into your layout. First, by going into the Insert
00:50dialog and selecting Web Viewer, but if you want to control the size of the Web
00:54Viewer, you can choose the Web Viewer tool, which will then change your cursor
00:58to a cross hair allowing you to precisely draw the area in which you want your
01:02Web Viewer to display. So here I have just dragged and selected a size and now
01:08I am going to release, which will bring up the Web Viewer Setup dialog window.
01:12This is in order to make it easier for you to create web viewers and FileMaker
01:16includes templates for several data driven websites. Now it's not necessary for
01:20you to use one of these templates as you could create your own custom web
01:23address, but if you are just starting to get used to working with Web Viewers,
01:26the templates are the best way to learn.
01:28When you use one of these templates, you then only need to specify the
01:30parameters on the right hand side, mapping these to fields within your
01:34FileMaker record. If we want to use the Google Maps which FileMaker ships due
01:39to an agreement that they have with Google, all I need to do is select on the
01:42Google Maps option and you will see there it will build a custom URL in the Web
01:46Address field.
01:48We click Google Maps; you see that we have got three required fields and two
01:52optional fields. We need to map these to fields in our FileMaker database. So
01:56by clicking on the arrow, I can specify a field and then we choose City and
02:04finally State. Now we have all this information that Google will need to
02:12display a map and all of it's coming dynamically from our database record.
02:17Also, there are some options on the bottom left hand corner of the screen and,
02:20by default; you can see allowing interaction with the web viewer content is
02:24checked. This means that users can interact with the actual Google Maps website
02:29by clicking into the Maps or moving the Maps around on screen.
02:31We can a also display the progress bar and the status messages so that users of
02:36the database can see when the data is loading, so they know what they are
02:39looking at if they see a blank screen.
02:41So now we will hit OK and the first thing you will notice is that there is an
02:44address that's been displayed inside the Web Viewer even in Layout mode. That's
02:48the address that it's going to point to when it draws the map. So let's go into
02:51Browse mode for saving what we have done and the first thing you notice when we
02:55go into Browse mode is that the area of the website that's been displayed has
03:00been cropped.
03:01So the first thing that we will want to do is go back in the Layout mode and
03:04provide it more size. Now this is an important part of putting web viewers into
03:07your layouts. You have to understand that the size that you choose to draw the
03:11Web Viewer in Layout mode is simply going to be a crop size of the webpage.
03:15It's not going to constrain the sizes of the webpage, it's just going to take
03:19almost like a cookie cutter, it's going to chop out a piece of the webpage.
03:22So it's a good idea to give yourself as much space on screen as possible. Grab
03:27the tab control, wind it to the end of your screen and then also grab the Web
03:32Viewer inside of it and winding that out as well.
03:36Now we can go into Browse mode and hit Save and now we see our map been drawn
03:42on screen. You see we can also interact with the map, moving the map all
03:47around, changing from satellite, even zooming in on certain areas. The
03:55interesting part is that when we go to the next record, you will see it redraw
04:03and show yet a different address on screen in a different map. The Web Viewer
04:07is using the operating system's web browser.
04:10Now keep in mind that these are specific to the OS that you are using. If you
04:13are a Mac user, despite what your operating system's default web viewer is,
04:17it's going to use the Safari engine.
04:19So if you are pointing to websites that have certain plug-in requirements, make
04:23sure that you install those plug-ins in your browser in order for them to work
04:27inside of your FileMaker layout.
04:28In the Windows operating system, it uses IE as it's browser engine, so you
04:33should do the same in that case. Web viewers are not meant to replace web
04:36browsers and for some websites, you may need to open up a separate browser
04:39window. You can either do that by creating a new window or just using a script
04:44step which you can learn more about in the scripting movies that's called Open
04:47URL. But all of the Web Viewer objects will require an Internet connection
04:52unless of course, you are doing a file reference instead of an HTTP reference
04:56where you can point to documents that are local on your machine.
04:59But if you are going to use any of the templates that ship with FileMaker, you
05:03are going to need an Internet connection. You see that the other templates that
05:06are available to you in addition to Google Maps are MapQuest, Google web
05:11search, FedEx and various Wikipedia sources. A couple of things that you should
05:15be aware of Web Viewers display web pages in Form View, like we are right now,
05:20and also List View, but in Table View, Web Viewers display only when they are
05:23in headers or footer parts of the layout.
05:25Also, you can now place web viewers in a portal. If you place a web viewer in a
05:29portal, the web viewer appears as an object on the layout that overlaps the
05:32portal instead. Web viewers are included in the default Tab Order just like a
05:36regular field would be and you can define a Web Viewer as a button. So when a
05:40user selects it, you can run a script step.
05:43One of the easiest ways to enrich your FileMaker database layouts is to display
05:47webpage content using the FileMaker Web Viewer layout object.
Collapse this transcript
11. Finding Data
Using the basic Find options
00:00One of the key requirements to any data storage application is data retrieval.
00:04FileMaker provides this via its Find mode features. Now we have been covering a
00:08lot of different views throughout this title and those can be found under the
00:13View menu. We have worked with Browse mode, which allows you to enter and edit
00:17data, and Layout mode, which allows you to create and manipulate the layouts.
00:20Preview mode of course allows you to see what prints will look like.
00:23But what we are going to work with now is Find mode. There are a couple of
00:27different ways to get to Find mode. First, under the View menu just like we saw
00:30there and also in the bottom left hand corner you can toggle between the
00:34different modes and also you can use a keyboard shortcut which would be
00:40Option+F or Ctrl+F. So let's go into Find mode. The first thing which you
00:44notice in Find mode is that all your data visually disappears and your screen
00:48is going to look suspiciously like it would in data entry with one key difference.
00:52You will see inside the corners of the fields that you have a little magnifying
00:56glass. This indicates that you are in Find mode. This is so that users don't
01:01get confused thinking that are in the Data Entry mode and just continue to add
01:04what are called Find Requests when they are intending to create new records.
01:08FileMaker Pro is now waiting for you to enter some criteria and you will notice
01:12that there is a Perform Find and a Cancel Find button up in the Status toolbar.
01:16For those of you familiar with the web, this sort of behavior might initially
01:19throw you because instead of offering you a single search field kind of like
01:22Google for example and then another page or a layout in which to apply the
01:26criteria, FileMaker simply allows you to use the fields placed on any given
01:30layout and then perform searches based on those fields. So that means that any
01:34single layout in your entire database can be used for searching. And ultimately
01:37one of FileMaker's core strengths is the ability to perform searches of your
01:41data in any layout in your database.
01:43So now you should be in Find mode and you see that the cursor is blinking in
01:46the Painting Name field. I am going to type in some criteria in this case, Two
01:51Lov, and now I am going to hit Perform Find. I could also hit the Enter key on
01:57my keyboard and you see here it has comeback with one record. You notice up in
02:02the upper left hand corner, that even though it's only showing one record, it
02:06also says that there are 15 records in the entire database. That tells me how
02:10many total records are being stored in this table. But the number 1 represents
02:14something that's called the Found Set.
02:16You also see that there is a little pie chart that indicates the percentage of
02:20records in my Found Set based on the overall amount of data that's stored in
02:24this table. So once I have created a Found set, it doesn't mean that the other
02:28records have disappeared. It just means that they are not currently visible. If
02:32I want to see all of the records that are not part of my Found Set, I can go
02:35under the Records menu and say Show Omitted Only at which point now you see
02:40that I see 14 records of the 15 that are stored in this database. At any given
02:45time you can reset the view by selecting Show All and now you see all of the
02:50records being displayed that are stored inside the database.
02:53Now sometimes you may have more records than can be found on the screen and in
02:57that case you will just have to scroll through the List View to be able to see
02:59all of them. Another thing that you will notice is when I went into Find mode,
03:04I just typed in Tw and performed a Find and you notice that it matches criteria
03:10for Two Pots or Two Lovers in this case. And that's because it's doing a search
03:15based on the field index.
03:17If you click inside the field and do Ctrl+I or Apple+I, you can see all the
03:22different words that are being stored inside of FileMaker's index. Here are the
03:28individual words. So when I type lov, for example, I could also get Two Lovers
03:35by a Tree because the individual words are what are been searched on inside FileMaker.
03:40So for example, if I go back into Find and I type in red and hit Perform Find,
03:48you see that it has given me Red Berries and if I do Show All, you see also
03:55that I could do a search for Vas which is Blue Vase, even though it doesn't
04:02start with vas there is an individual word inside that field that does.
04:06So these are the basic ways to find data inside your FileMaker database. Keep
04:10in mind that in addition to FileMaker's ability to be able to create the data
04:13storage mechanism and provide a user interface, it also provides very powerful
04:17data retrieval tools.
Collapse this transcript
Reviewing new requests in Find mode
00:00In many cases you may need to search for multiple criteria in one field. In
00:04these instances, you will need to be familiar with adding a new Find Request.
00:09Let's take a look at that. If you open up ListView_11_02 in your exercise files
00:13and go to the Painting List layout, you see that we have got a series of
00:16records inside of a FileMaker database and each record represents a painting.
00:21Let's say I happen to be a fan of Marta Alvarado, so I want to search for all
00:25her paintings. I will go and click in the Find button which takes me into Find
00:29mode and I will type in Alvarado and hit Perform Find.
00:37You see it comes up with four records in the Found Set out of the total 15 that
00:41are stored in the database. However now, I also want to locate paintings by
00:45Gibson. So I type in gibson and hit Perform Find. It gives me three records of
00:54my Found Set out of the 15 stored in the table. However what if I want to find
00:57both Alvarado and Gibson. Well, if I type in gibson alvarado into the field,
01:08what do you think might happen? Well just take a look. I get no matching
01:13request and the reason for that is because it's actually searching for a field
01:18that contains both a gibson and alvarado, but that's not what I am intending to do.
01:22In these cases, what I want to do is create separate requests for these
01:26criteria and notice that I am using the terminology request instead of records.
01:30Also notice that the FileMaker menu that used to save records in Browse mode
01:34has changed to Requests. It allows us to add, duplicate or delete requests when
01:38we are creating Find criteria. So this mechanism allows me to perform both an
01:43And Search and an Or Search. So for example, if I type gibson into one request
01:50and then go up on the button up here in the Status toolbar and click on New
01:54Request and then now type Alvarado in the other, it allows me to find all of
02:00the paintings created by Gibson or Alvarado.
02:03So if I hit Perform Find, you see that now it has given me a mix of Marta
02:08Alvarado and Norma Gibson paintings. Alternatively, if I create a request with
02:13Gibson, so I will say Find and say Gibson as the artist and if I go into the
02:21Painting Name and just type berr, FileMaker is going to return the one painting
02:27that matches both of those criteria. So in the first case, I was doing an Or
02:31Search, Marta Alvarado or Norma Gibson. It's because I use two different Find
02:35requests and if I use one single request and put two criteria into it, I am
02:40doing what's called an And Search, meaning give me everything that matches
02:43Norma Gibson and in this case, Red Berries is the painting name.
02:47A couple of notes here, when you are in Find mode, you can continue to add new
02:51requests and you can add an unlimited number of them, but keep in mind that you
02:55probably go into run out of conditions or records that match conditions when
02:59you get to several different requests. Another thing you should know is that
03:02you keep adding new request in Find mode when you get to ten of them, you will
03:06see a message on screen that says, You are in find mode and appear to be
03:09entering new record data rather than finding request criteria. Are you sure you
03:13want to create new find request?
03:15This is only here to make sure that you intend to be in Find mode creating new
03:19requests and that what you are not actually doing is trying to create new
03:22records. They don't want you to get 50 of these in before you realize that you
03:25haven't actually added any records to the database.
03:28So in addition to just doing basic finds using New Request will allow you to
03:32create both And Or Searches when retrieving data from your FileMaker database tables.
Collapse this transcript
Establishing search operators
00:00In FileMaker Pro when you are searching for data, you don't always have to
00:04specify each exact criterion. For example, if I want to find all of the
00:08paintings in this database that were created between the year 1872 to 1937, I
00:14don't actually have to go and create 65 new Find Requests each with a different
00:17year. But instead what I can do is use what FileMaker calls its Search
00:21Operators. If you go into Find mode, you will notice in the Layout bar that not
00:26only can you navigate to the different layouts and use any one of those to
00:29enter in your criteria, but you also see there is an Insert Operators.
00:35If you click on the Operators button, you will see that you have a list of
00:38different characters that FileMaker interprets when added in as a search
00:41criteria. For example, some of the easy ones, if you enter in a exclamation
00:46point, it will find all the duplicate values in that field and some are the
00:49more obvious ones like less than, less than or equal to, greater than, greater
00:53than equal to are commonly used with numeric fields and also with the date
00:57ranges. And there is also a Range option, which if you put a ... in between the
01:03starting value and the ending value, FileMaker will use that as a range and
01:07bring back all the matching criteria that fits within the starting and ending value.
01:11Also you can just do a double slash and that will find any date that matches
01:16today's date. So let's take a look at using the Range operator in the example
01:22that I just mentioned. So let's say we want to find all the paintings that were
01:25painted between the year 1872 and 1937. All I have to do is type in 1832... and
01:33then 1937 and now I hit Perform Find and you see that FileMaker identified that
01:40as a range and gave me all the criteria that matched and fit within the start
01:44and end dates that I added. Also if you want to be diligent about entering data
01:48into your database and need to discover where all the missing entries are,
01:51another common technique is to try the equal sign operator.
01:56You will notice that equal sign means match whole word or match empty, because
02:00really what it means is find an exact match for any value that follow the equal
02:04sign. So if I enter an equal sign into the Year field and I don't follow it
02:09with anything that means find exactly nothing, and now when I perform find, you
02:15see that it found the two records in the database that actually have no value
02:19in the year. This is an excellent tool for cleaning up your database. And
02:22finally you can leave your searches open ended. For example, I can say find
02:28greater than 1900 and then perform a Find and you see it gives me all the years
02:34after the year 1900.
02:36So in addition to doing multiple requests, you can also insert different search
02:40operators to assist you in locating data with minimal data entry in the search
02:44requests themselves.
Collapse this transcript
Constraining or extending a Find request
00:00Different from doing an inclusive search via tour or more requests, like we've
00:03talked about in previous movies, there are also times when you may want to add
00:07or remove from your current found set, as oppose to searching within the entire
00:11database of records.
00:12In these cases, you can use the functions that are called Constraining and
00:15Extending Found Sets. Now I'll do a search by entering Find mode and then
00:21entering Dave's. I'll hit Perform Find and I find that I get seven records.
00:27Now I am going to go back into Find mode and this time I am going to type
00:31Gibson in into the Artist field, but instead of hitting Perform Find, what I am
00:37going to do is go under the Requests and in this case what I am going to do is
00:40I am going to say Extend the Found Set.
00:42Now what this is going to do is it's actually going to take my Found Set of
00:45seven records, because FileMaker remembers what my last search was, and it will
00:50add to it. When I say Extend, it will add to it an additional Found Set that
00:54includes all the Gibson Art. So I can say Extend Found Set. So now you see I
00:58have got 10 records that are a mix of both Dave's and Gibson's Artwork.
01:02You can do the reverse as well, for example, if I go back to Show All. Now I am
01:06going to do is search by Gibson and Perform Find, and you see that it gives me
01:14three records.
01:15Now I go back into Find mode and in the Year, I'll choose an Operator for
01:21greater than or equal to 1982, instead of performing the Find, I'll go under
01:27the Request and in this case I am going to say Constrain Found Set. And what
01:32this is going to do is it's going to search within the previous Found Set for
01:35any values that match the criteria that I have just added.
01:38So you see within that Found Set, I find that there are two records that match
01:42my request. Now the real power of this is when you have thousands of different
01:47records and you want to be able to drill down or drill up from certain
01:50criteria, to chase certain Found Sets, whether you are trouble shooting or you
01:53are trying to identify very specific Found Sets, of data.
01:57So working with varying groups of records is always powerful and you can easily
02:00view trends in your data, search for exceptions or problems in the information
02:04that you have entered, or imported into your solution, or quickly access
02:07specific records, all using either Constrain and Extending Found Sets.
Collapse this transcript
Finding a date/time or time stamp
00:00Another of the user benefits of FileMaker searching is Date and Time Range
00:04searching capabilities. If you open up your Orders_11_05 files in your Exercise
00:09files., you'll see that we have a layout in Order:detail that contains some
00:13fields that have Date, Time and Timestamp values. In older versions of
00:18FileMaker the only way to search for ranges in these dates was to enter
00:21beginning and end dates using the search operators.
00:25In recent versions of FileMaker, there has been new improvements in Date and
00:28Time searching capabilities. And they're actually kind of pretty cool. Each
00:31syntax that I'll be showing you here applies only to fields that are set up
00:35specifically as Date, Time or Timestamp fields. Let me show you some of the
00:39ways that you can search within these fields.
00:41So first you'll notice inside the Order Date, if you look into the Order List
00:46you'll see several different dates as you scroll through each record. They're
00:50all formatted as Dates with the Month, Day, Year and normally when you search
00:56inside a FileMaker field you will be searching on the exact syntax that's
01:00contained within the field but because this field here is a Date field, I can
01:03use some special syntax.
01:05So let me give you an example. For starters, we're going to enter Find mode and
01:10in the Date field I am going to type in a value that isn't formatted for a
01:15Date. As a matter of fact, if I ever try to enter this data, formatted in this
01:19very same way into the field during data entry I would actually get an error
01:22back for FileMaker. But what's interesting here is that when we're in Find mode
01:25it accepts this.
01:26And now let's take a look at what happens when you hit Perform Find. So you see
01:31that even though we go into the Order List, you can see, even though we only
01:36put in 6/2009, it actually gave us back matching records that were all the
01:41dates in June of 2009. So what you are doing here is you are putting in the
01:46Month and then just skipping over the Days.
01:49And since you skipped over the days FileMaker interprets data saying give me
01:52all the days that match the month and year combination. Another way you can do
01:56this, if you go into Find mode, is just simply enter in a month number. So,
02:03FileMaker will now interpret this as all dates in the month of 12 in the
02:08current year. So when you hit Perform, you see that you get matching records,
02:12not with 12 in it, but just the month of 12 and the current year.
02:15I'll go back to Show All. Another example is how this works within Ranges. So
02:20we'll hit Perform Find, Order Date and in this case I'll type in
02:254/2009...6/2009 and we'll hit Perform Find. And you see what it has done is it
02:34has given us all the dates that fall within that range. So the beginning of
02:37anything that falls under April of 2009 through everything that falls under
02:41June of 2009.
02:43Another way that you can search for values by entering in data that's not in
02:47Date form is by typing in a day abbreviation into a Date field. FileMaker knows
02:55for each date what day of the week that actually represents. So now you see
02:59that it went and searched on that part of the day that it stores internally and
03:03it has given us back all this information that was on a Wednesday.
03:06And what's interesting about this is that there aren't actually any fields
03:08defined in these records that have the day of the week in there. So this is all
03:12just FileMaker's internal information. There are also ways that you can range
03:15just certain aspects of the date. Back into Find mode. We're going to use the
03:19brackets that look like this. And I am going to enter in 4...6. Now if you
03:25recall the ... in between two values means a range. This means between 4 and 6.
03:30I am going to close that bracket and I am going to just then do a / and 2009. So
03:35as you can imagine, this is give me anything that falls in the dates between
03:39April and June of 2009. So when you hit Perform Find. Here we have some May,
03:45June. It looks like there were no matching Aprils. And this bracketing can
03:50happen on both sides. So I can do 4 and then do...
03:59See if we get any values that match this criteria and there you see we've got
04:03everything from April of 2004 through June of 2009. The same is true for Time fields.
04:09In that case the syntax is a little bit shorter but if we go into Find mode,
04:13well here's a field that's defined as a Time field. And I am just going to type
04:17in 3pm and see what we get. You see here it gives me anything that's in the
04:213 PM hour, from 3 o'clock to 3:59. I can also do ranges in the Time fields.
04:27...6 pm and you see it gives me anything from 3 O'clock even to 5:59 PM.
04:38And in an even more abbreviated manner, I can just simply type in pm into a
04:42Time field and hit Perform Find. And it gives me anything that was created in
04:46the pm or in the afternoon or evening hours. And this, just like I had
04:50mentioned earlier, there is no am or pm or afternoon or morning values stored
04:55in the record; it's just what FileMaker is interpreting internally.
04:57And lastly, this gives a little bit of insight as to what's actually going on
05:00here. What FileMaker is doing is it seeing that your data isn't formatted
05:04properly and instead it's putting it in a wild card character in the area that
05:07you're not providing. So in this case I'm going to show you an example of a wild
05:11card character, which is an asterisk. And I am going to say 15. So this is
05:16going to give me all times that are 15 minutes after any hour.
05:20So let's see what that gives us. And you see we have two that happen to be 3:15.
05:24And finally the combination of the two things that we've discussed apply in
05:28the Timestamps as well. If we go in the Find mode and enter into the Timestamp
05:32field. Here I am going to say // 3 pm. Now this means all Timestamps in the 3
05:39o'clock hour today because // indicates today. So we didn't have any today and
05:45we can check different hours as well.
05:47But the reason I wanted to show you this is because when we come back with the
05:50Field search you see that instead of putting in our original values, it gives
05:54us the wild card formatted values. So this is something that you can logically
05:58assume, okay 3 and then I want any part of the 3 o'clock hour and any one of the
06:02seconds within 3 o'clock hour.
06:03I just put wild card characters in there. So you can kind of see how this is
06:06working. You know when you put in 6/2009, it's actually interpreting it as 6,
06:15indicating any date within the month of June in 2009.
06:19So if you get familiar with this searching syntax, it's not only going to help you,
06:22but as you train your users and possibly as you start to work with
06:25scripts, which we will cover later in this title, this syntax can help you more
06:28accurately find Date, Time and Timestamp data in your database.
Collapse this transcript
Saved Find requests
00:00One of the brand new features in FileMaker 10 is the ability to save your Find
00:05requests. And in one of the other new features in FileMaker 10 you see that we
00:09have this new Layout Status toolbar and you'll notice that on the toolbar we
00:13have this icon for finding records or entering Find mode. But just pushing the
00:17button will get you into Find mode and then you see it gets replaced with the
00:20Perform Find or a Cancel Find icon.
00:23If you click and hold down on the Find you see that there is a whole contextual
00:27menu that talks about saving and modifying and creating new finds. This is a
00:32pretty neat feature, in previous versions of FileMaker. Any time you did a
00:35search and you put criteria into the database, it would always save the last
00:39Find. In this is where you would probably see, if you go in Find mode, if you
00:43have worked with FileMaker before there was something that was called Modify Last Find.
00:48And it was in the Request menu when you would perform the Find. Now that has
00:52been replaced with the concept of Saved Finds. And in order to demonstrate
00:57this, let me just do a quick Find here. If we go into Find mode, I will say
01:04Alvarado, hit Perform Find. And now when I click and hold down on this button
01:10you see; now it lists recent Finds. You see I've got Alvarado listed there.
01:15And what's nice about that is if I say Show All; notice at this point, I don't
01:19have to go into Find mode. I'll click and hold down on this button. Click
01:23Alvarado and now it stores that Find in my session. And what do I mean when I
01:27say that. Well, when I am talking about storing it in a session that means that
01:30the recent searches will be saved inside the database until I logout and then
01:35log back into it.
01:36My recent Finds, if this is a shared file will only show up in my session
01:41meaning between when I login and when I logout. When I come back, I won't see
01:44those recent Finds anymore. And the idea there is that, if you have hundred
01:48users working on the file at the same time and everybody is saving their Finds.
01:53Well, you don't want to see all the other user's Finds in there because this
01:55will get cluttered very quickly.
01:57So it just saves yours and since it can only manage yours within each session
02:01that's why you'll see those there. Now if you want to save this beyond your
02:06session, you can then take one of your recent Finds and you can say Save
02:11Current Find. So now that you've just performed one, which is basically Modify
02:15Last Find, which is the criteria that you see here. Perform it. Go into this
02:22dropdown menu and say Save Current Find and now you'll see the Specify Options
02:26for Save Find.
02:27And you can either just leave the criteria in there or if it's kind of
02:30complicated you can just give it some kind of short description. Also you'll be
02:35able to go into the specified Find Request and if you are familiar with
02:38scripting, you'll notice that this layout is familiar because this is where you
02:41can go in and edit the entire criteria. And we'll talk more about this in the
02:46Scripting section.
02:47But here you can modify it further or add more criteria to it if you want to.
02:51And then ultimately save it with whatever name you've given it. Once you do so,
02:56clicking down on the Find button. And now you see it under Saved Find. And this
02:59will be here for you next time that you are logged into the file. And at any
03:02point you can go back into the system and Edit Saved Finds.
03:07And here I've got one, but if I had several of them at any time I can change
03:11the name, change the criteria, add additional criteria, maybe even add Omit
03:17Record, Requests anything that you can do inside of Find mode, you can do
03:23inside a Saved Find. So the idea here is you are now able to work with Find
03:30mode in the manner that you have before. But if you are working with a search
03:34that might be rather complex and it's something that you normally would make
03:38notes of, you can now just save it inside the FileMaker file.
03:41So Saved Finds brand new feature inside FileMaker 10 and it should really
03:45change the way that you're searching for data inside your FileMaker databases.
Collapse this transcript
Finding matching records without Find mode
00:00FileMaker 10 has two different ways that you can create a Found Set without
00:04having to go into Find mode. You can do both of these within Browse mode. The
00:10first of which is a feature that was released in couple of versions ago that's
00:13called Fast Match. And it's all based on the Contextual menu. Now the
00:17Contextual menu is the menu you'll find when you click on a field and right
00:21click. This works in various different modes but when you are in Browse mode
00:25you see the Contextual menu gives you some options for changing the text that's
00:29stored within the field or inserting some type of stored value.
00:34But you notice down here at these three items that you've found matching
00:37records. So first if we look at what I am clicking on, I have the Marta
00:40Alvarado record. If I right click on that and choose Matching Records it
00:45creates a Found set based on the field that I was currently in and all that
00:49while I have stayed inside a Browse mode. I can click into this field that has
00:54no value in it and instead of doing Find Matching Records I can extend the
00:58current Found Set.
01:00So for example this will give me all the Marta Alvarados and any field that
01:05does not have a value in year and I can constrain them down to just the ones
01:11that match here 1872. So that's one of the options that you have available to
01:15you. I'll hit Show All Record. And hence we discussed in the Saved Finds video.
01:20So if you click and hold down on the Find button you'll see that you have
01:23another menu.
01:24A menu related to Saved Finds and if I go in Find mode and I say 1900...
01:32perform Find. Now when I click down and hold you'll see that was stored inside
01:38the file. Now that I have created a Find and clicking and holding and going
01:43here and selecting that also creates a Found Set for me in Browse mode. So the
01:47idea here is that you might want to train your users on these two ways they can
01:50perform Finds in Browse mode because these are great tools for drilling down or
01:55drilling up in data that you're working with on screen.
Collapse this transcript
12. Sorting Data
Sorting with one criterion
00:00In each of the exercises in this title, we've been working with multiple
00:03records. But you'll notice as you open up each file that the records are in an
00:08order that really doesn't have any kind of relevance. It's not in alphabetical
00:13order, not by artist, not by year. Now what's happening is that when you first
00:16open up a FileMaker file and look at multiple records it's going to give you
00:19those records in the order in which they were added to the database. In the
00:22cases of reporting or printing or exporting or just even viewing the data, that
00:27might not always be the desired order.
00:29So in this movie I am going to show you how to sort records in FileMaker. There
00:32are a couple of different ways that you can get to the Sort dialog. First if
00:36you go under the Records menu, you'll notice down here it says Sort Records and
00:40it also has a quick key. On Mac it's Apple+S, on Windows it's Ctrl+S. And also
00:47in the new Layout toolbar you'll notice that there is a Sort button.
00:51Clicking any one of these will get you to the Sort Records dialog and inside
00:55the Sort Records dialog you'll notice that they will always store the criteria
00:59for the last sort. And this is helpful sometimes when you're going back and
01:02resorting something like you've done moments earlier. This way you don't have
01:05to do it again twice. But in our case we're going to hit Clear All.
01:09And in this Sort dialog you're going to notice that you have two windows to
01:11choose from. The window on the left is all of the different fields that are
01:15available to you that have been defined inside this database. And on the right
01:18it'll display the criteria in order that you want to apply towards your Found
01:22set. So one thing you take a note when you click on this drop down menu, it
01:26allows you to pick on fields from many different tables. But what you see here
01:30above this first separator that it says the Current Layout versus the Current Table.
01:35And the default is the Current Layout and this is very helpful because most
01:38likely if you're in a layout that has certain fields on it, if a user is
01:42sorting so that they can look at the data in a certain way, they probably don't
01:45care about fields that aren't on the layout. So in this case you see we've only
01:49got three fields on the layout. Painting Name, Year and Artist.
01:52So those are the ones that are presented as the default. Of course we could
01:55choose from all of the different fields that are defined inside the table. But
02:00we'll stick with this layout and we'll say Painted_Year. And now we see that
02:06listed as the top sort order in the Sort Order window. And when you click on it
02:11you'll notice we have these cell phone signal looking icons just to the right
02:14of your sort criteria, and those match down here.
02:16So in this case the default is Ascending order A to Z or 1 through 10 let's say
02:22if you're doing it alpha versus numeric. Or you could change this while you
02:26have your criterion selected you can select Descending order and you see that
02:29that changes the icon. So it depends on which one of these that you would like
02:32to do and then you can hit the Sort button or your Enter key and you'll notice
02:37now that all the values have sorted based on the criteria that you entered in
02:41the previous window.
02:42One thing to note is that even though these records did not have a value inside
02:47Year they show up at the top of the list. And that's the behavior that you can
02:51expect from FileMaker. So if you're creating reports or instructing users on
02:54how to work with Found sets, keep in mind that the blank records in the fields
02:58will always show up on top. And this something just you just want to take into
03:01account when you're working with sorting, but also at the same time this is a
03:05good way to look for inconsistencies in your data or find records that don't
03:09have values in them.
03:09Just hit Sort on that value and then you'll see all the blank ones on the top.
03:13So understanding how to work with sorts is going to help you manipulate data
03:17inside Found sets so that it can be more meaningful to you and your users.
Collapse this transcript
Sorting with related fields
00:00When you are looking at data inside FileMaker, the layout which you are
00:03looking at is based on table. So that means that most of the data that you are
00:06seeing on screen lives inside that table. If you look in layout mode, you will
00:12see that the three fields that we have in this layout are Painting Name which
00:16is based on the Paintings table, Painting Year, also based on the Paintings
00:20table and then this third field, Artist, which is actually a related field
00:25coming from the Artist table.
00:27We will talk more about related fields in the relationship section, but what I
00:30want to demonstrate is that we have fields from two different tables on this
00:35layout, so when it comes to sorting we can pick fields from the current layout,
00:42from the current table, but also from the related table.
00:45Now in this case we happen to have the combination of both of those on the
00:49Painting List layout that we are viewing right now. So you will see that we can
00:52do Painted Year and sort by Painted Year and you see everybody is listed that
00:58way, but also what if I do sort by Artist, what will happen here? Well, what it
01:05does as it just treats it as a field that's defined locally on the table. So
01:09the rule here is any field that you have on your layout whether it's a local
01:13field or related field can be used in your sort criterion.
Collapse this transcript
Sorting with multiple criteria
00:00Many times when you are working with FileMaker and you have a large set of
00:04records, you may want to just look at them in a certain order. This, of course,
00:08is where sorting comes into play. Sometimes when you are sorting, you may have
00:11multiple different criteria that you need to sort with. So for example, here
00:15we've got 1500 records and if I sort them all by last name, they will sort
00:22alphabetically by last name.
00:24However, in some cases if we isolate some records here, if we go to Find and
00:32type in this value, you will notice that we actually have several records that
00:35all share the same last name. So I have sorted them by last name, but what
00:39about if I want to sort them then within the last name by first name as well
00:43and you see in this case R, A, C, C, S, J, that doesn't necessarily work. So
00:48what you do in those cases is you add multiple criterion into your sort.
00:53So here we have last which will keep last in the Sort Order window, because we
00:58ultimately do want to sort by last, but within the last name we then want to
01:02sort by first. So there we just simply add first name. Now the order in which
01:08the Sort order fields are listed in this window is very relevant here. For
01:12example, it will sort by last name first and then when it finds matches on last
01:17name, it will then revert to the first name search.
01:20So as a keep adding criteria and you can add as much criteria as you'd like,
01:24but keep in mind that if you add ten criteria the tenth criteria means that you
01:29had nine matches prior to that. So it's highly unlikely that you will end up
01:33with the dataset like that, but in some cases you may need it and it's
01:36available there for you within FileMaker, but let's take a look at how this
01:39works, I will hit Sort and now you see that it is sorted first by the last name
01:45and then when it found matches on the last name, it then sorts by the first
01:49name as well.
01:50So when you show all records and do that sort again, now you can see that H, I,
01:59I, I and then within the I it then sorts by first name. So in the cases where
02:03you need to sort within a sort group, just use multiple criteria in your Sort dialog box.
Collapse this transcript
Sorting with custom values
00:00Many times when you are looking at records in List view, you want to sort them
00:03so that you can see them in a certain order. And as we looked at in previous
00:06movies, you can see that you can add single criteria or multiple criteria to
00:13your sorts, much like I am doing here and what you will notice in any case is
00:19that depending on which fields you choose, you can be either do them in
00:23Ascending and Descending and all those have different behaviors depending on
00:26the field type. For example if it's a number field, it will start at number 1
00:30or 0 and go all the way up to whatever the ending number is. If it's
00:33alphabetical, it will start with A and end with Z and if it's a date, it will
00:36start with the earliest date and with the later and so on and so on, same is
00:39true for time and timestamps.
00:41However, that might not always work for the types of searches that you are
00:44doing. So let's say for example, we want to search on Type. Type is the field
00:51that you see here in the far right hand column and you see that these customers
00:55can either be Silver or Bronze or Tin even. In this case it might be some
01:00classification that this organization is using for all their customers.
01:03Now as you see, they are sorted in the order of the Bronze customer before the
01:08Silver customers, but what if that's not how the business rule works within
01:11this organization. What if they'd like to have Silver before Bronze or Tin
01:15before Silver, everything out of alphabetical or any other types of fields out
01:19of chronological or numerical order? Well FileMaker does allow you to sort by
01:23custom values, if we take a look at this Sort dialog, you will notice that we
01:29have the ability to choose the field and then when the field is selected we can
01:34either choose to sort it in Ascending order, Descending order or you see this
01:37Custom order based on value list.
01:40Now we will be covering value list in later chapter, but if you are not
01:44familiar with them, what a value list is, it's something that you can define
01:47inside your FileMaker database. That is exactly what it sounds like, it's just
01:50a list of values and it has various different uses. But in this case what it
01:54allows us to do, if we go into Manage > Value Lists, you can see that I've got
02:01a value with set up for Customer Type and what this allows me to do is just
02:05simply list the values in the order that is meaningful to the users.
02:09So in this case they want to see their customers in this specific order,
02:13meaning that Gold ones first, Silver, Bronze and then Tin following that. So if
02:18you look, we've now selected the Order and you see it gives us a different icon
02:22to the right and now I hit Sort and I guess we will have to do something
02:27similar here. Do what you like with these and now you see that Gold is on top
02:38followed by Silver, followed by Brown and so on.
02:41You are not just constrained to using your Ascending or Descending sort order
02:47values when sorting records in FileMaker, but instead you can use customer
02:51values set up as a value list.
Collapse this transcript
Sorting with buttons
00:00FileMaker Pro provides a special interface for sorting your records and that
00:04can be viewed by clicking on Sort icon. But sometimes for your users, they may
00:10not be as familiar with this Sort dialog box as you are, so instead of
00:14providing a great deal of training for them so that they can view the records
00:18in their desired format, what you can do instead is allow them buttons on
00:23screen, so they can sort on values by just clicking on certain items.
00:27The most logical way to do this is if you are looking at a List view is to make
00:30your column headers clickable. In the case of Phone and Email, you see that I
00:34have a little hand that shows up which indicate that there is a script
00:37attached. Let me show you how to do that with the type, so that when users come
00:42into this layout, they don't have to click on Sort, pick the criteria and
00:45execute the sort, instead they can just click on the button and it will do the
00:49sorting for them, so that's really easy to do. If you are going to Layout mode,
00:53when you are in Layout mode you can click on anything which you see on screen
00:59and that becomes a button in that case.
01:02Of course you could draw a button, you see that there is a button drawing tool
01:07in your Layout tools and you could draw one here and allow it to sort. But
01:11since you already have these column headers on screen, it's a good idea to use
01:15those as your button, then you don't have to clutter up your interface. So I
01:17will select the Field label and when that Field label is active I will go under
01:21the Format > Button Setup menu and then I can scroll down and what this does it
01:28allows you to pick one action within FileMaker and assign it to the clicking of
01:31that button. So you will notice if we scroll down, that we can find sort
01:39records and if I click on Specify, it will ask me how I want to sort these.
01:44Now this will show the last sort that you chose and you notice that the layout
01:49isn't available to you anymore, because inside this button or the script step,
01:53it doesn't necessarily know where you are going to be when you are executing
01:55the Sort. So what we will do is we will search for Customer and Type happens to
02:02be on top, I will hit Move and we will pick sort in a custom order and we will
02:11hit OK. Now the other option that we have here are whether or not we want to
02:15perform without dialog and the whole idea here is that we don't want them to
02:18have to use the dialog, so we will yes, we will perform without dialog then we hit OK.
02:23And now when we go into Browse mode and save our layout, now we see a little
02:28hand cursor button pops up, but now when the user clicks on the Column header,
02:33it will sort based on the value that we indicated in the button. So in addition
02:38to having your users trained to use the Sort dialog window, you can also make
02:42any object that's on the layout, a button that they can just simply click on
02:46and then give them the desired sort order.
Collapse this transcript
Maintaining a record sort order
00:00One of the new features in FileMaker 10 is the ability to maintain the sort
00:05order of your record set. This isn't so much a feature as it is the way that
00:09FileMaker is handling things behind the scenes but it actually provides a lot
00:13more intuitive experience when working with large sets of data and at the same
00:17time something that your users are going to appreciate.
00:20Let's take a look at how we would sort records. What I have done here is I have
00:24attached buttons to the column headers on each one of these columns here. So
00:28for example, if I click on Customer Name, you can see that it will sort by
00:31customer names. If I click on SLP, it will sort by the sales person that's
00:39associated and Ordered, it will sort by date.
00:42So if we look at the SLP, the interesting thing here is that when you sort
00:47something, the sort order is now saved with the view that you are currently in,
00:51as any one user. Now if you make a change to a record on the database -- so for
00:56example, now we have got a sort order of salesperson. If I go in and choose a
01:02different salesperson, let's say Nicole, now when I commit this record, so
01:06watch the 1184 record. I commit the record and now you will notice that 1184 is
01:12now gone and instead you will see it listed in the other individual's record
01:20over here with Nicole.
01:21So we will try that again. You can see that 1051, we will assign that to Linda
01:27and then when we commit the record, you notice that it automatically resorts.
01:31So this is very handy because frankly, the way that you did it in previous
01:35versions of FileMaker, you would do your found set and then you would sort it.
01:38Any time you made any changes, whatsoever, it would require that you resort in
01:42order to be able to see anything in the desired order.
01:45Now also, I am going to open up a new window here which will emulate what it
01:53looks like on the network and you will see that other users that are working in
01:58FileMaker, when they do a different sort than the one that I have got, it
02:02doesn't affect my record. It's all session based and of course, we don't want
02:05it to affect the different records. When a field is modified in another
02:09machine, if you notice here, we have got Home-to-Home Designs. We will go to
02:15the top record here.
02:17One interesting behavior is I will pick this Erickson's Workshop and I will
02:22change it to Nicole. Now just so that you are prepared for this, notice that
02:26when I change it, I haven't yet committed the record but it already changed in
02:30the other users found set. So I pick Jeffery at the Peaceful Garden Spot and
02:35you notice that it's gone now. Same thing is true for this one. If we look at
02:40House-to-Home Design Centers, it automatically is removed from the list.
02:45Just something that you want to it set is an expectation but it's actually a
02:48really cool feature. If users are sorting by records, then when someone else
02:53changes the values or even if they change it themselves, it doesn't require
02:56resorting, it just automatically updates on screen.
02:59So this is, kind of, a live or active sort order. So now that FileMaker 10
03:04maintains record sort orders, this is going to take a lot of steps out of
03:08having to maintain your own individual sort order and keep resorting all your
03:12records each time you make data changes.
Collapse this transcript
13. Value Lists
Creating static value lists
00:00When you are working with entering data in to a FileMaker database, you may
00:04find that you are entering in some of the same values all of the time in each
00:07one of these records.
00:09So for example, here there are only so many seasons, so while users are
00:13entering adventures into the database, they are to having to type in all the
00:16different seasons each time. One of the ways that you can make this easier on
00:20your users is by creating something that's called a value list. A value list
00:24can then be assigned to the field in the form of a drop-down menu, for example.
00:30So let's take a look at how you create value lists in FileMaker. You go under
00:34the File menu; you can see that next to Manage we have manage Value Lists. This
00:40is where all the lists that you created are stored within FileMaker and then
00:43you can go in and edit any of these, if you need to. If you want to create a
00:47new one, you hit the New button and then give it some kind of logical name in
00:51case you need to assign it to a field in a different layout.
00:55Let's say in this case, we will call it Seasons and you have a few different
00:58options but the one that we are going to focus on right now is using custom
01:01values. This is where you are building a static list, which means that every
01:04time a user invokes this list, they are going to see the same values each time.
01:08So in this case what we will do is we will click in to this box and it's just a
01:11text area. You will type each value in and a Return to limit it list and hit
01:21OK. Now you see that value list is stored inside the file. Now it's available
01:27to be assigned to the field.
01:29Now in a later movie, we will be talking about the Field Control Setup dialog
01:33but just to show you how you can assign the value list to the field, we just
01:36quickly go into Layout mode and right- click on the field, select Field/Control
01:42> Setup and choose Drop-down List. Then pick your Seasons drop-down, hit OK, go
01:53back into Browse mode. Now what you will see is that when your user clicks on
01:57this field, they have some predetermined values to choose from, which can save
02:01them some typing; but the real benefit here is that you can make the data that
02:05users are entering in more uniform. That becomes a big issue when you are doing
02:09reporting or searching on certain data. You want to make sure that some users
02:13don't spell words in different ways than others.
02:15By creating a value list, you can provide them with options to choose from
02:18rather than them having to figure out what data to enter in. Static value lists
02:22require manual entry of the items that will appear in the value list, like we
02:25have just done. You will want to use a static value list, when the values, you
02:29wish to present to users, will change rarely or never.
Collapse this transcript
Creating a value list from a field
00:00FileMaker Pro provides you a couple of different ways to allow users drop-down
00:05menus or even just lists in different formats for them to choose from, when
00:08entering data in to the system. For example, you see on the Season field, when
00:14a user clicks or tabs in to that field, they are presented with various
00:17different options for the season. This makes data entry a little bit easier, so
00:21that users are choosing rather than having to enter in their own data. Then you
00:25can provide more consistency of data entry that way as well.
00:28Here what we have done is we have set up what's called a value list with some
00:31static values in it, but sometimes you want your value list to be more dynamic.
00:36Dynamic value lists are created on the fly and they can be based on data that's
00:41already in a field. For example, in this Adventure table, it has a field for
00:45Country, as you see that I have clicked in to here and this contains values
00:49really of all the different possible countries all over the world.
00:53Now sometimes, you might run in to problems, when you are trying to report on
00:55the countries, if users have instead of putting United States, they put USA, or
00:59maybe they have spelled different countries wrong. So this is a great example
01:03of allowing them to pick from previously entered values but still allow them to
01:08enter in their own. That way you can save some data entry issues.
01:11So the way that we do that is we set up a different type of value list. So we
01:14go into File > Manage > Value Lists. We are going to create a new value list
01:20and we are going to call this one Countries. Now we could just enter all the
01:26different countries in the world in to this custom value list. Probably not
01:29realistic, but instead what we will do is we will say Use values from a field.
01:34This will give us a list of previously entered values in the Country field.
01:38Basically, what we are doing is we are picking a field. So first we pick the
01:40table and then we pick the field, real simple and include all values. We hit OK
01:47and we hit OK again. Now what it will do is create a value list based on the
01:54index of a field. It's important that if you are pointing to a field to
01:57populate your dynamic value list, you have to make sure that it's indexed. So
02:01inside your File > Manage > Database, you scroll down to country. You can see
02:07that this one is, in fact, indexed. We also can see what the index is.
02:11A little developer trick here. If you will click in to the field and hit
02:14Apple+I or Ctrl+I, you can see all of the previously entered values. Now all
02:20the duplicates are removed here. This just gives us a non-duplicated indexed
02:23list of all the different countries. Since an index is created, we can borrow
02:27that index and use it as a drop-down.
02:29So we will assign that, right-click, Field/Control > Setup, pick Drop-down List
02:38and choose Countries. We hit OK and go back in to Browse mode. Now you see that
02:47users have the opportunity to pick a previously entered value, rather than
02:52having to figure out how to spell their own, or to determine whether not it's US or USA.
02:58So by formatting a field as drop-down menu based on a dynamic value list, you
03:02can still allow users to enter in new values but at the same time allow them to
03:07choose from previously entered values.
Collapse this transcript
Displaying second values and only second fields
00:00When you are using a dynamic value list in FileMaker, you have a couple of
00:03different options for controlling the appearance and the contents of the value
00:07list itself. Let's take a look at an example of this.
00:10If you open up the Exercise File, Lucky_ You_Tours_13_03 and you navigate to the
00:15Trip Detail layout, you will see that we have no records in the database. What
00:19we want to do here is create a new record for the trip but we want to use a
00:23value list to allow the user to pick an Adventure or a Guide.
00:27So in that case, let's first set up a couple of value lists. We will go in to
00:33Manage > Value Lists and we are going to create a dynamic value list to
00:38populate all of the different adventures. So we will say values from a field,
00:44pick adventure. Now here the key is that, what needs to appear in the field is
00:50actually the id of the adventure. We'll talk more about the concept of ids and
00:55how they relate to table relationships in the relationship videos, but for now
00:59understand that our goal is we want to have the adventure id show up in the
01:03this field and the guide id show up in the field and we are done.
01:07So that seems easy enough. We'll just create a value list, go in to the value
01:11list, select id and then hit OK. We will call this one AdventureID. We hit OK
01:20and we have one in there for Guide already but let's go and attach this one to
01:24the Adventure right here at the Adventure Name. We will go in to Layout mode,
01:30pick up the AdventureID field, right -click on it, go in to Setup, pick
01:36Drop-down Lists and choose AdventureID. Simple enough. And we will go back in
01:43to Browse mode, hit Save and let's create a new record. We create a new record
01:49and click inside this field.
01:51However, all that shows up here are ids, which is fine because what we want to
01:55do ultimately is populate this field as one of these ids, but what the main
01:58problem is here is that when users look at this list, they are not going to be
02:02able to tell which id goes with which adventure. So there's a way that we can
02:06do this in the value list. You go in to the Manage > Value Lists and choose
02:12the AdventureID and we hit Edit, we will select Specify field. Now you will
02:19notice on the right hand side it says Also display values from second field.
02:23We are going to take advantage of that opportunity and we are going to click
02:26here and say instead of just the id, show us also from the adventure table, the
02:33name, the title of the description. Let's go back and now take a look at how
02:40this displays on screen. This is great. So now we have the ids and we have the
02:46names but you will notice here that everything is in the order of the ids. So
02:51it could be a little bit hard for users just to scroll through this one. It
02:55might be a little bit easy, if they were alphabetical.
02:57We can also control that through the value list. So we go to Manage > Value
03:01Lists, AdventureID and you will notice down below here we can sort values using
03:08the First or Second field. Let's pick Second, hit OK and go back to the value
03:15list, much better. Now we can look for the values sorted by the second field,
03:21displaying the second field but as you see when we pick one of them, it
03:25populates the field, as it should, with the id only.
03:29You will see that we have another example of this already set up on the Guide.
03:34When we look at that on in Browse mode, we will see that it's doing something
03:44similar. In this case, what it's doing is it's only showing the name of the
03:48Guide but it's populating the id. Well, there is one extra step in that case.
03:54If we go in to Value Lists and Guide, you will see that it's set up with the id
04:01as the primary field. This is the value that will actually populate the field.
04:06This is the one that the user will see but you see here it says, Show values
04:11only from second field. So even though the id is never being displayed to the
04:14user, it will still be populated.
04:18The whole idea is to give the user the drop-down menu with values that they can
04:23make sense of. So when you are creating value lists, you have the option of
04:27displaying second fields and making a lot easier for your users to make data
04:31entry decisions.
Collapse this transcript
Setting up field controls
00:00FileMaker Pro provides many tools in Layout mode for configuring the behavior
00:04of fields and the primary tool for configuring these field options is called
00:08the Field/Control Setup. If you go into the Lucky_You_Tours 13_04 file and
00:13navigate to the Trip:Detail layout, in Layout mode you can see that we have
00:19series of different fields on screen.
00:22Now our objective here is that we want to assign some previously configured
00:26value lists to the field and as you may have seen in some other movies in this
00:30chapter I have been using the Field/ Control Setup dialog to do so, but we are
00:35going little closer look at this dialog and see what some of the different options are.
00:39First I will choose one of the fields, in this case the adventure_ID field and
00:45there are a couple different ways we can get to the Field/Control Setup dialog.
00:48The most popular way is to right-click on field itself when you are in Layout
00:52mode and you can see the Field/Control Setup dialog. However, if you are a Mac
00:57user and you have the mouse without the right-click, you can hold down your
00:59Ctrl key and click and that's how you can get to the contextual menu. But
01:04otherwise the more traditional way is to select the field, go under Format and
01:08then you can see Field/Control and navigate over to Setup. Or you can use the
01:13quick keys for Option+Apple+F. We'll select the Field/Control > Setup and
01:19we get the Field/Control Setup dialog. Now keep in mind what this is asking us
01:22is for the options just for the field that we have selected. This isn't
01:26something that's layout based.
01:28So for the adventure_ID field we have some Style options and some other options
01:34that I will review here in a moment. But the first one that you will know is
01:37that this is where we say what field this is supposed to be. So when you first
01:41place a field on a layout you get a window that looks about the size of this
01:45one here that asks you to pick the table on the field that you want to place
01:49and you can reassign a field that's already on a layout.
01:52So in this case I could switch this up if I would like to and pick a different
01:55field but we will just keep that as is. Here you see under the Control Style
01:59section, we have got some options to display the values in certain ways and to
02:04choose different options based on the display selection. Here you see that this
02:08field is already setup as what's called a Drop-down List.
02:11Now I am going to go through all the different options that you see here but
02:15you should know that the default is an Edit Box. So a field when it's first
02:19placed on a layout is just going to be an Edit Box, which just simply means
02:23it's a blank field that users will just type right into. And then the options
02:26that are below here are all the different data entry value list options and the
02:31one that selected here is the Drop- down List. And after you choose the
02:35Drop-down List and after you choose a drop-down list, you will select what
02:37value list you want to appear in the drop-down. In this case we picked
02:41AdventureID and then you have some options when you choose a drop-down list of
02:44including an arrow to show and hide the list and then also the edit.
02:48Let's take a quick look and see what that looks like in Browse mode. So when I
02:55click into this field you see that I get this drop-down list and there is
02:59another type of a list that we are going to look at in a second that's called
03:01the Pop-up menu but the Drop-down List style allows the user to select an item
03:05from a value list or manually enter the value. So I can choose one these values
03:11or I can click twice not necessarily double-click but click twice and then just
03:17type something in and it gives me either one of those options.
03:20So this is a good interface choice when there is a large number of values to
03:23choose from because users can then use the arrow keys. If you click in here I
03:28am now clicking on the arrow keys up and down to allow them to type ahead or I
03:34can type gal for example and than it goes right to the Galapagos. So it gives
03:39user some options on getting through all the different choices off the keyboard
03:43and then users can also click on Shift and click multiple values too if your
03:49business rules make sense to allow them to do that.
03:53You saw the option in Layout mode, if we go back there, Field/Control > Setup, to
04:01include the arrow to show and hide the list. It's not a bad idea to do that
04:04because sometimes users may not know there is a drop-down menu there or you may
04:09want them to be able to tab into it and just have this as an optional drop-down
04:14values. So in this case these are really a suggestion. You can pick something from
04:19the list if you would like or you can just enter in your own value.
04:22So you see when I click into the field it does not drop the arrows down but
04:25when I click on that it does. So this is an option that really depends on the
04:30business rule and in this case we will leave it as an arrow. The most important
04:35thing about the Drop-down List is that it allows the user to either pick from
04:38the value list or to manually enter a value into the field, which is different
04:43from the Pop-up menu. Let's pick the Focus field and apply a pop-up menu. This
04:48time I am going to right-click Field/ Control > Setup and as you see it's got in
04:53this case the Display Option of Edit Box which is the default and I am going to
04:58choose Pop-up menu.
04:59A field that presented as a pop-up menu requires the user to make a selection
05:03from a menu with the mouse. The menu then takes up as much of the screen as it
05:07needs so as you will see when we will go there in a second it could be a very
05:10long list and the user must pick one of the values in the value list. There is
05:14no option to bypass that and sometimes if your lists are larger, it could be a
05:19little bit clunky because it is going to fill up the entire screen. And
05:22although it is possible to Shift+Click multiple items, the user can clear the
05:25entry in the field by pressing the Backspace key.
05:27So even though you are making sure that they pick something there are still
05:30some ways that they can bypass out of it, but why don't we take a look at what
05:33that looks like? We will say focus, go into Browse mode, save our changes. So
05:40remember this is the value, the Drop- down List, we can bypass and enter our own
05:44value. Here is the focus; this one requires that they pick one of the items in
05:51the list, which has its own benefits. Sometimes you want to present a dropdown
05:56on screen because you want to make sure that users are only picking the values
05:59that you provided for them. This is a very good way to maintain the integrity
06:04of you data and keep all the data that's been entered consistent especially
06:07when it comes down to reporting or doing Finds in your database.
06:11So really when your making the choice of picking a pop-up menu you are doing
06:14that because you want the users to only pick the values that you provided for
06:18them. Now in somewhat of a contradiction there, if you go back into the
06:23Field/Control Setup dialog you will notice that you could also put in other
06:27option, which will allow the entry of other values. In that case it doesn't
06:32let them-- as you see it doesn't let them click beyond the Drop-down List and
06:38type something in it just says Other and than up on screen will pop and then
06:47this is the way that they can bypass the dropdown.
06:49So you really are not getting the benefits of the Pop-up menu in this case. So
06:53really the way that you should make this decision is, should the user be picking
06:57from your list no matter what? Or do you want to give them the option to
07:00bypass? That's how you choose between Drop-down Lists and Pop-up menus.
07:03Next back into Layout mode, let's select the field called Ref on the bottom
07:11and we will right click on that, go to Field/Control Setup and we are going to
07:15choose the next option which is a Checkbox. Now you will notice that we are
07:19choosing from existing value lists and there were some other movies in this
07:23chapter on creating value lists but you should know that if you don't have one
07:27in here already you can just click down to the bottom and select the Manage
07:30Value Lists option, you will be able to add or modify your own.
07:33But here we will pick Checkbox and we are going to pick Referral and
07:36checkboxes here is little bit different. You will be able to see what this looks
07:40like in Layout mode already. This style presents the value list as a set of
07:44checkboxes that the user can toggle either on or off. The selected items are than
07:48stored as a return delimited list in the order in which they were selected,
07:52which could be useful at some point for you. But the real reason that most pick
07:57checkboxes is because unlike these other options where I can pick one of the
08:02values in a Drop-down List and one of the values in a Pop-up List here I can
08:09pick multiple values or even all of them for that matter.
08:14So these options are not mutually exclusive. So if you want to provide your
08:18users options for entering more than one piece of data into the field and
08:22whether it will be stored in other areas if you don't have a checkbox assigned
08:25to it, it will look like a return delimited list of these values and if you
08:28want to do so than in those cases than you will use a checkbox.
08:32We go back into Layout mode and select the Previous field, right-click on it
08:38and go into Field/Control Setup. We are going to choose the last item of the
08:44four here, we are going to choose Radio Button Set and I am going to choose Yes
08:49and No as the value list. So if we hit OK we can see what this looks like in
08:54Layout mode and this is similar to the checkboxes except these are usually
08:59intended to be mutually exclusive options.
09:01So unlike in the checkbox where you pick this because you want users to be able
09:04to choose potentially multiple options, here you just want to choose one or the
09:08other. So we go into Browse mode we can see how that works. See it's either Yes
09:13or No. As one them as selected the other one is not selected. So the radio
09:17buttons are intended to be mutually exclusive and the checkboxes are meant to
09:22provide more than one option.
09:23And than finally we go into Layout mode and select the Embark field and then go
09:30to Field/Control > Setup. You see that it has got a style assigned to it that's
09:34called Drop-down Calendar and the Drop- down Calendar when you view it in Browse
09:38mode allows users to enter a date into a field using a small drop-down
09:42calendar. And this is something that users are generally more familiar with
09:46from websites, I think airline websites use this quite a bit, and it was a very
09:50popular feature when it was introduced into FileMaker and what's nice is it cuts
09:54down on errors a lot because your people don't have to think OK what's the date
09:58next Friday, that type of thing. So here they can pick any date that they want
10:02and you see it shows up automatically in the field. Now the option that you
10:06have to choose from there, similar to the Drop-down List, is whether or not you
10:12want to add the icon to show and hide the calendar.
10:15So in that case if you do that, just like we did in the AdventureID with the
10:19Drop-down List, once a user clicks or tabs into it, it automatically shows the
10:24calendar. With the selection on they will have to hit on the icon itself in
10:29order to show it. So it depends or whether or not you want to show it each time
10:32the user enters the field or make it optional. And this will allow for faster
10:36data entry by users.
10:38So all of those options can be accessed via the Field/Control Setup dialog and
10:43there are really two primary benefits for formatting fields in any one of these
10:46options. The first is to allow for faster data entry by users, like you see in
10:50the case of the calendar or even some of the drop-down menus, and then second
10:53it leads to greater accuracy because any time a user manually enters data
10:57into a field, you could run the risk of misspelling or some kind of
11:00inconsistent entry. Providing a list of values to choose from in any of these
11:04options will go a long way toward ensuring consistent data entry.
Collapse this transcript
14. Printing and Saving
Previewing pages and print options
00:00One of the benefits of FileMaker is that you can print any layout that you can
00:05view on screen. So you don't have to print special print layouts, but there are
00:09some ways to approach that that can help you get better results.
00:12If you use the tools that FileMaker gives you to visualize what your layouts
00:15will look like, then you can make all your layouts look like print layouts. And
00:19the main tool is Preview mode, I will show you Preview mode in just a second,
00:23but the first step that you want to take is going into Layout mode and when in
00:28Layout mode what I wanted to bring your attention to is this line right here,
00:32you see a line there and you also see a line here. These lines are what a page
00:38edge looks like in Layout mode and the idea is that they are there so that you
00:42can develop around them.
00:44If I were to print this, it would cut off my photo field and therefore I might
00:48want to make the photo fields fit inside this line. It's also important,
00:52though, to look at where these lines come from. These lines are coming from the
00:55print driver that I have selected on my computer. This size might fluctuate a
01:00little bit. Generally, you can get an idea where things may print and where
01:03they won't print, because they are all kind of based on 8.5X11 for the most
01:07part, it serves as a good guide as a result.
01:10In Browse mode when you want to see what something is going to look like
01:13printed, you see this button here called Preview. Preview is meant to show you
01:18what your report will like when it prints out in the printer. This is another
01:22good way to take a look at what will get cut off. So we see here that we want
01:25to go in and make the header a little bit smaller and move the photo field over
01:30and possibly make it a little bit smaller.
01:32And that is the role of Preview mode. So between Preview mode and Layout mode
01:37using the print guides, you can use these FileMaker tools to take all the
01:42guesswork out of the way that your layouts will look when they print.
Collapse this transcript
Printing from List view
00:00When printing in FileMaker you really have two different options for how you
00:04are going to print your data. You can either print it as one record at a time
00:07or you can print it multiple records at a time.
00:10The most common way to print multiple records at one time is through a List
00:13view. That way you get more records on screen and it makes for more efficient
00:17printing. There are a couple of ways that you can maximize the amount of data
00:20that you get in your printouts. The first of which is in the layout itself. If
00:24you go to the layout, you will notice that the height of the body style
00:28matters. A good rule of thumb is to make sure that the size of the body part,
00:33which is indicated here for total height, you see it's 25 pixels, it's a good
00:37idea to have that be just a smidge above the height of the field. Because,
00:42otherwise for example, if we go back in the Browse mode here and we hit Preview
00:48mode, if we scroll all the way to the end, this will tell us that it will take
00:505 pages to print all of the records in my current found set.
00:56If you go on to the Layout mode and you see by just having the body be in this
01:00case, just about 15 to 20 pixels higher and we go in the browse mode after
01:05saving, you see now we go into the Preview mode, scroll all the way to the end,
01:10it's eight pages long. So making some logical reasonable decisions when it
01:14comes to the height of the body part and to change it, you can go in here
01:19select the current value, hit 25 and now you will see it will shrink that down
01:24appropriately. Then when we go in the Browse mode, now you see that we have got
01:28everything fit on here in an efficient manner. And then also you can control
01:33what prints on screen, you don't always have to print every record in your database.
01:38So keep in mind that anytime you print multiple records, it's only going to
01:42print the amount of records in a found set. So at any given time if you just
01:45hit Show All and you see Show All is grayed out here. That means at all our 115
01:49records that are stored in this table are currently visible. But maybe we don't
01:53need to print all of those, so if I right click on one of these items and let's
01:58say just go Find Matching Records, now I have lowered it down to just a seven.
02:03So when printing in List view, make sure that you've made the most efficient
02:06layouts and that you are only printing the records that you need to and this
02:09can help you generate precise and efficient outputs.
Collapse this transcript
Printing from Detail view
00:00When you are printing records in FileMaker, you really have the choice between
00:04printing multiple records at a time or just printing one record. And
00:08traditionally if you are going to just print one record, you probably want to
00:10create a form view or a detail view.
00:14So in these cases you are going to want to create a layout. If you go under the
00:17View menu, it has a View as a Form. If you go into Layout mode, you will see
00:23that the body is a much larger size than, for example, if you were in the List
00:28where the body size here is only about 43 pixels high, in the Adventure Detail
00:34the body size is large enough to fit all of the fields that are relevant to the
00:39Adventure Detail, which is the table that this layout is based off of.
00:43And the idea though is that if you go into Browse mode and switch your View
00:49option from Form to List, it will print one record of this size for every
00:55record in your found set, which you might not want to do. So the way that you
00:58can get this to gray out so that your users can't make this change is to go
01:02into Layout mode, then go to Manage > Layouts, select Adventure Detail and
01:07Layout Setup.
01:08Under the Views tab you can choose whether or not a view can be a Form View or
01:12a List View. So if you have a view that's intended to show multiple records,
01:16make that only a List View and one that's intended to only show one record at a
01:19time. Make that only a Form View and then also you will need to be aware of
01:25what this is going to look like when you print it out.
01:28So here you see that we have got a view that was setup for data entry purposes,
01:32but unfortunately it's not optimized for printing, because it would get cut
01:36off. So although FileMaker certainly has strength in allowing you to print
01:40whatever layout you can see on screen, don't feel like you need to do that. You
01:44can setup a print screen for just printing one record at a time like the one
01:49that we have here in Adventure Sales Detail. In this case when we go into
01:53Layout mode, we've got only the information that we want to print on screen and
01:58by using the print driver guides we can make adjustment to make sure everything
02:03fits within these parameters on screen.
02:06So keep in mind when you are printing one record at a time that it's okay to
02:09create a print layout and in that case you can have more control over some of
02:14the items that will print as you are outputting your one record.
Collapse this transcript
Sliding objects
00:00When you are considering allowing your users to be able to print off layouts
00:04that you have created in FileMaker, there's a couple of things that you might
00:06want to take into consideration. First off, you know that you can print any
00:10layout that you can see on screen.
00:12Now the issue with that, as we will see in Layout mode, is that not every
00:16layout is print ready. As you see here, we've got the print margins that cut
00:19right through my photo field and right through about one-third of the header.
00:24So this might not be the best view to print. You shouldn't shy away from
00:28creating your own layouts that's specifically made for printing. As you can see
00:32we have got one in here that's called Adventure Sales Detail and this is a
00:36layout where I have decided to include only the fields that I want to see.
00:40Let's say in this case I want to create a tear sheet that I can use to print
00:43one offs for a chosen adventure and this will print one tear sheet per adventure.
00:49Now I have decided I want to have the description and press quote, photo and
00:53price fields on this layout. And I can see when I go back into Browse mode, I
00:57can get an idea of what these are going to look like printed out. So I say
01:00Preview and I cycle through the different records and this all look great now.
01:05The one thing is though that although my footer looks good and the space
01:09between the footer and the price looks good, what are we noticing here on
01:13screen, what we are seeing, tons of white space in most of these records and
01:18the reason for that is because we had to size the field for the description, so
01:24they could accommodate large descriptions like this one. So if we go into the
01:28Layout mode and look at this a little bit closer.
01:30This is about the size that we needed in order to accommodate some of the
01:33larger descriptions and one of the ways that you can look at what the size
01:37might need to be is when you are in Layout mode, if you go to Layout > Show
01:42Sample Data, here it shows the data from the record that we had that was active
01:47and this is great in fields like this, for example, where you want to make sure
01:50you can fit four digits with two decimal places and a dollar sign. But here if
01:53we sized out the field just for that record, it gives us some kind of
01:58unattractive white space.
01:59There is a way that you can control this when you are in Layout mode. You go
02:02into Layout mode and I am holding down the Shift key so I can do multiple
02:06selections here, but I will select Label and the field for Price, the Photo
02:11field, the Quote field and the Description field.
02:15While I have all those selected, I am going to go to Format and set Sliding
02:20Printing. This is an option that allows you to either shift items to the left
02:25or shift items up, so that the layout object will only size itself as large as
02:29it needs to in order to fit the data. Now in this case the layout size that we
02:35have put on the field, that's going to be the maximum size so it won't slide
02:41more and make it larger, so the idea here is that I can make this description
02:44field as large as I need to, to accommodate some of the descriptions that have
02:49a lot of data in them. But what we wanted to do is slide up when there isn't a
02:53lot of data in that field.
02:54So what we will do when have all these items selected, because we want them to
02:57all slide up in these cases. As we select Sliding Up, our options there are
03:02Only directly above and All above. And you see there are some diagrams that
03:07indicate this. So here is the item that would slide. Do you wanted to stop
03:10sliding when it reaches the next piece of text data? So this means if I had one
03:14field to the left and one field to the right, do I want this piece to slide to
03:18the bottom most field on the layout, or the one directly above it.
03:22So in this case we've only got all fields above it, so we'll just do All above.
03:27You will also see there is an option for reducing the size of the enclosed
03:30part. I have a body part that's created to accommodate all these fields. So one
03:35of the decisions I can make is if I am going to shrink up the white space, do I
03:39want the rest of the body part to shrink up as well? In this case we've got a
03:43footer that we want to print out at a specific 8.5X11 size, so we will say no
03:49on that. But if I hit OK and go into Preview mode, after saving, here is the
03:57record that we originally created and you can see that this has got the footer
04:01printing out as one page tear sheet.
04:03Now as we go from record to record, you see that now everything will slide up
04:07to make it look nice and clean just below the description and dynamically
04:13adjusting itself as you go from record to record. This is called Sliding
04:16Objects. Use this tool if you want to control white space on outputs from your
04:21FileMaker system so that you can create cleaner and more professional looking
04:25reports and printouts.
Collapse this transcript
Printing merge letters
00:00One very popular request from FileMaker users is the ability to print letters.
00:05And much like other applications like Word for example FileMaker supports Merge
00:10Fields. Navigate over to the Confirmation Letter layout. I'll show you an
00:14example of how this technique works.
00:17First you'll need to go into Layout mode, let's first look at what it might
00:20look like if we drop fields into the layout like we do with all the other
00:23layouts. Here we have the Field tool and let's say I drag the first name over
00:31to where I have placed text on the layout. You'll notice I can line-up the text
00:36which I have just drawn with my Text tool by simply typing in Dear, for
00:41example, and I will delete that by hitting the Delete key.
00:45In order to line the text up with the field, it might not be too difficult, we
00:49could probably align these, but the problem is when we want to use information
00:53in line with the text, like for example here, Thank you for choosing the insert
00:57name of package here, what if that is a half a sentence long, we would need
01:02this information to wrap, now if it was all text it would wrap but if it's
01:05fields, it would not.
01:07So what we want to use instead of inserting a field would be inserting a Merge
01:12Field. I am going to go ahead and delete this field here and I am going to
01:17click inside the text area that I have created. So I have got Dear and then
01:21space and now here's how you add a Merge Field in the FileMaker layout. Go
01:26under the Insert menu and at the very bottom you see Merge Field, you can also
01:31do Ctrl+Option+M and that will insert a field as well. And in either case it
01:38will pop up Specify Field dialog.
01:40This is the window that allows you to choose which field you want to insert and
01:44here we are going to choose the first name field and hit OK. And now if you
01:49look on your layout what it's done is it's inserted in a Merge Field, but
01:53what's interesting about this is that it's actually just another piece of text.
01:58However, it's different than the text because you'll see when we go into Browse
02:02mode and Save.
02:05As you cycle through each record, it's dynamically placing in the first name
02:10value from the record that you are at the time. But since its text, we can go
02:14in Layout mode and we can tighten this up a little bit. So for example I can
02:20make a space then the colon and I can make just one single space from Dear. And
02:27down here we will want to include another Merge Field, Insert > Merge Field and
02:34let's pick booking, how about the adventure, we'll do adventure name.
02:41Now in this case you'll notice something different. What I have done here is I
02:45have inserted the Merge Field for the adventure title and I am going to tighten
02:49up the spacing just a tad. But what you'll notice is because it's text and
02:54because it's text on the layout I can apply text formatting to it. So in this
02:58what I have done is gone in and made this bold and italic as well.
03:04So the same thing I can do with any kind of text on screen I can do with the
03:08Merge Field. Take a look at what both of these will look like in Browse mode.
03:12So now that you see as I cycle through each one of these, I get a wrapping
03:16effect. If this was actually two lines worth of text it would wrap around,
03:21because it's inside a layout as text rather than a field.
03:25So it's a good idea when you are creating letter layouts that you always use
03:29Merge Fields.
Collapse this transcript
Saving as a PDF
00:00FileMaker allows you to output certain layouts that you've created, either as
00:05hard copies through printing, but also as a PDF or an Excel, in this movie
00:10we're going to talk about outputting your layouts as a PDF document. And it's
00:14actually quite easy to do. You'll just navigate to layout that you want to use
00:18to create a PDF. In this case we're going to go to Adventure Sales Detail and
00:24when you get to that layout, go to the File menu and select the Save/Send
00:29Records As and in this case choose the PDF option, where you will choose a name
00:35for your PDF file and the location where you want to save it, in this to the Desktop.
00:41But if you look down below you see that you've got some other options. The
00:45option is which records in the current found set do you want to print. You see
00:49here in the upper left-hand corner that we've got 44 records in our found set,
00:53so you'll need to determine whether or not you want to print one PDF per each
00:57of the 44 records, thus 44 total pages as one PDF document, or if you just want
01:02to print the record that's currently being browsed. In this case, we'll say
01:06Current record.
01:07The one kind of interesting option that you have here is you can choose Blank
01:10record. Blank record is useful if you've got a layout that has form on it and
01:15you don't want to have any record data inside the form, so you could use it to
01:18printout and distribute or give to users to fill out by hand so that you can
01:22use it to transcribe into your database. But we're going to choose Current
01:26record. And then when you hit the Options button to the right, you'll see that
01:30we have PDF Options and if you are familiar with creating PDF documents you'll
01:34see that these are the actual PDF options.
01:36This isn't like creating a PDF in your Mac OS print dialog, this is actually
01:41generating a real Adobe PDF document which gives you options for putting in the
01:46title, subject, author, keywords and so on, choose your compatibility options.
01:51And you can also require a password for a file and even the initial view in the
01:56different page layout option. So all that same stuff which you do when you are
01:59creating a real PDF. After you're saving it, you can include Automatically open
02:04this in the application.
02:06And also this is a neat feature; you can create an email with this file as
02:09attachment. So if somebody has contacted you and said, hey, can you send me a
02:12PDF of the Kilimanjaro trip via email? You can save yourself a step by checking
02:18the Create email with file as attachment; it will automatically author new
02:21email. You can then put in the address and type a message, but this file will
02:25already be attached.
02:26So in this case let's take a look at what the PDF looks like. We'll hit Save
02:31and now you see it's created a PDF of the one record that we've chosen in our
02:37found set. So keep in mind when you are deciding on how to output records from
02:41FileMaker that you can print them as a hard copy, but you can also save them as a PDF.
Collapse this transcript
Saving as an Excel file
00:00FileMaker Pro provides various different ways that you can share information
00:04that you store in your FileMaker database. You can export data and you can
00:09print hard copied of data and then you can save layouts in your database as PDF
00:14forms. Also as we'll be discussing in this movie you can export data out as an
00:20Excel file. And this is a great option for if you want to share data that's
00:24stored in your FileMaker database with someone who doesn't have access to the
00:27database. However, it's not intended to be an alternative to the data in your
00:31database. You shouldn't create an Excel spreadsheet and then make
00:34modifications. Then you'll just end up with version control problems.
00:38But if in fact somebody contacts you, let's say it's an accounting person and
00:42they want some information that's stored in FileMaker, this is an excellent
00:45tool for being able to share the data and it's really easy to do too.
00:49The first thing that you'll do is identify a layout in your FileMaker database
00:54that has all the fields on it that you want to export. And if you don't have a
00:58layout in your FileMaker database that has all those fields you can just
01:01quickly create one on the fly, or you can create one that has more than enough
01:05fields, by the time you get into Excel you can delete all those columns out
01:08that you don't need.
01:10This is very simple to do. You'll just go to the layout, go under the File menu
01:15and so Save/Send Records As and then choose the Excel option. You pick a
01:20location for the file that you'll be saving and you'll notice that something
01:24new here in FileMaker 10. You can either save it as an .xls, which is an Excel
01:3095-2000 Workbook, or now in FileMaker 10 you can save it in the new Excel file
01:36format, which is the .xlsx. And then you choose whether or not you want all the
01:42records that you are viewing in your found set, in this case it's all the
01:45records in the database, to total 115 records, or you can just say the Current record.
01:50We'll keep it as records being browsed and you'll notice that you have a few
01:53options, you can name the worksheet, title it, give it a subject and an author
01:58and you can choose whether or not the file will automatically open up in Excel
02:02after you've saved it. And also this is a handy little feature; you can create
02:07an email with this file as an attachment. So if someone calls you up on the
02:10phone and says, can you send me all the customer information for such and such
02:13and such and such? You can do a found set, find the right location, do File >
02:18Save As Excel and then check on the Create email with file as attachment and
02:23FileMaker will produce the Excel file and then attach it to an email and open
02:26it up in your default email application. But let's take a look at what the
02:30Excel Spreadsheet looks like.
02:31And you see what FileMaker does, it will give you the bold headings and these
02:36are the field names inside your FileMaker database and it puts all of the data.
02:41If you recall we had five columns in our FileMaker layout and so you see here
02:46we've got start, end, first name, last name of the guide and these are even
02:49related fields that are showing up here.
02:51So a really great tool for FileMaker, for sharing information on the fly is the
02:56Save As Excel feature, which allows you to save out in formats that can be
03:01share by those that may not have access to FileMaker.
Collapse this transcript
15. Reports
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. This allows you to do
00:08things like aggregate, organize, or otherwise just manipulate data that users
00:13have already entered in to your system into reports and outputs that give you
00:16visibility into data that you won't normally have.
00:19And the most powerful type of report in FileMaker is something that's called a
00:23Sub-summary report. At its essence, a Sub-Summary report is a way to present a
00:28list of data that's grouped by a certain variable. Let me give you an example
00:32of that based on a List View.
00:34If you look at this list view, this is a order_list layout and what we are
00:39looking at here is a bunch of information that's been entered in by the users
00:43of this database system and it's just one order from a customer to the tune of
00:47about 151 different orders.
00:50Now this is great, this information looks just like it does when the user is
00:52entered it into the system. But with one simple change we can turn a list view
00:57into a report. Now this isn't going to be Sub-Summary report but I am going to
01:00show you sort of the evolution of a Sub-Summary report starting from a list view.
01:04You go into a Layout mode, you notice that we have a Footer here and I can
01:09insert one type of field that can turn this list view into a report by simply
01:13giving the information that no user had entered into the database anywhere.
01:17A field that showing this information that's been aggregated rather than input
01:21into the database.
01:22You grab your Field tool and drag down to the Footer and choose the
01:27TotalSummary field and we'll open this up a little bit and this is a currency
01:33so we will go to Format > Number and we are going to Format as decimal,
01:37Currency and we'll hit OK and let's look this in Browse mode now.
01:42Now you see that one simple addition has allowed us to take what was normally a
01:45list view and see that now it's actually sort of a light sales report. You see
01:49that it gives us total of all the different orders that we see here and this
01:53total is based on the Found Set. And we could see that this value is Found Set
01:58specific because if we go into Find mode and click into the Customer and search
02:04for Erickson's Water shop we see that value changes.
02:07So what this is called is the summary field and it gives us a value that
02:10aggregates our accounts across a Found Set of records. Now, this is part of the
02:16logic behind building a Sub-Summary report.
02:19What we'll have to take a look at are the layout parts that make it happened.
02:22If you go into Layout mode again, you'll see that what we have here is a Header
02:26part, a Body part and a Footer part. We've talked about these in previous
02:30movies and I am going to introduce you to some new parts.
02:33If you go into Layouts > Part Setup you'll see that we are going to add a
02:38couple here. So first if you hit the Create button, you'll see that you got
02:41several different options here. I like to discuss briefly what these options are.
02:45In general, the summary layouts parts, which you see here in between the header
02:49and the footer, these summary parts have a certain behavior. What they will do is
02:53help you group data based on the certain break field that you introduce.
02:57I'll talk to you a little bit more about those as we get to it.
03:00So first let me introduce you to the Sub -Summary part. This is the backbone of
03:04any grouped report. So if we select Sub-Summary when sorted by, what this
03:10language is indicating is it wants to know how we want to group our reports. So
03:14you see that we've got a list view and our objective here would be instead of
03:18just having one large list view, instead what we'll have is a list of orders
03:22with grouped by customer. And that way each customer can have its own subtotal
03:27and at the end we can have a total that covers all of the different customers.
03:30So what it's asking us here is what you want to group by? So Sub-Summary when
03:34sorted by asks us to select the name of the field. Then you see here we've got
03:39a field name that is related and in this example you go to order_Customer.
03:45That's where we will find the CustomerName field, which is the field that we
03:48have on the layout. If you ever need to know what your break field is just go
03:51onto your layout, double-click on it and you can see what field you need to use.
03:54Now, when we hit OK, it's going to ask us a question, do you want to print this
03:58grouping part above or below the fields or the groups? In this example, we are
04:04going to say Print Above, because it's going to summarize the customer name and
04:09have that part above the body, which lists all the details.
04:12So we say Print Above and you see in the Part Setup that we now have a
04:16Sub-Summary part. So I'll hit Done. Let's take a quick glance of what this
04:20looks like. Right now it looks exactly like the layout that we had before and
04:24that's important to note because there is a couple of triggers that turn this
04:28into a Grouped Report.
04:29What you want to do next though is go in and put a field value somewhere in
04:34your Sub-Summary part. Here is the Sub- Summary part. If you click on it, you
04:37see it right there and it's pointing to your break field. So what you want to
04:41do is take your break field, select it and then move it up into the Sub-Summary
04:46part and it's also not a bad idea to group all the detail information in the
04:52same location here.
04:54So now let's go back into Browse mode and hit Save. And you see now that all
04:59that really changes that the customer name is no longer on there. Now the way
05:02that we invoke the grouping is by sorting by the break fields. It is a little
05:09unorthodox but that is the trigger or the on switch to our Grouped Report.
05:13So if we go into Sort and we select the order_Customer, select CustomerName and
05:21now we sort this information. Now suddenly on screen what we see is a grouped
05:26report. We went from a list view to a Grouped Report.
05:29You see we have a break every time a new customer's grouping starts and so what
05:34you have inside of a Sub-Summary report are little mini Found Sets. So you have
05:38your entire found set of a 151 total orders, but what it does at each group is
05:43create a Found Set for each one of the customers.
05:47Now we talked earlier about the role of the summary field and what it does is
05:51it aggregates across a Found Set. So you see here at the bottom of the report,
05:55it's giving us information on all 151 orders.
05:58If we go into Layout mode and first do a little formatting on that with
06:03thousands separator and move it over to the edge. By taking this summary field
06:11that already exits and copying it and pasting it to the layout parts, also as
06:18you saw you could see that the grouping started because the CustomerName is
06:22offset. But another good idea is if you select the Sub-Summary part, you can
06:26change the Fill color for the Sub- Summary part to give it a little bit more of
06:30a break. And if we select this field and we'll make it transparent and now we
06:36are going to save our layout and go onto Browse mode and our sort order is maintained.
06:40So now you see in this highlighted area that this one summary field that we
06:45created gives us the total summary when it's in the footer but at each one of
06:49these breakpoints it gives us this summary for each one of the customer groups
06:54and with a little bit of formatting you can have yourself an easy to view
06:59grouped report.
07:00Another approach is to separate the total from the breakpoint and you could
07:06just add another Sub-Summary that is also sorted by CustomerName and this time
07:13we are going to say Print Below the body part and we hit Done. We'll take this
07:18value and we'll put it immediately down below and maybe give it some text color
07:25and now we'll take a look at our report. Now you see that you have a separate
07:30part that's totaling the summary value at the end of each one of these details.
07:35So in just a few minutes, you can take any list view, add a couple summary
07:39parts to it and end up having yourself a grouped report which will allow you to
07:44aggregate, organize, synthesize or even manipulate data that other users have
07:49already entered into your database.
Collapse this transcript
Creating subsummary reports with no body part
00:00Once you become proficient in creating basic sub-summary reports you can then
00:04progress onto some of the more advanced sub-summary reports. In this movie, I
00:08am going to show you an example of creating a sub-summary report that has no
00:12body part in it.
00:13Imagine you've got a report that is a sub-summary report but instead of having
00:17the 151 orders that you have in the sample file, perhaps you have 151,000, then
00:20it's not very realistic to create a report for all of your customers when every
00:26one of the order details is listed here.
00:28So in this case what we want to do is create a report that just simply lists
00:31the customer and then their total. I am going to show you how to do that. We'll
00:36start in Layout mode. This one is a lot simpler than you may think.
00:41First of all, since we don't need any of the order detail we can get rid off
00:44the body part. So what you do is go into the Layout menu to Part Setup and
00:50you'll select the Body part and hit Delete. Now, let's take a look at our
00:54report in Browse mode.
00:57So we are almost there, we've got just one row and you see that both summary
01:01parts are showing up for each one of the customers.
01:04The interesting point here is that you can have a sub-summary that groups
01:07information, but not actually display the information. So in the background the
01:11data is still there, it's still been aggregated and grouped and displayed, but
01:15you don't have to actually show it.
01:17So let's remove one more of these parts. But first let's move the TotalSummary
01:23into the same line and go under Layout to Part Setup and select the second
01:29sub-summary part and hit Delete and now let's take a look at this report in
01:33Browse mode. So now you see what you have is the Customer Name and their Total.
01:38In order of each sub-summary row to group the sub-summary totals, this needs to
01:44be sorted by the break field. So matter of fact, if we go onto the Records menu
01:48and hit Unsort you see that it completely clears our report out because what
01:52it's done now is reverted back into the normal Browse mode but we've deleted
01:56the body part so there is no data to display.
01:58So if we go back into Sort and sort by the break field, which is the related
02:03CustomerName field, we hit Sort and now we see them all listed. Now this is
02:08helpful because what we were looking for is a report that chose all the
02:13customers. Now let's say your boss comes back to you and says, this is great,
02:16this is exactly what I want, but can I rank these in the order of best customer
02:21down to the lowest revenue producing customer?
02:24At first you might think, okay, that might be a problem because in order for
02:28sub-summary reports to work, you have to sort by the break field. FileMaker
02:34provides an interesting little way to make this work. If you select the sort
02:39value, because no matter what that has to be the first sort order, you can put
02:43secondary sort values in there, but definitely on top you need to have the
02:48break field.
02:49But if you go down here to this option that's called Reorder based on a summary
02:54field, if you check out that option and then find the summary value and in our
02:58example we used a field that's called TotalSummary.
03:01So now the language is kind of interesting because it's not saying sort based
03:06on this, it's just saying reorder it, because of course it knows already that
03:09in order for this to work, we will, if it's sorted by another value. Let's take
03:12a look at what that will look like.
03:14So now you see it's sorted, it's done it in reverse order which we can fix
03:17pretty easily, but it gives us the groupings with our break fields intact, but
03:24it does not have to show all the body detail and we didn't have to change the
03:27sort order. We can simply reverse this by selecting this and choosing
03:31Descending and with a couple quick tweaks in Layout mode we can go into Browse mode.
03:39And now we have a report that's not organized alphabetically by the break
03:42field, but instead by the highest revenue-producing customer down to the lowest
03:47revenue-producing customer. And what you can do to add more value to this
03:52report is continue to add more summary fields.
03:56For example, if I select TotalSummary, hit Copy and then Paste and double-click
04:02on this field and there is another field that's already defined in your
04:05database called OrderCount and it simply counts the number of orders.
04:09So what you can do here, resize it just a tad and go into Browse mode and take
04:14a look and with a simple tweak to this field, Format > Number and we'll just
04:23say General Format. Now we can clearly see how many orders were for each customer.
04:31So we just turned a list view into a sub-summary and then use the sub-summary
04:35part to give us an order breakdown for the customers. So the amount of orders
04:40that a customer had placed does not exist in the database anywhere. This data
04:44is generated on the fly and so as the total customer order revenue, both of
04:50those items are generated on the fly using sub-summary parts.
04:53This variation of the Sub-summary report will allow you to generate and display
04:57aggregate information fields to any user.
Collapse this transcript
Building dynamic reports
00:00FileMaker 10 is the first version of the FileMaker that allows dynamic
00:04reporting in List View and Table View. Dynamic reporting is really just a
00:08concept that's a combination of sub- summary reporting, restoring the Sort Order
00:13and Saved Finds all of which we've covered in movies earlier in this title.
00:17Let's take a closer look at how this dynamic reporting was created and the
00:21different elements involved. First if you go to the layout called Customer:tier
00:27and go into Layout mode, you'll see that this layout is made up of three parts.
00:32If we go to Part Setup, we see we have a Header, a Sub-summary and a Body.
00:38The Sub-summary is a sub-summary part when sorted by the field called tier. So
00:46each one of these is a customer and each customer falls into a certain tier and
00:51when we look at this in Browse mode the extra feature in this sub-summary
00:55report is that it can be updated live by the user. And this is because
01:00FileMaker no longer requires that a Sub-summary report be viewed in Preview
01:04mode but instead in Browse mode where users can interact with the data.
01:07First, we need to sort it by the Break field. So we'll go into Sort and we'll
01:12sort it by the Break field, which is Tier. Within the Tier we are going to sort
01:16them by CustomerName. So we can put in two sort values and this will trigger
01:20the report to group the data as you see on screen and so, so far we have
01:24employed the Sub-summary reporting and now I am going to show you how the
01:29Restore Sort Order works.
01:30So a user can interact with this information, you see you have got the summary
01:33of the total number of customers in each Tier. Now watch as I interact with the
01:37Tier by changing this to Tier 4 and committing the record, you see that the
01:42count automatically updates and the value automatically goes down into the next
01:46Tier. And you'll see this same thing happen here, Zen Garden we just added and
01:51you can do this really to your heart's content.
01:54So the idea here is that now you have an interactive grouped report in List
02:00View and you don't have to go in the Preview mode with this. The other thing
02:04that's new with dynamic reporting is that you can also view these in table
02:08View. Previously in table View you could not do group reporting, but now you
02:13have the ability to do so.
02:14So in order to get to table View, you can either go to View and pick View as a
02:18table, or click on the icon here that will bring us into table View. Now in
02:23table View you see that it will group all of these again based on the Sort
02:28Value and restore that Sort Value regardless of whether or not you are in List
02:33View or in table View.
02:34Now note that the user didn't have to leave Browse mode to go back in and do
02:39another found set. FileMaker 10's new dynamic reporting capabilities will
02:44change the way you develop reports, as you are no longer restricted by the
02:47Read-Only Preview mode which did not allow users to interact with their data.
Collapse this transcript
16. Importing/Exporting
Importing data
00:00FileMaker Pro allows you to exchange information with other applications by
00:04either exporting data to other file formats or by importing data directly into
00:08FileMaker Pro. Importing with FileMaker Pro is a streamline process that's
00:13activated through the File menu and the Import option.
00:18The Import Data function brings data from another data source, usually a file
00:21into an existing FileMaker Profile. So what we have got here is an empty
00:26FileMaker Profile and we are going to import data from another source into this file.
00:31We do that, we go under File > Import Records. I am going to choose the CSV
00:35file but I can also choose this Excel document with the .XLS file format, or in
00:41FileMaker 10, I can now choose a . XLSX file format because that's now
00:46supported. And I hit Open and now what you see is the Import Field Mapping dialog.
00:52Let's take a moment to review the Import Field Mapping dialog. The first thing
00:56you should know is that this window is split into two sides. On the left hand
00:59side, you have your Source, which in this case is the CSV file we chose and on
01:03the right hand side, we have the Target. Now the Target is important to know
01:06because a FileMaker file can have many different tables and so you want to make
01:12sure that you are choosing the correct table. In this case, we just have the
01:15one adventure table so it's an easy choice.
01:17You should also be aware that you can create a new table based on the data that
01:21you are importing into your file by choosing the New table option and this will
01:26not only import the data, but go and create a new table in your Manage Database
01:30as well as to final the fields, one for each column of the information that you
01:34are pulling in.
01:35In this case, we are just going to import the data into the current table and
01:38what you will notice is that we are seeing the data that's coming over from the
01:42Source field. So it gives us some visibility so that we can match these up, so
01:46the first task before you proceed is going to be to match up all the different
01:50fields and we can see that the focus would be Hiking, description, Argentina,
01:53country and here we might have one that needs to be changed. Here we see
02:00season, we click down on season and we move it up to where we see spring and
02:06now everything seems to be -- we will change maximum elevation.
02:10So you go through this process depending on your import source. If it happens
02:13to be another FileMaker file, you can just choose matching names and it will
02:17automatically sync all these up. Or if you have done any import from this
02:20Source before, you can just choose last order and it will sync all this mapping
02:24up for you. So generally, you really only have to do this one time and then
02:28FileMaker will store that for you.
02:29And in this case, we are going to add the records. We will talk about some of
02:33the other options here in a moment. Now that I have got everything mapped up, I
02:37hit the Import button and the option that comes up on screen says Perform
02:41auto-enter options while importing.
02:43What this does is if you have got any fields that are setup in your source
02:47table, in this case the adventure table, that have auto-entry options on them
02:51like, for example, creation date, modification date, serial numbers, any kind
02:55of lookup values. If you check this box, it will execute the auto-enter when it
03:01creates the new record that it's importing in.
03:03So easily put, it will add today's date to the creation date for a record that
03:08you are importing in from another source. So here we will say Import and after
03:13you do an import, you get a summary on screen. In this case, it indicates to us
03:18that the total records added/updated were 44 and the total record skipped due
03:23to the errors were zero. So it will tell you if it skips any records due to the errors.
03:28If in fact, you do run into any of those, what it means is that you had field
03:33validation setup inside the table and whatever the data was that you are
03:37importing into that field violated the field validation rule and therefore you
03:41would have to go in and switch that from Evaluate always to Evaluate only
03:45during data entry and we did a movie earlier in the title, on how to address that issue.
03:50So once your data is imported, you can then now work with it as if it is in a
03:55FileMaker file. There is a couple of other things that we can look at in the
03:58Import dialog. If we go back to File > Import Records and then File again and
04:04we will choose, in this case, the Adventures FileMaker file and hit Open, this
04:11is where you will notice that the matching name option is now available to us
04:13which takes all the mapping out of it.
04:15Just select mapping names and you see everything adjusts and syncs up
04:18appropriately. So the Source is the adventure table and of course, we want to
04:22pick the Target, which is going to be the adventure table in our file as well.
04:26But now you look down at the Import Action and you see that we have three
04:29options to choose from.
04:31The default option is called Add new records from a source file. When you add
04:35records, the import process is going to create a new record in the target file
04:38for each importable record in the source file. It's not importable like I
04:42mentioned if it violates one of the data validation rules.
04:46When you add records from most source file formats, the import process will add
04:50all the records from the source file into your FileMaker database. If in this
04:54case, we have got a FileMaker Profile, so we can add only the records in the
04:58Found Set of this file that we are connected to. So if you have source file
05:02opened, you want to make sure and go in and do a Show all, or intentionally,
05:06you can create a subset of data through doing a search and just import in that Found Set.
05:11You will notice there is an Update Existing Records in Found Set option; you
05:15can also choose the Import Action of updating existing records in a Found Set.
05:18With this option, you are going to replace the data in your file with the data
05:21from the source file. So, for each field that you import into, the data from
05:26the first importable record in the source file overwrites the first record in
05:30the target file.
05:31So more simply put, if you have 50 records in your import source and a 100
05:36records in your target the first 50 records in your target are going to be
05:40replaced by the records from the import source. This really is not a very
05:44common Import Action, but in case this is something that you need to do. It
05:47simply replace, it really should be called replace existing records in Found Set.
05:52But a very popular option is the update matching records in found set. You can
05:56update matching records and fields in your target file with data from another.
06:00So for example, you might have a copy of your database on your desktop computer
06:03and another copy in your laptop and then, you update a bunch of information on
06:06your laptop.
06:08When you come back to the office you want to sync that data up. All you need to
06:11do is choose the Import Action and then, you can go into the Import Field
06:16Mapping dialog and you have to tell it what is the matching field, so that way
06:20it knows how to identify which record before it does the updates.
06:24So here we have an ID and you will notice that when I have got this Import
06:27Action option chosen, I click on the arrow in between the two fields and you
06:31see down here by the Field Mapping key, I have selected the match records and
06:36so the rest of the records that I want to update actually let's say that I
06:40don't even have more than just the few records that I have updated out in the field.
06:44I can uncheck all the arrows and just choose the ones that I want to update
06:49from the field and also the other option is to add the remaining data in your
06:53records. So if I have added new records out in the field, not only will it sync
06:57the ones that existed, but it will add all the new ones that I created. And I
07:00will keep in mind that Match Fields must uniquely identify each entity in your database.
07:05So for example, in a database of people, you could use one match field such as
07:09like an employee number or maybe a combination of match fields, first name,
07:14last name and so on, because as you see here, you can pick multiple match
07:17field. You can combine them together and say first, middle and last name match,
07:22then I have got the right record to update.
07:24Then when you are done, you can hit the Import button and as we talked about
07:28before, you can choose to update the options or not and you see that 44 records
07:33are imported I had 44 in here already, so no new records were added and the
07:39records from the source file would have updated them in this case.
07:43So importing and exporting from FileMaker are done through Import Records menu
07:47commands and this allows you to exchange information with other applications.
07:52The importing and exporting feature serves as a valuable timesaving function,
07:56especially when you are working with large sets of data.
Collapse this transcript
Exporting data
00:00FileMaker Pro will allow you to exchange information with other applications by
00:04exporting data out of FileMaker into a file format that's compatible with the
00:08other application.
00:10So in this example, we are going to take a look at exporting and if you look at
00:14the file that we have, I have got 115 records and what I want to do here is
00:19export these out into a file format that can be read by another application and
00:22this is a pretty easy process.
00:24First, you navigate to the layout that's based on the table that you want to
00:27export and if you want to export all the data, then hit Show All, otherwise, if
00:32you only want to export some of the data, then first create a Found Set before
00:36you export, because the export is only going to export whatever you have in
00:39your Found Set.
00:40Then you go to the File menu and choose Export Records and choose the location
00:44where you want to save. In this case, we will save at the Desktop. And now you
00:49have to choose what file type. This is going to be based on what type of
00:52application you want to use to read this information.
00:55As covered in a previous movie in this title, you can also save records as a
00:59spreadsheet for use in Microsoft Excel, but you see here that those are also
01:03included as export formats.
01:05You can choose Tab-Separated Text or Comma-Separated Text, which is a .txt file
01:10or .csv file. Both of those are file formats that can be imported into nearly
01:14any database solution or any solution that stores data at all.
01:19You can export as a Merge file which can then be used in Word, for example, to
01:22create mail-merge, or an HTML table that could just be opened up in a Browser
01:27or hosted on a webpage, or you could export it out as another FileMaker Pro
01:31file which allows you to archive data for storage and retrieve it later, or as
01:36raw XML to be imported into another app. And then here you see the original
01:40.xls Excel file format or an Excel Workbook that is in the new supported .xlsx
01:48file format. But you could accomplish the same task by doing a Save As Excel if
01:53you would like.
01:55You probably notice if you have worked with FileMaker in previous versions that
01:58there are some file formats that are no longer supported for export. They were
02:02things like DBF or Basic, or some kind of outdated file formats.
02:06We are going to choose Comma- Separated Text and name this file Test and hit
02:12Save. And then we are presented with the Specify Field Order for Export dialog.
02:16On the left-hand side we see a list of all the tables inside this database.
02:22Here you would choose the table that you want to export. In this case, we will
02:26choose trip. And if you want to move all of the different fields at once, you
02:30can just hit the Move All button. You see them show up in the Field Export
02:33window. You can also hit Clear, but if you want to choose them one-by-one, you
02:37can select them and hit Move or double- click on them until finally you have all
02:41the fields that you want to export.
02:43Now once they are in the Field export order window, you can change the order in
02:47which they will appear in the exported file by clicking on one of these on the
02:51left-hand side and moving it up or to your desired position. If you make a
02:55mistake, you can select one of these and hit Clear and double-click on another
02:59one if you would like to.
03:00If there is some specific data in the database and you want to preserve that
03:05formatting, there is an option here for Apply current layout's data formatting
03:09to exported data. Those are unique situations but you should know that that's possible.
03:13Once you have selected all the fields, you hit Export and FileMaker will
03:17generate an exported file. You can export as many times as you would like in
03:21whatever way that you choose without any risk of changing or deleting the data
03:24in the original file, unlike importing where each time you import you are
03:28adding more records to the database.
03:30The importing and exporting features can serve as valuable timesaving
03:33functions, especially when you are working with large sets of data or have
03:37users without access to FileMaker Pro.
Collapse this transcript
Integrating a Bento database
00:01Bento is a Mac OS X Leopard and later, personal database application and if you
00:06have started your database in Bento and you now want to migrate to the
00:09FileMaker, then you should watch the movie earlier in this title on creating
00:13database from scratch, where you will see that you can create a database using
00:18an existing Bento Source.
00:19But if all you want to do is import the data from your Bento database
00:22application, then you can use Bento as an import source. Say you have got a
00:26database file and you want to import Bento data into it, you'll go into under
00:30the File menu, to Import Records, to the Bento Data Source option, select that
00:36option and up on screen, you will see the Select Bento Source window.
00:41You will notice on the left hand side, you have got a list of Libraries and on
00:43the right hand side, Collections. You will need to first select a Library
00:47before you can see the Collections. Here I can import in data from the Projects
00:51Library, choosing the Entire Library collection and hit Continue. But before I
00:56do so I want to point out what I think is the most interesting part about
00:59selecting a Bento Source.
01:01If you are an OS X user, you have an Address Book application and an iCal
01:05application that stores both event records and task records. But since Bento
01:09uses Address Book and iCal libraries, what you can really do here with this
01:14activity is import in your Address Book records from Address Book into
01:20FileMaker Pro using the Bento Source as the conduit.
01:23So here I could select Address Book, select Entire Library and hit Continue and
01:28then I would have to link up the fields appropriately, so in the case of
01:32Address Book, I would want to have a table that's based on contact, but also I
01:37could import in Bento Data Source, Projects, Entire Library and Continue. Then
01:44it works just like a regular import from here.
01:46So if you've started a database in Bento and want to import that data into
01:49FileMaker or if you want to bring in Address Book or iCal data into your
01:54FileMaker database, then you can use the File > Import and then select the
01:58Bento Data Source as your option.
Collapse this transcript
17. Calculation Essentials
Defining calculations
00:00So far in this title, we have been talking about the three core areas of any
00:04successful database application and they are building a proper architecture
00:08which we've discussed when we built the tables and the fields and then allowing
00:11users to input data effectively which was done through developing layouts and
00:15then we have also touched on output in the form of printing and exporting.
00:19Now, output isn't just specific to reporting or being able to print out or
00:22export data. Output also means that you are putting certain data into the
00:25system and then it's aggregating that data and that's what called calculations
00:30and the results of the calculations are also considered output.
00:34A calculation allows you to derive information from values or data. If you are
00:37defining a calculation in FileMaker, you are using either fields or data that
00:41you are feeding into the calculation formula that will then produce the desired
00:45result. Calculations are also known as formulas, mathematicians even call them
00:49expressions. But in FileMaker, you call them your calculation formula.
00:53Calculations will always return a result, so that means you have to feed some
00:56information into a calculation and then it will return some other value for
01:00you; and the information you are feeding into the formula can either be static
01:04text or in most cases, it's going to be in the form of parameters that you
01:07designate as fields.
01:09You are probably already familiar with what a calculation syntax might be. For
01:12example, if we just created a calculation that's set in the text values 2+2.
01:17That calculation will always return the number 4.
01:19Now, if we put a calculation field together that had the word Amount plus the
01:24word Tax. That would return the sum of two fields in a database that were also
01:28named Amount and Tax, if of course, those two fields had the same name.
01:32As you flip from record to record, the value in the Amount field will change
01:36and the value in the Text field is going to change and so therefore, the value
01:40returned from your calculation will also change.
01:42There are many different uses for calculations. For example, the most obvious
01:46is that fields can hold and display the results of a calculation. But you
01:49remember when we setup our fields, we can also validate based on a calculation
01:53and then, we will also did auto-entries that were based on calculations, where
01:57we are assigning initial values to a field based on a calculation formula.
02:00You will also see when we get into the movies on scripting and security that we
02:04can use calculations to help us run scripts in a dynamic way and to setup
02:08specific types of security as well.
02:10So to really learn how to use calculations, we are going to want to understand
02:13the Calculation dialog and the calculation formulas.
Collapse this transcript
Exploring the Calculation dialog window
00:00The first step in understanding calculations in FileMaker is getting familiar
00:04with the Calculation dialog window. The Calculation dialog appears in a wide
00:08variety of places within FileMaker Pro and is really one of the primary areas
00:12where actual programming comes into play.
00:14So in this video, I am going to show you the mechanics of the dialog so that
00:17later you will have the understanding needed to write some initial formulas.
00:19The main place that you will see the Calculation dialog is under the Manage > Scripts.
00:24If you go to Manage > Database and select the Fields tab, you can create a
00:28sample of calculation to invoke the dialog. The way to do that is just to
00:32create a Test Field Name and select the Type of Calculation. When you create
00:38the Field, you will notice that the Specify Calculation dialog will appear on screen.
00:42So let's take a quick tour so that you know what all the elements are on
00:45screen. This dialog allows you to view fields from your database, which you see
00:49in the left hand window. You can choose Fields from the Current table or from
00:54any of the related tables. You can also mix those fields together in your formula.
00:59You can choose from a wide variety of Operators as well. That's what these
01:02items are in the middle. This allows you to concatenate two different fields
01:06together. So for example, if you wanted to put the first and last name together
01:10to create a full name calculation field, you would just put this in between the two.
01:16This button here will wrap any text values in quotations. So if you are putting
01:20a word in your calculation formula and it's not a word that represents a field,
01:25you need to wrap it in quotes. This button here represents the Return
01:29Character, which is popular in text functions.
01:32On the right hand side, you will see the mathematical operators. The top button
01:36is used for division, the asterisk represents a multiplier and then of course
01:42you have subtract and addition buttons as well.
01:45You'll also see Operators that include statements like equals, meaning does
01:50this field equal that field, or not equals, greater than, less than, less than
01:55or equal to and so on.
01:56On the right hand side are the list of functions. We will be talking about the
01:59functions in detail in the upcoming movies, but this is where you can find each
02:03one. You will notice as you select and double-click on one of the functions; it
02:07appears down in your calculation formula area of the dialog.
02:11This is where you are going to author all of your formulas and the other pieces
02:14that you'll need to be familiar with on the bottom of the Calculation dialog
02:18are the result options. So here, you will say the calculation will result as
02:22either a Number, Text, Date, Time, Timestamp, Container. Those are all the
02:27different types of fields.
02:29So just like a field needs to have a certain Field Type, the result of your
02:32calculation will need to as well. So the same logic applies when you are
02:35selecting Field Types.
02:37If you need the result of your calculation to be used in another formula, then
02:40you'll want to make sure it's a number. But it's just going to be a text value,
02:43choose Text and so on.
02:46So given the wide range of uses for calculation formulas within FileMaker Pro,
02:50establishing a solid familiarity with the Calculation dialog as well as the
02:54Function parameters themselves is essential in becoming a professional
02:58FileMaker developer.
Collapse this transcript
Using number functions
00:00In this movie, I am going to introduce you to the most useful and common
00:03functions that FileMaker Pro offers for manipulating numeric data. You will
00:07also gain some additional experience using functions in calculations fields as well.
00:11The Number functions are used to manipulate and perform functions with numeric
00:15data and as a class; they are relatively easy to learn because most of them
00:18only have one or two parameters. So this is a good starting point for learning
00:21calculation functions and they all just produce a numeric result.
00:25So what I am going to do is show you in the Calculation dialog, some of the
00:30different numeric functions and we are going to look at how they give some
00:33results and the field value that we are going to use in each one of these
00:36examples is the Number field that we see that has a value of 123.4567.
00:39So if you open up Manage > Database, click on the field that's called Calc and
00:46hit Options. You see currently we don't have any formulas written, so we are
00:50going to create a couple of different examples here. First, you will notice in
00:53the right hand window that all of your functions are listed by name, but
00:57clicking on the dropdown menu will allow you to isolate just certain classes of functions.
01:01So I am going to select Number functions and you see that we have got several
01:06of these, most of which, you will probably never run into because they are
01:10pretty sophisticated for crunching numbers but some of them that are pretty
01:13popular are, for example, the Round function.
01:18Round is going to round a number or the value that's placed here into whatever
01:25precision you give it. Now just as a review for Calc functions, you see I have
01:29just double-clicked on a function and the format of a function is the name of
01:33the function which is what tells you what it's going to do and then each
01:37function has different parameters and inside these parameters I could type in
01:43the number 3.11111 if I wanted to.
01:47And then it says, give me the precision and in this case, I just need to give
01:50it a number and I am wrapping this one in text because that's a parameter that
01:54it's asking for and then in this one, it's a value. So a lot of these, you see,
01:58wherever it says number, that's where you either have to place that number
02:01value, wrapped in quotes, if it's just a number or a field value.
02:05But let's take a look at what this will return. So I see I have 123456
02:09different places and it rounds those to just 3. Now the idea isn't that you are
02:15going to create a calculation that already has number in it. But instead you
02:19are going to make it dynamic, so as users go from record to record, this value will change.
02:23So in that case, I am going to double- click on a field that we have already
02:25defined that's a number field and place that inside the calculation as a
02:30parameter. And now you can see that the value that's in the record 123.4567
02:36gets rounded to three places 457.
02:38You will notice that's different than other number functions. If we go back to
02:44the Number functions and I can Truncate and in the case of Truncate, I could
02:51put the Number field in here and give it a precision of two and let's look and
03:00see what that will do and you see instead it doesn't round it, in that case,
03:03it just truncates.
03:04So there is a couple of different examples but let me show you some of the
03:07others. Some that you can see are Floor, Floor will return the next nearest
03:14integer below the number itself. So in this case, we would get 123.4567. That's
03:20going to give us a value of 123. If I go in here and just select this field,
03:27you see 123 and there is a couple of other ones in here with different sort of
03:31flavors of number functions.
03:35Ceiling is opposite of Floor meaning it will give the next highest integer.
03:38This we wrap, Int and we select the Number field and then put inside that-- we
03:43will just keep the integer of this number which in this case is going to have
03:46the same result as Floor which is just 123.
03:49And a lot of these other ones are pretty advanced and you might not find
03:52yourself using them too often but Truncate, Random, Integer, Ceiling and Floor,
03:56are probably the most common of the Number functions.
04:00So in this movie, we focused on the core Number functions that are used most
04:04frequently or that are most useful. So it's best to be come adapt to using
04:08these functions without needing to refer to a reference as a source. So
04:11practice and apply these functions as often as you can.
Collapse this transcript
Using date and time functions
00:00In this movie, I am going to show you some of the functions that allow you to
00:03manipulate Date, Time and Time-stamp data. The date, time and time-stamp
00:07functions are among the easiest to learn because the syntax is really simple.
00:10These functions just fall into one of two categories. One is going to be those
00:14that extract a bit of information from a date or time and then there is those
00:17that construct a Date, Time, or Timestamp from bits of information that you are
00:21going to provide inside your calculation.
00:23Let's take a look at these, you go under File > Manage > Database and if you
00:29choose the Calc function and hit Options, it will bring up Specify Calculation
00:33window and you can isolate all the Date functions first. You will see here that
00:39they are pretty self-explanatory.
00:41If you choose Day for example and we put in a Date field, because remember, a
00:47calculation function is going to have the name of the function and then
00:49everything inside the parameters you need to provide it either fields or values
00:54in order for it to process the function properly.
00:56So here we've got a field in our field list that is set up with the format of
01:01Date and its called Date. We'll double -click on that and now we have day of date.
01:06Now a day will return the day portion of the date which is either going to be a
01:09number between 1 and 31. So in this case, to return to number 7, we hit OK and
01:16you see in fact it did return to number 7 and there are some similar functions
01:21to the Date function.
01:22For example, DayName returns the day name, for example, Sunday of the specified
01:29date. The DayOfWeek is going to return a number between 1 and 7 that represents
01:33the day of the week of the specified date. Sunday is 1, Monday is 2, so on and so on.
01:39In Month, if we put the Date field in the parameter, month is going to give us
01:46a numerical value between 1 and 12 that represents the month of the specified
01:50date. You may not want the numerical value of the day of the week or the month.
01:56And so in those cases you can use MonthName, which when used with the Date
02:02field will give you the name of the month. In this case, it's June.
02:10And you will see that we have got some other functions that are pretty easy to
02:13interpret. WeekOfYear gives you a numerical week; the Year will extract the
02:17year from a date.
02:19The Time functions are just as easy to read and there is very few of them. You
02:23will see here that they will extract from a Time field either the hour, minutes
02:30or seconds, these are the ones that extract bits of information from a Time
02:33field and here's the Time function that will construct it. So if you have a
02:38field that you want to use that will provide the hours, you can just pick a
02:42field for hours, field for minutes, field for seconds and then the result in
02:45that case, will be a Time and then that way you will have constructed a real
02:51time field that can be evaluated as time.
02:54It will return a time built from a specified hour, minute and second
02:57parameters, as an integer, meaning the number of seconds since 12 midnight.
03:02And Timestamp is similar to Time. It's only got one and this one just simply
03:06constructs the Timestamp, so you can take a Date field and a Time field and
03:16results a Timestamp and you will see that we have been able to create a valid
03:21Timestamp field out of two separate fields that were not Timestamp formatted.
03:26So this lesson will just focus on a core number of the Date, Time and Timestamp
03:31functions and you see in the case of Time and Timestamp functions that there is
03:35really only a few of them to learn. But in the case of the Date, these are the
03:38ones that are the most useful, so it's best to become adept at using these
03:41functions without ever having to need to refer to them as a source. So this way
03:44you can write them free hand.
03:45So practice and apply the Date, Time and Timestamp functions as often as you can.
Collapse this transcript
Using text functions
00:00The largest groups of functions in FileMaker Pro pertain to investigating and
00:04manipulating text strings. Unlike some groups of functions in which only a few
00:08are used on a regular basis and I would say about nearly half of the text
00:12functions are of primary application and importance. So in this movie, I am
00:16going to introduce you to the syntax of some of the core Text functions.
00:19If we open up the Manage Database window and open up the Calc dialog, we can
00:28isolate the Text functions, which are the first on the list, and we see there's
00:33quite a few Text functions. I am going to introduce you to the ones that are
00:38used the most often though.
00:39The easiest ones to understand would be the Length function and this one is used
00:46to determine the overall character length including spaces of the string of
00:50text inside the function itself. The Length function returns the number of
00:54characters in the string that we designate in the text. So here if I were to
01:00just type in "How Long is that string?" it's going to return the number 24 and
01:11keep in mind that it's going to be counting the question mark as a character,
01:16so it just doesn't necessarily be counting text but any character, so it's
01:19really the length of all the characters.
01:21But 99% of the time you are going to be putting a field in here. So we will see
01:25how this looks when we go into our value here. You see we have got 1, 2, 3, 4,
01:325, 6, 7, 8, 9, 10, 11, 12, 13. It's important to note that these two spaces in
01:39between John and Q and Q and Public were also counted. So length is a very
01:45popular one.
01:47And another one that I want to show you is WordCount. So in WordCount, instead
01:52of counting characters what we are doing is counting the total number of words,
01:58which can also be useful for you. So you see here we have 1, 2, 3 and it's
02:02important to note that a single character is considered a word. Basically,
02:05anything that follows a space is considered a word.
02:12Another popular one is PatternCount. PatternCount allows us to detect the
02:19number of occurrences of a search string in the specified text. So we will say
02:25Text field and let's say the search string is-- and here this parameter
02:31I need to wrap in quotes. So I will say give me J and let's see what this gives us.
02:39It's going to return a number, number 1.
02:42Now something interesting about PatternCount is note if I make it a lower case
02:50j that it also gives us number 1. Now some of these functions are case
02:56sensitive; in the case of PatternCount it's not. So you want to take that into
02:59account because sometimes you may just be trying to isolate specific case
03:04sensitive patterns and then you would use other functions in that case.
03:07Another one that you might find useful is in the case of Trim. This one is
03:12pretty helpful. You can use this as an Auto-Enter function but Trim will trim
03:19all of the leading and trailing spaces from the text and then returns it as
03:24trimmed as a result. So here let's say if for some reason, users keep typing in
03:29spaces and you will notice that the calculation will trim all these spaces,
03:33no matter how many that you put in there.
03:35So this is a good way to help clean up all your data. You can use this in a
03:38Calc Replace or in an Auto-Enter calculation for data entry. Moving on, there
03:47is a series of functions that will extract the numbers of characters from a
03:52word or words from a sentence and they come in groups. You will see them listed
03:56here: Left, Middle and Right.
04:00So there is Left which just counts characters, LeftValues which counts the
04:04number of values from an array or a list, and LeftWords counts the number of
04:09words from a sentence. So if we just do numberOfCharacters from the Left, so
04:14here we are saying Text, numberOfCharacters, 6. That's going to give us JOHN Q,
04:25which is 6 characters.
04:27Now the same can be true for Left and one thing you can do is just click into
04:34the field and scroll right down. You can do LeftWords inside Text and I want
04:42numberOfWords and I got JOHN Q again, which again, the single letter of Q is
04:50seen as a word because of the spaces before and after it.
04:54Now these will come into play many times when you are nesting different
04:59calculations together, which is a little bit more of intermediate but it's a
05:01really good idea to wrap your head around these because at some point you might
05:04find yourself parsing out data or working with cleaning up text and these are
05:08great tools.
05:09But notice also there is Right, which is Text, numberOfCharacters. If I say
05:13Right, number 3, it will give me LIC and John Q Public, RightValues gives me
05:18the last three words in a return- delimited list and RightWords will give me
05:24the last three words if I put three in there in the sentence.
05:28Finally, a handy one is also Substitute. So here you can specify a search
05:36string wrapped in quotations. In this case, I will say Q and here we will use
05:41the Substitute function to replace the Q with a PR. So you see it has detected
05:47a Q and everywhere it has detected a Q, it replaces it with the PR.
05:56And similar to the Substitute, the last one that I want to introduce to you
05:59that's very helpful is the Filter.
06:04What the Filter function does is return a version of the text that you put in the
06:07textToFilter area in which any characters other than those specified by the filter
06:11text will have been removed.
06:14So here we will say filterText, 'aeiou' and result in Text and we will see what
06:29that gives us. So what that has done is it has taken out everything that I told
06:33it to filter out, it's taken out and it leaves that in place of the original
06:37value. So you see we have an o, u and i and it shows them in that order.
06:44So it will be good to get familiar with these functions because they are going
06:46to be used in quite a few areas within FileMaker Pro and this lesson has
06:50focused on really the core Text functions, the ones that are used most
06:54frequently, but it's best to become adept at using these functions without
06:57needing to refer to the reference as a source. So the more that you can write
07:00these free flow, the better, so do your best to apply these in functions as
07:04often as you can.
Collapse this transcript
Using Get functions
00:00Get functions are a rare breed of function because they pull environmental
00:04information about either the session that you are in, the application or
00:08information from your operating system and they could be really useful if you
00:11need to extract this type of information, your calculation or scripts.
00:14So we will take a look. They are really easy to understand when you see them
00:17too. Go into Manage > Database, select Calc and go View > Get Functions and you
00:27will see that there is nothing for you to enter inside these functions.
00:31So for example, Get (AccountName), I don't have to enter anything in here. I
00:36just tell it what the result is going to be and we will see that the Account
00:40Name, this is the account that I have used to login to this file. Essentially,
00:44you are saying go and get this information and place it into either the field
00:49or within the formula.
00:51So I can say Get (LayoutNumber), Get (LayoutName), (tableName), (PageNumber)
00:58over printed item, PortalRow, even PrinterName, you can extract those. There is
01:04a helpful group here that allows you to extract information on this Users'
01:08Screen Info. So you can present different layouts to them if you first evaluate
01:13what their screen depth is, height, width and that type of thing.
01:18You can find out the SortState of your Found Set of records, if you extract the
01:23Get (SortState) value. Then information on the user's computer. You see that I
01:28am pulling this from the operating system and it tells me that I have got
01:34operating system 10.5.5.
01:38Developers frequently implement these when they are doing bug reporting. You
01:42can take a Timestamp of the users' entire environment when they run into
01:47issues. But these can be used all throughout different calculation functions
01:50and scripts and you see here there is an entire set for windows.
01:53There is a movie that we will be talking about later in the Title where we talk
01:56about scripting or manually opening up new windows. But when it comes to
02:00scripting, you can capture a lot of information about the users' current window
02:04and then create a new one based on that info.
02:09Some of the new ones in FileMaker 10 involve Triggers. We will be talking about
02:15Triggers in the later movie and you will be able to see the role of these functions.
02:18So Get functions don't have any parameters for you to memorize but instead they
02:24stand on their own. As a result they are also pretty easy to understand. So if
02:29you ever need to pull information about your FileMaker version, any of the
02:33components of FileMaker, the window environment, the layout you are on, or
02:37anything from the operating system including information like Get(CurrentDate)
02:43and Get(CurrentTime). These are great ones because if you have ever worked with
02:48FileMaker in the past, there used to be a function that's called the Today
02:51function that you could use when you are putting date calculations together and
02:56the Today function is no longer supported. It's been replaced with the Get (CurrentDate).
03:00Get (CurrentTime) can be used for creating timestamps for new records and
03:04different types of things like that. Most of these should be easy for you to
03:08make sense of just based on their name.
03:10In this movie, we have been focusing on the core Get functions. It's best to
03:14become adept at using these functions without needing to refer back to the
03:17reference source. But when it comes to get functions, it's best to take a look
03:20at the list that's available to you. So as you encounter the need, you will
03:24know whether or not you have a Get function that can support it.
Collapse this transcript
Using logical functions
00:00In this movie I would like to focus on some functions that are known as
00:03logical functions. The Logical Function group contains some of the most
00:07interesting and powerful functions available in FileMaker Pro and unlike the
00:11other categories of functions that we have been reviewing in which several
00:14functions are often very similar in syntax and behavior, the Logical Functions
00:18are a collection of unique and sometimes complex functions. They really break
00:22up into two categories and I will show you examples of both.
00:25The first of those categories within the Logical Functions are used for
00:29performing conditional operations. Let's take a look at a couple of those, if
00:34you open up the dialog and select Calc and hit Options and choose Logical, you
00:44will see all the Logical Functions listed here. The two that I am going to
00:49focus on here are the If function and the Case function.
00:53The If is the most basic type of logic function there is, in that it just says
00:58if this test pass as a True, show this result but as a False show this result.
01:05So for example if we did a plain English version of this, if we said if it's
01:10raining --that would be our test-- bring in umbrella as a True or do not bring
01:16in Umbrella as False.
01:18I'll show you an example on another file of an If function, I would like show
01:22you an example of the If function in another one of our Example Files. So what
01:27I would like to do in this example is create a field that conditionally
01:30determines what the commission is going to be. So let's say we have one
01:35commission price for a sales person, if they sell one of these adventures.
01:41If we go into the database and we will come up with a field we will just call
01:46it Comm and we will create a Calculation. Then now in this case what we would
01:53like to do is we are going to use our logical function for If, the business
01:59rule that we will say in our case here is that, if the sale is over a $1000,
02:06the sales person gets 5%, otherwise they don't get anything.
02:10So we go into the If function and we say If and this is where we create our
02:14test, we will say Price > 1000 and for this to work price, we need to be
02:24defined as a number which it is and if it is greater than 1000 then we will say
02:33Price * 0.5 otherwise if it's not greater, then we would just say 0. We result
02:45that a number, we hit OK and we go into Layout mode and place this field on our layout.
02:55So here is the Commission field. We go back into Browse mode and take a look
03:08and we see that the price is $1,852. That's greater than a $1,000, so it's
03:12$92.60 and we will see if one of this prices is 0, we see that that becomes 0.
03:21So you will see that the calculation evaluates based on each record. So as you
03:25go from record to record it dynamically provides you with a different result.
03:29Let's go back into the calculation, I would like to introduce you to the
03:32seconds of the most important logic functions and this one is similar to the If
03:37function. This one is called the Case function. So if we take the same story
03:43where we said if the price of the adventure is over a $1,000 then the
03:47salesperson could get 5%. Let's say that there is whole series of different
03:52tests. Now we have got under 500, 500- 1199 so on and so on. So in this case we
03:58have got multiple tests and anytime you have multiple tests you want to have a
04:04Case statement.
04:06So if you look in the top of your logical function list, you see that what its
04:10saying is that you can provide one test and then a result of that test, another
04:15test and a result of that test and so on. So instead of saying if this is true,
04:19do this, otherwise do this, you are just saying, if this is true, do this, if
04:23this is true, do this, so on and so on.
04:26It's a lot easier to write these. Let's take a look. So here we will say if the
04:34Price < 500 and then you will put a semicolon delimiter in here, semicolon and
04:42then we will say Price multiplied by and the Commission Rate there is 5 so we
04:49will say 0.05. So this is our first test. This is our first result if it's true
04:58and if it's false, instead of providing the false what we do is we just say go
05:01on to the next test.
05:03So the next test will be, I am coping and pasting this. If the Price < 1199,
05:15multiply the price by 0.75. Now what it's doing and you will notice there is a
05:20cascading effect that's happening here. What I am saying is if it's not less
05:24than 500, then go the next one. So if it's between 1199 and 500, it will be
05:29this rate. So you see that it keeps going until it finds a true statement. So
05:34we will do one more of these, let's say < 2000, Price * 10 and actually we will
05:46do one more finally, Price > 2000, we will give them a lopping 12% and the
06:00result is a number now.
06:01The one thing you can do at the end, because like I mentioned before it's going
06:04to keep evaluating each one of these tests until it finds a true one, but if
06:09you don't have all the possible trues then you can put a default value in
06:13there. In this case we will just say 0, if it's greater than 2000, actually we
06:21will say if it's greater than 2000 we will do 0.12% and that results in a
06:24number. We say OK and now we see as we go from record to record, you see this
06:32one is over 1199 and this one is over 2000 so it gets a different percentage,
06:3812% and so on and so forth.
06:41So that's the difference between the two most common and important logical
06:46functions that perform conditional operations and that's the If and then the Case.
06:52There is another set of the logical functions that performs tasks that return a
06:55Boolean result and I will show you those, Database Calc Options back to Logical
07:06and you will notice some of these and probably won't use too much, but here is
07:09a perfect example. The function here is called IsEmpty and I will put the
07:14parameter of the Text Field in it.
07:15Now you see we are not instructing it what to do, if in fact, it is empty. So
07:20what it does by default is it will return a number 1 if it's true, if the value
07:24is, in fact, empty, or a 0 if it's false, if in fact, it is not empty. We will
07:30see that this field has a value in it so it gives us a 0, which indicates false.
07:34One of the other things that you can do in your Calc function is use this as a
07:41test in your If. So like we talked about before If and then you can say IsEmpty
07:46(Text), then tell it do something at that point. So let's say If IsEmpty
07:51(Text), we'll say Empty, otherwise False.
07:57Now there is a couple of things just speaking of calculations in general that
08:01you see me doing here, you see that I am using the white space when I am
08:04authoring my calculation, white space is ignored when FileMaker is evaluating
08:08the Calculation function. So it's a good idea to help you visualize and work
08:12with your calculations in this window by just adding some additional white space.
08:15Also don't forget that when you have a text value we need to wrap it in
08:19quotations and then the last thing you notice that I was freehand typing these
08:23functions. So you should remember that you don't always have to choose the
08:27function, it's a great way to get familiar with them, but you don't have to do
08:30that. So at some point it would be good to be able to do these freehand so that
08:35you can do more programming on the fly. We have to pick the result, which would
08:40be Text in this case, and we hit OK and we see that this gives us a False.
08:45So there are a lot of logical functions to learn and they are really powerful.
08:49You will find yourself using them inside Scripts, Calculations, Validations,
08:54Auto Entered Calculations, all sorts of different things. So this is a good one
08:57to get familiar with, but I wanted to touch on the more core functions in the
09:01Logical Function set and one that are used the most frequently and definitely
09:05the If and the Case and the IsEmpty are the most popular.
09:10So it's best to become as adept as you can using the Logical Functions about
09:13having to refer to the reference as a source. So do your best to try to
09:16integrate these and apply these functions as often as you can throughout your
09:19FileMaker solution.
Collapse this transcript
18. Script Essentials
Understanding scripts and script steps
00:00One of the most powerful features in FileMaker Pro is the ability for users to
00:04create scripts. A script is a sequence of stored instructions that will allow
00:08the developers to automate repetitive tasks or control how the users interact
00:12with the system. Really almost anything that you could do manually through the
00:15keyboard or the mouse or through menu commands can be scripted and really this
00:20is all best learned through practical application.
00:22For example, if you know there are some things that you do everyday on a
00:25regular basis you might want to automate them through a script. Some examples
00:30you might already be familiar with are things like navigating from
00:33layout-to-layout, or assisting users in data entry, importing and exporting of
00:38data and even creating reports that will tie in a specific Found Set to a
00:42specific layout in your database.
00:45In essence, a script is a sequence of instructions for accomplishing a task.
00:49If you're new to scripts you might find it helpful to think of scripts as you
00:52would for a recipe for cooking something.
00:54When cooking a recipe provides instructions such as chopping, simmering, or
00:58separating into two round pans and so on. These actions in the case of a recipe
01:04need to be performed in a certain order. They must operate on a prescribed set
01:07of ingredients as well. Some recipes and scripts are simple and others are more
01:13complex and take a little longer to complete.
01:15So think of your job as a scripter is writing a recipe that the computer will
01:19follow. The first thing you want to do when you're scripting is determine what
01:23the end goal is going to be. For example, some end goals may be printing a
01:27sub-summary report or navigating to another layout. And what you will find out
01:31as you fine-tune your skills at scripting is there could be many different ways
01:35to accomplish that task but experience will help you become familiar with the
01:38most clear and efficient ways to do so.
01:40So there's really no wrong way to write a script as long as it reaches your end goal.
01:44But as you get more and more experienced you will learn how to do these
01:48things in fewer-and-fewer steps and make your scripts more efficient.
01:51Learning how to write these scripts is all about learning how to combine sets
01:55of script steps together to achieve this desired end goal. It's difficult to
01:59learn the script steps individually because many really don't have an
02:01interesting or practical purpose unless they are combined together with others
02:05to achieve a result. But combining these together will then create a script or
02:08your recipe. So really the best way to understand the possibility of scripts is
02:13to become familiar with the script steps. The movies in this chapter will
02:16examine the script steps and also putting them together into entire scripts.
Collapse this transcript
Assigning script steps to buttons
00:00If you are just starting to get familiar with scripting in FileMaker, one of
00:03the easiest ways to do that is to assign just a single script step to one of
00:08the buttons that you have on screen. Let me show you what I mean in Layout
00:12mode. Any object that's on screen can become a button. Whether it's a group set
00:18of icons, a graphic image, an area of text, or a field, anything that you click
00:25on a Layout mode is considered a button.
00:28Now if you have one of these items selected -- so for example, if I go to Log
00:33Out and I go under the Format menu, you will see that there is an option that's
00:38called Button Setup. This allows you to assign an action to the clicking of
00:42that button, when in Browse mode or in Find mode.
00:46This is also a great way to show all the different script steps that are
00:49available. In the Button Setup dialog, you will see that in the window to the
00:53left that every supported script step in FileMaker is listed for you to choose
00:57from. Now in the case of using the Button Setup window, you can just choose one
01:01of these script steps and it will execute that action each time a user presses the button.
01:06You will also note as you look through some of these, that they represent
01:10pretty much any action in FileMaker. Whether it be, something like navigating
01:15to a layout or certain record, or going to a field, also cut, copy and paste
01:21actions and inserting certain values, creating new records, deleting records,
01:27performing finds and all of the supported constrain, extend and modifies,
01:33showing all records in a found set, opening up new Windows, opening files,
01:37adding and modifying accounts, checking spelling and then there is a whole
01:41group of miscellaneous ones that do some pretty interesting things.
01:44Your best bet is to either open up this dialog or the Script Maker dialog and
01:48get familiar with each one of these script steps. If you want to know more
01:51information about every script step, you can find some very good documentation
01:54in the FileMaker help window, but in our example here, we have got a Log Out
01:59button. So I am going to assign the Exit Application script step to this
02:03button. You see then that it gives us a couple of options and in many cases
02:07some of these script steps have options that you need to configure, but in the
02:10case of Exit Application, it's pretty self-explanatory.
02:12You see that you can choose between the Button Styles. The reason for that is
02:16because this button was added to the layout using the Button tool. Some of the
02:20other buttons, like fields and text areas, won't have these available to you
02:23but all of them will have the ability to change the hand cursor over button and
02:27I will show you what that looks like in Browse mode.
02:30So if we save, users can then tell when they roll over an item that's a button
02:37because the cursor turns to a hand with a finger pointing out, like it's
02:41clicking on the button. You see that each one of these has a script assigned to
02:45them and in addition to the script we have provided some help to the user by
02:50going under Format, to Set Tooltip and put in what the script will do.
02:55So if you want to get familiar with scripts and script steps, the best way to
02:58do that is to start assigning the actions to buttons on your layouts.
Collapse this transcript
Using the ScriptMaker dialog window
00:00When you're starting to learn how to create scripts for your FileMaker
00:03database, you are going to need to become familiar with the Script Maker dialog window.
00:07All of the scripts created for a given database file are listed in the Manage
00:11Scripts window. You can find the Manage Scripts window under the Script menu
00:16and you can also get to it under File > Manage > Scripts. Either way it will
00:21take you to the Manage Script window.
00:22The first thing you notice on a new file is that new files don't have any
00:26scripts created. It is your job as a developer to add the scripts necessary to
00:30automate repetitive tasks and to provide controls for users to manipulate the
00:33system. But when you first open up your file, you won't see any in there.
00:37Once you do have scripts in your database, you will be able to see them listed
00:41in this window. So for example, if we hit the New button in the bottom
00:44left-hand corner, it will automatically create a new Edit Script window for us.
00:49Closing that window will now show the script in the Script List window.
00:53If you have more than one script in your Script window, you can maneuver them
01:00into specific orders by using the Double Arrows to the left of the script name
01:05in the Script List Window.
01:07The check box at the beginning of the row indicates whether a given script
01:11should be listed in this Scripts menu. So for example, if we uncheck New Script
01:17and go under our Scripts menu, we now see that New Script2 is the only one that
01:22is listed. If I go in and I check both of them, now you see them both listed.
01:27When a script shows up in the Script window, users can execute the script by
01:32clicking on this Scripts menu and then choosing the Script that they want to
01:35run. Also, you see that up to the first nine scripts, we'll have a
01:38corresponding quick key. On Mac, this is the Apple and then the number one, two
01:44or all the way up to nine. And on Windows, that is a Ctrl key.
01:50As you see by default each new script is called New Script. It will be your
01:54responsibility to name the script and it's a good idea to name it something
01:58that makes sense to you when you try to retrieve it later.
02:01If you don't rename the script, you will see that it will just be called New
02:04Script in your Script list. So make sure to give your scripts a name that makes
02:07sense. Inside the Edit Script window on the left-hand side, you will see all of
02:12the available script steps listed.
02:14To make it easier to find Script steps, you can view them by Category. As you
02:18see here Control, Navigation, Editing, Fields, Records, Found Sets windows,
02:24Files, Account, Spelling, Open menus and Miscellaneous or if you just know the
02:29scripts step that you are looking for, you can select all by name and look for
02:33it alphabetically.
02:34You can also click in to the list and hit a key on your keyboard and it will
02:40navigate you down to the appropriate script groups alphabetically. You can also
02:45look at each one of these by group. So if you just want to see the scripts that
02:49deal with records, click on Records and then you can find the script step you
02:52are looking for there.
02:56Back on your Manage Scripts window, you will notice that in addition to
02:59creating new scripts, if you click down on the Arrow next to the New button,
03:04you can also create a New Folder. These folders can help you organize your
03:11scripts for easier retrieval.
03:13Once you have created your New Script folder, you can take existing scripts and
03:17move them into the Folder. So you can move a script below an expanded folder
03:24and then you see this four-pronged arrow. You just click down and move the
03:28script to the left to indent.
03:31That now indicates that the script is part of the Script folder. So closing the
03:35folder will hide the script, expanding the folder will reveal it. This can be
03:40handy once you are storing the large number of scripts in your file.
03:43Another easy way to find a script when you have a lot of them to choose from is
03:47to use your filter. All you have to do here is type in a keyword and you will
03:52see that it will isolate the scripts that have some part of your filter
03:55criteria in the name of the script.
03:58Other buttons that you see on the bottom of the screen, once you select a
04:01script, you can either edit the name or the script steps. Also, you can delete
04:09any scripts and you see there are some other buttons here for duplicating
04:13scripts. If you find that you have a script that is going to be very similar to
04:16an original one instead of starting from scratch, just select the script that
04:20you want to duplicate and hit the Duplicate icon and then, you can start by
04:24editing from the duplicate version.
04:27Also, it's a very good idea to print backups of your scripts or hard copies
04:31either while you're working on them, trying to troubleshoot them, or just a
04:35good idea for a Backup or for Archiving all your work.
04:38Another helpful function of Script Maker is the ability to Import scripts in
04:42from other files. This is helpful if you convert it from previous versions or
04:46if you have other files that have similar functionality and you just want to
04:49borrow a script from them.
04:51Then finally, when you've selected a script, you can run that script by
04:55clicking on the Perform Script icon. Just another way to trigger one of the
04:58scripts that you've got selected in your list.
05:01So once you've gotten familiar with the Manage Scripts dialog, it's time to
05:04move onto understanding how the Edit Script window works. In upcoming movies in
05:09this chapter, we will take a look at building some Sample Scripts.
Collapse this transcript
Creating multi-line scripts
00:00Earlier in this title we looked at assigning a single script step to a button
00:04on a layout. However, most scripts will have multiple lines of steps because
00:08scripts become much more extensible with the combination of steps instead of
00:11just one step alone.
00:13So let me show you an example of creating a script instead of just assigning
00:16the script step to a button. You see here on this layout we have got a Print
00:20button and when you press the Print button, it prints the layout that you are
00:24currently on. However, this layout is not print ready and therefore shouldn't
00:29be the one that prints. Instead, we have another layout, which is called the
00:31Adventure Sales Detail which is print ready. So instead we would like to
00:36navigate the user over to that layout, have it print that layout and than move
00:40them back to where they started. That takes multiple actions instead of just
00:44the print action.
00:46If you look inside Layout mode you see that we have button and what we have
00:50assigned to that button is the Print action. Instead, let's create a new script
00:55that does the various different steps like moving the user from this layout to
00:59the print layout, printing and then taking them back to where they started.
01:02We start creating our new scripts under the Script Maker window selecting
01:06Manage > Scripts and then the New button. This will pop up an Edit Script
01:12window at which time we want to name it something and we will name it something
01:17that make sense when we are trying to retrieve the script later, PrintAdventure
01:24and now we browse through the different script steps and determine what's the
01:28first one we want to start with.
01:30Now remember we want to figure out what our end goal is. Our end goal is to
01:33start at the layout where the user initiates the script, take them to a print
01:37ready layout, print that layout and then take them back to where they started
01:41So step number one there is to navigate the user to the Print Ready layout.
01:45There is a script step under the Navigation section that's called Go to Layout.
01:50If we double click on it we see that it moves it over into our script area.
01:54Now we just need to configure the Script Step Options. In this case, we need to
01:58tell it what layout to navigate to. That's where we pick Adventure Sales
02:02Detail. Next we want to be able to print this item so if we scroll down to the
02:08print and if you are having trouble finding any script step, you can always
02:11just go, all by name, click inside and hit P and you see it will take you down
02:16alphabetically to all the different script steps that start with P. Here we see
02:21the Print step. We can double click on that.
02:24We will note our Script Step Options, Perform without dialog and Specify print
02:29options. If we select Perform without dialog this means that the user won't be
02:33prompted with the Print dialog window, thus not been able to choose which
02:37printer they want and some of the other options that are specified in that
02:41dialog window. In this case we will keep it unchecked.
02:44Now that the user is gone to that layout and printed, we would like to navigate
02:48them back to the layout where they started. If you choose the Go to Layout
02:53script step and double click on it. Of course, what you could have also done as
02:59you see if Clear this one, I could have selected the original and hit Duplicate
03:04and then moved it down thus saving me an extra step and you see at the very top
03:09of the list is the original layout. This is a handy tool inside you scripts
03:13that allows you to take your user back to where they initiated the script.
03:17So in this case we will do that and we will add one more just for fun. If you
03:21look down under your Miscellaneous category, double click on Show Custom
03:25Dialog, in order to configure the custom dialog and its contents you just hit
03:30the Specify button and you give it a title. As you see here on the top this is
03:37the title of the window, Your Adventure Has Been Printed will appear in the top
03:46Title bar and for the user you can say user, Your Adventure has been printed.
03:58Any of the ability to name the button that show up on screen, you see on this
04:01one we have got OK and Cancel which is pretty standard for any system or
04:06application level dialogs but here we can just allow maybe one that says OK or
04:13Thanks or something along those lines. And you can also have a little bit of
04:17fun with your Message or the Title; you can make it dynamic using what you now
04:21about calculation fields.
04:22If you hit the Specify button instead of just saying, Your adventure has been
04:26printed, you can say some text and a little bit of space and you can use
04:36ampersand, which will concatenate your text with the field value. In this case,
04:41we are going to use a function, if you recall the Get functions, we will use
04:45Get AccountName. So what this will do is say Hey, whatever the AccountName is,
04:52your adventure has been printed.
04:56So let's hit OK and OK again and now we have got multiple lines in our script
05:02and really you could add any combination. Sometimes scripts can be pages long,
05:06sometimes just a few rows long, but in this case now we can close out our
05:11script. You noticed by the way that a script is unsaved when it has an asterisk
05:14at the end of the name.
05:16So we can use the Apple+S as in Save or the Ctrl+S to save it and we can close
05:23the window now if would like or we can keep it open and just toggle over to
05:26file, just in case we need to come back to it and make some modifications. Now
05:31we have got our button and we go to Format button on the layout and you see
05:36it's just got the one step currently assigned.
05:38If we scroll up to the top of the screen, one of the script steps is Perform
05:43Script and this is very handy, for when you want to do more than one script at
05:47a time, you just go create a script with multiple actions in it and then you
05:50assign just this one step to the button. So you have to click on Perform Script
05:54and then hit Specify and select the script that you want to run and hit OK, hit
06:00OK again to close the dialog and then you want to save this change in your layout.
06:04Now you will notice that when the user hits the Print button it will toggle the
06:08Print dialog window at which time we can say Print Preview. This would be what
06:15the print document looks like. In this case, we are printing it in preview and
06:19then it says, Hey Admin, which is the account name that I am used to login,
06:23Your adventure has been printed and I say thanks and it takes me back to my
06:26original layout.
06:28So scripts can be useful either as a single step or as multi-line scripts and
06:32you will find that most of the scripts that you create will be a combination of
06:35different steps making them that much more useful.
Collapse this transcript
Building a subsummary script using If statements
00:00A good example of a multi-lined script is the script that gets generated when
00:04you create a sub-summary report. If you go into Layout mode and use the New
00:09Layout Assistant, you will notice if you pick the List/Report option and choose
00:16Grouped Data and I will cycle through here with some example fields. You will
00:21notice that the very last step of the report is where you can either create a
00:28script or not create a script. I have decided that I would create one of these
00:31scripts to show you something interesting about FileMaker 10.
00:35You can access the script inside the Exercise File under Manage > Scripts and
00:39it's called Customer Report and if you go into Edit mode, you see that this is
00:43a great example of a multi-lined script because there is a bunch of different
00:47things that you have to do to create a sub-summary report. You first have to
00:50get into Browse mode, navigate over to a layout that has the sub-summary part
00:55established and then sort by the Break field.
00:57So we start off with the first script step. Enter Browse mode, which takes us
01:01to a mode that's compatible with the sub -summary report. Takes us to the layout
01:07called Customer Report that has the sub- summary parts on it. And then we go to
01:12Sort Records and we can specify the Sort order in the same way that we specify
01:18the Sort order when we are creating a live sort. We just get the Sort Records
01:21dialog window when we choose the field, the Order in which it sorting and then
01:26we can restore that in the script.
01:28But the behavior for a sub-summary report is different in versions before
01:32FileMaker 10. So it's not a bad idea to put in a condition just in case one of
01:38your users accesses this report but they are not using FileMaker 10. You see
01:43here that I have put in the comment. Go to Preview mode for earlier versions,
01:47which do not support summary reports in Browse mode. And it will use something
01:51that's called an If statement. If you recall in the Calculation section we
01:56talked about the If function because it can introduce conditions into our
01:59calculation functions.
02:01Here, it's introducing a condition into our script. So the condition can be
02:06specified by clicking on the Specify button and we will get the familiar
02:09specified calculation window on screen. If you also recall from our discussions
02:14in calculations, we know that there are several Get functions. One of the Get
02:18functions will determine what the application version or the version of
02:22FileMaker is that you are using. In this case, if it's anything less than
02:25version 10, we then want to navigate users to Preview mode and then to Browse
02:31mode because if you don't do those two steps in any version prior to 10 you are
02:36not going to be able to get your sub-summary report to draw.
02:38So this is an example of a multi-lined script that has a condition in it and
02:42which you should know is that any If statement. If you start an If statement in
02:46your script, you are going to need to end that If statement as well. Because
02:50FileMaker is going to need to know when you are done asking the question or
02:53imposing the condition on the steps within your script. So just like in a
02:58calculation, we are saying do this test and if it's true do this and if it's
03:02false do that.
03:04Here is the test, if the application version is less than 10, so if it's true
03:09it's going to do everything that's indented below it. But if it's false, it's
03:12just going to continue on and go to the next step after the End If. So in this
03:16case, we are doing two things at one time. We are running a report that will
03:20generate the sub-summary report for us and it's also checking our version
03:24control using an If condition statement.
03:26So now we will save our script and we see it listed here in our Script List. If
03:31we go into Browse mode we can now run the script, as you see it takes us over
03:37to our Customer Report layout. And it sorts everything appropriately and
03:42displays everything in a grouped format just like we intended it to. So you can
03:46create a sub-summary report by hand or using the Layout Assistant, but either
03:50way you should take into account the possibility that people might be running
03:53this report in a version less than FileMaker 10.
Collapse this transcript
Setting print options
00:00One of the supported script steps is the ability to print documents through
00:04your Script Maker. If you look at one of the scripts that we have created in an
00:08earlier movie under your Manage > Scripts, if you choose PrintAdventure, you
00:12will see that we have decided that we wanted to print a layout. So we added the
00:17Print Script step.
00:19In this movie, I am going to take a minute to show you the couple of the Script
00:21Step Options for the Print step. You will see here that at first you can
00:25perform it without dialog and sometimes that's a good idea. If you just wanted
00:29to print to the user's default printer then you can select the Perform without
00:33dialog and they won't be bothered by having to hit OK when the Print dialog pops up.
00:39But I would like to concentrate on the Specify print options here in this case.
00:44Here you can see the user is allowed to select to print driver and selecting a
00:48print driver will affect the dotted lines on your layout. What I am talking
00:52about in the dotted lines is you go back to the file and go into Layout mode.
00:59You see these dotted lines here really your print edge. These are affected by
01:03the print driver that's selected at the time that you viewing the layout. Back
01:07in the script you will notice that you can choose the Printer and there is also
01:14some additional details. You can save inside of the script step whether or not
01:18you are printing all pages, From 1 to 1 whichever you want to do there.
01:22And you will notice that there is an option for FileMaker Pro in this dialog.
01:26Keep in mind that this dialog is for the HP Printer that I am set up to right
01:30now on this computer. But every print driver has a different view. So don't be
01:34alarmed if you look at this and it doesn't match the print driver that you have
01:36on your machine. Somewhere in your print driver is going to be a drop down
01:40where you can choose the FileMaker Pro option and from there you have some
01:45additional selections you can make. The first of which being you want to print
01:49the records being browsed, which is just the active record.
01:52And in this case, this would make sense because we just want to print the
01:55adventure that we are on. Records being browsed means print all the records in
02:00your found set. So if you happened to have a Show All before you press this
02:04button, it's going to print one page for every single record in the database.
02:07So that means that it probably makes more sense in this script to select
02:11current record. Which just means it's going to just print the active record.
02:15Another interesting option that you see here is the ability to print a blank
02:19record. Sometimes you might have a Formed layout that you created in FileMaker
02:23with fields in it for data entry. Sometimes it's not a bad idea to be able to
02:27print out a blank copy of that. Fax it over to somebody for them to hand fill
02:31out and then they can send it back it to you for transcribing.
02:33Here's various different reasons that printing the blank record might be
02:36helpful or during development if you are planning on marking up a layout you
02:40might want to print the blank record so that you can use that as the basis for
02:43your mark ups. There is also some different behavior for the Print Setup in
02:47FileMaker 10. Some users of FileMaker Pro on windows had discovered that when a
02:51FileMaker Pro solution was developed on windows, the information that
02:55identifies the selected printer for print related script steps like this one
02:59was saved with the script step.
03:01Then when running the script the selected printer would be targeted even if it
03:05were not the default printer in that particular user system. So apparently,
03:08this didn't work for some printers whose names were longer than 30 characters.
03:12So it's kind of a gotcha. And so now as you see some of these print drivers are
03:18quite long, so FileMaker has fixed that and remedied it in the current version
03:23of FileMaker Pro. Now there is no equivalent behavior for this on Mac however.
03:27There are no significant UI changes. It's just the way that it works that has
03:31been affected by this. No dialogs are been added or removed and no visuals
03:35rearrangements were necessary. When a user executes a print script step that
03:39has been saved with Perform without dialog option unchecked, the system print
03:44related dialogs will be presented. And that's the way that it acted before. Yet
03:48no in FileMaker 10, FileMaker is going to restore the printers selection in the
03:53dialog to the selected printer saved with this script step.
03:56So when the user sees the dialog pop up it will have the targeted printer
04:00already selected. It's still gives them an opportunity to toggle that but this
04:03gives them an opportunity to sort of pseudo save in the print driver into their
04:07script step. However, if the selected printer saved with the script step cannot
04:12be found at runtime or if no selected printer is saved with the script step
04:16then the user's default printer will be used instead. So this is a way that
04:19FileMaker has remedied some of the issues that they have had with this printer
04:22script step in previous versions. So it seems like all is fixed in FileMaker 10.
Collapse this transcript
Adding Find criteria to a script
00:00Finding records is one of the most common tasks users perform in FileMaker Pro
00:03systems. As a result, finding records is also a common action that scripts are
00:07called to perform. Scripts can be set up to perform any search a user can
00:11perform manually and even some that cannot be performed manually.
00:15Because you can control a scripting search more tidily than you can a manual
00:18search, scripting searches are often more efficient and reliable and this can
00:22help with the system performance. There are several script steps that may be
00:26involved in finding records including the following.
00:29Go on to Script Maker and double-click on Customer Report. You will see on the
00:35left-hand side if you click the Category and then Found Sets, here are several
00:41script steps that may be involved in finding records. We have got Perform Find,
00:45Constrain and Extend Found Sets, Modify Last Find and then Showing All Records,
00:50which is really an unfind so to speak, Omitting Records, Show Omitting, Omit
00:56Multiple and then the Sorting and Unsorting of records. Those all work with
00:59Found Sets.
01:00But the one that we are going to concentrate on now is the Perform Find script
01:03step. So in our Customer Report, let's say what we would like to do is instead
01:09of just running the report, instead we want to isolate just the records in the
01:13database that have a gold or a silver customer type and then just add those to
01:17the report and we would like to save this into the execution of the report.
01:21So if we go back into Customer Report, before we get to the point where we
01:28print, which is right about it Go to Layout, we are going insert a Perform
01:33Find. So I double-click on Perform Find and I am going to move it up to under
01:37Browse mode and now you see the Specify button will allow me to insert the requests.
01:44This is a little bit different than entering search requests in Find mode on
01:47screen, but we will end up with the same result. So I need to create a new
01:51request, so I hit New and of course, we want to search for the Type. So here I
01:59pick the field. This is like clicking into a field when you are in Find mode.
02:04So I am going to click into Type and then this is the criteria that I would
02:07type into the field. All the operators are supported here, but in this case, we
02:11won't use them. But just see now because you can wrap your head around the fact
02:14that this really is just picking the field to click into and then what you are
02:18going to type into that field.
02:20So in this case I will say Gold and now I am going to say Add. So up here we
02:24have Customer Type, Gold. So now I am done with this request, I can hit OK. So
02:30I see I have one request and this is like when you go into Find mode and you
02:33type in -- now I am going to type in Gold into the Type field but I also want
02:37to find Silver. So what would I do in that case, I would create a new request
02:42and so I am going to have a request for Gold and a request for Silver which
02:45will return back a Found Set that has both types.
02:47So I will hit New again, choose Type and then type Silver and hit Add and then
02:56hit OK. So now, you see that I have both requests saved and I can keep adding
03:00more and more request if I want to. You should also note that when I am
03:03creating a request, I can either make it a Find request or an Omit request.
03:08So if I wanted to find all of the customers in one state, but omit all the ones
03:12that were Silver. Then on this Find request, I would have it say Omit, but in
03:18this case, we are just going to leave it as is.
03:21So now we say OK and now it's going to perform that find automatically. It's
03:25just going to go ahead and execute the Find without the user having to
03:28interact. So let's save our script because we see we have an asterisk next to
03:32it. So I will do Ctrl+S or Apple+S and I will go back to the report and now
03:39let's run the script, Customer Report.
03:43You see we only have 520 records out of the total 1522 and you see that all of
03:50them have a Gold or a Silver type. Now you might also want to allow the user to
04:01enter in a value to search. So let me show you how you can do that as well.
04:06So instead of storing the criteria into the Find, maybe you want the user to
04:09tell you what types they want to see in the report. So in that case, we take a
04:13little different approach. If you go into all by name, what you will want to do
04:20is emulate entering Find mode. So if double-click on Enter Find Mode, we go
04:25here and you see by default it allows you to pause.
04:29So this is a lot like if you go into Find mode and you see that we are paused
04:35waiting for the user to enter a value in here. This is the manual operation
04:39that we are trying to emulate with the script.
04:42So back in the Script window, we say Enter Find Mode and now we are waiting for
04:47the user. That's what the pause is, is it waiting for the user to enter in a
04:51value and then when the user hits Continue, it will perform find. But here we
04:55have to remove the restore of the Find request to allow the user to enter in
05:00the Find request.
05:01So let's save our script and we will go back to where we started Customer
05:06Detail and we will go back into Browse mode and now let's run the script.
05:12Customer Report, takes me into Find mode and now we want to direct the user to
05:18go to the Type field.
05:19So let's go cancel this find, go back into our script and this is a pretty
05:25popular way to do it. You just make a change, test it out, go back and modify
05:29it. So here there is a script in here that says Go to Field. So we will Enter
05:36Find Mode and go to the Type field and why don't we go so far as to show a
05:42message. If you recall in a previous movie, we did the Show Custom Dialog. We
05:49will say Please enter the type for your customer report. So now you see that we
06:00need to save our script, so we can test it. So I will hit Ctrl+S and we will go
06:05back and then now let's run the script.
06:08So now you see that the script has been paused as we instructed it to, allowing
06:13the user to click into the Type field and choose any type that they would like.
06:17When the user is done, they can press the Continue button or they can just hit
06:20the Enter key on their keyboard and up pops the report showing the type that
06:25they selected.
06:27So since finding records is one of the most common tasks that users perform in
06:30FileMaker. It's a good idea to get familiar with the different Find Script
06:34options when you are authoring scripts, since creating scripts is really just
06:39emulating the work that users do by hand.
Collapse this transcript
Using Set Field and Set Field by Name
00:00The Set Field script step is easily one of the most important and useful steps
00:04allowing you to set the contents of a field to the result that's generated by a
00:08calculation formula. It is the calculation formula portion of the Set field
00:13script step that makes it so versatile. This is the primary tool that you will
00:17use to modify field data from within a script.
00:20Let's take a look at a script that contains a Set Field script step so that you
00:23can see how it's used. You go into Manage > Scripts and you will notice that I
00:28have a Set Debit. So what's happening in this script is that the user has to
00:33enter a total into either the Debit field or the Credit field on this order
00:36line item based on the type of transaction that it is.
00:40So the transaction type is based on the script parameter from the button from
00:43where it was selected. So this script could be executed from various different
00:47layouts, it all depends on the script parameter.
00:49So here we say if the ScriptParameter = Debit, then set the OrderLine Debit
00:56field. So you see the target field, which is Debit in the table OrderLine. So
01:02the first part of this in the brackets is the field where you want to put the
01:06value and the second part is the value you want to put in the field. So you see
01:11here in this Specify Calculation dialog, we just put one field. But you can put
01:15an entire calculation in there with all sorts of conditions and make it as
01:18sophisticated as you like.
01:20But in this case we just wanted to put the value that's in a field and then we
01:24use the Set Field script step one more time, so if it does not equal debit,
01:29then we want them to go to a different field and you see in this case, the
01:32field is Credit and put in the same value.
01:36So when creating a new record in a script, you will want to use Set field
01:39because it will accomplish two tasks for you. First, it allow you to navigate
01:43to a field and then secondly, it allow you to put some value into that field
01:47and since you are using the Calculation dialog for that field, it could be a
01:51text value, the value from another field or the result of an entire
01:55calculation. It gives you a lot of versatility in your scripts.
01:58There is a couple of things that you will need to know though. First, when a
02:02script navigates to a record and then a Set Field step is activated. That means
02:07that it's going to a target field and its acting as if a user has clicked
02:11inside the field and begun editing. This does what's called locking a record.
02:16But even though it locks the record, when it moves on to another record it
02:20hasn't yet committed the value in that field. So if you are doing something
02:23like creating a child record and you want to use a Set Field to populate the
02:28foreign key value or something along those lines, it's important that you
02:31commit the value. Committing means saving the value.
02:35The Set Field script will navigate you to a field and then put the value that
02:39you have told it to put into the field except it won't save it to the database.
02:43So in order to make sure that it's saved, I would recommend that you use the
02:47Commit Records/Requests Script Step.
02:50So as you are learning the Set Field, I strongly recommend that you also couple
02:55it with the Commit Record/Request with the Perform dialog and the Skip data
03:00entry validation option selected. So you can open and lock a record but make
03:05sure that you are saving the record when you are done setting the value. So
03:08it's a good idea to try to get comfortable with Set Field because you will find
03:11as you create more and more elaborate scripts that you are going to be using at
03:14all the time.
03:15Now FileMaker 10 has a new Set Field and this is actually a pretty big deal
03:19because nothing is changed on the Set Field script steps in quite some time.
03:24But as you see in our Set Debit script, we have to have a condition in here
03:28because the Set Field can only choose one target field.
03:32So when choosing a Set Field, you have to hard code in the Target Field but
03:36there is a new script step now that does the same thing but does it in a more
03:39dynamic fashion. If you go under Manage > Scripts to Set Debit by Name, you see
03:46we have one, two, three, four, five, six, seven script steps that can now be
03:51accomplished in a set of two. It's this new Set Field by name script step.
03:56So using a ScriptParameter, which means that when you assign the button to a
04:00layout, you can assign a parameter to it. In this case, we can assign a
04:04parameter that either says Debit or we could have it say Credit depending on
04:08where it's been executed.
04:10So this way we don't have to put an if statement or a condition in here at all.
04:14We just say go to the field that's identified in the ScriptParameter. So here
04:18you are going to use the exact same name in your ScriptParameter as the field
04:22name and populate that field with the OrderLine total.
04:26Of course, as we just talked about, we want to make sure that each time we have
04:30the Set Field; we are going to want to follow it by a Commit Record/Request. So
04:33now you can see that the six step script can now be replaced by just a single
04:38line script with a commit record following it. So the more comfortable that you
04:42get with the Set Field script step, the more elaborate your scripts will be.
Collapse this transcript
Using script parameters
00:00In this chapter, we've been discussing creating scripts. Now creating scripts
00:04is one thing but executing those scripts or allowing those scripts to run is
00:08something entirely different. Now, of course, FileMaker 10 has all sorts of new
00:11ways that you can trigger the execution of the script.
00:14One thing that you might notice, when you're assigning a script to either a
00:17button or a trigger, is that there is something that's called a Script
00:20Parameter. We'll take a look at that dialog in just a second but let me show
00:24you an example of why this might be useful.
00:26So if you look in this Exercise File, you see that we've got 27 buttons up on
00:32screen. Each one of the buttons has a script action attached to it, so that
00:36when I press a button, what it does is it executes a Perform Find and puts in
00:41the criteria of whatever the letter is that I'm pressing, becomes the search
00:45criteria. So I press the letter I and you see it searched for all the last
00:49names that begin with I. If I do T, it comes back and says it can't find any.
00:54So no records are found. W gives me all the W's, B gives me all the B's and so on.
01:00So if you have 27 different buttons that all do a different action, for
01:05example, clicking on this button will find all the W's but clicking on this one
01:10finds all the I's, how many different scripts do we think that would require
01:13that we need to author? On older versions of FileMaker, this would have
01:17required 27 total scripts. In current versions of FileMaker, we have exactly
01:23one script to find in this file. The reason for that is because we're using
01:27something called a Script Parameter.
01:29If you look inside this script, you see that we enter Find mode. Then while
01:34we're in Find mode, we set a field called LastName with something called a
01:38ScriptParameter. Now you'll notice in the Calculation dialog that we're using a
01:43Get function called Get (ScriptParameter) but where does that parameter come from?
01:50We'll go into Layout mode and click on one of these buttons and we'll say
01:53Format > Button Setup. You'll see that we're saying Perform Script, but
01:57anywhere that you're picking a script, you'll notice this window down below
02:01that says Optional script parameter. And here what I've done is I've put the
02:05letter G. So what happens is based on these instructions, when the user hits
02:11the button, not only is the script going to run but it's also going to set a
02:15ScripParameter into FileMaker's memory.
02:18Then inside the script, we then extract that out through this Get
02:25(ScriptParameter). So basically where it says Get (ScriptParameter), it's just
02:29going to put in whatever value we assigned as the parameter on the button. So I
02:32can run the same script and if I run it on the letter G, then it's going to set
02:37the last name with the letter G; if I run it on M, it will set it to M and so on.
02:42The idea of the ScriptParameter was to make script writing more efficient, so
02:46that you didn't have to create so many scripts. You could make it dynamic so
02:49that you could create one script and run it for many locations throughout the
02:53system. You notice you can do that in the Script > Button Setup dialog.
03:00Then also, if you go into your Script Maker and Perform Script, you have that
03:07Optional parameter there as well. Later in this movie, we'll be talking about
03:13script triggers but just as a note while we are on the topic, you can set a
03:17script parameter there as well.
03:19So the script parameter is just a piece of information, whether it's text,
03:23a field, or an entire algorithm because you can use the Calculation dialog to set
03:28the parameter. That value can then get packaged up at the pressing of the
03:33button of the script or at the initiation of the script and then un-packaged
03:36within the script and then used within the script steps dynamically.
03:39So remember when you're triggering a script that you've authored in FileMaker
03:43as either a trigger, a button, or a sub- script, you have the option to specify
03:47a script trigger. This will allow you to get the same functionality at your
03:50FileMaker solution but yet author fewer scripts.
Collapse this transcript
Building Send Mail script steps
00:00One of the more popular end user features in FileMaker is the ability to either
00:05manually send an email or from within a script in a FileMaker record. This is
00:09called the Send Mail functionality. The easiest way to do it is manually. Any
00:14user, whether it's programmed into the file or not, can go to a record that has
00:18an E-Mail address on it and go under the File menu and choose Send Mail.
00:23You'll see the Send Mail dialog box pop -up. Then what the user can do is map
00:28some of the fields on the record to the dialogs. In this case, you see To. We
00:34want to specify a field name, probably a good idea to send it to an email
00:38address. You can put a copy on there, if you would like to. You can put a
00:43Subject in here, you can just say "Test " or "This is cool", if you like. Or you
00:47can go in and specify a field name that you've set up for that. Or create a
00:51calculation that can pull in all sorts of dynamic information, using your
00:55function. So let's say Get functions for the account name or the information
00:59that you're deriving from the record. The sky is the limit as far as which you
01:03want to put in here.
01:04You can even attach your file, just by choosing a file on your Desktop
01:07somewhere. I don't know. It will attach to your email. Then when you hit OK, it
01:11will send a Send Mail command to your operating system default email client.
01:16Most clients are compatible with this functionality but it's definitely, we're
01:20testing before you deploy it onto your network.
01:23So users can do this. You'll notice that there is a supported script step in
01:27the script maker too. If you hit Edit, you can perform this without dialog.
01:32Performing without dialog is the way that you can toggle between having the
01:36email go directly to your Outbox, as you've addressed it, or it goes into your
01:41drafts. So depending on what you want to do, you can play around with the
01:45Perform without dialog checkbox.
01:47You see you get the same window in the Send Mail. One thing that I wanted to
01:53point out is that you see you have an option to send one email, meaning the
01:57data in the current record, or multiple emails, one for each record in the
02:01found set. This is a really neat, new feature because what it allows you to do
02:06is author an email one record at a time, meaning you're not going to send out
02:10some email blast that will get caught in a spam screener, for all 1522 contacts
02:16at once; but instead it will go one at a time and send out emails from whatever
02:21address that you have set up in your email client to whomever is addressed in
02:26the email field on each individual record.
02:29This is a great feature for communicating with your customers or if you decide
02:33to use this as a script step. If you create a new order, you can have it
02:37automatically send a confirmation to your users, whatever it is that you would
02:40like to do. So the more robust the calculation that you build inside the body
02:44and the subject, the more effective this email could be.
02:48There is something new in FileMaker 10 that makes this even more interesting.
02:53Admittedly, in previous versions of FileMaker sending a large group of emails
02:59out through email client could pose a problem. There are so many variables
03:03involved that have nothing to do with FileMaker that sometimes this combination
03:06doesn't work very smoothly.
03:08For example, you could have incompatible email clients, you could run into
03:12something that's called a Port 25 conflict, which means depending on your ISP,
03:17if you try to send out a certain number of emails, sometimes it's as low as 50,
03:21sometimes it's a couple of hundred; but if you send out too many emails in
03:24short enough period of time, you get flagged as a spammer and then they'll shut
03:28up your ability to send outgoing emails. That's not a good thing.
03:32So what FileMaker added in both the manual version under the File menu and in
03:37the script step, was the ability to toggle between either an email client or an
03:42SMTP server. This is a huge improvement over just using the client. As a matter
03:46of fact, I would go so far as to say that you should just setup the SMTP
03:50options any time you're using the Send Mail script step.
03:53SMTP options are just the options that you setup, when you put a new account
03:57into your mail client. If you're not sure what these are, contact your IT
04:01department or whoever supports your mail accounts and ask them for this
04:04information. What it allows you to do is set up the Name, Address and Reply-To
04:09Address for the account that you want the all the emails to be from.
04:13Then of course, you need some outgoing SMTP information, whether it's the
04:17server address, the port that's being used and then your authentication method
04:21with the user name and password; all that information needs to be saved in the
04:24script, so that your emails can go out. All you need to do is configure the
04:29SMTP options and then just hit Send Mail. What it does is it sends an email,
04:34just like your mail client does, but you don't have to have the mail server on
04:38your machine, you don't even have to have an email client on your machine. You
04:40can just put all the information in here, store it and then distribute the file
04:45either on the network or to other users. They'll be able to send from the same
04:49account that you've set up. It's a really amazing, a versatile option that's available.
04:54You don't only have to put in one account but you can put in conditional
04:58accounts. All these Specify buttons in the script step allow you to put in If
05:02statements or conditions that say if this email is pertaining to this, then
05:07make it come from this address. So for example, if you say if the email is a
05:12confirmation, then have it come from one address; or if it's an inquiry, have
05:16it come from another address; if it's a sales thing, so on and so on and so on.
05:20So really the sky is the limit and this is really one of the real sleeper
05:23functions inside FileMaker 10. So remember that you can train your users to go
05:29under the File menu to execute the Send Mail or you can build it in, in any
05:33robust fashion that you like as a script step into your existing scripts. So
05:38have some fun with this one because this is really one of the really neat
05:40improvements in FileMaker 10.
Collapse this transcript
Executing server-activated scripts
00:00I just wanted to take a quick moment to mention that scripts can be executed
00:04from the web and from the server. Those on the server side can be automated.
00:09Now we're not talking about web publishing or any server configuration in this
00:13title, but none of those technologies have changed at all since FileMaker 9. So
00:17if you're interested in great detail on either the subject of web publishing or
00:22server configuration, please take a look at the FileMaker 9 beyond the basics
00:26titles and you'll get all the detail you need there.
00:28With that in mind, I wanted to point out one thing, when you go into manage
00:31scripts. If you look at your scripts in the bottom-left hand corner, you'll
00:37notice something that's new to FileMaker 10. That is the Compatibility option.
00:44So you see that you have three different options there, the Client
00:46compatibility, Server compatibility and Web Publishing. So all script steps are
00:52not compatible in all technologies. So you can't run every one of these scripts
00:56from the web and you can't run every one of these scripts from the server.
00:58Now when I talk about executing scripts from the web, I'm talking about having
01:02a browser-based version of your database with buttons on it. That when users
01:07click on them, it can communicate back to the database on the server and then
01:11run a script. Now for the server execution, what I'm talking about there is
01:15that you can set up a schedule on your server to run a script in the middle of
01:19the night, for example.
01:21So let's say everyday you import a bunch of data in from another system or you
01:25want to send a bunch of confirmation emails out in the middle of the night.
01:28Well, you can create a script that does that and then you can tell your server
01:32to run that script in the middle of the night. It does not require that anybody
01:36logs into the database, it does it all on its own. All the information is
01:39contained right inside the server and the script, so no one even has to bother
01:43with it. Plus, it will keep a log that all those scripts have run, so that you
01:47can double-check everything during your server management.
01:51The thing that you have to pay attention to when you're authoring scripts is
01:54the compatibility issue. It's easy to find client compatible scripts because
01:59every script step is compatible on the client. The client means FileMaker Pro.
02:03So any script that you author will have compatibility, if it's run in FileMaker Pro.
02:07However, if you run it on server, you'll notice that some of the scripts on the
02:12left hand side are grayed out. Like you see the Pause/Resume Script, Install
02:16OnTimer, a lot of the Insert script steps and any Window management. This all
02:22makes sense because you're actually not logged into a copy of the file, you are
02:26just sending instructions through the guts of the server. So therefore, you
02:30can't open any files or change anything within the application itself and
02:34that's why you see most of this is grayed out.
02:36The same is true with Web Publishing. There is a few like the one you saw just
02:39get highlighted. Open URL is supported in Web Publishing but not on the Server.
02:44Then from a server standpoint, if you look at importing and exporting records
02:53-- if you note Import Records, when we go into Server, that's supported on the
02:57Server but not on the Web. Mostly, those are the same in each case, but one
03:02thing that's also new in Server 10 is that importing and exporting used to not
03:06be supported, when a script was run from a server in FileMaker 9. Now in
03:11FileMaker 10, they are supported.
03:12So just a couple of notes here about the fact that you can run scripts from the
03:15web and you can also schedule to run them from the server. That when you're
03:19authoring scripts, you should take into account the compatibility because if
03:23your script runs in to one of these steps and it's been run from the Server,
03:26let's say. You try to run one of these grayed out ones, it's just going to skip
03:30it and that might have different behavior than your users might expect.
Collapse this transcript
19. Script Triggers
Understanding script triggers
00:00Probably the most exciting new feature in FileMaker 10 is the support for
00:06something that's called script trigger. Script trigger has easily been the
00:10most requested item for FileMaker users, probably for the last decade or so.
00:16So finally, FileMaker 10 is incorporating the use of this thing called script triggers.
00:21Now what is a script trigger? Well, creating a script is really just half the
00:24battle because in order for this script to run, it needs to be triggered or
00:28executed from some action that's on screen. So since triggering a script is
00:32necessary for them to run, it's a good idea to get familiar with the different
00:35ways that you can do so.
00:37First let's start with the ways that you can trigger a script in versions of
00:41FileMaker prior to 10, so that I can differentiate the difference between the
00:44new script triggers. Originally, FileMaker allowed you to trigger scripts in
00:48the following ways.
00:50In Layout mode, you could attach a script or a script step to a button or an
00:56object down your layout. As you see here, I have attached the Exit Application
01:01script step to the Log Out button. Also, you'll notice under your Scripts menu
01:06is a list of scripts. When you create a script, you can choose to check the box
01:11next to the script name to make it available to your users via the Script menu.
01:16If you select one of these scripts, it will automatically run the script for you.
01:20So these two, the buttons and the Script menu have been triggers in the
01:23past. You can also assign scripts to run on Open/Close, which we will be
01:28talking about in the file based script trigger movie.
01:31Then for more advanced users, if you create custom menus, you can have a script
01:36trigger on a menu command. Then also, you should be aware that you can trigger
01:40a script on the server. You can do that without a user having to log in to the
01:44database. This was something that was new in FileMaker 9 Server.
01:48In FileMaker 10, there have been new triggers introduced. They are broken up
01:52into two categories, as far as the new triggers are concerned. One is the
01:56object-based script triggers and then there is the layout-based script
01:59triggers. We'll take a look at each in the upcoming movies.
02:02The object-based triggers allow you to execute a script, when users clicks into
02:06a field, or when they click out of a field, when they modify a field value,
02:10or when they click out of a modified field value, which is a save, or if they press
02:15one or more specified keys on the keyboard.
02:18The layout-based script triggers, when you load a record, commit a record,
02:23revert to the previous record, a lot of this navigation that you see up on top,
02:28or also if you press one or more keys not associated with an object,a nd when you
02:33go to navigate to the layout, you can run a script,a nd when you enter a new mode,
02:39like Preview mode, let's say, or if you exit a mode.
02:44So this really is something to be excited about. So we are going to take a look
02:47at example of these in the upcoming movies.
Collapse this transcript
Using object-based triggers
00:00The first set of triggers that we are going to take a look at are the
00:03object-based triggers. These are triggers that deal with layout objects, most
00:07specifically fields. For example, if you click into a field or click out of a
00:11field or modify or save a field value then you can execute a script.
00:16So all these will be based off of Layout mode, if we go into Layout mode in our
00:20Exercise file. We are going to want to choose a field to apply our script
00:24trigger. In this case, we will choose the Description field. Once you have a
00:28field selected you can go under Format to Set Script Triggers. You can also
00:34access this through the contextual menu by right-clicking on the field. And if
00:38you are a Mac user you can hold down your Ctrl key and click on the field.
00:43So then you will get the Set Script Trigger dialog box. In our example, what we
00:48want to do is run a script that checks the spelling of a field, ones the user
00:52makes a change in this field and then leaves.
00:54So in this case, we want to do ObjectSave, not just ObjectModify because they
00:58have just been making the change but after they have made a change and then
01:01committed the record. So we will check the box next to OnObjectSave and now it
01:07pops up our Specify Script window. This is where we pick the script that we
01:11want to run when that action occurs.
01:13Here we have got a script setup already to run a CheckSpelling script step on a
01:18field and we hit OK and we are going to run this one just in Browse mode, as in
01:23our case there is no saving inside Find mode. So we hit OK and now the first
01:28thing you notice on the layout is that there is a small red asterisk in the
01:31lower right-hand corner of the field on the layout. This indicates that a
01:34Script Trigger has been attached.
01:36Now you have to be careful before you go add script triggers on a layout to
01:39make sure that none of the other fields have triggers already assigned. And if
01:43they do, go study the script assigned to those fields and make sure that you
01:46are not creating a conflicting event.
01:49Let's take a look at how the Script Trigger works. If I go into this layout and
01:55change something on the field and now click outside of it, you see that it's
01:59invoked the Check Spelling dialog, which was one of the steps inside the
02:03script. By simply making a change and leaving the field therefore committing
02:07the value inside the field I am able to invoke a script.
02:10Let's look at another example using the same field. Let's say in this case, you
02:14will notice that we have an Audit Log, imagine that your users want to have a
02:18record created every time somebody makes a change in this field.
02:21The record will then be created in a child file that will contain the
02:25information on who made the change, when the change was made and then the
02:29original value and the new value. That's all done in a script that we have
02:33created here called GrabExistingDescription and then CreateLogEntry. These are
02:41all scripts that you can study where we have identified an object and then grab
02:44the values and set them to variables so that we can use those variables when we
02:47create the log file.
02:49So we have two scripts already set up, but we don't want the user have to go
02:52run those scripts every time they make the change, we want this to happen
02:55behind the scenes. So let's go into Layout mode and we are going to select the
03:00field go under Format to Set Script Triggers.
03:06Let's remove the one that we have added earlier and in this case I am going to
03:10select OnObjectModify. Now, this is when I just make a change inside the field,
03:15so in the logic of our story that we are trying to achieve here, if the user
03:19makes a change and only if they make a change inside the field we want to set
03:23the existing description of that field to a variable. And those are the steps
03:27that are contained within the GrabExistingDescription script. So I hit OK but
03:32we are not done yet, we want another script to trigger on a different action.
03:36So in this case, we have grabbed the existing description if a user has made a
03:41change. Now I am going to select the OnObjectSave and I am going to select the
03:46new script and that's CreateLogEntry. This is the script that we looked at
03:50earlier that creates a new record in the Audit Log table and then takes the
03:55information that we stored in the variables which is the existing description
03:58and then the new change that they have made and places those values in to the new record.
04:03All that's happening through the script but now we can make it transparent to
04:05the user. So we hit OK and you see we still have the icon on there indicating
04:11that there is at least one script triggers assigned to this field.
04:14We go into Browse mode and save our changes and now we see there is no records
04:18in the Audit Log and in this case I will make a change to the values in the
04:24field and I will click outside of the field to the users it appears that
04:28nothing has happened at all, but what's actually occurred is that as you see
04:32when we roll over we have assigned the original value to the field and then you
04:37can see what the new value of the field was inside the record.
04:40So all this happen without the user knowing it, without the user having to
04:43press any new buttons or execute any kind of scripts visually at all and in the
04:48case of an Audit Log this ones quite useful because you don't necessarily want
04:52the users to know that you are tracking the changes.
04:55So object-based triggers are extremely useful. They can be used one at a time,
04:59assign to fields, or layout objects or several different triggers can be
05:03assigned based on the different actions for the same layout object. Now let's
05:07take a look at the layout-based triggers.
Collapse this transcript
Using layout-based triggers
00:00One of the groups of the new script triggers that are introduced in FileMaker
00:0310, are called layout-based triggers. These are triggers that you can assign to
00:08any given layout that will run an event or a script on the load of a record,
00:13the commit of a record, the loading of the layout, or entering a new mode, or
00:17existing a new mode. Unlike their counterpart, object-based triggers, these are
00:21setup on the Layout Setup dialog.
00:23Let me show you an example of this here in our Exercise File. Let's say we've
00:27got a file where we've created a layout, you see the Customer by Tier layout on
00:31screen here. This happens to be a sub-summary report. As we know from
00:36sub-summary reports, in order for them to work properly on screen they need to
00:40be sorted by the break filed.
00:42So there is a script that will run the report and each time that we run the
00:47report, it turns our List view into a group report. So let's say what we would
00:53like to do is make sure that every time a user navigates to the screen, that
00:57the report is run. So that they don't have to do those steps themselves. So
01:01this would be the perfect opportunity for us to use a layout-based trigger.
01:05We'll go back into Layout mode and we'll access the Layout Setup dialog by
01:09clicking on the pencil next to the layout list. You'll see that a new tab has
01:13been added to the Layout Setup dialog in FileMaker 10 and that's the Script
01:17Triggers. You see here you've got the OnRecordLoad, OnRecordCommit,
01:20OnRecordRevert, but also OnLayoutKeystroke, OnLayoutLoad, OnModeEnter and
01:24OnModeExist.
01:27In our example, we are going to attach a script to the loading of a layout. So
01:32that way anytime a user goes to this layout, the script will be run and they'll
01:36see their group report on screen. So I'll choose RunReport and assign that to
01:42this layout. We'll have that happen only in Browse mode and let's say Preview
01:47mode as well. Now we hit OK, go in to Browse mode, make our changes.
01:55So let's go to a different layout and we'll navigate back to Customer by Tier.
02:02Now you see that the RunReport script has been executed, when we run our
02:05layout. You can see what that looks like, not run. We look at the script for
02:13RunReport. First, it's performing a Find and isolating only two Tiers of
02:18customers. Then it's sorting by our break fields, so the groupings will occur
02:23on the layout. If you run that manually, it would have the two tiers grouped;
02:30but so that the users don't have to run that manually, we are going to have
02:33that run every time they navigate back to this layout. No matter what happens
02:38on the layout, each time they navigate there, it will run a script for them.
02:44You see that can be just as handy to use script triggers on the layout levels
02:48as they are in the object level. So since these are brand new in FileMaker 10,
02:52it's probably a good idea for you just to get familiar with the triggers, so
02:56that when you writing your scripts, you can then think about when and where you
03:00might want to have those execute.
Collapse this transcript
Using file-based triggers
00:00The last set of script triggers that we will be looking at aren't part of the
00:03new script triggers that were added in FileMaker 10, but instead these script
00:07triggers have existed in FileMaker for many versions.
00:09You are probably already familiar with them. They could be found under the File
00:13Options dialog and you see here the Perform Script on the opening of a file and
00:18the Perform Script on the closing of the file, more specifically these are now
00:22referred to as on first window open, which means that upon the opening of the
00:26very first window in your file, a script will be run.
00:29Conversely, you can also assign a script to when the last window closes and
00:33this is now referred to as the on last window close. So for example, let's say
00:38you have a script that locates any records that were created today and if no
00:44records were created today, it shows user a message.
00:47So if we go into the File > File Options dialog and assign this Find New
00:52Records script to the on open, we will hit OK and now I will close the file, go
00:58into my exercise and open the file again and you will see that it automatically
01:03ran the script for me. There were no new records added today, so it gave me
01:07this message.
01:08You can also assign a script to the closing of a file. The only thing you have
01:12to keep in mind here is that your user could have multiple windows open and it
01:15doesn't execute until the last window on the file is closed.
01:18Although you may already be familiar with these file based triggers, if you are
01:22not they can be very useful and work just like the layout or the object triggers.
Collapse this transcript
20. Relationships
Diagramming relationships (with ER diagrams)
00:01In previous chapters I have mentioned things like relationships and related
00:04fields. And when I am talking about relationships, I am actually talking about
00:08how different tables are related to each other and how those relationships
00:12really define the data that's in those tables.
00:14An important note is that whenever you sit down at a computer and open up a
00:17FileMaker Pro to start a new database, what you are actually doing there is
00:21constructing something and much like a home construction project, your database
00:26project will proceed more smoothly if you first begin with some kind of a plan.
00:29So the first thing that you want to do, even before you open FileMaker, is to
00:33come up with the plan on what type of data you are going to be managing in your
00:36system. If it's a very complex system, then it's going to have a lot of
00:39parameters to it and then you will have a very complex plan. But if it's really
00:43simple project, you still want to take a couple of minutes ahead of time and
00:46determine what type of data you will be storing in the system.
00:49So first take a few minutes, look at your data and then literally sketch out
00:54what type of information you plan to manage in your database. For example, here
00:57we have a basic database system where we have a Customer Database table and we
01:01have got Orders and then we have got Products. It's really a Standard Invoicing
01:04System where the customers are ordering products and creating order forms as a result.
01:08So in an example like this one, we can see what types of data we are going to
01:11be storing. And it's important for us to pick discrete and unique buckets of
01:15information, because that's going to ultimately tell us what tables we need to
01:18define in our system and say OK, well, I have got Orders and that's going to be
01:22discrete unique bucket of data. I have got Customers. I also have Products and
01:26possibly maybe some other tables as well.
01:29Now I have my list, which will ultimately become the tables that need to be
01:33defined in the system. The other thing that's important, after you determine
01:36what all your tables are going to be, is determine how they are going to be
01:38related to each other. So you see here in this sketch that I have, that's all
01:41cleaned up. We have determined that we need a Customer table, we need an Order
01:45table and we need a Product table and then we've got this other table there
01:48that's a Line Items table, which represents any Product that shows up on an
01:51Order. And then the questions you ask yourself specifically are, can one
01:55Customer have many Orders? And if the answer is yes, then you want to create a
01:59relationship between those two.
02:00If there is no relationship between the tables at all, then you don't have to
02:03note that accordingly. But here in this example, we have determined that one
02:07Customer could have one or many Orders, so that's what called a one-to-many
02:12relationship.
02:13But we are not done yet, we still have to say do Orders have a relationship
02:17with Products and yes, they do and then we continue. Does a Product have a
02:21relationship with Orders? Yes and one Order can have many Products and one
02:25Product can have many Orders.
02:26So in this case, we know that we will create a separate table, a Line Items
02:29table, much like any invoice line item file, we will cover that in upcoming
02:33movies. So after a little bit of what's called the Data Modeling, we have
02:36determined what tables we need to build in FileMaker and determine which tables
02:40have which relationships with each other.
02:41So now we can move out of our architecture stage and into FileMaker and define
02:46those tables accordingly. In order to create relationships and physically
02:49define the relationships within FileMaker Pro, we are going to use something
02:52that's called the FileMaker Relationship Graph.
02:54In the upcoming movies in this chapter, we are going to use the Relationship
02:57Graph to establish and then maintain the table relationships in our FileMaker Solution.
Collapse this transcript
Setting Primary and foreign keys
00:00Once you have completed your data modeling exercise which will help you
00:04determine what tables you are going to need in your FileMaker database as well
00:07as what relationships you will need between those tables. Then and only then
00:11can you move on to starting to define these elements inside your FileMaker file.
00:15So you will see inside of our exercise file, I have done a couple of those
00:19tasks already. So assuming that we have created our diagram and we know what
00:23tables we need, we can then go into a FileMaker file, create a File go into
00:27Manage > Database, at which time we will put in all the tables. So I have gone
00:31ahead and done that for you in the exercise file.
00:33So as you see from our Modeling Exercise, we needed a Customer table, an Order
00:37table, a Product table and then we have got this thing called an OrderLine item
00:40table which I will discuss in later movies.
00:42But it's important to note that you need to really make these decisions before
00:46you move into FileMaker. If you have a small project, it might not seem like
00:50you need to sketch things out ahead of time, but I cannot emphasize enough how
00:52important it is to make decisions on tables and relationships before you start
00:56working with these because the pitfall could be that you haven't taken
00:59something into consideration and then you end up pulling a lot of wires out
01:02under the hood and that can be a lot more detrimental later down the line than
01:06when you are just sketching it out on a piece of paper.
01:08So first you create the tables as you see we have here. Now what we need to do
01:12in order for the relationships to be created in FileMaker is we need to have
01:15something that will hook these two tables together and you will notice that in
01:19the Manage > Database window we've got Relationships tab. And on the
01:23Relationships tab, you see that we've got these boxes that appear. That looks
01:27similar to the entity relationship diagram that we created in the Data Modeling
01:31exercise. But these blocks represent tables in FileMaker Pro. Now these blocks
01:36are known as table occurrences and it's important not to think of them as the
01:39table themselves because a single table may actually be represented multiple
01:44times in the graph and I will discuss some of those scenarios in later movies.
01:48But when you add a table to a file, FileMaker Pro will automatically add a
01:52corresponding table occurrence to the Relationship Graph. So what you see here
01:55is I have added four tables to FileMaker and it's gone ahead and created these
01:59table occurrences for me. And then after the fact, you can add any table
02:02occurrences that you want, directly in the Relationships tab.
02:06So back into tables, we need to concentrate now on what's going to hook these
02:10tables together. If you recall, we have determined that we have relationships
02:13between Customer and Order and between Order and OrderLine and Product and
02:17OrderLine. So we need to have something in there that's going to help identity those.
02:21So if we look into the table by double- clicking, we know that the customer is
02:24going to have a one to many relationship with orders. So another way that this
02:29is discussed in computer language is that there is a relationship between the
02:33two tables and it's called a parent- child relationship. Similar to real life
02:37parent-child, the parent could spawn many different records that are related to
02:42it in the child table. So one customer could be one record in the customer
02:46table and the many orders could be many different records in the order table.
02:50So we need to be able to link those two together. But first we need to uniquely
02:53identify the customer. So in order to build the relationship, each table is
02:57going to need an appropriate key field. The key field is the term for a field
03:01that uniquely identifies each record.
03:03The customer table will need what's called a primary key. There are two types
03:07of keys that we will discuss, the first of which is the primary key and the
03:11primary key will uniquely identify each customer.
03:14So if you think of it this way, if we are going to have a relationship, you
03:17have a parent, you have a child, then you need to be able to identify which
03:20child goes with which parent. And so in this case, we are going to have a field
03:23that is going to be called CustomerID and this is really a language that
03:29various FileMaker developers will use putting an ID in there. And if we create
03:33that field, what we are going to want to do is make sure that it's
03:36automatically populated with the unique value every time a new record is
03:40created, because if we have two records that have the same ID in the field, we
03:44are not going to be able to determine which child records are related to them.
03:48So if one customer has many orders and on that order record you put in
03:51CustomerID 123, there better only be one customer with 123. Otherwise FileMaker
03:56is going to be confused as to who the parent is supposed to be.
03:59If you remember earlier in this title, we discussed the way that you can have
04:02FileMaker automatically allot unique ids to each record and that was in the
04:07File Options. So each time you create a primary key and in this case,
04:12CustomerID, you will also go into the Options dialog and you will select Auto-
04:17Enter, Serial.
04:18Now don't worry about the values because you can just start at one and
04:21increment by one. All that's necessary is that within this customer table, each
04:25one of these records has its own unique ID. So we will set that up and now what
04:29we have got is the CustomerID primary key field. Now each one of the tables
04:34that act as a parent is going to need one of these.
04:36So once you have created a unique identifier in each one of the tables that
04:40will act as a parent in these relationships, you can view these over in the
04:43Relationship Graph. So if you recall, we have one customer, we will have many
04:47orders and so we see that the customer has a customer ID that's created. And
04:52one order will have many products and so you see we have an order ID that's set up.
04:57One product will have many orders, so we have a product ID set up and so on. So
05:01we are not telling yet, we have to now complete to the relationship on the
05:04child side. So if we go into these tables. Earlier I mentioned that one
05:09customer could have many orders. So if the customer has a unique ID of 123, the
05:13net value needs to exist somewhere in each of its related child records and
05:18that is what's called a Foreign Key value.
05:21So we need to first determine which of the tables are acting as children or
05:25child tables in our relationships and inside those we need to now define a
05:29field that will contain their parent's ID value. So the way, I would like to
05:34think of this is in the real world a parent has a last name and when they have
05:37a child, that child inherits their last name and that's how you can tell who is related.
05:41So CustomerID number 123 has a child record or several child records. They are
05:46all going to need to share the same ID or it vacates the last name. Just the
05:49way I like to think about that.
05:50So let's take a look at the relationship between customer and order. So if
05:54records inside the order table will be related to a record inside the customer
05:58table, we need to have a field that will contain that unique ID. And you will
06:02have to define those fields in each one of the child tables. So what many
06:06developers like to do is create a field that has the same name as the field in
06:11a parent table, but we add an FK at the end of it meaning Foreign Key.
06:16So I will create that field and now we don't do the auto-interruption in this
06:20case and it's important to explain why. It's because we want the value in this
06:24field to be populated with the CustomerID, not its own unique ID. So in the
06:28case of the order table, it's managing its own unique ids in the order ID.
06:32There are several methods, which we will discuss in upcoming movies, that can
06:36help you put that value into the field and we will do a couple of them
06:39manually. But the idea is that we keep this empty until it has a parent
06:43relationship and then we'll populate the field accordingly.
06:45So there is another table in here called the OrderLine item. And so we have got
06:50one customer who has many orders, so we see we have CustomerID uniquely
06:54identifying it and then we will have the OrderID uniquely identifying order
07:00because it will be a parent. But order also acts as a child, so we have
07:03CustomerID that will be related to customer ID. That's how those two will be
07:07physically linked together within FileMaker.
07:09But we have got an order and a product relationship and ultimately we want to
07:13resolve all relationships to one-to- many relationships. In this case, it would
07:16be one order gets many products, one product could be on many orders. That's
07:21what's called the many-to-many.
07:22So what's customary in that case is to create, what's called the Joint table
07:25and that's what the OrderLine item table is. That way one order can have many
07:30line items and one product can have many line items and we don't have a
07:33many-to-many there anymore.
07:34It's a somewhat intermediate concept when talking about relationships, but this
07:37is a prime example of how that will work. So if we concentrate on the
07:40one-to-many relationships between Order and OrderLine and the one-to-many
07:44between Product and OrderLine, we have to think about which one of these tables
07:48in each relationship is the parent and which is the child.
07:50Well, this one is kind of easy. Order is the one and OrderLine is the many, so
07:55Order becomes the parent. Product is the one, OrderLine is the many, so product
07:59is the parent and in both cases OrderLine is the child.
08:03So we remember every table that acts as a child needs to have a field, its own
08:07independent field that can be populated with the parent ID.
08:10So in that case, since it's acting as a child in two different relationships,
08:14we need to go into the OrderLine file and define Orderidfk. Remember that
08:21stands for Foreign Key and we'll do another one for ProductIDfk and create that
08:28relationship as well.
08:29Now in the Relationship Graph we can see ProductID has a corresponding foreign
08:34key field, the primary key OrderID also has a corresponding foreign key field.
08:39Now our next step is to create these links between all of the tables, now that
08:43we have the hooks otherwise known as Keys already in place.
Collapse this transcript
Creating relationships with the FileMaker relationships graph and table occurrences
00:00At this point in the process we are assuming that you have already gone through
00:03your Data Modeling Exercise to determine the tables that you need and the
00:06relationships between those tables.
00:07You can also see that we have already created our tables and that within each
00:13table you'll see that they have gotten their unique primary key. In some cases
00:17where appropriate, table will also have a foreign key defined. Those are
00:21critical, because at this stage what we want to do is link these table
00:25occurrences together. The table occurrences are these boxes that you see on the
00:29Relationship Graph.
00:30This is really the easy part too, because to physically create these inside
00:34FileMaker doesn't really take that much effort, but first I want to give you a
00:37brief idea of some of the tools that are available to you in the Relationship
00:39Graph. You see down on the bottom, you have the ability to create new table
00:43occurrences and edit existing relationships. Also you have the ability to range
00:47your graph much like you do in your Layout tools, you can select certain items,
00:51by drag selecting you can see them highlighted. Then you can use some of the
00:54Arrange tools to organize them better.
00:56As you get more and more table occurrences on your graph, you might want to use
01:00the Color tool, where you can pick from the Standard FileMaker Color Palette to
01:04give them a different look and feel, so you can identify them better. Right now
01:08as you see, much like in Layout mode, the Pointer tool is the Default. If you
01:12want to create some notes, you can use this handy Alpha tool, which will create
01:16a sticky like icon on your Relationship Graph where you can just make notes for
01:20either you, or the other people that are working with the database. Then also
01:23you can print. When you are done with this, it's a good idea, just like you do
01:26with scripts or anything else, to print this out, so that you have a copy of this.
01:30So using the Pointer tool, we are going to create a relationship between
01:34Customer and Order. What you do first is you go in to the Parent table and in
01:38this relationship between these two tables, Customer is the parent and you will
01:42click and hold down your mouse on the ID. You see that your cursor now has a
01:46little dumbbell looking icon to it. As you move out of the table, you'll notice
01:51that it's pulling a line with an equal sign in between.
01:55What you do is you then go over in to the table that will serve as the child
01:58and you find the foreign key value that matches the primary key in the parent
02:03table. In that case this is the CustomerIDfk. Once I have got it highlighted, I
02:08just release. Then you see what happens is that FileMaker will isolate the
02:13primary key and the foreign key in the relationship.
02:15You will notice that it even does a one- to-many link. Really that isn't truly a
02:20one-to-many, since these are just table occurrences, not the actual tables, but
02:23it does its best guess and it's really based on the fact that it knows that
02:26this isn't an auto-enter serial and that this is just a value that doesn't have
02:29an auto-enter serial. So this will remain unique, whereas this one won't, which
02:32is what we want. So it doesn't one-to-many.
02:34There is a couple of other that we need to create. So here we have Order, which
02:38is the child table on this relationship, but it has another relationship where
02:42it is the parent. So we select the foreign key value again, click down and then
02:47drag it in to the child table, which is OrderLine in this case. Then select the
02:52proper foreign key value, which is OrderIDfk. So you can see where those naming
02:56conventions can make this a little bit easier on you. Then release and now you
02:59see the same thing has happened here. OrderID to OrderIDfk. So we know what
03:03makes up that relationship.
03:05Then finally, we have the Product parent and the OrderLine child relationship
03:09to setup. So we go in to ProductID and click-and-drag down in to the
03:13ProductIDfk. You see that we have now got all of our relationships setup in
03:19FileMaker. What's nice about this is that now Customer has a relationship with
03:24Order, which means that an Order record can now pull in data from its parent.
03:30So that any record inside Order, it's going to have a value and CustomerID. So
03:34that means it only has one related parent, which means that you can borrow from
03:38the parent; which probably sounds familiar to a lot of us, when we were in
03:42college, but I like to use the analogy of borrowing from your relatives. So
03:47there is only going to be one record in this CustomerID that this Order record
03:50is related to and therefore, it can borrow any one of these fields.
03:54So in your Order table, you no longer need to define fields for Address,
03:58Company, Country, First name and all that type of thing for your customer,
04:01because now you can borrow from them, because of the relationship. We'll
04:04explore that more when we talk about working with Related Fields.
Collapse this transcript
Using related fields
00:00Once you have established your relationships inside your FileMaker file, then
00:04you have the benefit of being able to start working with some of the
00:06relationship-based functions in FileMaker Pro. The first one of these functions
00:10that we are going to look at is the concept of using Related Fields. So once
00:14you have a relationship in place, it's possible to use a relationship to look
00:18at data from one table from the perspective of another.
00:21So go in to the Order_Detail layout in the Exercise File and you will notice
00:25that each one of the records in this table represents one Order. So we have got
00:30some information that lives on the Order record, like the Customer Number that
00:34was populated when the Order was created. Then the Order Number, which was
00:38populated automatically from FileMaker, because it's a unique ID. This also
00:42happens to be the primary key field. And an Order Date, which was created by
00:46the user who entered the Order.
00:48It would make a lot of sense, because this is an Order that we would want to
00:50have a series of customer related fields. Now our options are that we could
00:55certainly go into the Order table and define a bunch of fields here, like
00:59Customer Name, Customer Address, City, State, Zip, so on. So we could do that,
01:04but this process would not only be inefficient, because we would go in and
01:07create fields that already exist in our solutions somewhere, but also it could
01:10create the risk of redundant data. Meaning if I had a customer address field in
01:15the Order table and a customer address field in the Customer table, if I put a
01:19new address in the Order, it's not going to be updating the Customer. So that
01:23would be a burden on the user to have to go and update it in two places.
01:27That is one of the primary reasons why you would work with a relational
01:30database system like FileMaker. So how do we get around that? Well, here is
01:34one of the great benefits of having tables related to each other and of course,
01:37we know that Customer is related to Order. Since Order is the child in this
01:42table, it can pull data from any one of the fields in the parent record.
01:47I like to refer to this as borrowing from its parent.
01:50So if you go back in to the layout and go to Layout mode, let me show you how
01:54easy it is to do this. So let's say what we want to put on here is the company
01:59shipping information. So what we will do is create a new field. I can go in to
02:04the Field tool, click and drag down and then release that here. You'll notice
02:09when you specify a field or leave a field on the layout, so far we have only
02:12been working with the current table and it gives us a list of all of the fields
02:17that are defined in the table that this relationship is based on. This is an
02:20Order_Detail layout, so we based it on the Order table. But what you might not
02:24have noticed is if you click on that field, you see that there is a list of
02:27related tables.
02:28Now not only is this table related to the child tables, but it's also related
02:33to other tables that it doesn't have a direct relationship with, but since the
02:37relationship daisy-chains through all the tables, they are technically related to
02:41each other. We'll talk about that more in upcoming movies.
02:44For right now what we want to do is choose from the Customer table and you see
02:48because there is a relationship, we have all the Customer fields available to us.
02:51In this case, I will pick the Company field and give that a little bit of
02:55size and I will Copy-drag this by holding down my Option key on Mac, which if I
03:02held down my Ctrl key on Windows, I would get the same effect, and I will put
03:07in some other fields here. While I am doing this, I would like to explain that
03:11these fields now don't have to be populated because they already contain
03:15values. They contain the value that exists in the parent record. So you might
03:20think to yourself, well, how do we know which one that's going be?
03:23Well, this is determined by the value that's inside the CustomerID foreign key
03:28field. So when I place these fields on the layout, FileMaker knows exactly what
03:32parent table to go look into and it will also know exactly what record to
03:36isolate. Since there is only one parent to any one related child, there is no
03:41confusion. So there is only going to be one value that could possibly match.
03:44Then that's the value that will show in these fields.
03:46So if go in to Browse mode and save our changes to our layout, we see as we
03:51cycle through these different records, now based on the CustomerID it's able to
03:55reach up into the parent and display these values. You see what I have done is
03:59in field behavior, made these so that you can't edit them. The idea here is
04:03that these are actually values that exist in another table. So it's up to you
04:07whether or not you want to be able to allow users to update those values here.
04:11So if when they are processing an order, they find out that the address is
04:14changed, or the zip code is changed. Updating it here will in fact update it
04:18back in the parent, because really what you are doing is you are looking at
04:21this data as it exists in the parent record.
04:23So this is a pretty handy way to borrow data from the parent record. There is
04:28also some other things that you can do with using the Calculation Engine. We go
04:31back up in to File > Manage > Database, let's say in the Order table we want to
04:36define a field. Now this is a little bit different than borrowing a field. What
04:39we are going to do is define a field in this table that's called OrderTotal
04:43and we are going to make it a calculation. If you remember from the calculation
04:47movies, there are various different functions that are available to us.
04:50I would like to introduce you to a function that falls under the Aggregate
04:54functions. This one is called Sum. Sum is a pretty easy one. If you put fields
04:59in a delimited string here, what the sum calculation will do is add up the
05:03numeric values that are found in each one of those fields. But a very popular
05:07trick that FileMaker developers use is that if you put one single related field
05:11instead of having several fields in there, what it will do is total up the
05:15value in all the related records.
05:18If you remember, Order is the parent in a relationship also. Order happens to
05:22be the parent in the Order to OrderLine relationship. So we discussed adding
05:27parent fields on to the Order layout, but now we are going to use the child
05:31fields looking downstream in to that relationship. We are going to total up the
05:35UnitPrice of all the individual line elements on an Order. Since in the
05:39OrderLine table there could be potentially either one or many different records
05:43that all have the OrderID in them, we know that we can identify the children.
05:48We know that potentially there could be many.
05:50So using the Sum calculation and simply double-clicking on one related field,
05:54in this case I have chosen ExtendedPrice and using the calculation result as a
05:58number, what we are able to do now is total up the ExtendedPrice for every
06:03related line item for this order. We have defined the field in the Order table.
06:07Let's go and take a look at how that's going to work. So you see that
06:10automatically this field has been added to the layout. And if it didn't in your
06:14version, that's just a setting that you can toggle in Preferences, so don't worry.
06:17If you go back in to Layout mode and either take the field that was created on
06:21your layout or drag one using the Field tool and we will put this one over
06:24towards Order Total label. Another thing you could do too by the way is do
06:29Insert > Merge Field and pick the field we just created. Really it doesn't
06:35matter, it just depends on your preference and whether or not you want to
06:38format these accordingly, but just showing you how that could work.
06:41So we go in to Order Total and now we go into Browse mode and we'll look after
06:45we save. We see that the total amount for each order, as we cycle through these
06:50orders, it changes dynamically, because each one of these orders has
06:53corresponding OrderLine item records that also have their ID in there. So this
06:58is the total of all OrderLine item records with number 1 in the foreign
07:02key field for Order, this is the total for all the ones with number 2 and so on.
07:07Quickly I will show you there is a couple other ways that we can create fields
07:13that aggregate related data. I will create an OrderMax and introduce you to
07:20Max. Same concept here. If we go into the related value and say ExtendedPrice,
07:25you can say OK there and then even a minimum. I will create that
07:29field, go back into the Aggregates and say Minimum. Again go down to the child,
07:35ExtendedPrice and I will do one more for Average. Create that,
07:42go into the Aggregates and select Average and go back down into the OrderLine.
07:47So it's just more examples of the same concept, but if we look at this, what
07:50this one is going to do is total all the related OrderLine ExtendedPrices,
07:54which we saw in the previous example.
07:56This one is going to give us the maximum line items, the minimum line item and
08:00then an average cost of all the different line items that are related. If we
08:03hit OK, we see in Layout mode that we have got those three records. I will put
08:10those on here, we can get rid of those labels since we already have labels, and
08:14do a little bit of formatting. Actually the next step would be to select those
08:21and you can go under Format, to Number and make these Currency. Okay and so
08:28we'll go back into Browse mode and check this out.
08:31Now that you see for each one of these orders, it's calculating the values of
08:37what the total of the order would be, the Minimum Line Item Value, the Maximum
08:41Line Item Value and Average Values for each one of the line items on the
08:45record. In this case you see we have just obviously got one record on here, so
08:50it just shows the same value for each one of them.
08:52So having a relationship between two tables, means that you can share data both
08:57upstream from the parent, because there will be just one record and also
09:01downstream to the many related records in the child table.
Collapse this transcript
Using Go to Related Records script steps
00:00After you have established table relationships inside your FileMaker file you
00:04can start benefiting from some of the relationship-based functionality. We have
00:07already discussed in a previous movie the ability to use related fields on your
00:11layout, which are basically borrowing the field values from the parents, and as
00:16you see here on this layout we have talked about how you can use related field
00:20references from the child table inside calculations in the parent to show
00:25aggregate values.
00:26Now I am going to show you a script step that will allow us to navigate from
00:29the parent to the related child record that's a very simple one. If we go into
00:33Script Maker and we hit New we are going to create a script that we will call
00:38GTRR and the reason I call it GTRR is because it's referencing a script step
00:44called Go to Related Records. In the FileMaker world it's commonly referred to
00:48as GTRR.
00:49So you can double-click on it or move it into your script area and this will
00:53allow us to navigate from the parent to the child and isolate the related
00:57record. This could be a handy navigation tool for your users so that you can
01:01drill down into related values. What we are going to do in this example is
01:05place a button for this script on the order record so that a user can click on
01:09the button and it will pop a new window that will display all the related
01:13OrderLine items and all of this can be done in one simple script step.
01:17So the script step that we have is Go to Related Records and we hit Specify and
01:21what we are going to do here is we need to select the relationship name that we
01:25want to use in this example. So we are in the Order record in the example that
01:30I have mentioned and we want to pull in the related OrderLine records and so
01:34that relationship that's between Order and OrderLine is called OrderLine.
01:39You could probably see some benefit here to using some naming conventions in
01:42your relationship names but in this example the relationship that we are
01:46looking for is OrderLine and now the next thing that it allows us to do is pick a
01:49layout. Since we are going to navigate to a new layout we need to choose the
01:53layout that we are going to use and in this case we are going to navigate to
01:58the OrderLine list because that's just a list view that was setup in the
02:01OrderLine table and since we are going to look at potentially many records at a
02:05time it makes sense to look at them in a list view.
02:07There are some other options that are available to us here. This one is pretty
02:10handy. It allows you to open up a new window. If you remember FileMaker allows
02:14you to create new windows. So this is a good use for it because that way the
02:18user can just close the window and get back to the parent record. So we will
02:22hit Show Window and we will name this Order Items let's say and we will give it
02:27some values for Height and Width and we will offset it a little bit from the
02:35original window so that we can see it's a new window popping up on top.
02:38Than the last decision we have to make is Show only related records. Without
02:42the Show only related records option shows in, it will navigate us using the
02:46relationship to the child table but it will show all the records in the child
02:50table. But what we want here is to show only the related records and we will
02:54get to this option in a second. So I hit OK and on my keyboard I hit Ctrl+S or
02:59Apple+S to save the script and I can navigate back to the file.
03:04So here I am on the OrderDetail and what I would like to do is I am going to
03:07assign this script to this Show Items button. So we will go into Layout mode
03:12and we will select Show Items and I will go down to Format button and say
03:17Perform Script and I am going to choose the GTRR script that we just created.
03:22I will hit OK and OK again. Now when we go into Browse mode, if you remember what
03:27we are looking at here we are looking at an Order layout and these fields are
03:31being pulled in from its parent, the Customer record, and these fields are been
03:36aggregated from data that's in the child table. And so let's assume that the
03:41user might want to look at the child records that make up these aggregated values.
03:46So now we have assigned a script to the Show Items and by clicking on it up
03:51pops a new window and what this new window represents is all of the items that
03:57are on order number one and we can tell that visually because order number one
04:01has a unique primary key of the number one and we look here at the foreign key
04:06value that's populated in the child records in the OrderLine table we see that
04:10they also have a number one and as we cycle through these different records
04:14we'll notice that it works dynamically.
04:16So here we have order number five, related records five and since we used a new
04:21window we can just close the window and the user is back to where they started
04:25and order number ten and order number ten and so on. So this can be used in
04:30another interesting way, if we look in the Manage > Database, Relationships.
04:34What we have done there is we have said here I am in the Relationship Graph and
04:38this is an important thing to note, anytime you are on a layout in FileMaker or
04:41really anytime you are in a FileMaker database you are somewhere on the
04:45Relationship Graph. This is what's called context.
04:48So in case of a layout that's displaying an order record that means we are here
04:52in the Relationship Graph. So when we say to use a relationship, that's what
04:56this item was between Order and OrderLine item, and you can review the
05:00relationships by double-clicking on the line and you see we have a relationship
05:03between Order and OrderLine which is the OrderID matching to the Order foreign
05:07key field and that relationship's called OrderLine. So now we said from here
05:12navigate me over to this one but use the relationship so it will only show the
05:17values where OrderID matches OrderIDfk.
05:20So in this next one we are going to extend this a little bit. We will discard
05:23the changes that we have made. We go back into Script Maker and I am going to
05:28modify this script a little bit. We'll go into that same script and we'll
05:33double-click on the Go to Related Records. So what I am going to choose here is
05:37instead of the Match current record only, I am going to Match all records in
05:41current found set. And I will save this and Apple+S or Ctrl+S on my keyboard
05:47and navigate back over into orders and you will note that we have 75 records in
05:51the found set right now.
05:53So what we I have changed in the Go to Related Records is it's not going to
05:56give me just the records that are related to the active record that I am on or
05:59order number 75 but instead what's it's going do is give me all the related
06:03records to all the 79 orders that are in the database.
06:07So you see here that means that all 143 of these are related. So what's
06:12interesting about this is that we can create a found set. We will go into Find
06:16mode and click into this field and hit Ippolite. Now you see we have only got
06:2124 records. So I am going to show those line items and you see what this
06:26represents, these are the OrderLine items that are related to all 24 orders in
06:31the Order table.
06:32So the idea there is that you can either choose to see the child records from
06:37the record that you are on or you can toggle to the child records in your found
06:41set and that's what that option allows you to do.
06:44Let's go over to Customer_Detail where I am going to show you one more use of
06:48Go to Related Records. We will navigate over to the Go to Related Record script
06:51and we will make one more change. In this case we are going to change the
06:54relationship. Instead of using the OrderLine relationship let's switch to the
06:58Product relationship and we will choose the Product_Detail and we will keep the
07:02Show in new window options and we will say Match all records. And now Ctrl+S or
07:07Apple+S, navigate back to Orders and now in the Customer_Detail let's go into
07:12Layout mode and let's assign the Show Orders button to the Go to Related Records
07:19script that we created and we will going into Browse mode and save that. Now
07:25before I show you the results of it I want to point out something else inside
07:28your Relationship Graph.
07:30So we have been talking about doing the parent to the child relationships, so
07:34we have done the Order to OrderLine, let me see all of the OrderLine items but
07:38something interesting about FileMaker is its ability to cascade through all
07:42these relationships. And if you recall I mentioned earlier that anytime you are
07:46in FileMaker you are somewhere around the Relationship Graph. So now that we
07:49have navigated over to the Customer_ Detail, we are here in context of the
07:53FileMaker Relationship Graph.
07:55So Customer I could pull up all the related orders by selecting the order
07:59relationship or I could also use the OrderLine relationship that says give me
08:03all the OrderLine items that have appeared on an order for this customer. So it
08:08cascades all the way through, so imagine this table has every order line item
08:12record in it and as you pull it through this relationship it only isolates just
08:15the orders that were per this customer.
08:18So I could do a Go to Related Records and pull up all the OrdeLine items for
08:21just this record. But what I have done here is I have selected the relationship
08:25for Product. So what it is going to do is it's going to show me all of the
08:29products that appeared in an OrderLine item that appeared on an order for this customer.
08:35So this could be an interesting way for us to find out well, let's just see in
08:38general over all the span of all the orders what products has this user ordered
08:43and that list will not have any duplicates in it because it's not the OrderLine
08:46item it's just the Order table and inside the Order table there is only one
08:50occurrence of any one product. So let's check out how that works.
08:54So let's say we are in this first record number one and if we double check our
09:00script we can see just as a reminder that we have got -- we are looking at the
09:05Product relationship and in this case we are going to go Match current record
09:08only just to take a look at it. So we will hit Save again, navigate back to
09:12Orders. And now with that script assigned to this button let's hit Show Orders
09:16and this is kind of interesting. What it has done is it's pulled up the
09:19product detail and is created a found set. Now this might not be as poignant
09:23because this user has apparently ordered one of every one of the products in
09:26the Product database but what this is telling us is here are all the products
09:30that, over all the orders for this customer,
09:32these are the products that they have ordered and you see as we go through
09:35different records everybody is ordered every record. Well we' ll go to the last
09:39one and see and yes, okay. So in this case everyone of the order contains at
09:44least one of the products. But what you can also do is modify this to say Match
09:50all records in found set and hit Save, navigate back and now this will tell us
09:55of these three records, basically the Ippolite family household. Let's navigate over
10:00to the Product table and see which related records they have ordered. And as we
10:04indicated earlier each one of the individuals has ordered one of every
10:07product and so of course you see that it has isolated one of every product but
10:11this tell us in this found set which products were ordered by this found set.
10:16So there are a bunch of interesting things you can do navigating users to other
10:19layouts once you have established relationships between your tables.
Collapse this transcript
Understanding multi-predicate relationships
00:00So far in this chapter we have been concentrating on relationships that create
00:04matches based on the quality of two fields. As a review, we look under File >
00:09Manage > Database, in the Relationships tab you can see the relationships that
00:13we have set up. For example we have got one relationship between Customer and
00:16Order, where Customer is the Parent and Order is the Child. You will see that
00:20the relationship is based on the value in the CustomerID field being equal to
00:26the value in the CustomerIDfk field and this indicates the equality between the
00:32two match fields. Now FileMaker Pro supports relationship criteria other than
00:36simple equality. As you see here there are several different operators that you
00:40can use beside just the equal sign. There is not equal to, less than or equal to,
00:44greater than, greater than or equal to, and then what's called a Cartesian X,
00:47which means that every record in the one table equals record in the other.
00:51In addition to that you can also have more than one match field in a
00:56relationship. So you can have what are called Multiple Predicates in your
00:59relationship. So we are going to explore the concept of both, having a match
01:03field that doesn't necessarily have to equal another match field and then also
01:07having multiple predicates. But first before we do that as a additional review,
01:11we'll go back into the Customer_ Detail record and we will find CustomerID
01:16number one and if you recall in a previous exercise we set up a Go To Related
01:22Records script that when we press the Orders, it will pop up a new window and
01:26shows all the Orders for that Customer. So we that Jane Smith has a total of
01:31five orders that she has ordered in all times. So you see when the dates are of
01:35these orders. Let's say what we would like to do is that when the user clicks
01:38on the Show Orders button, it pops up a new window that only shows orders from
01:42the current year, instead of all the orders from all time. So what we do there
01:46is go back into our Manage > Database and we look at the Relationships tab and
01:52instead of changing this relationship because we want to maintain this
01:56relationship because we are going to use it elsewhere in the system, we are
01:58going to create a new relationship. So this is the first example we see of
02:02creating a new table occurrence because remember as we discussed each one of
02:06these boxes represents a table occurrence. We will go down into the bottom left
02:10hand corner and click on the button and up on screen will pop the Specify
02:15Table. We are going to choose Order again and you will notice that it gives us
02:18the name Order 2 and that's because of the table occurrence with the name Order
02:22already exists on our Relationship Graph and FileMaker must maintain unique
02:26relationship names on the table graph. So, we'll say Order_ThisYear for example
02:34and hit OK and now we see that another table occurrence has showed up on the
02:38graph. And if we want to identify this in a certain way we can give it a
02:42different color if we would like to and this indicates that it is a table
02:45occurrence that's not based on the base table. Just a technique that a lot of
02:48FileMaker developers use. Another thing to notice that now we have one table
02:52occurrence based on Order and now we have two table occurrences based on the
02:56Order table. So what we want to do is create a relationship between Customer
03:00and Order where we only show the customer's related records from the current
03:04year. So the first step of that is to accomplish the Only show the customers
03:09related orders part and in that case we will mimic the relationship that we set
03:13up between Customer and Order. Right now these relationships look exactly the
03:17same but that's because we have got a couple of fields that we want to add to
03:20our tables in order to facilitate this relationship. So let's go back into
03:24tables. And now if we think about this we want to identify not only related
03:28records, which is what we have already got setup in our relationship, but we
03:31want to identify records where the OrderDate is greater than the first date of
03:36the current year. So if we look in Order we have a field that's called
03:40OrderDate already set up, so that part of the relationship is set. But if we go
03:43into Customer, do we have a field that's setup here that indicates what the
03:47first day of the current year might be? Well we don't. So what we are going to
03:50do is setup a field using some of the things that we