navigate site menu

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

FileMaker Pro 12 Essential Training
Richard Downs

FileMaker Pro 12 Essential Training

with Cris Ippolite

 


In this course, Cris Ippolite walks through the essential FileMaker Pro skills, from creating tables to managing fields and records and working with layouts. The course shows how to find and sort data, create reports, import and export data, create scripts, and diagram relationships, and more.
Topics include:
  • Comparing flat vs. relational databases
  • Creating databases from templates
  • Determining what tables you need
  • Understanding relationship types
  • Defining key fields and creating relationships between tables
  • Creating fields
  • Using new FileMaker 12 container fields
  • Creating, duplicating, editing, and deleting records
  • Importing and exporting data
  • Managing layouts and layout objects
  • Applying new FileMaker 12 themes to layouts
  • Finding records and working with found sets
  • Building reports and charts
  • Authoring calculations
  • Creating and triggering scripts
  • Working with relationships in scripts, calculations, and charts

show more

author
Cris Ippolite
subject
Business, Databases
software
FileMaker Pro 12
level
Beginner
duration
10h 28m
released
May 29, 2012

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

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



Introduction
Welcome
00:04Hi! I am Cris Ippolite, and welcome to FileMaker Pro 12 Essential Training.
00:08FileMaker Pro is the leading desktop database software popular for its ease
00:12of use that's used by everyone from Fortune 500 companies to individuals
00:16who just want to be a little bit more organized.
00:18In FileMaker Pro 12 Essential Training, we will be working with a bunch
00:22of integrated data based around a database that we will create from scratch.
00:25We will start by taking a look at how to manage the various types of fields
00:29used to store your data, including how to set up containers that can be used
00:32for storing rich media.
00:34Then we'll take a look at how to best manage layouts to display your data,
00:38first using the included themes and then building a custom layout from scratch.
00:43I will show you how to build interesting and attractive reports,
00:45including some summary reports and charts, and we will take a close-up
00:49look at how to set up relationships between tables and then some of the
00:52powerful advantages available to you when working with relational databases.
00:56And now, without further delay, it's time for us to dive into FileMaker Pro 12 Essential Training.
01:03
Collapse this transcript
Introducing the FileMaker family
00:00 Before we get started with our exercises, I'd like to take a moment
00:02 to introduce you to the six different products in the FileMaker 12 product family.
00:07 First, there's FileMaker Pro 12.
00:10 This is the product that we are going to be using throughout this title,
00:12 and it's the standard user version of FileMaker Pro that allows you to
00:15 create your own databases, modify those databases, and basically do
00:19 everything that we are going to be talking about in this title.
00:22 FileMaker Pro 12 Advanced has all the functionality I described of FileMaker
00:27 Pro 12, but it also has some additional tools that developers will
00:29 find useful like script debuggers or the ability to create customized menus
00:33 allowing you to create runtime versions of FileMaker Pro applications
00:37 in those types of developer-type features.
00:40 It costs a little bit more, but if you want that extra functionality,
00:43 and you're going to be maintaining databases using FileMaker,
00:46 FileMaker Pro Advanced might be the right product for you to have.
00:49 Then there are two different kinds of FileMaker Server products.
00:52 FileMaker Server 12 is an application that gets installed on a dedicated
00:56 server machine or up to three different machines, and it's used
01:00 to be able to share all of the different files that you create in FileMaker
01:03 to many different users all at the same time.
01:06 For example, you can have your FileMaker Pro databases shared for up
01:09 to 250 consecutive users who are all using FileMaker Pro or FileMaker Pro
01:14 Advanced, and then you have the ability to even publish these same
01:17 databases to the web using either PHP or as raw XML data.
01:22 All of that's built right into FileMaker Server 12.
01:25 Now if you'd like to be able to share your databases from more than 250
01:29 consecutive users or publisher databases using a web technology that
01:33 FileMaker has that's called Instant Web Publishing--or even if you want
01:36 FileMaker to be the host for any kind of an ODBC database application,
01:42 then you will need to purchase another product which is called
01:44 FileMaker Server Advanced.
01:47 This is an upgrade to FileMaker 12 Server and has some additional costs,
01:50 but it also contains all the functionality that FileMaker server
01:54 has, plus all this additional functionality that you can buy
01:56 with the upgrade.
01:57 And then finally the newest products in the FileMaker product line are
02:01 a very exciting application for sharing databases via an iPad or iPhone,
02:05 and they're called FileMaker Go.
02:07 These are apps that can be downloaded for free on the iTunes store that will
02:11 allow you to load databases locally on your device, whether it's an iPhone or
02:14 iPod touch or iPad, or you can even connect to databases that are being
02:19 hosted using FileMaker Server, and you can connect to those using
02:22 Wi-Fi connections or even your 3G or 4G connections.
02:26 So you'll see that we've got a product for the FileMaker end-user, even
02:29 the FileMaker developer, and then we have a bunch of different options
02:33 for deploying a database application, whether it's just going to be
02:35 on a network or even to point it out to the web or even if the product
02:39 that we are going to be using is going to be deployed using one of
02:42 the Apple devices, the iPhone, the iPod touch, or the iPad.
02:46 But the version of the product that we are going to be using moving forward
02:50 is FileMaker Pro 12.
02:52 So let's take a look at FileMaker Pro 12 starting off with the FileMaker Pro Quick Start Screen.
02:58
Collapse this transcript
Touring the FileMaker Quick Start screen
00:00 The first thing that you're going to see on screen when you open up
00:02 the FileMaker Pro application is what's called the FileMaker Quick Start dialog.
00:07 This is a dialog that you will see in many other applications, and it gives
00:09 you a starting point for different ways to create databases, modify
00:13 existing ones, or even some additional training options.
00:16 If you don't want to show this screen next time you open up the application,
00:20 you will notice in the bottom left-hand corner there is a check box
00:22 that says Show the screen when FileMaker Pro opens.
00:25 Now if you've checked this box and the Quick Start screen no longer opens,
00:28 and then you do want to invoke the Quick Start dialog, all you need
00:31 to do is go under the Help menu and choose Quick Start Screen.
00:35 Either way, you'll see that on this dialog you've got some options over
00:38 on the right-hand side for additional training.
00:41 You can go to some of the FileMaker video tutorials or hands-on tutorials
00:45 or even the FileMaker Forum that's available.
00:47 These are all very helpful resources,
00:48 and I recommend that when you have some time that you go and check those out.
00:51 Now on the left-hand side we've got the ability to create databases,
00:55 convert databases from existing data files, or even create them using a new starter solution.
01:00 These are all options that we are going to explore in the upcoming movies.
01:02 But in the middle of the screen you will see that you can open up
01:05 a database either from a recent or favorite file or just using the Browse button.
01:09 So for example, if I hit the Browse button, I can then use my Open File
01:14 dialog to navigate to wherever I might have a file and hit Open.
01:20 Once a file is open in FileMaker it then becomes one of the recent files,
01:24 and you'll see even we go back to the Quick Start Screen that now it appears
01:27 under the Recent Files options.
01:30 If this is a file that I will be working with quite a bit, I can go
01:33 under the File menu to the Open Favorite and select
01:37 the Manage Favorites option.
01:39 When I select Manage Favorites, I can hit the Plus button,
01:42 choose a file that I want to add to my Favorites list, and hit Select.
01:47 Now whenever you see the Quick Start Screen, when you open up FileMaker you
01:50 will see your recent files and then whatever files you've added
01:53 to the Favorite Files.
01:55 By simply double-clicking on any one of these files it will then open up
01:58 that file for you in FileMaker Pro.
02:00 Now if you'd like to clear files from your Recents or Favorites, you will go
02:04 under the File menu to Recents and choose the option for Clear Recent Files.
02:08 Also, under Favorites you can go to Manage Favorites, select the file,
02:13 and hit the Minus button which will then clear the Favorites, and of course you
02:17 will no longer see those listed under the FileMaker Quick Start Screen.
02:22 This Quick Start Screen will equally address both new and experienced users.
02:26 Brand-new users who aren't sure how to get started will see all the different
02:29 access to the help and tutorials that are available to them and experienced
02:33 users will have quick access to recent and favorite files and the ability to
02:37 customize their display in the window.
02:41
Collapse this transcript
Explaining the new file format change
00:00 Some of you watching this movie may have worked with previous versions of
00:03 FileMaker Pro, and if so you're probably familiar with the file extension .fp7.
00:08 This indicates the file format of a FileMaker database.
00:12 In FileMaker 12 the file format has been updated.
00:15 So what this means to you is that if you have any old files that say .fp7
00:20 at the end that you will notice this dialog appears when you open up the file.
00:23 What this is saying is that you will need to update this file to the new
00:26 FileMaker 12 file format, and to do so is simply a matter
00:30 of saying OK in this dialog.
00:32 But what you might want to do is rename the old original file so that
00:36 you have an old copy of it just in case.
00:38 So you will also notice that after I say OK, they asked me where I want
00:42 to save the file and then as it's converting, it opens up the new file
00:47 which is now your old converted file ready for use in FileMaker 12,
00:52 but it's also created what's called the Conversion.log.
00:55 This is something that shows you all the different things that it's done,
00:58 converted different fields, and updated some of the information to
01:01 make it work just like it did in older versions of FileMaker.
01:04 If you want to look at more details, you can go into the Conversion.log
01:06 to learn more about this.
01:08 So now you see that you've got your original .fp7 file format file, and
01:12 you'll note that the new extension for files created using the FileMaker 12
01:16 file format are .fmp12.
01:20 Keep in mind that if you have older versions of FileMaker, like FileMaker 11
01:24 or 10 or anything earlier than that, you won't be able to open up any
01:28 file that has a .fmp12 extension.
01:31 Those will require versions 12 or later of FileMaker Pro.
01:35 The changing of file formats actually means good things for the product line
01:39 now and into the future, but just remember to open the files in their
01:42 appropriate version of FileMaker Pro.
01:46
Collapse this transcript
Using the exercise files
00:00If you're a Premium Member of the lynda.com online training library,
00:03or if you're watching this tutorial on a DVD-ROM, then you'll have access
00:07to the exercise files that I am using throughout the title.
00:09Now the way that the exercise files are laid out is that they all come
00:12in a folder called exercise files.
00:14When you open that folder you'll see that every chapter in the title has
00:17its own subfolder, within each chapter folder are folders
00:21for each one of the movies.
00:22So for example, if you're watching a movie in chapter 1, movie number 4
00:26you'll go to the 01_04 folder and double-click on the exercise
00:30with the similar name.
00:32Each of the movies have its own dedicated FileMaker file so that you
00:35can start from any point in the title.
00:37We are going to be creating an invoicing database file from scratch.
00:40So in the early chapters of the title we will be building the file along
00:43with each movie in the order that a database should be built and in
00:46the later movies in the title we will be using that same file to add more
00:50specific features and data to the exercise files as they pertain
00:53to each topic that we are talking about.
00:55So if you're a Monthly subscriber or an Annual subscriber to lynda.com, you
00:59won't have access to the exercise files, but you can easily follow along
01:02from scratch or even on your own files.
01:05So let's go ahead and get started.
01:08
Collapse this transcript
1. Getting Started
What is a database?
00:00 Before working with a database it's important to first understand what
00:04 a database actually is.
00:06 By definition a database is the collection of like information
00:10 with common underlying attributes.
00:13 You are actually already familiar with the concept of a database,
00:15 and you might not even know it.
00:17 For example, you've probably seen databases in the form of things like
00:20 address books on your computer where one record in the database equals
00:23 one individual whose information you're trying to store, and in this case
00:27 the like information that you're storing would be different individuals
00:30 in a different context and the underlying attributes are actually things like
00:34 phone numbers, email, instant message, address, and those types of things.
00:39 Every one of the contacts will all have information or potentially
00:42 have information for those.
00:43 So you want to create an area where you can store all of that when necessary.
00:47 You're probably also familiar with databases from your web experiences.
00:50 For example, lynda.com is a huge database that stores all the different
00:55 links to all the different movies you might want to watch, and you can go on
00:58 and search that database by telling it what author you might be interested
01:02 in or what type of application you're interested in, and it will direct you
01:05 to the location of those movies.
01:07 The role of a database is twofold.
01:09 First, the database physically stores the data along with the database files
01:14 so that all the data lives together in one place.
01:16 But in addition to storing the data, it also contains information on how
01:20 to identify the data within the storage mechanism.
01:23 A good example of this is a spreadsheet.
01:25 If we take a look at the spreadsheet here you will see that this one stores
01:29 information on individuals.
01:31 You'll also notice that when you look at the spreadsheet the information
01:33 is organized into columns and rows, each column represents
01:37 a different attribute about one of these individuals, each row represents
01:41 a different iteration of the data that we are sorting.
01:44 So you see, for example, we have columns for First, Name, Last Name,
01:49 Start Date, Title, and Status, and then in this second row we see
01:53 that we've got a different piece of information in each one of those cells
01:55 wherever a row and a column intersect.
01:59 But in FileMaker databases the rows are actually represented as something
02:02 called a record, and that's the terminology that I am going to use
02:05 throughout the rest of this title.
02:06 So then a record is a grouping of a bunch of different pieces
02:09 of information or attributes that all describe one instance of the
02:13 information that's being managed.
02:15 So that one instance in a spreadsheet is represented as a row,
02:19 and in FileMaker we call that a record.
02:22 And in a spreadsheet an attribute of one of these rows is represented
02:27 as a column, but in FileMaker we call these Fields.
02:30 At any intersection we will see here that Pamela has a last name of Dreyfus.
02:37 So in that case in FileMaker database we are going to be storing
02:39 that information inside of a field.
02:41 So hopefully a little background on databases that you might already be
02:44 familiar with will help you understand the concepts that we are going
02:47 to discuss as we move along in this title.
02:49
Collapse this transcript
Comparing flat vs. relational databases
00:00So what makes storing data in an application like FileMaker different than just storing
00:05your data in a spreadsheet? There are many different ways that you can store data on
00:08your computer, for example, in a spreadsheet or word processing document, but those are
00:12examples of what are called in database circles a flat file. A database, on the other hand,
00:18is a collection of data that are organized into different tables. These tables provide
00:23a systematic way of accessing, managing, and updating data. A relational database is one
00:29that contains multiple tables that relate to each other through special key fields,
00:33and we'll be talking about those later in this title. And that flat file design puts
00:37all the database information into one single table or list, and it still has fields that
00:41represent all the different parameters; however, there are some issues with flat file storage.
00:46Flat file may contain many fields, often with duplicated data that are often prone to database
00:50corruption or confusion. If at some point you decide to merge data between two flat
00:55files, you will need to copy and paste the relevant information from one file to another.
01:00Spreadsheets are a common example of these types of flat files. They store data in different
01:04worksheets and often these different worksheets contain similar or redundant data. A relational
01:08database, however, incorporates multiple tables with methods for those tables to work together.
01:14The relationships between the table data can be collated, merged, and displayed in database
01:18layouts, all representing the stored data accurately. FileMaker Pro is an example of
01:24a relational database system that can store the data just as easily as a spreadsheet,
01:28but it has many different advantages for data entry and integrity over its flat file counterparts.
01:33To better understand the advantages of a database, let's imagine the needs of two small companies
01:37that take customer orders for their products. Company A uses a couple of spreadsheets, the
01:42ones that you see here on screen. We've got a spreadsheet that they store customer information
01:48and a separate spreadsheet where they store order information. When a customer places
01:52an order with this company, a new record or row will be created in the order table.
01:57Because Company A only has one table of data, all the information pertaining to that order must
02:02be put into a single record, so the Customer First, Name, Last Name, OrderDate, and so on.
02:06This means that the customer's general information--in this case their First and
02:10Last Name--is stored in the same record as the order information. If a customer places
02:15more than one order, then their general information will need to be reentered and thus duplicated
02:20for each order that they place. The name Pamela Dreyfus is not only stored in the Customer
02:25spreadsheet, but also on every row that represents an order that it was ordered by Pamela Dreyfus.
02:32Whenever there is duplicate data like this, many inconsistencies may arise when users
02:36are trying to query the database or search for this type of data. Additionally, change
02:40of customer information, like, for example, if Pamela Dreyfus changed her last name, would
02:45require the Database Manager to find all the different records in the spreadsheet and then
02:49manually change the last names. But conversely, Company B in our example is much better off
02:55with a relational FileMaker database. As you see here, I have a relational FileMaker database
03:01that stores customer information much like a spreadsheet does, but also order information.
03:06But instead of having to duplicate the data every time I create a new customer record,
03:10instead what I am going to do is just pull in or link to data that's stored in a different table.
03:14Each of the customers has one and only one record of general information stored in
03:18a table that's called Customers. Each customer record is identified by a unique customer
03:24code, and that will serve as a relational key. When a customer orders from Company B,
03:29their name is chosen from a list that corresponds this unique key with the name of the customer
03:34and then pulls in all the related information. This way, if the email address changes for
03:40one company, all you have to do is change it back in this one record, and it will propagate
03:43throughout the system to all the different related orders. This approach to entering
03:47data solves problems of duplicate data and also the problems that come with changing
03:51customer information. The Database Manager needs the only change the data once in the
03:56customer record if someone decides to update their information. In addition, since the
04:00relationships between the tables follow the business logic of an organization using the
04:04database, it makes tasks like sharing, retrieving, or even reporting on the data much more easier,
04:09stable, and efficient, while minimizing data integrity errors. We are going to see various
04:14different examples of this as we go throughout the title, but it's important to know the
04:17advantages of having your data stored inside a FileMaker database, because your data is
04:22then going to be related within the different related database tables.
Collapse this transcript
Reviewing how FileMaker works
00:01We have talked about why you would want to use a relational database to manage your database
00:04over the other flat file options, but I'd like to show you a couple of reasons why FileMaker
00:09Pro is such a great application for developing those relational databases.
00:13First off, you can see here onscreen that we can store information or application much like we do with the spreadsheet
00:18or other applications. I've got information here on Customers, but I can also store information
00:23on Products or Invoices or whatever other information fits our needs. But in addition,
00:32we can easily create new records, as you see here, by just simply hitting this New Record
00:35button on the top of the screen, or delete records very easily from our database.
00:41We can even search for records by going into a certain Find mode and entering in some type
00:46of search criteria--in this case, the State of California--and within about a second,
00:51FileMaker is going to show me all the different records that match that criteria that are
00:55stored inside my database. This is something that's usually very challenging to do inside
00:59flat file options. What's nice about FileMaker is that it's a true relational database, meaning
01:04that we can store related values throughout the different tables. For example, here I
01:08am in the Customer Record, but if I click over to the Invoices Record, I can create
01:12a new invoice allowing me to store all sorts of different information about this invoice,
01:18but most importantly, I can choose to link data from the Customer table to this new Invoice
01:23Record. This means I don't have to create duplicate information in all of these fields here.
01:28I can manage all of my customer information just in the Customer table, but I can still
01:31use it in the context of invoices if I need to. And the database can have many different tables.
01:36You will see in this case we have got Customers, we have also got Products and
01:40Invoices, and we're able to create custom layouts in FileMaker that allow us to do things
01:44like print these different views that we see in the form of labels or any customized design
01:49that we would like. So what's key about this is that all these different tables can fit
01:53into one single FileMaker file, making the management very easy so that you don't have
01:57files spread around in all different locations that are storing all this different info.
02:01In addition, FileMaker has all sorts of FileMaker specific kind of cool functionality in here as well.
02:07For example, you'll see when I click on this tab here that it automatically pulls
02:11the data from my web site field and FileMaker has the ability to actually display an interactive
02:17web site right here on screen. This way, users don't have to leave FileMaker and go to another
02:21application to be able to search around on the web. The same is true for the information
02:24that's stored inside of Address fields, for example. I can have that displayed in a dynamic Google Map.
02:29I don't have to go and search inside of Google to display this map, it'll
02:33automatically pull that data from the fields that are being stored here. So in addition
02:37to storing the data, FileMaker can actually do some pretty cool things with it as well.
02:41And also, you're not just limited to storing text or number data inside of FileMaker, you
02:45will see that we've got all sorts of different types of fields, text, numbers, dates times,
02:49we'll cover all that in the appropriate chapters coming up in this title. But one I wanted
02:54to show you here is a special type of a field that's called the container. You see here
02:57that this field can store an image file or other types of media. For example, I can insert
03:04a QuickTime movie and not only can I insert the movie, but I can play the movie, and I
03:13can share this with other users that have access to this database. But the true strength
03:18of FileMaker is that it provides the ability to create a database very easily.
03:21It's probably one of the easiest database creation environments out there, then it also works the same on
03:26both Windows and Mac. So this means that FileMaker Pro users on the same network can access the
03:31same database file simultaneously despite the type of operating system that they're using.
03:36And with the advanced Security model that comes with FileMaker, each user can get
03:40their own account which will help identify these users allowing up to 250 concurrent
03:45users at the same time to access your database through the network. In addition, users can
03:50not only access and share your database through their own network, but also through the web.
03:55You can publish your FileMaker databases to the web using several different technologies
03:59that are compatible with FileMaker databases like instant web publishing or PHP if you've
04:03heard of those. You can also share your databases with other applications that are called ODBC
04:09compliant applications, which allows you to integrate data from your FileMaker databases
04:14with data from other non-FileMaker data sources. And not only can you store the information
04:18and share it with other FileMaker users, but FileMaker allows you to do things like export
04:23data out of your FileMaker database in various different formats. This way, if your users
04:28don't have FileMaker, they can still share the data that you're storing in your database.
04:33You can also use more conventional methods to share your data like saving records as
04:37an Excel spreadsheet or as a PDF. We are going to cover all of these in this title but for
04:42those of you that have never worked with FileMaker before and were thinking okay, what is this
04:46thing that we are talking about? You get the idea that it's a database, but what you've
04:49really got here in FileMaker is the ability to create a fully functional and powerful
04:53software application using FileMaker Pro without having to know anything about databases or
04:58computer science or anything like that. By the time you are done with this title, I assure
05:02you that you will be able to create a FileMaker Pro database, deploy them, share them with
05:06people, even understand their limitations and then build reports in other ways that
05:10you can share the data with non-FileMaker users. So let's get going with learning
05:14a little bit more about this great database application.
Collapse this transcript
Touring essential preferences
00:00The very first time you launch FileMaker and before you start actually working with the
00:04product, it's probably a good idea to get familiar with the different preferences that
00:07are available to you. You can open up your Preferences under the FileMaker Pro menu if
00:11you're a Mac user, or if you're a Windows user you'll find it at the bottom of your Edit menu.
00:16When you open up Preferences, you'll see that we have got five different tabs to choose from.
00:21And I am just going to go through a couple of different areas in these settings
00:24to show you some of the ones that you will probably use more often than others, and we'll
00:27skip over some of the ones that you may never use at all. So first, in the General tab,
00:31you will see that we've got a couple of default settings already chosen for us.
00:35The first one we'll talk about is how you can choose how many recently opened files you can look
00:39at when you go under the File menu or in your Quick Start screen. When turned on, the default
00:44is 10. So really, if you work with a ton of different database files then you might want
00:48to increase that a little bit so that way you don't have to go digging around on your
00:51computer to try to find where all these files are stored. The next option, Use Manage Database
00:56dialog to create files is helpful when you get into the inner workings of the database,
01:00it's not set by default, but I am going to suggest that you turn that one on.
01:04There are various different dialogs that you will encounter when you're working in FileMaker Pro and sometimes
01:08you may increase the size of these by pulling down the corner of the windows or moving them
01:13to different positions onscreen and FileMaker is going to remember those sizes. And if you
01:18want to reset them back to their default positions, you can just come here and press the Reset button.
01:22Once you confirm, it will then reset all the dialogs to their original sizes.
01:28The other thing that you see here is something called the User Name. This is the username
01:32that FileMaker uses to identify which copy of FileMaker you are using to access the database.
01:37We'll talk about this in later movies, but you should also keep in mind that whatever
01:40name is shown here is also going to be the default name that gets put into the Account
01:45field when you log in to FileMaker. So if you find that you or different users of your
01:49database are confused by having to eliminate the name that shows up inside the Account
01:53field, you can go into this option here and put Other and type in what their account name
01:58might be instead. Again, remember that a User Name is specific to every copy of FileMaker
02:03installed on a computer, whereas the Account Name that we'll talk about in later chapters
02:08is the user that's logged into the database. Next, on the Layout's tab, there's one option
02:14here in the middle that's checked by default that's called Add newly defined fields to
02:18the current layout. What this means is that when you define a field in your Manage Fields
02:22dialog window, FileMaker is going to automatically drop that field on the layout that you currently
02:27have on screen. It's probably a good idea when you're in the middle of creating new
02:31files, but if you're just maintaining files and not doing a lot of defining fields, then
02:35you probably want to turn this option off. So I am going to say keep this one checked
02:38for right now, but you will find that after a very short period of time, you are going
02:41to want to turn this one off as you move forward. You can skip over Memory and Plug-Ins for
02:46right now and under the Fonts tab, the most useful setting here is the ability to specify
02:51the default font. However, you can leave it as the default Helvetica option. So just like
02:56with many other software applications, Preferences are something that you probably want to check
02:59out the first couple of times you open the application and then really you can just leave
03:03them set as you start to work with it moving forward.
Collapse this transcript
Exploring the interface
00:00Once you have FileMaker installed and you've done a quick review of the Preferences, it's
00:04now time to start working with the application. And the first step is going to be to look
00:08at the interface and get a little bit familiar with these different modes that FileMaker uses.
00:12So first, the Status toolbar. FileMaker 12, this gray area cross the top the screen
00:17is referred to as the Status toolbar area. If you look in the upper left-hand corner
00:22of the Status toolbar, you'll see there is a book icon and a number with the dial and
00:25a little circle there. Those have different roles depending on the different modes which
00:29I'll be introducing you to in a second. But in Browse mode, which by the way, is the
00:33default mode, and you can see which modes you are in--by the way--by going under the
00:37View menu. Browse mode is the default. Anytime you open up the database, it will go to Browse
00:41mode. Browse mode allows you to add new records, delete records and edit existing records as well.
00:47In Browse mode, in the upper left-hand corner, the number that you see here indicates
00:52the number of records that are in the table that any given layout is based off of where
00:56in a layout right now in FileMaker it happens to be based on the Contact table.
01:02So this tells us that there's one record inside of the Contact table. If there were more records
01:07in this database, we could use the book icon to navigate back and forth to them, and when
01:11we talk about the concept of finding records in the database, later on in this title, you'll
01:16see that this number will split to show us how many records are in a found set versus
01:19how many overall are stored inside a table, and we'll talk about that more in the Finding
01:23Records chapter. Also in Browse mode, you will notice that you have a series of buttons
01:27across the top of the screen. All these buttons also reflect functionality that can be found
01:32in some of the menus. So for example, on the Records menu, you see there's a New Record
01:36which also has a corresponding shortcut key. There is also Delete Record, and you will
01:41see that those are also buttons in the Status toolbar area. And you'll notice that if you
01:45go under View to Customize toolbar, you have the ability to add or remove the buttons that
01:51you see in the toolbar and customize it for your liking. You will notice that some of
01:55the other buttons that you see onscreen here, like for instance, Print. If I drag that up
01:59into the toolbar area, you will see that it will add that there, and I can say Done.
02:02But also if I drag it and release it, you see that little puff of smoke icon indicates that
02:06it's been removed from the toolbar. It's the same dragging and dropping that you will see
02:10on both Mac and Windows, but the puff of smoke animation is particular just to Mac OS X.
02:15Now, if you want to just show icons or text only or whatever it is you can see the different
02:21ways that this will look under the Show icon. You can also use a small size if necessary.
02:27And keep in mind that any customizations that you do, won't travel with the database for
02:31all the different users, but they're really specific just to your copy of FileMaker Pro.
02:35In addition, you will see that there's a bar below the Status area that's called the Layout
02:40bar, and its main role as you see here is to help you navigate from layout to layout.
02:46If you click this dropdown, you'll see a list of all the layouts that have been set up to
02:50be visible to the user in this dropdown. So here I can navigate from one layout to another
02:55if I'd like to, and that plays different roles in different modes as well and then each layout
03:01has a different view option. You can see these options also under the View menu right here.
03:06You have three options, Form, List, and Table. What we are looking at right now is a layout
03:11viewing as a form which means that only one record can be seen at a time. You will notice
03:16that we can't scroll down to other records. If we were to go and create one, we see that
03:20only one record at a time is visible onscreen. That's called viewing as a form, and that's
03:25very customary when you're doing a detail or a data entry layout, for example, the one
03:29that you are seeing onscreen. The other option is to view as a list which if we make this
03:35layout view as a list, you'll see that we can then scroll from record to record, but
03:39the layout really wasn't designed to view more than one record at a time, so really
03:43something like the Contacts layout which this one is a list, and we can tell that because
03:49we see that it has more than one record onscreen at a time. When you create a layout in FileMaker,
03:54it's best to either choose it to be a Form View or a List View so that there's no confusion
03:59to your users about how they are supposed to operate. The third option is Table View
04:03which allows you to view your records onscreen in a spreadsheet like view. We'll be talking
04:08more about this in an upcoming movie. We'll switch this back to List View. But the other
04:12thing I wanted to share with you was under the View menu, you see there are these four
04:15things up on top. I talked about this idea of a Browse mode, and this is a mode where
04:20users are able to interface with your records, add, edit records, delete, that type of thing.
04:26But there are also three other modes that I want to make you aware of. You can navigate
04:29back and forth to them under the View menu or using the quick keys, but also if you look
04:33here, you'll notice that we've got this button called Preview. When I click Preview, I've
04:38now entered Preview mode and Preview mode is set up inside FileMaker so that you can
04:43see what your layouts will look like if you were to print them. So you can see that there
04:47are page margins added around the perimeter of the document, and you can see where maybe
04:51your layouts will cut off. This is intended really just to be a print preview, but in
04:56addition to being able to print and manipulate some of the print settings, you can see here
05:00you can do Page Setup, change things to a different view to see if we get more room
05:06and also changing print drivers, we have the ability to do so here. Not only can you manipulate
05:12the print settings, but also you could choose to save this as Excel or save as PDF.
05:17So in the case of saving a document as PDF, it's going to create a digital PDF version of whatever
05:22you're seeing onscreen with the same margins and limitations that you are seeing in Preview mode.
05:26Save as Excel is a little bit different in that it's just going to save something
05:30that looks similar to this layout in Table View without all the formatting. So if we
05:34get out of Preview mode here by hitting Exit Preview, you will see we have got another
05:38button over here on the far right that's called Edit Layout. And when we click Edit Layout
05:42what it does is it takes us into what's called Layout mode which is one of the other modes,
05:47and you'll notice that we've got all sorts of tools onscreen, and that in the upper left-hand
05:52corner, we see that that book icon and numbers have now changed. When you're in Layout mode,
05:57it's no longer showing you the number of records in a table, but instead it's showing you the
06:00number of layouts in the database. So you can see you can use the book icon or the slider
06:05to navigate to the different layouts, and as you go from layout to layout you'll see
06:09that you see sort of under the hood what's going on here. You see that you have got fields
06:14set up and placed on the layouts, you have got all sorts of different layout objects
06:17that are available to you, all of which we'll be covering later on in the title.
06:21But you'll also notice that you have got this thing called the Inspector and the Inspector allows you
06:25to manipulate the way things look and some of the preferences for some of the objects
06:29that you see onscreen. In addition, you will notice that you have got additional tools
06:32available to you in Layout mode. By default, you have got the pointer which allows you
06:36to select and move different elements around onscreen, but you have also got a whole series
06:40of other tools for drawing lines, shapes and inserting various different layout tools all
06:46of which we'll cover in the Layout chapters. Layout mode isn't intended to be available
06:51to all users. Using FileMaker's built-in security, you can lock down Layout mode, so it's only
06:56available to certain administrative users if you like. But this is where you do all
07:00the changes and build all of your layouts from scratch if you'd like to or modify existing ones.
07:04You'll also see in Layout mode that there's another bar. In the Layout toolbar,
07:09you see that you have got some additional options here. If you hit this little Aa button,
07:13you see that you get the Formatting bar which is the third component of the Status toolbar area.
07:17That allows you to choose different things onscreen and manipulate their text
07:22if you'd like to, the formatting, the size, and even the alignment. And finally, if you
07:27go into Find mode--I'll say don't save the changes that I made--you will notice that
07:33it's whatever layout that you're on. In this particular case, it's the Contact Details,
07:37and it's given us a blank screen, and what it's really waiting for us to do is enter
07:41in some information or search criteria. We'll talk more about this when we get into finding
07:47records, but basically this is a mode that's dedicated to allowing you to be able to enter
07:52search criteria and retrieve data in your database, and you'll notice that after you
07:56perform a search, it takes you back to Browse mode. So Find mode is just a temporary mode.
08:02So now that we are familiar with what everything is called onscreen and where we can find them,
08:06it's time to start using some of these tools to create FileMaker databases.
Collapse this transcript
2. Database Creation Essentials
Creating databases from templates
00:00Once you become familiar with the FileMaker application and how it's set up, there's a
00:04couple different ways that you can start creating databases. Of course, you can create them
00:08by scratch, which we will be talking about for the remainder of this title, but there
00:11are also a couple different ways to get a quicker start. You will notice when you first
00:14open the FileMaker application that you have got some options over here on the left that
00:18allow you to either Create a New Database and start from scratch or Convert Existing
00:23Files or use that's called a Starter Solution. You can select the Use a Starter Solution
00:27from the Quick Start screen or when you are already in FileMaker you can go under the
00:31File menu and choose New From Starter Solution. FileMaker updated its Starter Solution viewer
00:37window in FileMaker 12, and it lists all the different Starter Solutions that are available
00:41to you, and you will see that they are also grouped logically in sort of business units,
00:45for instance, of the 16 here are the ones that are General, ones that are related to
00:48People & Assets, and so on. But if you're looking at All Solutions, you can scroll through
00:54these and they're pretty self-explanatory for the most part. You'll see, for example,
00:59if you choose the Contacts option and then hit Choose, it's going to ask you where you
01:04would like to save this. We will hit Save, and now it opens up the Starter Solution.
01:09So the first thing you will notice is that there's really not much development that's
01:12necessary, the layouts are already created. If you take a peek into the Database you will
01:18see that there's a contact Table and a series of Fields. So a lot of this stuff is already
01:22programmed for you, there are some routines and Scripts already built-in. And it's ready
01:27to start creating new data. You can hit New Record and instantly start working with the Database.
01:33But more importantly you should know that in addition to being able to add
01:35your own data to the Database, you can also go into Layout mode and manipulate the database,
01:40change some of the fields and the way things look and really customize it for exactly how
01:44you need it go look. So you don't have to just settle on the way that they're built
01:48already for you, the idea is you can tell by their name is that these are intended to
01:52get you started. And the Starter Solutions are also a great way for you to see how different
01:56functionality works. Like, for example, here is something that's called Web Viewer, and
02:00it displays the addresses that are listed in these fields. And this is a great way for
02:04you to see how these Web Viewers actually work. But also you'll see that there are some
02:08layouts that are pre-built. You will notice that in each of the Starter Solutions they've
02:12got iPad and iPhone layouts already created. Each of these layouts conform to Apple's touch
02:19screen guidelines, so making things like buttons and some of the touch areas larger so that
02:24they'll be ready to be viewed on any device without any modification whatsoever. So in
02:28addition to being able to work with the data or add your own data you'll also be able to
02:31view this information on the various different Apple devices. One thing I should mention
02:35about Starter Solutions is that if you happen to be using a 30-day trial version of FileMaker,
02:40keep in mind that that's just a 30-day trial for the application. The Databases that you
02:44create or the Starter Solutions that you create and modify, they don't have a 30-day limit on them.
02:48So feel free to go ahead and poke through all the different Starter Solutions
02:52in the Starter Solution Viewer and see if there's maybe something that's already built
02:56in here, and that'll let you get started as quickly as possible. Starter Solutions are
03:00a great way to get familiar with FileMaker without having to do any programming.
03:03So I encourage you to go ahead and take a look at a couple of different ones, download them,
03:06and play around and see which one suits you best.
Collapse this transcript
Creating new databases in spreadsheet format
00:00Certainly the easiest way to create a fully functional database right of the box is by
00:04using a Starter Solution, like we talked about in the previous movie. But if you want to
00:08create a FileMaker Database that already contains data or if you've got data that's in another
00:12file format and just want to start working with it in FileMaker Pro, then the best way
00:17to work with it is to convert an existing file into a FileMaker Database.
00:21There's a couple of different ways that you can get this functionality. If you happen to have the
00:24Quick Start Screen open you can click on Convert an Existing File, but otherwise if you are
00:28already in FileMaker you can simply go to the File > Open option, and then you'll see
00:34that on the bottom left-hand corner there is the option here to show which types of files.
00:39Of course, this is what the Mac option looks like, the Windows option is similar,
00:43they both have dropdowns. And you will see that by default it's set to open up other
00:46FileMaker Files, but you will also notice that you can open up files that have formats
00:50that are either tab, comma separated text files, merged files, both different generations
00:56of Excel documents and even import from other sources, for example, like a Bento Data Source.
01:02In this case we are going to choose an Excel workbook, and now that we see that we are
01:06able to choose the file that I have in our exercise files which is a spreadsheet.
01:10I hit Open, and now FileMaker recognizes that it's a spreadsheet, and because it is it asks us
01:16what we want to do with the first row of data. It's common in spreadsheets that you would
01:19use the first row of data as column headers. So those are what FileMaker could easily use
01:24to identify what the different columns are and they are for attributes. And it can then
01:28convert those in the field names. So we are going to choose the Field names option because
01:32that first row is a column header, and I hit OK, and now it asks us where we want to save
01:37the database, and as you see it creates a FileMaker Database for us, it creates two
01:43different layouts. One layout is the Detail view that shows all the different fields that
01:47were created in a sort of data entry looking view for us that's set to View As a form.
01:52And then the other option is the Table view which should look familiar because this looks
01:56just like the spreadsheet that we'd converted. And also you'll notice that all of the records
02:01came over from a spreadsheet, in this case there were 653 records, and you'll also notice
02:06if we go to File > Manage > Database that it has created a table and all the fields
02:11are defined and not only are they defined, but whatever characteristics they had as a cell
02:15in the spreadsheet have carried over into the FileMaker Database. Once you've converted
02:20your spreadsheets into a FileMaker Database, of course, you can start building an entire
02:23database around them, but some of the stuff that you can do right on screen immediately
02:28is manipulate some of the data that you see here. From this layout I can actually start
02:32adding new records. I can either do that from the New Record button on the top of the screen,
02:36or if you scroll all way down to the end you'll notice that the very last row has the plus
02:40button next to it. And by hitting that button, I can go in and I can enter some test information.
02:46Also, I can modify some of the fields that are already on screen by hovering over the
02:51Column header, and you'll notice that this little arrow appears. The arrow let's me do
02:55things like Sort the values by Ascending or Descending or by a Custom list. And you'll
03:00also notice that on the very bottom I have the ability to change the Field Type, so if
03:04this wasn't a text, I could change it to some of the other field types. Also when I click
03:09the Field Options it will pop-up the Field Options that we are going to go through in
03:13a later chapter, but all easily accessible to you while you're still in Table view. I
03:18can also actually add New Fields if I'd like to, you will see there's a plus button here
03:21in the column, pressing the plus button gives me a blank column header, where I can add
03:27the name of the field, and when I click outside the screen, it's now saved that field to the
03:32database, so it's helped me to find a field without even having to go into the File menu.
03:36And now when I select the dropdown, you'll see that there is an option on very bottom
03:40call Table view, which allows me to modify some of the things that I am seeing on screen.
03:45So here I could turn off the New Field I created if I wanted to, or I could even move it in a
03:50different order based on however it is that want this to look. And here I can also add
03:54a New Field. If I don't see a field in the table, I can go down to Manage Database and
03:59Add a New Field that way as well. If you're used to working with spreadsheets or if you
04:03have a spreadsheet that you have been using all this time, you can open it up in FileMaker
04:07Pro, which will of course convert it into a FileMaker Database for you. It's the easiest
04:10way to move from a spreadsheet into FileMaker Pro, and from there you can then use a Quick
04:15Table View, which should be familiar to you if you're already working with spreadsheets.
04:18And this allows you to add new fields to your database and start creating your first FileMaker
04:22Database from just experience that you already have using a spreadsheet.
Collapse this transcript
Adding tables by importing
00:00You see the database that I have got on screen is actually a FileMaker Database, but we created
00:04it by converting a spreadsheet. And what it's done for us is not only bring in the 653 records
00:10that were rows inside of our original spreadsheet, but as you see when we go to File > Manage >
00:15Database that it's brought in different things called Fields. In FileMaker a column
00:21or an attribute is represented as something that's called a Field. So you see it's already
00:25defined those fields for us, but you will notice over here in this left-hand tab there
00:29is something called Tables. A Table is something that we are going to be talking about quite
00:33a bit in the upcoming movie, but in short, a table is part of the database, and it's
00:37the part that stores different types of data. A FileMaker Database can have unlimited amounts
00:42of tables, so in this case what we have gotten is Itinerary data. So since Itinerary data
00:47can have its own attributes. It's got its own Table so that we can define those Fields
00:51within the table and then store the data independently. But we also add new tables to the database,
00:56we can do so by simply adding a Table Name and hitting Create, but what I am going to
01:00show you in this case is the way that you can import in another data source that will
01:05create a new table and allow us to work with the data all in one Database file. I am going
01:09to hit Cancel and go under File, to this option here called Import Records. When I choose
01:15the File Option you'll see that we can navigate over to the exercise files 02_03.
01:20Instead of a Spreadsheet this time I am going to choose a text file. And that's another one of the
01:26conversion formats that are compatible with FileMaker. So I hit Open, this new file presents
01:32an import field mapping. I am not actually going to import data into an existing table,
01:35we will cover that in later chapters. But what I am going to do is use this tool to
01:39create a new table. So here you see in the option when I pull down the dropdown in the
01:44upper right-hand corner I can choose the New Table, and then in parenthesis it says Adventures.
01:49It's getting that name from the name of the text file that I'm importing from,
01:52so that's what it's going to name our New Table. So I say let's go ahead and Import, which will
01:57also--by the way--add new records. So now I say Import, and it told me that it's not
02:01only created a New Table but that it's also imported in the 11 records that were in the table.
02:07So now you will notice when I go in to File > Manage > Database, I've got two
02:11tables: this one has various fields defined, and you'll notice that these fields don't
02:16necessarily have Names. So one of the things that we can do if we would like, is Import
02:21those again, this time saying Import > File > Adventures, Open, and all we have to do
02:31in this case is just say don't import the first record. We will say New Table.
02:36And then this time what it's doing is it is not importing the first record in this text file which was
02:39just blank, but instead what it's doing is it's giving us actual names which are great
02:44field names for our database. So now we say Import we see we've got now just 10 records.
02:50And a table was created, all the fields are defined, and all the different data was brought
02:54over for us. Now without actually having to program anything, we've got two different
02:58tables in our database, and we can even start linking these things together so that they
03:02can share data with each other. Adding tables from various data sources is a fast and easy
03:06way to get Tables, Fields, and Data into your new FileMaker Database.
Collapse this transcript
3. Creating Tables
Determining which tables your solutions will need
00:00There are a couple of different methods that you can use to create a FileMaker Pro database,
00:04first of which would be to use some of the Templates or Starter Solutions that we discussed
00:07in the previous movie. And in that way you can just go ahead make some modifications,
00:11add some data, and you're ready to roll. But the other option which is a lot more common
00:14when using FileMaker is to create your databases from scratch or to build all of the components
00:19from the ground up. In order to build the database from scratch, you need to first make
00:22some decisions about what type of information or data is going to be stored within those databases.
00:27So the first thing that you are going to have to determine is what types of
00:30tables you are going to have to use in the database. But let's back up for a second.
00:33What is a Table? A Table is a container within your database that stores data. And if you
00:39remember, a database is like a big bucket of information that can store all sorts of data.
00:43That's one of its key roles is to actually do the storing, but you can have different
00:47types of data within one database. So in that case you want to make sure that within the
00:51database you've got the proper places to store these different types of data. These locations
00:56for storing data are what are called Tables. And you will create one table for every entity.
01:01Now an entity is a term that really just stands for a single person, place, or thing, or really
01:07it's something for which you can actually store data. The best way to look at an entity
01:11though is just, an entity is a group of information for which you can store information, or its
01:15information that can be described. So if you have multiple different types of data that
01:20you are going to store in the database, each one of them needs to have its own little mini-bucket
01:24to be stored. These smaller storage areas are what we call Tables, and a database can
01:28have an unlimited amount of them to find within each FileMaker database. Each of the Tables
01:32will represent an entity, so some examples of what an entity might be would be, for example,
01:37let's say you have a database and you want to store customers and products and invoices in it.
01:41Each of those are different types of information, and let's say customer name.
01:45That only describes a customer, it doesn't describe a product. And a product skew number
01:49only describes a product and not a customer. So it looks like we can't define a field in
01:53one table that would describe both of those things. So the solution there is we know that we need
01:57to have two different tables within our database, one for customers and one for products.
02:02But how do we determine which tables we are going to need? Well, a very important note here
02:05is that when you sit down at a computer and open a FileMaker to start creating a New Database,
02:09what you are actually doing is constructing something. Like any other construction project
02:13that you embark on--like let's say building a home--your Database will proceed more smoothly
02:18if you first begin with some type of plan. So the very first part of any plan when you're
02:21developing a database is to determine what types of information you are going to storing
02:26inside the database. So the first thing you really want to do even before you open up
02:29FileMaker Pro is to come up with a plan, what type of data that you are going to be managing
02:33in your system. And therefore that will tell you what tables you are going to need.
02:36So you are going to want to first take a few minutes at the very least, look at the data
02:40and literally sketch out what types of information you plan to manage in the database.
02:43So for example, I might be looking at the database that I was just mentioning earlier and think,
02:48okay, well, I've got customers, I have got products, but then also I want customers to
02:52buy products, so we might want to have another invoices table. So these are discreet and
02:57unique different types of data, there are groups of data that I can track, and that
03:01can be described in something that I want to manage, but they are independent of each
03:04other at the same time. So in this kind of standard invoicing system where the customer
03:09is ordering products and creating invoices results, we can see that I've got a least
03:13three different tables here. So I will start off by sketching out Customers, Invoices, and
03:17Products as my starting tables. So you see that we have determined that we're going to
03:21have different types of groups of information in one single database file, Customers, Invoices,
03:25and Products, but what we've really done is created a list that tells us what tables we
03:29are going to need to define inside of our new FileMaker Database.
Collapse this transcript
Creating tables in the Managing Tables window
00:00In the previous movie we determined that we needed a Customer table, an Invoices table,
00:05and a Products table in our new FileMaker Database. So now in this movie we are going
00:09to talk about how I'll actually add these tables to our database. Creating a FileMaker
00:13database from scratch can start in either the location that you see in the upper left-hand
00:16corner on your FileMaker Quick Start Screen, or if you are already in FileMaker Pro you
00:20can go to the File > New Database option. And the first thing that you are going to
00:24see is that FileMaker is asking you to name your new database file. So we are just going
00:27to leave it as a default name of Untitled, save it to the Desktop. And you see that new
00:32file has been created, and that FileMaker opens up into Browse mode, allowing us to create
00:37new fields. But what we are going to do go on to the File menu to Manage > Database, and
00:43this is really the area where you are going to do all of your programming, creating tables
00:46and fields and even relating these tables together. But the first thing that we notice
00:50is that it opens up to the Tables tab, and we see that we already have one table listed.
00:56Notice that FileMaker has adopted the name that we gave to the file--in this case the
01:00word Untitled--and has named the initial table that. It's suppose to be a convenient helper tool
01:05here for you, but really what you are going to end up doing is going in and changing the
01:08name of the table to something that actually matches one of the entities that you have
01:13determined in your previous exercise. So here let's call this one Customers.
01:17After I've selected the Table Name and changed it, I can hit the word Change, and after hitting the
01:22Change button I see that I've got the word Customers now. So we've got three total tables
01:26that we are going to add to our database. The second of which is going to be the Invoice
01:30table, and I just simply add the word Invoice, hit the word Create, and now I have got two
01:35tables. So we can keep doing this for every table that we've got in our database, but
01:39before I add a Products table--which is the third one we determined we needed--I am going
01:43to hit OK to close this window, and I am going go under File > Import, and I am going to
01:48hit File again. Now in this case I already happen to have a Database setup that contains
01:53all my products. So let's say on this new project I want to bring all the information
01:57together in one file, but instead of having to create a table and define all the fields
02:02and import all the data, since I have already got it in another FileMaker file or some other
02:05type of file, I am just going to import it in as a new table. So I am going to a select
02:09Products, hit Open and then instead of importing data in, I am going to choose the table that
02:15I want to import--which is Products--and then I am going to choose the New Table Products
02:20option, and we see here is all the different fields that are going to created in my new database.
02:23So now I hit Import, and it tells me that the 41 records have been imported
02:30in, as we see here, I can see the data in the background, and there are no errors, and
02:35it created a table called Products, so now I go to File > Manage again, and I see now
02:40that the three tables that we wanted to define in our database based on the entities that
02:44we had come up with earlier are now created, and in the case of Products, I don't have
02:48decreed any fields or add any records, because I've imported all that information in when
02:52I created the New Table. Now that we have created the tables that we determined that
02:56we needed based on our entity list, we can then create different fields within these
03:00tables, and since I have multiple tables within the file, I can also create Relationships
03:04between these tables. But the first thing that we want to do to set up the foundation
03:08is to determine the tables that we need and define those within our FileMaker Database.
Collapse this transcript
4. Creating Relationships
Understanding relationship types
00:00So far in the process for developing our new FileMaker Database, we've talked about the
00:04concept of tables. We know that these tables are going to be independent little buckets
00:09where we can store different groups of information. And it's really important to understand the
00:13different groups of information that we are storing in our database and then more importantly,
00:17to understand how those groups of information relate to each other. And that's referred
00:21to as the concept of relationships in Databases. I am going to discuss the concepts of relationships
00:26throughout this chapter and throughout the rest of the title, but understand that relationships
00:30can get complex pretty quickly. We are going to keep it really simple here, and I'm going
00:33to touch on all the points that you need to be aware of, but I strongly recommend that
00:37you go check out the title on lynda.com online training library called Relational Database
00:42Design with FileMaker Pro. In that title I take all sorts of extra time to discuss these
00:47concepts and dig a lot deeper than we are able to do here. When we talk about Relationships
00:51in Database terms, we are talking specifically about how different tables are related to
00:54each other and how the relationships between those tables really define the data that's
00:58stored inside the Database. So in order to decide the data model for your Database system,
01:04it's important to first determine what are the possible kinds of connections that we
01:07could have between our databases and then we can choose from those types of connections
01:11or relationships to determine which ones we actually have. So in this movie we are going
01:15to quickly review the different types of relationships, and I'll give an explanation of each.
01:19And to keep things simple, we are going to focus on the three types of relationships that account
01:22for all the situations that you will encounter within your database. The first one, called
01:26one-to-one relationship, is very rare. And what it usually means is that you've mistakenly
01:30created a second table for something that should actually just be a field. So for example,
01:35you see that I've got two boxes on screen, and each box represents a potential table
01:39in our database, so the one on the left, I am storing all my customer information, and
01:43on the one on the right, I have determined that I want to store address information.
01:46I've mistakenly determined that that might be its own entity, but after evaluating the
01:51relationship between a customer and addresses, I realized that one customer can only have
01:56one address. So in that case that's defined as a one-to-one relationship. So we don't
02:01need two separate tables to store all this information, instead what we can do is define
02:06all of the fields that we are going to put in the address table into the original customer
02:09table, and we are left with only one field. So if you are going through this process and
02:13evaluating the different relationships that you've got, and you find out that you have
02:16got a one-to-one, you will take a look at and determine that this needs to be combined
02:20together in one table, pick the one table and then define all the fields in that one.
02:24But the main relationships that you will want to be familiar with are the ones that are
02:27called one-to-many relationships. These indicate that one parent table is related to many records
02:33in a child table, this is terminology that I am going to use throughout the discussions
02:37on relationship, so if you look here on screen we see the we've got a customer table again,
02:41but this time we have got the invoices table. And what we have determined is that one customer
02:45can have many invoices, but that any one invoice is only related to one customer.
02:50So that's a prime example of a one-to-many where the customer is the one and the invoices are the many.
02:56You will notice the line and the hash mark between the two boxes, that is when you're
02:59sketching these things out, that's a customary way to indicate the one on the single hash
03:04side and the many on the double. Anytime you have one-to-many, decide that's determined
03:08the one, in this case customer is referred to as the parent table and the table on the
03:12side of the many is referred to as the child table. And this vernacular is common in data
03:17modeling, so I will be using that quite a bit throughout this title. You may also encounter
03:20relationships that are called many-to-many relationships, and these ultimately need to
03:24be eliminated. And the way that you eliminate these is by creating a third table, but first
03:29let's talk about why. You will notice that we've got invoices and products now on screen,
03:33and when we evaluate the relationship between the two of these, we see that one invoice
03:37could have many products on it, but at the same time a product could have many invoices.
03:41We see that that's displayed here with the double hash, this is just a convention that
03:44you can use when you're making note of these things, but many-to-many relationships are
03:49problematic, and I will go into talking about that more in later chapters. Now the way that
03:52you will know that you're done with data modeling portion of your database is because you've
03:56evaluated all the possible relationships between your tables, and you've determined that all
04:00that are left are the one-to-many relationships, so no one-to-one relationships, no many-to-many
04:05relationships, but they should all be resolved as one-to-many.
Collapse this transcript
Diagramming relationships with ER diagrams
00:00So far in the process of creating a database, we've learned that we have to determine what
00:04tables we are going to need in our database. Then we understand that since we can potentially
00:08have multiple tables in one database, we need to evaluate what kind of relationships those
00:12tables are going to have with each other. Understanding now that there are three different
00:16relationship types, say one-to-one, a one-to-many and many-to-many, it's time to now create
00:21a diagram of all the tables that we are going to have and then how they're related to each other.
00:25This will help us set up the relationships inside the FileMaker Database when we are
00:29ready to start creating the database. In this movie I am going to expand on these techniques,
00:33and we are going to learn a general method for diagramming database systems, and it's
00:36called the creating an Entity Relationship Diagram, commonly referred to as an ERD.
00:42ERD modeling breaks into three phases, first, we develop a list of entities or tables that
00:47belong in the data model. We then determine in diagram the relationships between those
00:52entities, which is what we are going to focus on here, and we review the diagram for correctness
00:56and consistency. This is the step where we are going to eliminate things like one-to-one
01:00relationships and many-to-many relationships. In the example database that we've been talking
01:04about thus far, we have the basic system where we want to manage invoices. So each invoice
01:09will belong to a customer, and that invoice could have different products on it.
01:13So we are going to focus on this as sort of our sample database, not only in this movie, but
01:17moving forward in the chapter. So the first thing that we want to do is determine what
01:21might be the possible tables. It's important to organize the information into its own buckets,
01:25and we can use this as a guide for creating tables in their table relationships.
01:29One thing that I like to do when looking for entities in any kind of description like we have here
01:33is to look for nouns. And if I do so, I can see that I've got invoices, I have got customers,
01:38and I've got products. And there might be some other tables as well. So from this exercise
01:43we've determined that we need a customer table, an invoice table, and a products table.
01:47So now I have my list which will ultimately become tables that we are to find in the system.
01:52However just identifying the potential tables is only half the task. We must now determine
01:56how these tables may be related to each other before we can actually define them in the
02:00FileMaker Database. Now that we have this list we can start determining the relationships
02:04between these tables, and we can really begin anywhere. And this is also in the process
02:08where we are going to want to create one of these ERDs, or Entity Relationship Diagrams.
02:12You don't need of custom software or anything like that to do this, you can just get a pen
02:15and paper, and then you can just kind of sketch these down. Before we do this I want to show
02:18you how tables or entities are represented on an ERD. In ERD, it's customary to represent
02:24your entities as a box with the entity name inside of it. These will eventually become
02:28the table names that you use in your database. To visually represent the relationships between
02:33two entities in your ERD, it's common to draw a line between the two boxes with a double
02:38hash on the side that acts as the child or the many. Keep in mind in any relationship
02:43we want them to be one-to-many relationships, so the side that's the one is called parent,
02:47and the side that's the many is called the child. And when you draw a line between the
02:51two boxes you can put a double hash on the side that's the many, and that way visually
02:54you can see which one of these two is the child and which one is the parent.
02:58Now remember, we already determined that we'll need at least three tables in our database, and we can represent
03:02these tables as boxes with the table name inside of each. So now let's move on to exploring
03:07the relationships between these entities in our example system. When you're sketching
03:11out your potential tables you need to start asking yourself questions about how they relate
03:15to each other. So let's take two of these tables, and let's say customers and invoices,
03:20and we can ask some questions about the relationship that these have with each other to try to
03:23determine what type of relationship they have. Here are some questions we may ask about the
03:28relationship between these two tables. Can one customer have many invoices?
03:32Well, sure, the answer there is yes. Can one invoice also have many customers? Well, we determined that
03:37anyone given invoice can only be for one customer, so what we have is a one-to-many relationship
03:42or one customer can have many invoices, but one invoice belongs to only one customer.
03:47This is what's called a one-to-many relationship. But we are not done yet. We still have to
03:51determine, do invoices have relationships, to let's say products, which is the other
03:55table in our list. So we can add the products onto our ERD and then ask ourselves similar questions.
04:01Can one product appear on many invoices? Sure. Can one invoice also have
04:06many products on it? Well, that happens to be a yes as well. So in this case what we've
04:10got is what's called a many-to-many relationship, and if you remember, we need to eliminate
04:15many-to-many relationships. Now the key to resolving many-to-many relationships is to
04:19add an additional entity in between the two entities that you are trying to relate.
04:23So in this case we've got products, and we have got invoices, and we've said they cannot be
04:27directly related to each other, because that's a many-to-many. So if we had a third entity,
04:31and we'll call it invoice line items, we can then create one-to-many relationships from
04:36each one of those parent tables to the invoice line items. Now products and invoices are
04:41actually still related, but they are related through these two one-to-many relationships.
04:47Anytime you evaluate relationships and determine that you have got a many-to-many relationship,
04:51you will just simply need to add a third table and then create one-to-many relationships
04:55from each of the parents into that new child table. These tables are commonly referred
04:58to as join tables. So why do we need this third join table? It's easier to understand
05:04if you ask yourself some questions about how you would work with this data once it's in
05:07the database, if you didn't have a third table? For example, let's say you need a report of
05:11all the products order during a time period. Which table would use for that? Well, if one
05:16product can be ordered many different times, then we need to store many different records
05:20that represent each product. So where would we put that data? Well, we can't put in the
05:24products table, because there's only one record per product in that table. And if we start
05:29duplicating products and doing things like that, our data gets really messy and unreliable.
05:33And if we talk about the different times a product is ordered, can we put multiple products
05:37into one invoice? Well, sure we could do that, but we would have to define all these fields,
05:41and it would be really complicated, and we wouldn't have any reliable way to search or
05:45retrieve on the data. So we have a problem there, what we need is a table that has one
05:50record for every time a product was ordered on an invoice. And that just so happens that
05:54that's exactly how we can define the invoice line item table. In this case, one record
05:59equals a product appearing on an invoice. So this report that I proposed can be based
06:04on invoice line item table, because it will have many different records for each product
06:08every time their product has appeared on an invoice, exactly what we are looking for in
06:11this particular report. And there are dozens and dozens of conflicts that can be created
06:15if you don't resolve a many-to-many relationship before you start working with your database.
06:19If you've got a small project, it might not seem like you need to sketch things out ahead
06:23of time, but I cannot emphasize enough how important it is to make decisions on tables
06:27and relationships before you start working with the database. Because if you haven't
06:31taken something into consideration, then you'll end up having to pull out all sorts of wires
06:34after you have already started working with database, whereas now, it's just simple as
06:38just sketching things out on a piece of paper and erasing things and building a new model.
06:42So after a little bit of what's called Data modeling, we've determined not only what tables
06:46we need to build in FileMaker, but also which relationship they have with each other.
06:50Now we can move out of our planning stage and move more into the architecture stage in FileMaker,
06:55where we will define those table relationships. In upcoming movies in this chapter, we are
06:59going to use a relationship graph inside of FileMaker Pro to establish and then maintain
07:04relationships in our FileMaker Database Solution.
Collapse this transcript
Understanding key fields
00:00After completing the Data modeling exercises, we will have determined which tables we are
00:04going to need in our FileMaker Database, as well the relationships that we are going to
00:08need between those tables. Now what we are going to need is some way to be able to link
00:12or hook the two tables together in a relationship. In relational databases, you are going to
00:17connect to related tables together using special fields that are defined in each table, and
00:21these fields are called keys. These keys will act as the link between the two tables, thus
00:26creating a relationship that FileMaker needs. A key field is really just like any other
00:31field that you would find in your database, but unlike the other fields, these are going
00:34to perform special functions. Key fields come in two different types, and each key type has its
00:39own function. There is the primary key which gets defined in the parent table in a one-to-many
00:44relationship, and something called a foreign key, which is defined only in the child tables
00:49in a one-to-many relationship. Let's take a look at primary keys. A primary key field
00:54gets defined in the table acting as the one in the one-to-many, otherwise known as a parent.
00:59And remember that there's always a parent table in a relationship, and there's always
01:02a child table, because our relationships are always going to be one-to-many, there is always
01:06a parent, always a child, just remember that. So the rule to follow when determining which
01:10tables will actually need a primary key field defined is that we need to define a primary
01:15key in every parent table. A primary key's main purpose is to ensure the uniqueness of
01:21each record in the table. So it must contain a unique serialized value inside every record
01:26and these fields should never be empty. So this is really just a simple way for you to
01:30uniquely identify every record in your database and to make sure that there's no confusion
01:34as to which record is actually the parent of any related records from another table.
01:38So you just needed to find which tables act as parents and each one of them get a primary key.
01:42Since any one relationship will be between two tables, and we already determined that
01:46there needs to be primary key field in each parent, then there also needs to be a field
01:51defined in the child table so that these two related tables can be linked together.
01:55The type of key field defined in the child table is called a foreign key field.
02:00It's going to be used to link a related child record or records in a child table back to the parent
02:05in the parent table. So for example, you see that we've got two tables here, we have got
02:09them represented by boxes. We have got a customer on the left side and then invoices on the other.
02:14So one customer can have many invoices. We are going to define a field, and as you
02:18see in gray here, the naming convention we will use for the primary key field is customer
02:21ID with the pk, indicating primary key. So that's the field it's going to be the hook
02:26on the parent site of the relationship, but now we need a hook on the invoices side of
02:31the relationship that will also tell us that these records might be related within the tables.
02:36So what we will end up doing is defining something called the foreign key field.
02:40And this will be how FileMaker will know that any records are related from the two different tables.
02:44A good rule to remember for foreign keys is that every child table in a one-to-many
02:48relationship must have a foreign key defined in it. If you look at your ERD, you can see
02:54which tables are child tables because they will end up having a double hash touching them.
02:58For example, the invoice line items acts as the child to products and to invoices,
03:03and the invoices table acts as the child to customers. So in each of those tables we will
03:08need a foreign key field defined, and it's customary to name those foreign keys after
03:12the parent. So for example, in the invoice line items, you see that we've got a product
03:16ID field with the fk for foreign key, and that's going to help be the hook in the products
03:22to invoice line items relationship. But notice, since the invoice line items table actually
03:27is the child in two different relationships, we need two different foreign keys.
03:32So you'll notice that there's relationship between invoices and invoice line items or invoice line items
03:36is also the child. So in that case we will need an additional invoice ID fk as the foreign key.
03:42So invoice line items, child in two relationships, it gets two foreign key fields, but also the
03:48invoices table is the child in the one-to-many relationship between customers and invoices.
03:53So therefore, we need to define a foreign key field, customer ID fk for foreign key,
03:58inside the invoices table. And since it only acts as a child in one relationship, it only
04:03needs one of those foreign keys. Understanding the concept of keys in the role of the primary
04:07and foreign key is critical to understanding how to link your related databases together.
04:12After you understand these two types of keys, you can then move on to identifying which
04:16of your tables need the primary and foreign keys defined.
Collapse this transcript
Determining which key fields you need
00:00So far in the process, we have discussed the concept of tables and then defining keys inside
00:05those tables so that you can create relationships. Keys are critical to building relationships
00:09in your FileMaker Database. So the next step will be understanding which of the tables
00:13that you have defined in your database will need to have these key fields added.
00:17So let's take a look at the tables that we have been talking about so far in this title.
00:21And we will determine what types of keys they might need. Here is our entity relationship graph
00:24where we've got the customers table, the invoices table, the invoice line items, and products.
00:30If you remember, the primary key decisions are easy. Every table acting as a parent needs
00:35a primary key. Let's look at which tables are acting as a parent in one to many relationships.
00:40We can see that customers is a parent to invoices, so it will need its own primary key.
00:45Invoices are acting as a parent to invoice line items, so it's going to need its own primary key,
00:50and products are also a parent to invoice line items, so that table will need it's own
00:54primary key. And we will notice that invoice line items is not a parent in any relationship,
00:59so it does not need a primary key fields at this time. Now let's look at these same relationships
01:04and determine which tables will require a foreign key field. The rule that I like to
01:08use is that every child table or a table acting as a child in a one-to-many relationship will
01:13require a foreign key field defined. And an easy way to determine visually which tables
01:17are acting as a child in a one-to-many is to look for the double hash. You will see
01:21this example on screen where one customer can have many invoices. Notice that the double
01:25hash mark is touching the invoices table, that tells us that the invoice table is the
01:30child table on this one-to-many relationship. So therefore invoices will need a foreign
01:34key field defined. So if we look at our ERD again, we see that invoices has the double
01:39hash touching it, therefore, it will need a foreign key field defined. And then invoice
01:43line items actually has two hashes touching it, so that indicates to us that it acts as
01:48a child in two different relationships and will require two different foreign key fields defined.
01:53But taking a closer look at the relationship between invoice line items and invoices and
01:57products, we see that since there are two double hashes touching it, we will need a foreign
02:01key that will link the invoices relationship that we can call the invoice ID foreign key,
02:06and also one from the products relationship that we can call the products ID foreign key.
02:11In final review, we can see that some tables play different roles in different relationships.
02:16Some are parent tables in one relationship, and child tables in others. The way we keep
02:19all these straight within our database is by defining the proper primary keys for each
02:23relationship the table is involved in. So for example, customers act as only a parent
02:28in one relationship, so they will get a primary key field defined. We can call it customer ID (pk).
02:33Invoices act as a parent in the invoice line items relationship, but also act as a
02:39child in the customer invoices relationship, therefore it'll get an invoice ID primary
02:45key field, but also gets a customer ID foreign key. The invoice line items as we've discussed,
02:50acts only as a child in two different relationships so it will need two different foreign key
02:55fields defined, one for each parent table. Products acts only as a parent in the relationship
02:59between products and invoice line items, therefore, all we need to do is to find a product ID
03:04primary key field. Determining which key fields you will need in your database tables are
03:08an important part of setting up relationships within the database.
Collapse this transcript
Defining primary and foreign keys
00:00So, so far in the process of creating a new database, we have determined what tables we
00:04need, we have determined the relationships between those tables, and as a result, we
00:08figured out which key fields that we need in each table. A Key Field needs to be defined
00:12inside each table and so that is what we are going to do now at this stage. You are going
00:16to define key fields in the same way that you would define any other field, and you
00:19do so by going under the File menu to Manage and Database. You will notice on the left-hand
00:26tab called Tables, we see all the different tables added into our database. We have got
00:31Customers, Invoices, and Products, and we have added this new Joint table called Invoice
00:35Line Item to resolve one of the many to many relationships that we saw that we had.
00:39So let's start first by defining primary keys. If you remember, we determined that the Customer
00:44table acts as a parent, the Invoice table acts as a parent and the Products table acts
00:49as a parent. So, each one of those three tables will require a Primary key field defined.
00:54I can select one of the tables and hit the Fields tab, and we see that I have an empty
00:58Fields list. So, the first Field that I am going to define is the Primary Key Field for
01:01the Customers table. I will do so by clicking down next to the Field Name and entering my
01:05cursor in here, I need to type in the Name that will be using. There are various different
01:09naming conventions you can use for primary keys, and none of them are right or wrong.
01:13But the convention that I personally like to use is to add a prefix to the Field Name
01:16that indicates what type of key it is. I like to use the prefix pk to stand for Primary
01:22Key, that way when I have got hundreds of different fields in my list, I can easily
01:26visually identify which one is the Primary Key. And you would be surprised how often
01:30you need to know that. The other thing that I like to do to make it easy to find in the
01:33list is to give it a "_" so that it shows up in the top of the list when I sort my fields
01:39alphabetically. As a matter of fact, I would like to add another "_" because I also like
01:43to use the "_" idea when I am defining Foreign Keys. So this way the double "__" will show
01:48up in the sort order in the Field list above the single "_" for the Foreign Keys.
01:53So let's say, __pkCustomerID. I like to use the name of the entity or the name of the table and
02:00then followed by ID, so my naming convention would be __pk, name of table, and then ID.
02:07So now I can just hit Create, and I see it added to my Field list, but we are not done yet.
02:11Remember that we need to make sure that every primary key field is not only not empty,
02:17but that it contains a unique value that no other record in the table has. We can do so
02:21by defining Field Options. We will talk about Field Options in the Field chapter, but there
02:25is one option that I want to show you here. If you click on the Options button while you
02:29have got the Primary Key Field selected, you will notice that it pops up to the Auto-Enter tab.
02:33Down here at the third one on the list, you see there is one called Serial Number.
02:37All you need to do is check that box and leave everything else set as the defaults. The other
02:41thing I would recommend doing is checking this box here in the bottom. This will prohibit
02:46any modifications of these values, or even though you should not really be allowing users
02:50to click inside a Primary Key Field anyways, just in case there happens to be one on layout
02:54somewhere down the road, users can't inadvertently make a change. That would actually really
02:58mess up all your related records. So, with those two options checked, I will hit OK,
03:03and now, I can move on to the Invoice table and in this case, I will do the same thing
03:08__pkInvoiceID, hit Create, hit Options, check Serial Number, check Prohibit, same steps
03:16we did in the previous task. And now, you will notice that the third table, Products,
03:21already has a __pkProductID set up, because we imported that in from another table that
03:26already had these Options configured. So now, once we have added all our primary keys we
03:30want to finish up by adding all our Foreign Keys. Going back to the Table list, remember
03:34that we only need to add foreign keys to the tables that are acting as a child in a relationship
03:38those happen to be Invoice, and InvoiceLineItems. So let's start with Invoice, double-click on
03:45it, takes us over to our Field tab, and the naming convention is very similar here.
03:48I am going to do a _fk and instead of naming the foreign key after the table, that I am
03:55defining the Field within, I would like to name it after the table that is actually the
03:59parent in the relationship. So in this case, there is a relationship between Customers,
04:04and Invoice, where Invoice acts as the child in that relationship. So, I am going to call this CustomerID.
04:08So _fkCustomerID tells me by looking at it that there is a relationship
04:15between Customers and Invoices, and this is the Foreign Key Field. Now, I will hit
04:19Create, and since a Foreign Key Field does not have to be unique or automatically serialized,
04:24we actually do not have any more Field Options to add, except we do need to go into the InvoiceLineItem
04:29and add two foreign key fields, one for Invoice because it's the child in the Invoice to InvoiceLineItem
04:37relationship, and then also one--you can see I can save a couple keystrokes by modifying
04:41this in Products--and I hit Create. Now we have got all our Primary Key Fields and all
04:47our Foreign Key Fields, and we have used a naming convention that will help us link these
04:50relationships together once we get to the Relationship Graph.
Collapse this transcript
Creating relationships using the relationships graph and table occurrences
00:00So here we are at the point of the process where we were assuming that you have already
00:03gone through your data modeling exercise to determine the tables that you need and get
00:07the relationship between those tables. And then of course, we have already created those
00:10tables in our database which we can see under File > Manage and Database. We have got the
00:15four tables, and each of those tables have the primary key and foreign key fields defined.
00:23If you click on the Relationships tab over here on the right, you will see that we have
00:26four boxes in what is called the Relationship Graph. These are very similar to how you model
00:31them in an Entity Relationship Diagram, but what you are actually looking at on screen
00:35here, what File Maker calls Table Occurrences. So rather than actually being the tables themselves,
00:40they are in occurrence of the table. Now, as far as creating the initial Relationships,
00:45they are going to look just like the ones that we had in the Entity Relationship Diagram.
00:49As you start to use more advance techniques in File Maker, you will understand that at
00:52some point you could have more than one occurrence that is based on the same table.
00:56But for right now, don't worry about any of that stuff, that will come way down the road.
00:59What we'll we need to concentrate on now is just simply creating the relationships between the table
01:04occurrences that we see in Relationship Graph. And this part is going to actually be very
01:08easy because we have already used a naming convention for the primary and foreign keys
01:12within each table. Before I show you how to create a Relationship, I just wanted to show
01:15you some of the tools that are available on the bottom of the screen. Here is an area
01:19where you can create new table occurrences and relationships, which we will get to
01:22later, you can move these around using your Pointer tool, and once you have more than
01:27one selected--let's say by holding down the Shift key--you can do things like Arrange
01:31them, left edges, or you can move them around manually. I like to move them around so that
01:35they match sort of what it looks like in my Entity Relationship Diagram. So in that case,
01:40it would look something like Customers, Invoices and then I like to have the Join table represented
01:45between the two tables that used to have a many to many. I can also change the color
01:50of different tables if I like, by selecting the table and then using this ColorPicker.
01:55Sometimes I like to identify all the tables that are in my original Relationships by a
02:00certain color, so you can select all of them and change the color if you like.
02:04You can also add little notes to yourself or to other users that are working on the database with
02:08you, by selecting the Text tool and dragging and drawing a sticky onto the Relationship Graph.
02:12There are some Zoom Options here that allow you to see a different view, if all
02:17your table occurrences do not fit all in one. And you can print these as sort of a record
02:21of the work that you have done, and you have some ability to manipulate which ones show
02:25up in certain pages over here in these buttons on the right. But in order to create the relationships,
02:30we want to first identify two different tables that need to be related, in this case, we
02:34will say one Customer can have many Invoices, so we know that the Customers is the parent,
02:37and Invoice is the child. So what I do with my Pointer tool is I pick from all the different
02:42fields that are listed here--and, by the way, you will see an example of this over in the
02:46Products table where we have tons of different fields, and it is very easy for us to find
02:50the key fields because we have used the underscore prefix that helps us see the key fields on the top.
02:55All these other tables do not have fields defined, so it's easy to find the Primary Key.
02:59But you can see how useful a naming convention is over here. So I find my Primary Key Field
03:04in the parent table, I click on it, and now we see this little dumbbell appear under my
03:08cursor, and I am holding down the Shift key, and what I need to do is drag and drop this
03:12onto whichever Field is the Foreign Key, and that is why I like to use a naming convention
03:16in the Foreign Key that adopts the name of the parent table. That makes this decision very easy.
03:21So here I drop it on the CustomerID. Now you will notice that in the list of Fields,
03:26a Field that has been chosen as a key either primary or foreign, now gets italicized, remains
03:32in the original field list but also then gets added up to the top where you can see that
03:36fields are isolated so that you can visually see what the key fields are in any given Relationship.
03:41You will also notice that there is a little Crows foot on the many side of the Relationship.
03:46Believe or not it is not actually File Maker being intelligent enough to know which one
03:50is the many but what it does know is that on this side this Field has been defined to
03:54contain a unique value, and when we set it up as a primary key, and this field does not.
03:58So, then it uses that little bit of intelligence to assume that this is the many, and that
04:02is the one. Let's do the same thing over here again ProductID, easy to find, drop it down
04:08the ProductID, now we see that ProductID is italicized and the two fields that are used
04:13in the Relationship have been isolated on the top of the table occurrence box, and now
04:18that just leaves us with one more choice to make Invoice goes to its own foreign key.
04:24And that is important. You can see now why we need to have two different Foreign Keys,
04:27because one will link Invoice and then one will link Products. We can not recycle those
04:31same ones together. Now, that we have got the base Relationships set-up in our FileMaker
04:36database, we can continue on to develop the rest of its functionality. It's important
04:40to get the architecture in place first before you proceed with those other tasks. Later
04:44on in the using Relationships Chapter, I will show you various different ways that you can
04:48use these relationships that you have set up here already. A FileMaker database can
04:51contain just one single table or be made up of multiple tables that are all linked together
04:56internally using FileMaker relationships, and those relationships are all managed here in
05:00the Relationships Graph. Now, that we have concluded talking about Relationships and
05:04FileMaker, I strongly recommend that you go check out the title in the lynda.com online
05:09training library called Relational Database Design with FileMaker Pro. In this title I
05:14go in to a two and a half-hour discussion in great detail about Relationships, talking
05:18about some of the same concept we have reviewed, but I use all sorts of different examples to
05:22help really drive some of these points home. So, if you feel like you want to cover the
05:25concepts of Relationship a little bit more, definitely go check out that title as Relationships
05:30in FileMaker in any database are critical to the functionality of the system.
Collapse this transcript
5. Working with Fields
Deciding what fields you will need
00:00Like other databases, a FileMaker Pro database is presented to the developer as a collection
00:05of tables each containing a number of fields. If you've worked with databases in other environments,
00:10you maybe accustomed to the term columns instead of fields. But in FileMaker Pro, these attributes
00:15that describe a table are called fields. A physical file can hold a limitless number
00:21of tables, and each table can effectively have a limitless number of fields defined.
00:26You manage all of these in the File > Manage Database window under the Fields option.
00:31A field in FileMaker Pro may be viewed as a slot that can hold information specific to a single
00:36database record. The value that's stored in a field should be thought of as an attribute
00:41of the entity represented by the table it's defined within. We can see some examples of
00:45fields in the Products table. We'll notice that there are various different fields already
00:50defined because we imported these over from another database. We'll see that there are
00:53things like the Category of the product, the Location of the product, Part Number, and
00:58different things like that. We have determined that these fields need to be defined in the
01:02Products table because they're all attributes of a product. We wouldn't, for example, put
01:07the customer first name or customer email in this table. Instead we've created a special
01:12table just for customers and then we would define those fields here. Fields do not always
01:17require a value, but in many cases, the fields could have a value for each record.
01:22So for example, in Products we see there's a field for a Picture, but not every product could
01:26have a picture, but that's okay, we can still have a record in the database representing
01:29that product, we just wouldn't have any data in the Image field. So when trying to determine
01:34which fields need to be defined in each table, we have to think about what some of the attributes
01:39of a customer maybe and what might change from customer to customer, for example, customer
01:43name--of course, each customer will have their own name--but you also want to make sure you
01:47include only fields that are meaningful to our users. These aren't decisions that we're
01:51supposed to make as the database designer, instead these are decisions that we want to
01:55ask our user about and help them provide that meaning for us. So let's say that after having
01:59some appropriate discussions with our users, we determined that the following fields need
02:03to be added to our Customers table. Here we've talked to the customer. They tell us that
02:08yeah, for each customer we want customer name, street address and some contact information,
02:12maybe even the logo and some information about when we added them to our system and if they
02:17have been modified. Let's say, for example, a field like discount rate is something that
02:21throughout the discussions we have determined could possibly be a field that we need, but
02:24not every customer record will have data in the field, but that's okay, we still need
02:28to define it in the Customer table. Some other examples here in the Invoice table.
02:33We see we have got some similar fields that are created by and modified by fields, but a lot of these
02:37are going to be numeric values, like what the total of the invoice is or dates when
02:42the invoice is due. We also see things in here, a good example of the invoice discount rate.
02:47We still need a field for it, even though some of the invoices might not even have
02:50a discount applied. To review, what we've actually done here is come up with a list of attributes
02:55that are specific either to a customer or an invoice. So in each case, what we've done
02:59is asked our users what information describes each entity in our tables and then what information
03:04is specific only to that table. This will give us our field list. It's really important
03:09to break down your fields into the most granular level possible. For example, in the Customer
03:13table, you'll notice that we have a field for street address, city, state, and zip.
03:18It's represented as four different fields. It could've just been easy enough for us to
03:21do the common mistake of adding one field that says address and try to put all that
03:25information in there at once. But it is in fact, a mistake. For example, what if we just
03:30want to search any customers from a certain state or do a ZIP code range search?
03:34We don't have an isolated area where we could do that if all the data is in one field. So just remember
03:38when you're coming up with these field decisions to break fields down into the smallest unit possible.
03:43Another great example of this is in the name. Instead of having a contact name,
03:47what you see here is that we've got a contact first and a contact last name. FileMaker databases
03:52allow developers to create a field to store information that describes value stored in
03:56our tables. But when you make decision on what fields you need, make sure to get your
04:00users' input and then to break the data down into its smallest parts before defining them in the database.
Collapse this transcript
Understanding field types
00:00Once you have a list of fields that you want to define inside the tables in your FileMaker
00:04database, you want to first decide which types of fields are going to be before you can define them.
00:09If you look under the File > Manage Database window, and you look under the
00:14Products list, you'll see that not only do we have all these fields defined, but notice
00:17under this column that they all have a different type, you see some are numbers, some are dates,
00:22some are text, and so on. When you're defining a field, not only are you picking a name,
00:26but you'd also choose from this dropdown of the different types that are available.
00:30So, before you can actually define these, you should assign each one of them a type and
00:34then after you have both of those pieces of information, you can go and define the fields
00:37inside this dialog window. First, let's do an overview of all the different field types available.
00:42A text field is appropriate for any type of data that can be stored as text
00:46and does not need more specific handling. It's also the most common type of field and
00:51the default type if you're adding a field for the first time in your FileMaker database.
00:56Numbers and dates, for example, can be stored in text field, but in doing so they lose
01:00their numberness or their dateness and can't be treated as such. A text field can hold
01:04about 2 gigabytes of information which is roughly the equivalent of about a billion
01:08characters or 500,000 pages of English text. However, I would severely caution you that
01:13if you have a database where you actually need to store 500,000 pages of English text
01:18into one field, you might have other issues going on there. A number field is a field
01:23to use whenever data needs to be treated as a number. So for example, if you need to sort
01:27it in numerical order instead of alpha order or use it in a mathematical calculation.
01:32FileMaker Pro will not prevent the entry of non-numeric data into a number field, for example, any
01:37text characters that are entered into a number field will be displayed, but they'll be ignored
01:41in most database operations. FileMaker Pro is able to store and retrieve any date in
01:46a date range of 1/1/0001 all the way up to 12/31/4000, and of course, you do need to assume
01:55that the dates entered into these fields are formatted as month/date/year. FileMaker will
02:00generate an error dialog if the user attempts to enter a date not within the stated range
02:05or not in an acceptable date format. Internally--and this is interesting--FileMaker stores
02:10a date value even though you type in a date 1/1/111 let's say, it won't store it as a date.
02:16What FileMaker does is convert it to an integer. And this integer actually represents
02:20the number of days that have expired since the first date in the date range 1/1/0001.
02:25So you can type it in as 6/12/70 even though it will display it as 6/12/70 behind the scenes,
02:32FileMaker is actually determining what integer it is and storing it as such. This is actually
02:36quite useful because this helps you determine dates that fall within a certain range because
02:41they are converted to a number or what date is later than another date because one number
02:45is going to be greater than another, and so on. FileMaker Pro stores time as a value that
02:50represents either time of duration or specific time of day, for example, on a 24-hour period
02:55and much like a date field, internally, FileMaker Pro stores the time value as an integer that
03:00represents the duration of seconds that have expired since midnight that day. So for example,
03:0510 a.m. today is stored internally within FileMaker as the number 36,000.
03:11That means that 36,000 seconds have expired since the clock struck midnight today.
03:16FileMaker Pro will generate an error dialog if a user attempts to enter nonnumeric data into a time field.
03:23Timestamp is actually a combination of a date and a time with the space between them.
03:27Timestamp is stored internally as a number of seconds since midnight on 1/1/0001. So it's a great
03:35deal of number of seconds, but this allows you to have an integer where you can determine
03:39the date and time combination of one field being either later or before the date and
03:44time combination of another. So what you get is a single integer that's converted into seconds.
03:49Now container, summary, and calculation fields will all be explored in greater detail
03:53later in this title. A container field is a very versatile field type that can store
03:57any type of binary data. We are going to cover this later in the Container chapter. A calculation
04:03field contains data that is computed based on a formula defined by the database developer.
04:08So in the case of a calculation field, you are not actually typing any data into this field.
04:12Instead it's displaying a result of whatever the formula is that you've entered
04:15in when you defined the calculation field. You are going to learn more about using calculation
04:20fields and the formulas in the chapter that's dedicated to calculation fields later in this title.
04:25A summary field is a special FileMaker Pro type of field that also doesn't allow
04:30you to type data into it, but instead shows you aggregate values across a found set.
04:34We are going to talk more about found sets when we talk about finding records later in this
04:39title, but then summary fields are also the basis for an important area of FileMaker Pro
04:43reporting, and that'll be covered in the chapter on reports. Now once you are familiar with
04:48each field type, you are going to want to learn how to assign those types to the different
04:52fields that you have created in your field list. So here's an example of the fields that
04:56we determined or needed in both the Company table and the Invoice table. If we take a
05:01quick look at them, we can determine which one of these field types we could assign.
05:05Most of them receive the Text field type because that's usually going to be a default, but
05:09things like Date Created will be handled as a date. In the case of Date Modified, since
05:14those occur more often than Date Created, we might want to actually make that a timestamp
05:18so that shows us not only the date that a record was modified, but also the time of day.
05:21Tax Rate, for example, is treated as a number because we might want to use that
05:26in a calculation or a formula later. So we got to make sure that that one is in Text,
05:30the same is true for Discount Rate. And the Company Logo field is going to be an image
05:34that we're embedding in each database record so that we are going to make a Container field.
05:38Now in the Invoice table, we have some of the same decisions. We've got things like
05:42Date Created and Date Modified doing the Date and Timestamp decisions that we made earlier,
05:47but a lot of these are calculations, and a lot of these are numbers because we are going
05:50to be doing a lot of math and coming up with currency values. Once your field list has
05:55been reviewed and each file type has been assigned, you can now move on to defining
05:59these fields within the tables in your FileMaker database.
Collapse this transcript
Defining fields
00:00In order to add fields to your database, you must first determine what tables you'll have
00:04and then what fields will describe those tables and then finally, what types of fields each will be.
00:10There are two ways that you can define fields in FileMaker Pro. You can define fields
00:14in quick view, like we are looking at here, but we covered that in the Creating New Database
00:19using a Spreadsheet Format video. So feel free to review that movie for more instruction.
00:23The second and more standard method of defining fields is through the Manage Database dialog
00:28which we get to under File > Manage and Database. In addition to providing a central location
00:33for creating and editing fields in any table, the Manage Database dialog also provides tabs
00:38for working with tables and relationships. So it's a good place to add fields that you
00:42have already listed out so you can do many at once. In this movie, I'm actually going
00:46to add all of the fields to the Invoice and Customer tables, and I am going to use the
00:50types that we discussed in previous movies. But first, before I start defining fields,
00:54I'll put a discussion here on field naming because the first decision you need to make
00:59before you even say what type of field it's going to be is what you are going to name the field.
01:02Many users employ naming conventions that have the types of fields denoted, for
01:07example, somewhere in it that says the text or number field or even special prefixes that
01:12can be added to the front of a field like we've done here with our primary keys or even
01:16our foreign keys that allow it to appear in the top of a list when a field list is sorted
01:21as you see here alphabetically. FileMaker Pro is very accommodating when it comes to
01:26naming tables and fields, but there are only a handful of restrictions that you need to consider.
01:30For example, watch as I try to name a field just the number 6. When I hit the
01:35Create button, a message pops up. Now this isn't restricting me from actually naming
01:39this field 6, but instead what it's indicating to me is that there are some special characters,
01:44numbers are included that should be avoided when naming fields. For example, you can't
01:49use the plus sign in the name of a field because if you try to put that in the calculation
01:52dialog, FileMaker is not going to know where you're talking about a field or you are actually
01:56putting in an operator telling it to add something to the value in other field. And other things
02:01like AND, OR, NOT, those types of things really should not be used in names either.
02:06And as you get more familiar with calculation functions, you are going to want to avoid that terminology as well.
02:11And another tip is that you should avoid spaces in your field names because if
02:15you ever want to publish your database to the web, these field names will have to be
02:19called out in these URL string,s and sometimes URL strings can get confused if they encounter
02:24a space, so it's a better idea to name them all one word smashed together.
02:30Just because certain characters are allowed in a field in a table does not necessarily mean you
02:33should use them. Should you ever need to share data between your database and another application,
02:38you may have difficulty because most other applications have more naming restrictions
02:42than FileMaker Pro might. For this reason, the best practice is to use only alphanumeric
02:47characters and table and field names. I'll hit Cancel, and I'll navigate over to Customers.
02:54So let's add the first couple field names. In the Customers table, I am going to add
02:58the CompanyName field, I am going to simply type in CompanyName, and then I am going to
03:04keep the Type as Text, and I am going to hit the Create button, and now we see the field
03:07added to my list. Once a field has been added, you can now duplicate it or delete it from
03:13the list or change the name by simply changing the name and then hitting the Change button.
03:19But you also see that once it's added to the field list, you've got this Options button
03:22over here on the right. We are going to cover this in the next couple of movies. It's also
03:26sometimes a good idea to add comments down here below. This will help you out if you
03:31feel that you want to see something about the field when you review it in the list.
03:34The comments will show up under Options or Comments. I'll add a couple of them in the
03:39Invoice table, but I'll leave these blank. I also wanted to show you when I add the Address
03:43fields that I am going to use a certain naming convention. You'll notice that I am going
03:47to say AddressStreet and hit Create, AddressCity, and then finally, you'll see that I'm going
03:57to add Zip. So the reason I'm doing these is because you will see now that if I'm looking
04:02for any of the address fields, you'll see in my sorted field list that they all show
04:06up as one clump. This way if I am looking for anything related to an address, I just
04:10look under A and under Address, and I can see all those fields. Otherwise, this field
04:14would show up under C, that under S, and this under Z, and it would be very difficult for
04:19me to find all of them in a normally alpha sorted field list. We can apply the same logic
04:23to ContactNameFirst, hit Create and then also ContactNameLast. So I have added just a few
04:34of the fields from our field list here, but now I am going to switch over to the Invoice
04:38table and add a couple of fields here, and this brings me to a table where we see our
04:42primary key and our foreign key fields already defined. So just to show you how I can switch
04:47between the different tables, I am going to add a couple of fields here as well, DateCreated,
04:52but this time I am going to choose a different type from the list, I am going to hit Create,
04:57and I can say DateModified, keep it as Date and hit Create again, and I am going to add
05:03some number fields here as well, InvoiceDiscount, which I'll choose as a Number field, and I'll
05:10hit Create, but I want to eventually turn this into a calculation, so you'll notice
05:14that I am going to put in the word calculation into my Comments. I am going to do the same
05:18for InvoiceSubtotal. You will notice that I can modify one of the existing field names
05:24and just hit Create, or what I can do is I can hit Duplicate and then change the name.
05:32When you duplicate a field, it will duplicate the name, add the word copy to it, copy over
05:36any comments, Type and Field options, so this can be a pretty efficient way to define very
05:40similar fields inside your database. But I've added a couple of comments here that you will
05:45see as you select each field, but if you click on that field's header in the Options/Comments,
05:50you'll notice that it toggles from whatever the field options are to the comments that
05:54I've put under each field name. Of course, I'll go ahead and add all the different fields
05:58from our field list to the exercise files, but once you're done, you want to close this window.
06:04But notice if you hit the Cancel button, you get this message that says Discard ALL
06:08changes made in this dialog? You definitely don't want to do that because what that means
06:12is that you're going to lose all the different fields that you have defined during this little session.
06:16So instead, you want to make sure that you're always hitting the OK button,
06:20and now notice also, on our layout, when we look at this in Form View, we see that a series
06:25of fields have been added to our layout. So what happens is when you don't have a lot
06:29of fields defined in your database, and you go in and define a whole series of fields,
06:33FileMaker is going to automatically put those on the layout for you. But now that it's done
06:37so for that first time, if we go back and add more fields, it won't automatically add
06:41them to our layout unless we've got Preferences set up under Layouts to do so. That preference
06:46is found under the FileMaker heading for Mac users or under Edit for Windows users.
06:52You select Preference and under Layouts, you can see there's either an option checked for Add
06:56newly defined fields to current layout or not. Now is a good time to have them added
07:00to your current layout, because you want to have at least one layout that has all the
07:03different fields on it for administrative purposes, and we'll discuss more about working
07:07with fields on layouts in later chapters. So after you have determined your list of
07:11fields, FileMaker provides a couple of different ways to define these fields in the database.
07:15You can then apply field naming conventions as well as choose field types while you set
07:19up these fields in your database.
Collapse this transcript
Using Auto Enter options in fields
00:00When you're defining fields inside your FileMaker databases, you have a couple of decisions
00:04to make, the first of which is what type of field you're going to be defining, and the
00:08next would be any additional options that may be necessary for that field.
00:11Developers often design a database so that some fields are automatically populated with data when
00:16a new record is created. You'll manage all the fields in your options under the File >
00:20Manage > Database window, and you'll see that when you select a certain field, for
00:24example, here the pkCustomerID, you can see in the Options column if it's already got
00:29Options applied. If not, you can either double- click on the field, or when the field is selected
00:33hit the Options button, and you'll see the Options for Field window appear. In the movie
00:39for setting up key fields in our database, we already used a Serial number option.
00:43That's one of the Auto-Enter options available in this dialog. FileMaker Pro has the capability
00:48to insert a serial number into each field every time a new record is created or committed
00:53in the database. This is mainly of interest for creating a primary key, as we've done
00:57here, which is a value that uniquely identifies every record in the database table.
01:01A serial number for a field can start at any value and end at any value. In the case of a primary
01:07key, it doesn't matter, so we just leave those at 1. But if you wanted to, you could for
01:11example, put an alpha character in here. FileMaker will ignore the alpha character and still
01:16increment by one. Some developers like to put those alpha prefixes in there so they
01:20can identify which table certain records were created within. FileMaker will always manage
01:25the next number internally, and it will never duplicate numbers. Therefore, it makes for
01:29great primary keys because those keys will have to be unique. This way you don't have
01:34to worry about it as a developer, instead FileMaker takes on that entire responsibility.
01:38By default, a value that's automatically entered into this field or any field that has these
01:43options selected can be manually changed by the user. For example, if we were to leave
01:49the Serial number value as a default and create a new record, the user could click into the
01:54field and change that value. Unless of course the Prohibit modification of value during
01:59data entry check box is selected, but that is not one of the default options.
02:03But you should note that when the Prohibit modification value is checked, that applies for all different
02:09values that are added for a field that's set up, not just one in particular.
02:13What that leads us to understand is that you can only select one value to enter into a field when
02:18a record is created. You'll notice that when I click on the Data field, the Serial number
02:22field becomes unchecked. We'll select that back to Serial number, hit Cancel, and let's
02:27go to the DateCreated field and double- click that on our list. In this field let's say
02:32we want to automatically enter the current date each time a record is created.
02:36So instead of having the users have to enter this value each time, we'll let FileMaker do it.
02:40So when you select the Options button or double-click, it goes automatically to the Auto-Enter tab.
02:45You see the first two options in this tab, they relate to Creation and Modification of data.
02:51A field can automatically track information about when a record was created or last modified,
02:55within some limits, and by whom. Both Creation and Modification options have the same set
03:00of choices. You'll see when you pick a dropdown, some have Date, Time, Timestamp, Name and
03:05Account Name, but in the case of this field only Date is available, the others are grayed out.
03:10And the reason for that is because this field was set up as a Date type. If it was
03:14set up as Time, only Time would show, Timestamp only Timestamp would show. But if it was set
03:19up as a Text type, then all these options would be available to us. So in this case,
03:23let's check the box next to Creation and leave it as Date and hit OK. And now let's go to
03:29the RecordCreatedBy just below it and hit the Options button, and here we're going to
03:33check Creation again, but this time we are going to pick from the dropdown, as we see
03:37in this case all the options are available to us because it's a Text field. We could
03:42choose the Date, like we did earlier, or Time, which would put in the current time at the
03:47moment of the creation of the record. A Timestamp would just be a combination of the date that
03:51the record was created and the time it was created, or Name, which is actually the name
03:56that's stored in the Preference pane of each user's copy of FileMaker, or it could be the
04:01Account Name. Let's take a look at those for a second. So I am just going to leave that
04:04as Date for right now, and we'll hit OK and OK. So if we go under Preferences, on Mac
04:10it's found under the FileMaker Pro dialog, on Windows it's found under Edit.
04:14You'll see that there's a section under the General Preferences that's called User Name, this is the name
04:19that's assigned to this copy of FileMaker Pro. So if I were to add an Auto-Enter option
04:24to the field CreatedBy, I could say User Name and what it would do is put the name
04:29Cris Ippolite into that field each time a record is created. Now, of course there could be
04:34many users on a database at the same time and they all have a different name in their
04:37User Name, so those names would show up. But many times this User Name is just adopting
04:42the name of the computer, so this could be more useful if you want to figure out from
04:45which computer these records were created, not from which user. The other option is to
04:50use the Account Name. If you look under File > Manage and Security, you'll see that you
04:55can set up a series of Account Names allowing users to identify themselves and have specific
04:59access to the database. In that case, you would assign them an Account Name, let's say,
05:03for example, Test. And then if they log in using that Account Name, it will then put
05:09the word Test inside the RecordCreatedBy. So I am going to go back into Manage > Database,
05:16go to my RecordCreatedBy field, and I'm instead going to choose Account Name. Now we see we've
05:23got DateModified right below it, I am going to select that field and hit Options.
05:27And this time I am going to choose the Modification Timestamp. And note that's the only value
05:31that's available to us, because this of course is a Timestamp field. Now, what FileMaker
05:36will do here is actually change the Timestamp value every time any of the other fields that
05:40are defined in the table are modified. So unlike everything else on this list, which
05:44actually just adds value to the field when a record is first created, the Modification
05:49option will update values in the field whenever any of the fields in the record are changed.
05:54You can't pick which fields you want to have trigger the Modification, so there are some
05:58limitations to its usefulness. So let's check that option and hit OK. And there are some
06:02other options as well. So if we go to AddressState, for example, we hit the Options button, and
06:08you'll notice that we've got this option here for Data. When checked, we can just simply
06:12have this data appear inside of a field every time a new record is created. So for example,
06:17let's say that the majority of our customers are in the state of California, that way we
06:21could save the data entry folks a little bit of typing by saying that the letters C-A will
06:26appear in every new record. Now, keep in mind, any Auto-Enter field can be modified after
06:32it has been created, as long as the Prohibit modification of value during data entry is
06:36not selected. So I would leave this unselected in a case like this, and when a user creates
06:41a new record they will see the State value. And if it happens to be one of the few that
06:44are outside of the State of California, they can just simply click in the field and change
06:47the value. We can do the same thing in the Invoices table, you'll see how quickly we
06:52can do so, Date, Creation Date, CreatedBy, AccountName, very easy to do these after you've
07:02set these things up. And I am going to add another one as well. Let's say we go to the
07:07InvoiceDiscountRate, I'll hit Options on that. This InvoiceDiscountRate is actually something
07:13that's going to be driven by the customer. So whichever customer is selected when you
07:17create the invoice, they'll determine what the InvoiceDiscountRate is. So what I am going
07:21to choose is this option that's called Looked- up value. When I check the box next to Looked-up
07:26value, you see that I get this new dialog that allows me to look up a field value from
07:30another table. So in this case, well, remember that each invoice has a parent customer record,
07:35because those two tables are related, and you would never create an invoice without
07:38assigning it to a customer, so we can set this up to pull the value from the selected
07:42customer in the related customer table. So let's choose Starting with table Invoices,
07:47and we are going to Lookup from a related table, and we'll say Customers. And Customers
07:52happens to have a field that's called DiscountRate, and so if we hit OK and OK again, now what
07:58it's going to do each time we create an invoice is it's going to go look at the Customer that's
08:02been assigned to the Invoice, look at what their DiscountRate is and put that value into
08:05the field. When we get into a discussion on calculations, we could also reference that
08:11field in a calculation. But the thing is if that value ever changes on the customer, whenever
08:16it's a calculated field, it will dynamically update any old records that have been created.
08:21But if we do this as a lookup in an Auto- Enter option, it will only go find that value at
08:26the time the record was created, and even if that value changes in the future, it will
08:30never update that. So that's good for things like discount rates or unit cost or different
08:34things like that. That way if you change the unit cost of a product, it doesn't go retroactively
08:39update all the different historical order item records in your database system.
08:43So we'll leave all the other settings as defaults and hit OK, and let's try this out by going into
08:48Customers and hitting New Record. So we see that the State has been populated, the DateCreated,
08:54the RecordCreatedBy account and DateModified. And we'll also see that if I go into the CustomerID
09:00and try to delete it, I get a message that says This cannot be performed because this
09:03field is not modifiable, which is exactly the instruction we gave it when we checked
09:07the Prohibit modification of value during data entry. Using the Auto-Enter field options,
09:13developers can design a database so that some fields are automatically populated with default
09:17data when a user creates a new record in a database. These are actually decisions that
09:21you'll want to make when you're deciding what fields you'll need when you're first creating
09:24the database, because it won't retroactively go back and assign those values to records
09:28that have already been created before you go and apply these options.
Collapse this transcript
Using field validation options
00:00Any database system will strive to have consistent data. Without data consistency it becomes
00:05extremely difficult, if not impossible, to derive meaningful and reliable information
00:10about whatever a database is designed to keep track of. To ensure that data entered into
00:15your database is consistent and reliable for business purposes, you must design checks
00:19and restrictions on the way users are allowed to enter or modify data in the system.
00:24This is where Field Validation capabilities of FileMaker Pro will come into play. Field Validation
00:29allows you to test field data against specific criteria and to warn the user if the field
00:33does not pass muster in some way. For example, if you go under the File > Manage > Database,
00:39you'll see that you have various different field options already applied under the Auto-Enter.
00:44But for example, if we go to the Customer AddressEmail field and hit the Options button,
00:51notice that the next tab over from Auto-Enter is the Validation tab. As you will learn in
00:55this movie, if a user tries to commit a record containing field data that violates one of
00:59these rules, the user will receive a warning and be prompted to change any nonconforming data.
01:04This way you keep all of the data consistent and reliable. FileMaker Pro developers can
01:09choose from any of these options and they'll automatically validate the field contents.
01:14Let's say that our database will require that every customer have an email address so they
01:18can receive automatic emails on their order status. Therefore, we need to make sure that
01:22in this AddressEmail field that we've got some validation selected to make sure that,
01:27that value is not empty. So in the Validation tab, we'll see that we can choose various
01:31different options like the data type or whether it's Not empty, Unique, or Existing, and some
01:37of the Validated by calculation options, for example, we are going to do in later chapters.
01:42But let's just choose Not empty for right now. And at the very top of the dialog you'll
01:46notice when we're asking this to actually validate the data. By default, it's set to
01:51only validate during data entry, but it's got this check box here to Allow the user
01:55to override during data entry. Let's take a look at what that looks like. So if we hit
01:59OK, and I hit OK again, I hit a New Record, and I try to do something else in the record
02:06by clicking on it, and it tells me AddressEmail is defined to require a value. But it also
02:11says, do I want to allow this field to remain empty and gives me the ability to revert it
02:15back to whatever state it was before the change was made, or I can just say Yes.
02:20But what we really wanted to do is say No. Now, it really depends actually what we want to do.
02:24You can see that there's different levels of severity. Here we can just sort of make a suggestion
02:28that they don't leave it empty, but users could just hit Yes and override that and then
02:32of course leave the value empty if they've chosen to do so. So here's our field that's empty.
02:38Even though we've put in a restriction, it still allows it to do so. But if we go
02:42into the Database, double-click on this to show our Validations options again, I can
02:47instead not check the box that's by default of course, that says Allow user to override
02:52during data entry. Now when I hit OK and then go to create a New Record, now you can see
03:00that the message is a little bit different. It says that the AddressEmail is defined to
03:04require a value, and you must enter a value. And if I hit OK, it just takes me right to
03:09that field and doesn't let me do anything unless I actually enter a value into the field,
03:13which is as restrictive as it can get. You'll notice, though, that that message might be
03:19a little bit cryptic to your users, so one of the things that you'll see in the Validation
03:23options is the ability to create a custom dialog message if the validation fails.
03:28So here, for example, I can say Please enter an email for this customer. Now when I hit
03:35OK, and hit OK again--get rid of a couple of these records by hitting Delete--say the
03:41New Record, and I don't enter anything in the email field, but now it gives me something
03:46that's a little bit easier to understand to my users, so now they know what they need to do.
03:49I go type something in there so it's not empty, and now it allows us to proceed.
03:55So back in Manage > Database, under Email, you'll notice that there's an Always and Only
04:00during data entry option too. These of course are the default settings, but if I switched
04:05it over to Always, what that means is that in other non-data entry ways that I'm adding
04:10data to my database, it will also enforce this validation. We haven't talked about importing
04:15data into our databases yet at this point, but later as you see when we talk about that,
04:19any field that says Always in it will enforce this restriction on the importing of data.
04:25So what it really means in our case is if I choose Always here, and I am trying to import
04:30a bunch of new customer data in from some other system, any customer data that does
04:34not have an Email address populated or is empty and doesn't pass the Not empty validation
04:40will be omitted from the importing our database. So you should only really select Always--which
04:44again isn't the default--in the events where you really want to strictly enforce one of
04:49these validations. The other options you have available to you are to choose Unique value,
04:54so it can be both Not empty and Unique, or Not empty and Existing. You can make sure
05:00that a date or a number value comes in a certain range, a Strict data type, meaning it has
05:06to be certain type of data formatted into the field in a certain way. And Minimum or
05:11Maximum number of characters, and here under Validated by calculation we'll look at some
05:17examples when we discuss this further in the calculation chapter. So FileMaker Field Validation
05:23allows you to test field data against specific criteria and then to warn a user if the field
05:27value does not pass muster in someway. This allows you to keep the data in your database
05:32consistent and reliable as it is being entered.
Collapse this transcript
6. Working with Container Fields
Using container fields in your database
00:00Container fields are an important building block for any FileMaker Pro database in which
00:04you want to store and/or display more than just text. With container fields, your database
00:09solution can actually store and display digital images or videos, play music and sounds, store
00:15electronic documents like PDF, Excel, or Word files. And really, a container field is so
00:20versatile that it can store any sort of binary data. Binary is just a generic term for data
00:26that cannot be represented as text. Container fields can hold up to 4 GB of binary data
00:31in three broad classes, either as an image, a QuickTime file--and when we say QuickTime
00:37file we mean multimedia files that are supported by QuickTime 7.5, and that's actually a pretty
00:42broad range--or files of any type, and I mentioned PDF, Excel, Word, those type of things, but
00:47really anything that you can work with on your computer, you can store inside of container fields.
00:51So if you open up the Exercise File 06_01, and if we go into Layout mode, it's
00:57the first time we've worked with Layout mode and all I am going to really do here is add
01:00the container field to the layout so that we can work with it a little bit, we'll get
01:04to more of that in the upcoming chapters. But you'll notice that all the different fields
01:08that we see here in Layout mode, some of them have text baselines and one of them doesn't.
01:12That's because this one here is actually our container fields. So what I am going to do
01:15is I am going to Shift-select these two things, and I am going to move it over into this white
01:21space and move it around with my cursor, and I am going to drag this into a large area
01:28in the middle of our screen. This is our container field that happens to be called CompanyLogo.
01:31Now, if we go back into Browse and Save our changes, you'll notice that if I click into
01:37this field and try typing, it won't let me do so. The only way to get data into a container
01:43field is first by selecting it so it's focused, and I've just selected the field, and we see
01:47that it's got the dark edge around it, unlike the edges here, if I click PhoneNumber, now
01:53that gets the dark edges around it and everything else has the dotted lines. But if I go under
01:57the Insert menu while I've got the container field selected, you see that I've got some
02:01options for inserting some values. You see here that we've got Picture, QuickTime, Sound, and File.
02:07However, we do have options for Audio/Video and PDF, but they're currently
02:12grayed out, and I'll get to why that is in a second. But first, let's look at how files
02:16can be stored using the options that are available to us now. So let's start by adding a picture,
02:20and I am going to pick Picture and then from our exercise files I am going to choose a
02:27file that's called author.jpg and select Insert. Now you can see the picture in the field.
02:33Notice that when you navigate back and forth from record to record that the picture
02:38only appears in the record in which I embedded it just like any other data that you put in a field.
02:43If we click into the field and now hit our Delete button, you'll see that it
02:48removes the value, and that's how we can control data inside of a container field.
02:52There are actually a couple of different ways to get data into your container. For example, in
02:56FileMaker 12, drag and drop is supported. So you'll notice if I make this window a little
03:00bit smaller and reveal our Exercise Folders, I can click on the author image and drag it
03:05into the container, and it now populates that database record with this image. You can also
03:10control data in the field by right-clicking the field or Ctrl-clicking on a Mac.
03:14You see here I can cut the value if I want to get rid of it, or I can insert another value into
03:19the field if I'd like to, or I can extract the data from inside this record by hitting
03:25Export Field Contents. Of course, being able to store any type of document in a container
03:29field does no good unless you can get the documents out again when you needed them,
03:33and that's where Export Field Contents comes into play. So when this file is shared, users
03:38can export data out of a container field that they didn't necessarily put in the first place.
03:43It becomes a very nice file repository or asset repository database in that regard.
03:49So let's clear out this image and try working with some other files. You see that over here
03:53we've got a file called TextFile. I drag that into the container. Now, in the case of a
03:57text file or any non-image or non-video file, first it's storing the document in the container,
04:04like we've instructed it to, but what it's doing is it's actually just showing us a preview
04:08of the file type, in this case text and then showing us the name of the file. We of course
04:13still can do the Export Field Contents if we want to, and we can control it by deleting
04:19the value if we'd like. And we'll see when we drag a PDF into the field, what it does
04:25is it actually shows us an image representation of the first page of the PDF. We can't necessarily
04:30interact with this at least at the moment, but it does give us a little bit of a preview
04:35and of course allows us to still do the Export Field Contents. Now, you'll notice that I've
04:39been adding one field at a time to each container. If you try to add more than one field--for
04:44example, if I have an image and then if I now try to add PDF--you see what it actually
04:49does is replace the value that was in there before. So there is only one file per container
04:54field, but you can either do one of two things, create more container fields if you need more
04:58files stored for each record, or you can compress or zip our package up multiple different files
05:05into one single compressed file and then upload that into your container field. So let's clear
05:09out this file, and let me show you what it looks like if I go into Insert, and I pick
05:15QuickTime, and I am going to choose this video called Paddling Out, and I am going to hit
05:21Insert. And now you see what it does is it gives us a Play button across the bottom,
05:25this is the QuickTime engine kicking in here. If for some reason you insert something, particularly
05:29on Windows, and you get a cannot play file error in the image here, what that means is
05:34that you need to go and install QuickTime player. QuickTime player is going to be installed
05:38as part of the normal FileMaker installation, but if you've chosen to dismiss that you'll
05:42have to go and install that player onto your computer so that you can actually interact
05:46with this content. So here you'll notice that I can click on it.
05:55And we can control the video, we can watch the video, and we can see it interact, and this is something
05:59that of course can not only be shared with other users, but each record could have its
06:04own video if necessary. The same is true for audio files. The audio files can be played
06:09by QuickTime, we can control the volume, and we'll get a Play button, but what it will
06:13look like is just this strip without any of the corresponding video. You will notice though
06:18that in the Insert option we have no access to Audio/Video, even though we were able to
06:23add video in QuickTime. And no access to PDF, even though we were able to add a PDF document
06:28as a file. I am going to show you in the next video how we can configure those and what
06:32additional options that will give us. Another thing that I wanted to show you, if we delete
06:37one of these files in the container and right- click in and say Insert a File, and we'll choose
06:42text file, you'll notice over here on the bottom left-hand side that we've got a couple
06:46of options available to us. The first one I want to show you is Store only as a reference
06:49to the file. If I choose that, it still embeds the file into the container field, but what
06:56it's done is embedded only the path to where the original file can be found. So right now
07:01the original file can be found on my Desktop, in the exercise files folder, in a subfolder
07:07called 06_01. But the problem is if I move that file and other users want to try to access
07:14it, now I get this error that says this file cannot be found. And the reason is because
07:19FileMaker is simply storing the path, and it's not storing the file itself.
07:23Now, when I go back and put the file back where the file can be found, we can see it.
07:27So it's a great tool to be able to not have to embed images, like, for example, if we had a very
07:34large video let's say, it's about a gigabyte in size, I could choose to store a reference,
07:38but that path must be maintained at all times. In upcoming videos I am going to show you
07:42how you can set your container fields up so that none of that matters. But keep in mind
07:47in the meantime when you see those options in the bottom-hand left corner, this is what
07:50they're referring to. FileMaker container fields are very special types of fields that
07:54allow you to store media files and files within your database record. FileMaker 12 has also
07:59provided many different options for managing these stored files.
Collapse this transcript
Working with container inspector options in Layout mode
00:00FileMaker Pro allows users to store files within container fields inside of database records.
00:05But in FileMaker 12 some new options have been added for managing those files.
00:10For example, now you have the ability to specify for each instance of a field on a layout whether
00:15a container field is formatted to optimize for static content, for example just images,
00:20or for interactive content, for example, movies, audio files, and even PDFs.
00:26By default, a container field like the one we see here in this layout is optimized for images.
00:31And you can tell that because when you click on the Insert menu or right-click and see the
00:36Insert menu, you only have options for Picture, QuickTime, Sound and File. Those are the options
00:40available to you when a field is optimized for images. When it's optimized for interactive
00:46content, you'll see other options available. So how do we manage these things?
00:51Well, first you need to go into Layout mode. Although we haven't covered Layout mode yet, there's
00:56just a couple of different tools I want to show you, and the rest we'll talk about in
00:59the upcoming few chapters. But if you go into Layout mode and you say View > Inspector or
01:05Ctrl+I or Command+I, you see the Inspector palette will appear on screen. And when I
01:11select this object, the container object, and select the Data tab, you'll see at the
01:17bottom tab here--and I'll shrink these up so that we can actually see the Data tab--
01:21you see that we've got some options that are specific actually to just the container.
01:25You won't see these with other fields. For example, if I select the AddressZip, you see that the
01:30data formatting is grayed out. But back here with the CompanyLogo, which is our container
01:37field in the Customers Table, you see that we have some options here on the top, first
01:41of all, the Format. These are features that you might recognize if you've worked with
01:44previous versions of FileMaker. What this does is allow you to pick whether or not you
01:48want to crop the image to frame. And why don't we take a look at what that looks like. Save
01:53those changes, and I'm going to right-click, and Insert a picture, and I'll pick author.
02:02So here the image actually extends just a tad bit outside of these lines. I'll go here
02:08and make it a little bit smaller so you can see how that works. So you see it's cropping
02:14the sides off, which is of course what we instructed it to do. Otherwise, we can say
02:19reduce the image to fit and maintain original proportions. Let's look at what it looks like
02:24when it doesn't maintain original proportions. Hit Save and you see that isn't a really desired
02:29effect, but depending on what kind of assets you are managing inside there, that might
02:33just work for you. So we'll say enlarge image to fit as well, but really the best setting,
02:38the most dynamic one is reduce or enlarge image to fit. And let's just take a look at
02:43what that looks like. When we maintain proportions, basically it has reduced it to fit the width
02:48of this without distorting the image itself. Of course you want to keep in mind the size
02:54of your container field on the layout, depending on what kind of files you might be storing in it.
02:59Images, you might want to go with like a 4x3 type aspect ratio, similar to what I've got here.
03:03You can also control Alignment, Left, Right, Middle, Top, Bottom, Center,
03:09for how the image appears inside a container. Those are all options that are available in
03:13previous versions, but now in FileMaker 12 you'll see these two options here, Optimize
03:18for Images, which is the default setting for any new container field, or Optimize for Interactive content.
03:24If we select Interactive content, and let's just choose Start playback automatically
03:30and go into Browse mode. First thing we'll notice--let's say we go in here, and we say
03:34Insert--now we've got different options available to us, Picture, Audio/Video, PDF and File,
03:40now QuickTime and Sound are not available to us. Of course we could use Audio/Video
03:44as the option to insert, so let's choose a Video, insert it into the image and what you're
03:51going to see...is that we get a different kind of a playback now this time.
03:57You noticed before when it was just inserting the QuickTime that we got the
04:01QuickTime player, but now we are getting a web player view, and what's actually happening
04:06here is that we started playback automatically, which was one of the options. If this file
04:11is being hosted on a server, then when we choose Interactive, this will allow the media
04:16to be streamed. However, it must be stored remotely on a server, and there's an option
04:20just in case you can't get this to work, you should pay attention to an option on the server
04:24side that's called SSL or Secure Socket layers, if for whatever reason you can't get it to
04:28stream, you need to turn Secure Socket layers off. But any hosted file with Automatic playback,
04:34and Interactive option turned on in the container will stream this content, which is great.
04:39That means that we can have up to a 1 GB file stored inside of a container, and yet it will
04:44still playback instantly, it won't require that you download the entire 1 GB to the record.
04:50This is also great when you've got users that are connecting to your database over the network
04:54or wide area networks, or even through FileMaker Go on the iPad or iPhone, you'll still be
04:59able to interact with very large data files, but you won't have to wait for those large
05:04data files to download. Keep in mind that if you turn Interactive content off, the limitation
05:09of 1 GB actually grows to 4 GB--just something to keep in mind. One thing you'll notice is
05:15first if we delete this video--if you recall, earlier in this movie we inserted a PDF as a file,
05:22and we saw the icon and file name, and we actually got an image that appeared in the
05:26container field, have the first page of a PDF, if we chose picture as the option.
05:31So now we are actually going to choose PDF, which is now available to us because we chose the
05:35Allow interactive content. And when we choose PDF and actually insert a PDF, we'll see now
05:42that we get a fully interactive page document, which goes into whatever reader or PDF reader
05:51is installed on our web browser actually. So I happen to be using a Mac now, so this
05:56Mac has Adobe Reader installed. If you look at a PDF in a web browser it will defer to
06:01the same Adobe Reader user interface. And the same is true for an Allow interactive
06:06content container field. So you get a little bit of secret as to what's going on behind the scenes,
06:11it's actually going in and tapping into some of the same tools that your web browser is using.
06:16Some other Mac users might see a default preview view, which is similar to Adobe, but
06:22in either case, if you don't see either of these, then that means that you don't have
06:25one of the PDF viewing applications installed, either on your computer or in your web browser.
06:31For those of you that are working with Windows, if you don't see a PDF option in your Insert
06:35at all after you've selected Allow interactive content that means you have to go install
06:40one of these PDF readers. So you can go to your Internet Explorer and install the Adobe
06:44Acrobat Reader plug-in. So, the first thing you'll notice is now instead of just showing
06:48the one page, I can actually scroll through all the different pages on the layout.
06:53And in Layout mode, if I wanted to make this even larger--let's say like this--then it allows
07:02my user more area on the layout to be able to interact with the document. So if you want
07:07to have a special layout that's created that is the full size of a document that way users
07:12can completely interact with PDF files. And you have all the other tools that are available
07:16to you too, to be able to bookmark, look at thumbnails, for example, and attach different
07:22things to the file and search through the files, it really becomes the best way to be
07:28able to store and interact with PDF documents. And the controls will also allow you to zoom
07:33in and out. You'll see here that when you right-click, you get all sorts of different
07:37options that are consistent with the plug- in itself. Allow interactive content becomes
07:42the preferred setting when you are going to store PDF files in a database records container
07:46field, because it actually allows your users to fully interact with the PDF without opening
07:50it in other applications. Of course you might want to make the container field much larger
07:54to allow them to more easily read the document. Interactive content also supports audio and
07:59video as well, but in order to remove this PDF, we have to go under Edit and then Clear,
08:06unlike the Delete option that we had before. You'll notice now when I go in and insert
08:11the Audio/Video, much like we had done moments ago, I get the same playback as we had earlier.
08:18However, this setting requires slightly more processing power than just the default Optimize
08:23for images only. You might want to consider a few instances when it may be better to leave
08:27the Optimize for images setting in place. For example, on list layouts, where it's unlikely
08:33that a user will scroll through a PDF or even play a video, you might want to just see the
08:36little thumbnail view of it. You can optimize performance by using image optimize container
08:40fields there. When we talk about this concept of portals where you're looking at--essentially
08:45it's just a list of related data, the same thing applies in that regard as well.
08:50In any instance where you wish to limit the types of files that users can insert to just Picture,
08:55QuickTime, Sound, or another type of file, you would then want to use Optimize for image
08:59content only. And don't forget that when you turn on Interactive, and you're actually hosting
09:04this database on FileMaker server, this allows the media to be streamed, makes it a lot easier
09:09for those who are accessing it remotely to be able to interact with the content.
09:12So beyond actual interactive content, you'll notice when you clear this out and go Insert and
09:19then File, and you select something like a document, like a text file, you notice that
09:25you can still store the text document in there, but you don't get any interactivity.
09:29And this has to do with the type of file that's been stored in here more so than the settings that
09:33we selected. So you can see that you can choose to either have your container field behave
09:37like a field in FileMaker, or it can use web browser tools so that it will allow additional
09:42interactivity based on your content being stored, for example, like in the PDFs or the video.
09:48It's best to evaluate the type of file that will be stored in the container field
09:50and then pick the proper setting when you are in Layout mode.
Collapse this transcript
Applying field options and using remote container storage
00:00Container fields add a lot of interesting functionality to your databases. But there
00:04are a couple of things that you need to be aware of before you start using them or really
00:07before you start inserting files into them. Here we have a Container field called CompanyLogo,
00:13and it's defined inside of a table called Customers in a file called Untitled_06_03.
00:18One thing I want to show you is that if you notice here over on the right-hand side, here
00:22is the folder where this file resides, and currently the file is 393K. What I would like
00:28to do is insert in a picture, and you will see the picture in the same folder is called author.
00:34But that this file is 33 MB in size, so I am going to insert that into the container field.
00:40Then you will see that since it's such a large file, takes a moment to display and
00:45also that's going to have some impact on the performance of the file. As we go from record
00:49to record, you'll see that there's a quick second there that it takes to actually load
00:53this image, and that can be a real big problem if you've got a lot of records with a lot
00:58of large files in them. As a matter of fact, if we go and close this file, the file size
01:03will recalculate, and you will see here now my file has increased not just the original
01:08393K, plus the 33 MB, but it's grown larger than that, because it has got things like
01:14indexing and cache size and memory that it's accounting for. So this can be really inefficient
01:19when it comes to embedding files into your FileMaker Database. And even opening them
01:25up or accessing them remotely as you can see causes a delay. This can become almost catastrophic
01:30if you're accessing it via things like FileMaker Go using a 3G or 4G LT connection to connect
01:37your FileMaker Server. So these are things that you want to avoid. In older versions
01:41of FileMaker, the option that you had was to delete the image like I just have done
01:47there, and I can say Insert Picture, and you will notice that there is an option down here
01:51Store only a reference to the file. I select that image, I hit Insert, and now you'll notice
01:58when I close the file, it's back to 393K. So it's still showing the image in the record,
02:05but it doesn't have all the overhead of actually embedding that image in the record, you see
02:09it redraws much quicker. But as I talked about in the previous movie that has all sorts of
02:13issues associated with it, because if I remove this file, if I change the name of the file
02:18or if other users who are accessing the database don't have access to that exact path to where
02:22that file is, then I can end up showing what would be a broken image. As you'll see here
02:27when I move the image to the Desktop and navigate back. So that's a pretty common issue that
02:34was happening inside a container fields. So in FileMaker 12, we have got some new tools
02:40and settings that allow us to manage this. And those can be found actually under the
02:44File > Manage > Database option and like we talked about in previous movies, any field
02:52that you have defined inside one of the tables in your database has field options available to it.
02:56When we select the CompanyLogo field and hit the field Options there, we will notice
03:01that under the Validation tab, we see that there's one other difference here between
03:06a container fields and the other type of field. Any non-container field will have the option
03:10here that says Maximum number of characters. When it's container field though, we can check
03:15this and we can put in, for example, a value which represents kilobytes or K, so we will
03:20say a 1000K--otherwise 1 MB--is the limit of the file size that we are trying to insert
03:25into this container. So let's say Insert > Picture, and we will uncheck the Store only as a reference.
03:31And I'll choose at 33 MB file, and you will see that we get an error that's telling our
03:36users that there is only a maximum file size of a 1000K and do you want to allow this invalid
03:41entry, and we will say No. So there's a way to limit the size of the files that can be
03:45entered into the container field. But what we can do is use a new setting that's also
03:50under Manage > Database, and if we go into Options let's turn this off for right now,
03:57and go over to the Storage tab. Another thing that's only available in Container fields
04:01is under the Storage you will see this section here for Container. And we have got the ability
04:06here to Store the data in the container externally. This is a huge new improvement in FileMaker 12
04:12and all versions after that. What this allows you to do is check this box and by
04:17checking the box FileMaker will do three things. When I close this dialog, FileMaker will create
04:22a subfolder in the same location as our database, and we see over here, here's the location
04:27of the database, so it's going to create subfolder here. And then it will transfer the embedded
04:32file, which is the author image it'll transfer that file that's currently stored inside the
04:36container field to that folder. And then it will save the reference to that file within
04:41the database record. So really what it's doing is it's going to create in a new location
04:44for the embedded file, and it's going to save a very low impact path back in the container
04:52field that says where it can find this. So it's basically taking sort of the best of
04:56both worlds, it's saying, I want to embed it so that everybody can access it, and they
05:00don't need to have a certain path in there, but at the same time it's also taking what's
05:04nice about storing as a reference, because it's really just storing the path, but it's
05:09also managing where this will go. You'll see here that you have a couple of different options,
05:14notice also that it always starts with the database location, and so what it's going
05:17to do is create a directory structure that looks like this. Files and then Untitled_06_03/,
05:25now after that point we have some options here, we can choose the default, which is
05:29called Secure storage, and if we go and hit Secure storage and hit OK, we see this message
05:35pop-up, basically what this is telling us is that it is identified that we have changed
05:41the settings on a container field, and that container field that we are changing settings
05:45on, happens to have a record that has a file inside of the container. So it's asking us
05:51now if we would like to transfer the files. Now I can choose to close this and not transfer,
05:56but it will ask me to transfer this next time I go in and make any modifications to that field.
06:01But I am going to say Yes, I am going to go ahead and transfer this and watch what
06:05happens. Not only does it give us the summary where it says these were completed, but hit
06:09OK, but we see that a Files folder was created in the same location as the database.
06:15And now keep in mind this is important, this database that I'm working on here in this movie is
06:20not hosted on a server. This feature that I'm talking to you about really is best used
06:25when you have a file that's hosted on FileMaker server, but as you see, that's not necessarily
06:30needed in order to see the functionality. But let's look at what this path looks like.
06:34So inside the Files directory we have a folder that's called Untitled_06_03 which is the
06:39name of the database. And the reason for that is because I could have let's say 10 different
06:43databases here, all in the same directory, and so that means that in the Files directory,
06:49FileMaker then has the option to create a subdirectory for each different file name,
06:53which is great! So beneath that we don't have any files, so let's go back to the database,
06:58and now Insert a Picture and choose author and hit Insert. And now we see what's happened
07:04is it's created a subdirectory called Secure, which was the default setting. And then below
07:08it is an intentionally cryptic path that eventually will lead to the file. Now this is what the
07:13meaning of Secure actually is. It will take the file, remove it from the embedded container.
07:19So you see right there what I did is I uploaded a file to the container, and it's just simply
07:24passed through the container to this location and then the database record stores what location
07:29it is internally, not visible to the user, but stores that internally so that it knows
07:33how to display the image. That's the Secure option, but there's another option, if we
07:38go back into Manage > Database, you see here it says External (Secure) go into Options,
07:42and we are going choose Open Storage instead. If you are not concerned about masking the
07:47path of the original file, then you can choose Open Storage, and it's a lot easier to read.
07:52We will hit OK here, and now it says do you want to transfer the files, and we're going
07:57to Transfer the files. But now you see me have a Status Completed, Transferred 1.
08:03So now you see what we have here is another directory, so instead, this time it's the Files folder,
08:09a directory with the name of the database and then it creates a directory for every
08:13table in the database, so this happens to be the customer table, and below that is a
08:18another subdirectory that represents the name of the field. So this of course is because
08:23the Untitled_06_03 file could have multiple tables, each with their own container fields,
08:30so this directory structure or path here really allows FileMaker to have an unlimited amount
08:35of tables, unlimited amount of container fields within each table and then certainly an unlimited
08:40amount of files within those same locations. So it's really up to you depending on how
08:44secure you want this path to be, and you can choose whichever option it is that you care
08:49to choose, but the big upside here is that I can still use FileMaker to upload or insert
08:56very large sized files, but if I have these remote storage options or external storage
09:02options available, then it's going to just use FileMakers to pass-through, thus not impacting
09:08the overall size of my file, still allowing me to manage and view very large file sets,
09:13but doing so in this remote storage directory structure. And even though we're using remote
09:18storage, we still have some of the same things available to us as we have only embedded the file.
09:22For example, if I right-click here, I can still Export Field Contents, but now
09:26what FileMaker is doing is it's going in finding the location of the file and allowing the
09:31user to create a copy of it even if it's stored remotely. This also allows us to be able to
09:36quickly move through records and redraw files, even though the file size is very large.
09:40Because what FileMaker is actually doing showing a thumbnail. The same is true for other types
09:45of media, we remove the image, and we go under Insert, this time we will choose File, and
09:52we will select a file, insert that into the container, and now when we go and look into
10:01our subdirectory, we see that it still has the CompanyLogo field. But now instead of
10:05the image, it has inserted the PDF. So FileMaker does some housekeeping on the back end as well.
10:11So we need to delete images from containers, it deletes them from that subdirectory, as
10:17we'll see here. And when you replace with new ones, it goes and adds those as well.
10:21Now if for some reason you have two records that have the exact same image or file stored
10:27in them, FileMaker will only create one copy. So it has the intelligence to be able to identify
10:31whether or not you already have a file with the exact same makeup, somewhere stored within
10:36your subdirectory structure. So that way it can really help mitigate the size of your
10:40backup files over on the remote server. So couple of important things to note here, first,
10:44I would like to press upon you that you really should be using this option when you're hosting
10:49the database on FileMaker Server. That way then you don't have to worry about the files
10:55being stored in the same location, they can be secured on another location somewhere,
11:00and it's a lot easier for users to be able to download the data when it's being hosted
11:04over on a server. Also you get thumbnails that are created and all sorts of other benefits.
11:10Another thing to mention is that this is an optional approach for managing data inside
11:14of containers, if any of your users are sharing the database using FileMaker Go, FileMaker
11:19Go of course, allows you to access your databases over the iPad or iPhone using FileMaker Go app.
11:26So this means that you can see files and even export the contents of those files
11:30onto the devices without actually having the impact of pushing a lot of that data over
11:35WiFi of even worse, 3G or 4G connections. So really this is just optimal if you are
11:40going to be sharing any kind of database files onto FileMaker Go through those connections,
11:46you definitely want to go with the remote container. Now let's say you want to make
11:49a copy of this file, we will Insert a Picture, there we go, and we see that it's now created
11:58this directory structure. Now let's say we want to copy the file, well, now we have this
12:01challenge because the file and the images that are stored with in the file are now separate.
12:05Well, there is a new option in FileMaker 12 that allows you to sort of recompile all the
12:10different images into the container fields to make it more portable. If I go under File
12:16to Save a Copy As, you'll see that in the dropdown I have got this one option here
12:20called self-contained copy, which makes a single file. We will save this to our Desktop,
12:27and now we hit Save. And now let's go back to the Desktop, and we see the file here,
12:33and if we check out the size of the file we see that the file is 778K, but when we open
12:38up the file, here's the copy. We see that we have got the logo embedded, and we will
12:45notice that under Manage Database that the Remote Container options have been automatically
12:50turned off. So if you want to make files embedded back into the container fields so that you
12:56can move data and all the corresponding files, then you will just make sure that you are
13:00choosing the option for File > Save a Copy As, and the new option in FileMaker 12 called
13:07self-contained copy, just one single file. So you can see how this new remote storage
13:12option will allow you to use container fields to store files of any size, without having
13:17any negative impact on the size or performance of your database. And you can do this whether
13:21they are accessed locally or more optimally posted through FileMaker Server.
Collapse this transcript
7. Working with Records
Creating and duplicating records
00:00So far in this title, we've discussed how to work with FileMaker to set up tables and
00:04fields inside of a FileMaker database so that you can store data. Now we are going to turn
00:09the discussion to actually working with the data within those tables. In this chapter,
00:13we're going to be discussing working with records, starting first with creating and
00:17duplicating records. So, if you pull up the Exercise File Untitled 07_01, you'll notice
00:22that it has two records of data in it. We can see that in the upper left-hand corner
00:27because we see the number 2. I can use the Book Icon to navigate between the first record,
00:33and the second record created in the database. A record in the database is an instance of
00:37whatever it is that we're storing inside the database table. So for example, since we are
00:42in the Customer Table, this number 2 indicates that we've got two different customers.
00:47If you're familiar with spreadsheets, a record is the same thing as a row inside of a spreadsheet.
00:51There are different ways that we can add records to the database, and the most common are going
00:56to be under the Records menu where you'll see the New Record option. This also corresponds
01:01with the quick key on Mac which is Command+N and on Windows, it's Ctrl+N, and it also corresponds
01:07with this button that you see here in the Status toolbar. You should also be aware if
01:12you happen to be looking at your Layout in Table View--which can be accessed by hitting
01:18this icon or even changing under the View menu to view as a Table--you'll also notice
01:22that you have a Plus button here, and by simply clicking the Plus button, it will create a
01:26new record. It gives us the same exact results as if we had gone under the Records menu or
01:31used the New Record button. We've created the new record, and you'll notice for a moment
01:35everything on the screen goes blank except for these fields that we had set up with Field
01:40Options for Auto Entry. Now, it's important that your users understand that when they
01:44hit a New Record button, that all the other fields will go blank, they should understand
01:48that they haven't actually deleted anything, but what they've done is created an area to
01:52enter in new data. Of course, the pkCustomerID, AddressState, DateCreated, RecordCreatedBy,
01:58and DateModified all have values that were set up in the Auto Enter options of those fields.
02:04Notice that when you click inside any one of these fields that a dotted highlight
02:09appears for all the different fields on the record, the one that's been clicked into actually
02:14has a solid highlight. This helps you visually understand the focus of your cursor, and also
02:20what field you're interacting with. So, if I start typing some text, I know exactly which
02:25field that will be typed into. This makes it easier to guide you as you're adding new
02:29information into the fields, and in this new record, you see here we've got the third record
02:34we can go through and add data to all the fields. And as long as they don't have a validation
02:39of not empty, then we can skip some if we want to, but we're welcome to of course add
02:43data into every field that we see on screen. Another thing that's important to understand
02:47for both you and the users of your database is that by just typing into a field like I'm
02:52doing here, that doesn't automatically save the data that I've just entered to the database.
02:59You'll notice that there's no File > Save option like you see in most other applications.
03:04But FileMaker does save data to the back end database, and it does so through what's called
03:10committing a record. There are several different actions that allow you to commit a record
03:15inside of a FileMaker database. Let's take a look at what those are. Any one of these
03:19actions will automatically save the data that you've entered into the record, so you don't
03:23have to actually worry about remembering to save data in the record because a lot of these
03:27things are happening pretty naturally throughout your interaction with the database.
03:31So, first of all, clicking outside any field area will commit or save the data that you've entered
03:36into a field. Pressing the Enter key, switching modes from let's say Browse mode to Find mode,
03:42or even switching Layouts let's say from Customer Details to Customer List, if you create a
03:46new record or even if you close the file. So really, you can't get into a scenario where
03:51you've added data into a field, and it doesn't ultimately get saved, but you just have to
03:54know, for reasons that we'll explore later on in this title that there might be a split
03:58second of time in between when you add the data, and when it actually gets saved to the
04:02database. So, in the case of the data that I entered into CompanyName, all I have to
04:07do is click outside the field, and now technically, this data has been saved or committed to the
04:12back end database table. Another way to add records to the database is through what's
04:16called duplicating a record. So, if you have a record that already exists, and let's say
04:21it has a lot of data in the fields that might be similar to the one that you wish to create,
04:25a lot of times it's easier to just duplicate the record. So first, what you want to do
04:29is find the record that you wish to duplicate, and you can go either under Records and hit
04:35Duplicate, or select Command or Ctrl+D or you can even go ahead and add another one
04:40of these buttons through customizing your toolbar onto your Status toolbar. But in this
04:45case, we're going to say Duplicate Record. We see now we have four records, and if we
04:52do a test here and duplicate this again, for example, you notice that both the last one
04:57I created and the previous one all have the same information in there. So I make it easier
05:02to do some data entry. Now, I can just go in and make whatever small changes there might
05:06be in the new duplicated record, and it saves my users a lot of typing. This has been a
05:11brief overview of how you create records in your database or how you add data to be stored
05:15inside the database itself. This of course is a pretty important component because if
05:20you have a database that doesn't have any data in it, it's not quite as useful as one
05:24that contains a great deal of data.
Collapse this transcript
Editing and locking records
00:00Once you've added records to your FileMaker database or if you already have records in
00:04the database, then you have the ability to edit the data that's stored in those fields.
00:09You can control whether or not users or even certain users can edit values inside your
00:12database through the Manage > Security option. This is we can go and set up different accounts
00:19and then assign different privilege sets to those accounts. One of the privileges that
00:22you can either add or remove is the ability to edit any records inside specific tables
00:28or inside certain fields. Also, in Layout mode, you'll notice that when you select a
00:32field, and you look at the Inspector, under the Behavior tab found under the Data tab,
00:39by default, you the ability to enter a field in either Browse mode or Find mode.
00:43But you can as a developer turn off the ability for users to click inside that field. This can
00:49be a good idea for things like your Primary Keys. So you'll notice when I go in to browse,
00:55save my changes. Now I can't click inside that field it also shows that it's not an
00:59active field and the rest of the fields are selected as well. But assuming that you've
01:03allowed users to make edits to the data that's stored in your database, then all they'll
01:07need to do is click into one of the fields, and you'll see that it puts the border around
01:12the field, of course, and that means it's active for editing. You also see that the
01:15cursor is blinking at the location where you can start the edit, here I am selecting the
01:19field contents, and I am hitting the Delete button, and you see that data has been removed.
01:24Once I've made the change, now I can click outside the fields, this is one, of course,
01:28many actions that we now commit that change or save the change to the back end database.
01:33So you can instruct your users that they don't have to hit File Save or anything like that
01:37to save the data that they have just changed. You'll notice when you inside a text field,
01:40like for Instance Notes, I can add some text and before I commit, you will see that I have
01:46an Undo Typing option under the Edit menu. I can say Undo Typing, and then it will then
01:52take me back to where I was before. But if I go in and add or edit some text and then commit
01:57the record, you'll notice that the Undo Typing option is no longer available. So Undo is
02:02only available before committing the data to the database. So as long as you've given
02:06users access to these fields and allow them to be of the make edits based on the account
02:10that they logged into database with, you can make edits. There is actually one other circumstance
02:15that I would like bring to your attention where users may not be able to edit a field,
02:19and that's if a record is locked by another user. Let me show you an example of this,
02:24you see here that I'm on Record number 4, and I'm currently making a change let's say, to Notes.
02:30So now actively editing, and let's say another user in all sort of emulate the
02:36experience of another user by opening up a new window. FileMaker allows you to create
02:40new windows and in this case, the new window takes me to the same layout, same record,
02:45and it'll treat me as if I'm a different user. So let's say I go into this field, and now
02:50I'm trying to make and edit as well. Well, first of all, I want you to note that the
02:53change that user 1 has made has not yet reflected because they have not committed the Record.
02:58So user 2 goes in and they try to change it, and now they get a message says Record cannot
03:02be modified in this window since it's already been modified in a different window. Now when
03:06your files actually being shared on a network, you're going to get more information in this
03:10message, and it's going to tell you that a user--and it will give you the username that
03:14they use to login to the database--is actively editing this record. And this is called Record
03:19Locking, and it prevents confusion while updating records in your FileMaker database.
03:23It's not a bug or anything to work around in FileMaker. It's actually there by design because this
03:27way if two users are trying to edit the same record, if it didn't have Record Locking then
03:32really only one of them would be aware of the changes that have been saved.
03:35The only thing that gets saved is whoever changed it last, but at that same time, both users think
03:40that they just went and updated the database. So this is definitely something you want to
03:44take into consideration when training your users on updating records in your FileMaker
03:47database while it's being hosted. Not only can you add records to a FileMaker database,
03:52but FileMaker also allows you easy ways to make these edits to existing data.
03:56It's just important that you understand that when changes are saved to the database, you're done so
04:00through committing a record and also that FileMaker prevents multiple users from editing
04:04the same record at once using its feature called Record Locking.
Collapse this transcript
Deleting records and backing up files
00:00A FileMaker database's main purpose is to be able to store data, and you can add data,
00:06duplicate data, edit existing data and just like you can do those functions, deleting
00:10records out of your FileMaker database is also pretty easy to do. Actually, it may be
00:14a little bit too easy. I am going to show you how to delete data out of your FileMaker
00:18database and then talk to about some ways that you might want to protect your database
00:21against accidental deletions. First, just like creating and duplicating records, you
00:26can delete a record by either going under the Records menu and selecting Delete Record
00:30or using the corresponding quick key which is either Command+E or Ctrl+E. You can also
00:35use the Delete Record button that you see on screen. The only thing that's different
00:39about deleting a record as opposed to adding a new record, you'll see when I hit Delete
00:45Record, I at least get a message that pops up that says would you like to permanently
00:48delete this entire record, thus reminding me that there's no way to retrieve the record
00:52once it's been deleted and also not making the default button the delete button, but
00:58instead, by default, allowing me to dismiss this and therefore, not deleting the record.
01:02So you see here that I've got four records in the database. When I go to hit Delete Record
01:06and actually tell it to delete, you notice now that I've got three. So it's purged that
01:10one record that I had active, and it deletes it from the database. However, if I didn't
01:16intend to delete the database, you'll notice that I can't undo the deletion of that record.
01:21Just like when you create a record or edit a record in a FileMaker database, deleting
01:25a record is final. You should also be aware-- and so should your users--under the Records
01:30menu is an option called Delete All Records, and you'll notice, when selected a message
01:35comes up that says Permanently delete ALL 3 records, and where's it getting that three
01:39records from? Well, you'll notice up here that there're three records in the table,
01:43and I happen to have all records showing. So whatever records are in what's called the
01:47Found Set--we'll talk more about this when we talk about finding records--but whatever
01:51records are in the Found Set or if all records are showing, those are the ones that will
01:55be deleted if the users go ahead and select the Delete All button. This however, does
02:00not have a corresponding quick key, which is good. If users happen to select Delete All
02:05of the Delete Record, which is a common enough mistake if you are using the menu, they'll
02:09know that it's the wrong one because they'll see the actual number of records in the Found
02:13Set quoted here. So make sure that users understand that that could be a real problem.
02:17And since the database is just a storage container, you might imagine the bad repercussions when
02:22it's completely emptied out. Then it's just a shell without any of the data. Since we
02:27are discussing what happens when somebody accidentally delete your database, it's probably
02:31a good time to talk you but backing up your data. There's a couple if ways to back up
02:34your database. First, if you're hosting your database on FileMaker server, which you should
02:39be doing, then you should consult the FileMaker Server Help on how to set up a backup schedule.
02:44It's very easy to do, you just click a couple of buttons and in that way, if someone happens
02:48to delete all your data or if you have file corruption and can't access your data, you
02:52can always revert to a recent backup. If you do not host your database on server, I strongly
02:57recommend that you create copies of your database and store them outside wherever you're having
03:01the database hosted, and you can do so by going under the File menu, going to Save a Copy As.
03:06What I recommend doing is saving as a compacted file and saving to a different
03:11location than this computer. So if you have like an iDisk or a remote disk option, you
03:16can save to those remote locations. You can also save to thumb drives or any kind of removable
03:20drives. This way if you do experience catastrophic data loss or corruption, then you can always
03:26revert to your backup. So it's really important since the data is usually the lifeblood of
03:30any organization, and you must have some sort of backup plan in place. It's really a very
03:35responsible way to approach this. When you are working with databases, everyone is bound
03:39to make some mistakes so FileMaker allows you the ability to intentionally delete records
03:43so that you can correct your mistakes, and therefore maintain the integrity of your database.
Collapse this transcript
8. Importing and Exporting
Importing data
00:00So far in the exercises throughout this title, we have been working with creating record
00:04data in our FileMaker Databases, but doing so one record at a time. The true value of
00:09a database is to store and manage a lot of data, and it becomes more and more valuable
00:13with the larger amount of data that you have. The best way to get large amounts of data
00:18into your database is to do something that's called Importing. Earlier in the title we
00:22already discussed creating a database from a spreadsheet, and even importing the spreadsheet
00:26into your database as a new table. But in this movie we are going to discuss just importing
00:30data into an existing table in your database. This will allow us work with very large datasets
00:35in some of the upcoming movies. Let's first look at Products. This one is interesting,
00:39because in a previous movie we had imported the Products table as a new table. As a result
00:44this not only created a table for us, but because we imported as a new table, it also
00:48had brought in all the fields from our source. Each field had been defined as if they were
00:53in our original table. However, we see now that we have a table with no records created
00:58in it, and we can tell that because in the upper left-hand corner, we see a zero here
01:02when we are on a Layout that's based on the Products table. So in order to bring in the
01:07data here, we are going to want to use the Import function. FileMaker Pro allows you
01:11to exchange information with other applications by exporting data from other file formats
01:16and then importing data into FileMaker Pro. So we are going to assume that we already
01:20have exported data from another data source, most data applications will allow you to create
01:25data exports, so this is actually very common function. Inside the Exercise folder we have
01:30a file called Products.csv, we can assume that that was created from some other non-FileMaker
01:36source and exported out as a .csv file. So what we want to do in order to be able to
01:41import data into FileMaker is first go to a layout that's based on the table that we
01:45want to populate with this new data. So in this case, we are going to import in product
01:49data, so we go to the Layout called Products where we see we have no records.
01:54Once we've established that context in that layout, we go to File and then Import and choose File.
02:00You will notice that under the Show option, you can see all the different file formats
02:05that are compatible with FileMaker import. The most common of course are .csv, .txt or
02:11one of the two Excel options. But you can see that you have some other options available
02:15to you as well. If FileMaker Pro does not support the format of a particular application
02:20that you are trying to get data out of, you may still be able to convert the data that
02:23comes out of that application into a supported format by opening it up in something else.
02:29For example, a FileMaker Pro does not import Microsoft access files directly, however,
02:35you can export data from Microsoft Access into a format that FileMaker Pro does support,
02:40like a txt file or csv file, then you can import that file into FileMaker.
02:45So although I can't import directly from Access, I can dump data out of Access and then FileMaker
02:50can import that data, so you really achieve the same goal. So the first step is to choose
02:54the source of the import, so here we are going to say All Available. I am going to go into
02:59the exercise files in 08_01, and I am going to choose Products.csv. And once I hit Open,
03:06we are going to be prompted with the Import Field Mapping window. If we open up this window
03:12a little bit, what we are actually looking at here is on the left-hand side this is all
03:16the columns that we see or the fields in the file where we are importing the data, the
03:22Products.csv file. And over on the right-hand side is the Products table in FileMaker.
03:27The actual table has nothing to do with which fields are on the Layout that we see in the background.
03:30The purpose of selecting layout was just so that we could provide context
03:35for which table it is that we want to import data into. So what we have to do here is tell
03:41FileMaker to take the data from one of the fields on the left, and as you see indicated
03:45by the arrow, put it into one of the fields on the right. So we'd see we need to move
03:50these things around and kind of line them up a little bit. You will see that I can move
03:53fields only on the right-hand side, so on the FileMaker tableside, up or down by using
03:58these handles. So here if I click down on Product Name and move it up, I see that I've
04:02lined up Product Name, now I can lineup Category and Cost, Date created. So what we want make
04:10sure that we are doing was make sure that all the data that we see on the left-hand
04:14side had the proper home over on the new database. So any ones that you don't want to import
04:20over, you can just check these arrows here and they will not be part of the import so
04:24that's really what the arrows indicate is do you want to actually migrate the data over.
04:29Sometimes depending on your source file it takes a little bit extra time to go through
04:32the field mapping, but once you do it once, then the next time you do it, and you point
04:36to the same source file, you are Mapping options will be restored, so it's kind of a do it
04:40once and not have to do it a bunch of times in the future. In some cases you'll notice
04:44that some of the fields are grayed out on the FileMaker side. This means that they're
04:48either a calculation field, which of course you cannot put data into a calculation field,
04:52calculation fields only display the result. And also container fields, if you're bringing
04:57it in from a non-FileMaker source, you can import container fields from FileMaker, import
05:02source into FileMaker target, but you can't import data into containers that's coming
05:07from something, for example, like a csv. One thing is let's say you have a field in your
05:12source, and you want to bring that over but you don't have a field in your current table
05:17to be able to import it into, so you can access the Manage > Database section here and then
05:23go and create the fields on the fly, hit OK. And now what I can do is I can line up the
05:29field I just created, which will usually end up on the bottom with the fields on the left-hand
05:34side of the Window coming in from the data source that I am importing into FileMaker.
05:38Once I've got everything lined up or turned on and off, and I've told FileMaker exactly
05:42what data I want and where I want it to go, then I hit the Import button. Before it actually
05:47does the import, you're presented with the Import option screen and really have one thing
05:51to choose here. You want to say whether or not you are going to Perform auto-enter options
05:56while importing. If you recall when you go and you setup new fields in FileMaker, you
06:01can setup Field options that allow data to be put into certain records each time a new
06:06record is created. You can check the box here to allow all those auto-entry instructions
06:11to be performed on every record that gets imported into the database, or you can uncheck
06:16it and leave it off. Keep in mind that if you turn it off, then you won't have things
06:21like Date Created and Date Modified updated, because unfortunately, FileMaker is going
06:25to see today's date as the date that all the records were created or modified. But it also
06:30might not allow you to update things like pkProductID serial numbers, for example.
06:35We will go ahead and turn it on just so we can see what will happen, say Import.
06:40And now what we see on screen is that FileMaker gives us an Import Summary view. Basically what
06:45it tells us is that a total number of 31 records have been imported and none of them have been skipped.
06:50The only thing that could make records skipped is that if we were in Manage Database,
06:57and let's say we have a field just here Cost, under Validation if we said, for example,
07:03that the data that's coming in has some sort of requirement and the requirement is set
07:08to Always, which means that if any of the records from the data source that we are importing
07:12in violate any of these rules, they will be skipped as part of the import.
07:16That's the difference between Always and Only during data entry. And now we've only brought in
07:2131 records, and there are some more Product records that we want to bring in, so this
07:24gives me an opportunity to show you another example of importing. We go File > Import,
07:30and this time I am going to choose All Available, so I can choose a FileMaker file called Products_Plants.
07:37I hit Open, and one of the nice things about importing in from another FileMaker file is
07:42that you'll see here under Arrange by, instead of the last order that I set up when I imported
07:46from csv, I can choose matching names. That saves us a whole heck of a lot of steps, because
07:52now it lines up all the fields on the import source with all the fields in the products
07:57table, and allows us to hit the Import button, thus importing all of the data right into our database.
08:03So now we see that we've got a total of 41 records in our database.
08:08One important thing to know about when you bring in data from an import is if you look in the
08:13upper left-hand corner here, every time you do an import, you'll see that you have a number/another
08:18number. So what this tells me is that I've got 10 records found or these 10 records are
08:23being isolated away from the entire number of records that are stored in the table, which are 41.
08:29The reason that they're isolated is if I make a mistake during import, I can just
08:33go in here and hit Delete found Records, which will delete only the 10 that were found and
08:38in that case allow me to do my import again, matching names, to Import, perform, and I
08:48can hit Show All and only then will they be mixed in with the general population.
08:51So sometimes it's nice to have sort of a moment to isolate these records from the rest of records in
08:55the table, in case you need to delete them or perform some action against them.
09:00The true advantage of a database is to store and manage lots of data. Best way to get a large amount
09:04of data into your database is to import it from another data source.
Collapse this transcript
Importing records to refresh data
00:00In the previous movie we discussed how to import data from other data sources into your
00:04FileMaker tables. You can also import data into tables repeatedly using the same data
00:09source in order to update certain fields in your target table. When I refer to target
00:13table, we are talking about the table that you are trying to import data into.
00:17In this exercise, we are going to do the same initial steps of the data import, but this time let's
00:21start with the Customers table as our target. Remember the first thing that you want to
00:25do is choose the layout that's based on the table that you want to populate with the imported data.
00:29Let's first delete these three records of sample data before we proceed, we can do
00:33so by going under Records to Delete All Records, and we see here it asks us if we want to Permanently
00:39delete ALL 3 records, and we say yes, Delete All. So now we will go under the File menu
00:43and choose Import and then File. And in our exercise files, you see there is spreadsheet
00:49here called customers.xlsx. XLSX files, or Excel current generation files, happen to be
00:55one of the supported import formats. Now we hit Open, and we can see that we have a series
01:01of field on the left and a series of field on the right. The ones on the left represent
01:05the data that's coming in from the spreadsheet and the ones in the right are the actual field
01:09names as defined in our Customers table. So if we do some lining up, all the fields in
01:14the Excel spreadsheet to the proper fields in our customers table. Now I am going to
01:19proceed to hit the Import button and FileMaker asks me if I want to Perform the auto-enter
01:24options while importing. I will go ahead and say yes, and we import, and we see that in
01:29just a matter of a second, 1524 records have been added to my database. But we will notice
01:35out of these 1524 records, that the first record that got imported was actually just
01:39the column headers or the field names. So I could easily just delete this record if
01:44I'd like, but what I am going to do instead is Delete All the Records, and Import these back in.
01:48So we are going to do the same import, point to the same file, but this time, when
01:54we do the import we are going to select this option here in the bottom left-hand corner
01:57that says don't import first record which contains field names. So we do the Import,
02:02and you see now that we get 1523 records and the first record in the list doesn't represent
02:08the fieldnames or column headers. So this is just like the import that we did in the
02:12last movie, but now let's say that the individual who gave us the spreadsheet has now made some
02:18changes to the spreadsheet. We take a look at it. We notice that they've made some changes
02:22with the first name in the Cris Ippolite record and added a middle name in this Boo Radley
02:28record and then we also see that they have added a new record that doesn't exist in the
02:32original 1523. So they were not mentioning to us that there were going to be updates,
02:38so now we have to figure out some way that we can identify all the records that have
02:41changed in the source file and only update those records because we could have a conflict
02:46here if we have been making updates in our FileMaker database and adding records in FileMaker
02:50database, and so on. So we don't have the luxury any more of just deleting all the records,
02:53what are we going to do is we are actually going to go into the File menu to import records again.
02:58This time we are going to point to the updated spreadsheet, and we are going
03:02to use the matching names update, so it syncs up all our names for us but I want to bring
03:08your attention down here in the bottom left- hand corner to the Import Action. By default in
03:13the last few imports that we have done, we have had it set to Add New Records.
03:17But this option here called Update matching records in found set, allows us to pick a field that
03:24is going to be a unique identifier. So we don't have keys involved in this particular
03:28import, and many times you don't so what you want to end up doing is finding a field that
03:33will be unique both in the spreadsheet data, and in the customer data, so one that actually
03:38fits that here is this Address Email field. If we click on the arrow in between the two
03:43Address Email fields, you will see that it changes to a double arrow and looking at our
03:47Field mapping legend down below, that indicates that we are going to match records based on this field.
03:52What it means is anytime you find a record in the spreadsheet that has the same
03:57email data as the record in FileMaker, then update any fields that may have changed, and
04:03we can go through each one of these records and turn off some of the fields that we don't
04:07want to have update if we would like, these could be ones that we've updated in the FileMaker
04:12database, and we don't want those to be touched. So really you go through and either select
04:17a double arrow for the match field or combination of match fields or you have the dash that
04:22means that you're not going be updating any data or you have the arrow which means that
04:27you're going to update the data in FileMaker with the new updated fields in the spreadsheet.
04:32So the key here though also is that we've learned from our source of the data that they
04:37may have added new records of database. So we see this option here that only appears
04:41when we choose Update matching records in found set, and it's called Add remaining data
04:45as new records. So now by configuring the import like we've done here, what it's going
04:51to do is find any records that have been updated in the spreadsheet, update those in FileMaker
04:57and then add any records that don't exist in the FileMaker database. So let's go ahead
05:00and do the Import, and we do the Import, and now we see that we have 1526 records, I hit
05:07OK and sure enough, we see that the update has been made to the first name on the
05:12Cris Ippolite record, and we see that the middle name has been added to the record here in
05:19the Contact first and then also if we do a search, we will see that this record has been
05:26added, and that of course was the record that was new inside the spreadsheet. So we see
05:31this change reflected, that change reflected, and this new record added. This process could
05:35be very useful if, for example, you have a copy of your database on your desktop computer
05:39and another copy on your laptop, you can then update the file in your office with the changes
05:44you made on the road or you can just select some of the fields to update while leaving
05:48most of the records and fields that you did not select untouched in your database.
05:53In short, this is an excellent way to do a one-way sync from one data source into your FileMaker database.
Collapse this transcript
Exporting data
00:00FileMaker Pro offers many sophisticated ways that you can connect a FileMaker database
00:05to a non-FileMaker data source. However, sometimes you might just want to share bits and pieces
00:10of your data without a direct connection to the sources. In these cases, you can use FileMaker's
00:15ability to export data out of your FileMaker database in order to be able to share it.
00:19This also works if you just want to share data with people who don't have FileMaker Pro.
00:23There's a couple ways that you can export data, for example, you can go under the File
00:27menu, and you see we have got the Export Records option here. What we can do is choose the
00:33location of whatever file it is that we want to export, and you will see under the Type
00:37dropdown, there are various different Export file formats to choose from, and you will
00:42want to check with the recipient of this data to see which file format they prefer, and
00:47if they're trying import that data into one of their non-FileMaker data sources, you might
00:51want to see what some of the compatible file formats are. For example, you can choose Tab-Separated
00:56Text or Comma-Separated Text, those are commonly referred to as TXT files or CSV files, both
01:03of these are file formats that can be imported into nearly any database solution or any solution
01:07that stores data at all. You have got DBF, Merge files, even an HTML Table which can
01:13be opened up in a browser or can be in embedded inside HTML of existing web site if you just
01:18want to share some of your data, if the data of course is static and doesn't change that
01:22often or as Raw XML which can be imported into many other applications and some web
01:28applications also, and also you see here the original Excel generation extension. xls,
01:35and then you've got the new latest generation .xlsx. That's the option we are going to choose
01:40for this experiment. So you also notice below here that after we Save this we can either
01:45open it up in its native application--which I will choose to do--or if we are going to
01:49send this to somebody anyways, I can check this and it will automatically create an email
01:53in whatever my default mail application might be and then send this file as an attachment.
01:58But for now let's just say Export, and we will save to the Desktop. Now because we have
02:04to choose Excel as the Export Option, this additional window pops up that we don't see
02:09if we've chosen other formats. This one is the Excel Options where we can name the Worksheet,
02:13Title, Subject, or Author. We will skip those for right now. Now we are presented with the
02:18Specify Field Order for Export dialog. On the left-hand side, we see all the different
02:23fields that are available in the layout that we are on, so you see we are on a layout based
02:28on the Customer Table. We can also see all of the fields in the Customer Table.
02:33So if we happen to have layout that only has four or five of the customers fields on it, we
02:36will see those in the current layout dropdown, but if we want to see all of them we can choose Current Table.
02:42This is basically a list of all the fields that we have at our disposal
02:45to export. So let's say we want to select a series of them let's say the individual
02:50who needs this data is going to use it for a mail-merge. We will hold down the Shift
02:54key and select all the different address fields and hit Move, and we see those appear in the
02:58Field export order box in the right, and we will also say CompanyName which I can double-click
03:03on, and you see we have got this little handles here that allow us to move and reorder the
03:08different fields for export. Finally, let's say we double-click on PhoneNumber and add
03:13that to the bottom of the list. So now I can hit the Export button and FileMaker is just
03:18exported the data, and its exported it in the form of a spreadsheet, and we've instructed
03:25it to automatically open up the spreadsheet, and we see that the spreadsheet has exported
03:30out all the columns that we chose with all the data in the order that we chose. Now one
03:35thing that you will have to be aware of is that the column headers that get created in
03:39your Export are actually the names of the fields. You can see the naming conventions
03:43that I used, where I didn't put any spaces in here. But keep in mind the recipient or
03:48even yourself can go and make those say whatever they like, and the other thing to notice is
03:53that the number of rows here--1524, including the column headers--and that actually matches
03:59what's called the found set in our database so one way that I can show you that this can
04:05be modified is if you don't want to share all of your data--let's say, for example, I
04:10go in and isolate all the records that have the address state of AK, and you see here
04:16now that's giving me 26 records out of the 1523. So now when I go to Export--I am going
04:25to replace the original one, I am going to keep these fields but I am going to export
04:29them all out--and now when we open it up, you see that only 26 of those records were
04:33exported. So the idea here is that you can pick and choose which data it is that you
04:36want to export by doing where are called foundsets, and then you can pick the different file formats
04:41as well. You can export as many times as you'd like in whatever way that you choose without
04:45any risk of changing or deleting the data in your original FileMaker file. Unlike importing
04:51or each time you import, you are adding more records to the database, this time you are
04:54just making copies of data that already exists in FileMaker without tampering with the original
04:59data in any way. The importing and exporting features can serve as valuable time-saving
05:04functions especially when you're working with large sets of data or have users without access to FileMaker Pro.
Collapse this transcript
9. Creating Layouts
Introducing layouts
00:00FileMaker Pro developers spend a significant amount of time working with layouts, and that's
00:05because FileMaker layouts is the primary way for presenting and organizing data in FileMaker.
00:10Layouts serve as both user interfaces and areas for design and development.
00:15In this chapter, we are going to learn how to work efficiently and effectively with layouts,
00:18which is an essential skill for any FileMaker developer. Now first, when we just start talking
00:22about layouts, you'll need to know that layouts come in various shapes and forms and can
00:26be rather simple or extremely detailed. It all depends on the needs of the particular
00:31database system, and the aesthetic sense and design skills of their creator.
00:34Generally speaking, a FileMaker system has a few types of standard layouts. One which we call a Form,
00:41which is named after been able to view as a Form View, this is seen as a detailed view,
00:48generally used for adding records or data entry or modifying data or just looking at
00:52as much data on a single record on screen as you can at time. We generally create at
00:58least one of those for each primary table, which allows of course for data entry and editing.
01:03A List View, which would use the List View option as well is actually designed
01:09in a completely different way to have a much smaller body. This is where you will pick
01:13and choose certain fields and these are generally used for doing searches, much like you see
01:18on the web, when you do a search in the search screen and then it comes back with matching
01:22records, you only see a handful of columns, and they are compared to all the overall fields
01:26that are available. It's also very common to create at lease one List View for each
01:30primary table in the FileMaker Database. The other type of very common layout in FileMaker
01:34is reports. FileMaker has all sorts of sophisticated reports functionality, which we will be covering
01:41in an upcoming chapter. But those are a common area for creating layouts in FileMaker.
01:46Layouts are the primary user interface and data display mechanisms in a FileMaker Pro database system.
01:52Each individual data entry screen, list view or report is going to be a separate layout.
01:58You might need only a handful of layouts in one application--as a matter of fact right
02:01now this one has only got four. And it's got all the default layouts, meaning every time
02:06you create a table, FileMaker goes ahead and creates one Layout for each one of those tables.
02:12Keep in mind that there's no practical limit to the number of layouts that you can create
02:15in a database file. It really just depends on what you need to accomplish with your database.
02:20In our exercise files, we're going to create a detailed layout for each primary table,
02:24Customers, Products, and Invoices. And then List Views for each of those tables and then
02:28later some reporting in the reporting section. Before we create any layouts though, I first
02:33want to get you acquainted with layout mode. Of course, we go from mode to mode under the
02:38View menu. So I'll go to View > Layout mode. As you learned in an earlier chapter, Layout
02:44mode is one of the four modes available in FileMaker Pro, provides you with all the tools
02:49you need to add or modify layouts. Keep in mind that you can restrict a user's ability
02:54to access layout mode by changing the settings in his or her privilege set. You want to see
02:58the help system for security for more information on how to do so. As a FileMaker developer,
03:03you are going to spend a great deal of time switching back and forth between Browse and
03:07Layout mode. So learning how to change modes quickly is quite useful. There are four ways
03:11to get in and out of layout mode. Of course, the first of which is under the View menu.
03:16The second of which is going to be using the shortcut keys, either the Command+L, or Ctrl+L.
03:23Also, you'll notice that you can exit the layout and enter layout mode by hitting the
03:28Edit Layout or Exit Layout button on the far right-hand side and then also on the very
03:32bottom of your screen you see that there is a dropdown that allows you to toggle between modes.
03:37The most common is likely using the Quick Keys on your keyboard. For Mac users
03:42Command+L, and for Windows Ctrl+L. As you see here, in our layout dropdown in Layout
03:47mode, FileMaker has created four layouts for us, one for each of the tables that have been
03:53created, under File > Manage > Database. Here you see we've got the four Tables, and if
03:59you go over to our Relationship graph, you'll see each one of the four tables, of course
04:03linked with all the relationships is represented on this graph. One important thing that you
04:07will need to understand moving forward is that anytime you create a layout, you have
04:11to figure out which one of your tables that layout is can be based off of. This concept
04:16is called the context of a layout and becomes vitally important as we move into more intermediate
04:20topics, but for right now, you'll understand that the first decision that you have to make
04:24when create a layout is to pick the table that it's based off of. In the following movies
04:29we'll explore how to create List Layouts for each of our primary tables, as well as mailing
04:34envelope layouts, for mailing things to our customers. Because layouts are the primary
04:38way of presenting and organizing data in FileMaker Pro, and layout serve as both interfaces and
04:44areas for design and development, we are going to spend a lot of time working with layouts,
04:48and you are going to want to be familiar with the concept of the layout.
Collapse this transcript
Working with themes in new layouts
00:01In the upcoming movies in this chapter, we're going to be looking at creating new layouts
00:04in the database using FileMaker's Layout Assistant. One of the options we'll see when we build
00:09those layouts is the ability to select something called the theme. So before we go onto building
00:14layouts, I wanted to take a moment and first talk about themes. You can use FileMaker Pro
00:18themes to enhance the appearance of the layout or report, or give all your layouts a consistent look.
00:23A theme affects the characteristics of a layout, including the Background Color,
00:27Field Borders and Fill, and text attributes in and outside of fields. You'll see here,
00:32I've got an example of one of the Starter Solutions called Personnel Records.
00:35In all the Starter Solutions that ship with FileMaker, have a theme applied. You'll notice that some
00:41of the aspects of the theme, for example, are the color of the fonts, rounded corners,
00:46different icons that ship with it, background colors and patterns, and even some of the
00:51styles that are used for the tab controls that you see on screen. And within each one
00:56of these Starter Solutions, they've applied the theme to all layouts inside the database.
01:03A theme doesn't control the placement or behavior of fields or objects in a Layout mode, just
01:07the way that they look. You have the option to apply a theme to a new layout using the
01:13new layout report assistant, which we're going to do in the next couple of movies, and you
01:17can change the theme of an existing layout in Layout mode, which I'll demonstrate in
01:20the final movie in this chapter. But you can see when you're in Layout mode, there's an
01:25option under the Layouts menu for Changing Theme. This will tell you which theme you
01:31have chosen at the time, give you a preview, and also shows you a preview of all the different
01:36themes that are available. FileMaker has all these brand-new themes that are all based
01:41on cascading style sheets. If you don't want to apply a theme, you can pick Classic. Otherwise,
01:47you can sort of tour through all the different themes and see if anything fits your liking.
01:53What I would recommend is that you only use themes on new layouts, since modifying existing
01:58layouts after you apply a theme can be kind of an arduous task. But each one of the themes
02:03has different things like different value list, drop downs, round or square corners,
02:08different colors of the text, different background colors, all these things ship with the theme itself.
02:13There are a couple of things that you might want to keep in mind though if you're
02:15interested in using themes. First, you must apply themes across every layout in your database,
02:21you cannot apply a theme across all layouts at once. So that means if you've got a couple
02:25different layouts, like you have got Personnel Details, I'll need to go in and apply the
02:30theme to this layout and then I'd have to go to the next layout, Personnel, go in and
02:35apply the same theme there. But as you can see I can do that, and it gives me this consistent
02:40look and feel. That's also best to pick a theme before you start your database and then
02:44stick with that same theme each time you create a new layout. Again, going back retroactively
02:49can create some additional work for you that might not be necessary. You can also change
02:53a theme later on as you see here under the Layouts menu, but many times you may have
02:58to make little tweaks as you apply themes and any customizations that you make to themes
03:02could be lost when you change to another theme. Object attributes, even if they're part of
03:07a theme, like for exampl, this text, can still be modified using the Inspector, and
03:12we'll go into all the different tools that are available in the Inspector in the next chapter.
03:16You may also notice that there are some themes that have the word touch after
03:21them, for example, Ocean Touch. These are themes that are intended to be used for iPad,
03:27iTouch, and Iphone devices. So they're consistent with their parent themes, but they have larger
03:32buttons and fields to account for finger interaction on each one of the devices that I have mentioned.
03:37There are even some layouts in each Starter Solution as you see here in Personnel files
03:41that already have these themes applied. So this is a good way for you to get familiar
03:47with some of the options that you available to you in each theme. It's a good idea to
03:50get familiar with some of the themes before you start building your layouts, so you can
03:53make these theme decisions as you create each layout in your solution. Themes are optional,
03:57and there's certainly not required. In the exercises and the rest of this title, we're
04:01going to use the Default Themes so that I can better demonstrate how to use FileMaker
04:05layout tools to build your layout elements without the constraints of a theme.
04:09But in the real world you may want to consider using themes when you create new layouts so that
04:13way you don't have to spend a lot of time working with the layout tools in order to
04:16create a very professional and crisp looking database. FileMaker 12 has introduced this
04:21new concept of these cascading style sheets based themes. So this is something that if
04:26you've used versions of FileMaker in the past, you may have ignored themes. But now it's
04:30a really good time to get reacquainted with them. You don't have to be a designer to have
04:34a crisp, clean and consistent look in layout your FileMaker database solution.
04:38Instead you can simply use one of the professionally designed themes that ship with the product.
04:42Keep in mind that the best practice is to use themes on new layouts and use FileMaker
04:47layout tools on existing ones.
Collapse this transcript
Using the Layout Assistant to create List views
00:00There are many uses for a List View inside of FileMaker databases. Perhaps you want to
00:05look at all of your different customer records, let's say all in one layout or you want to
00:10create a report. Maybe you just want to display the same data with a different look or functionality.
00:15Whatever the need, you'll end up creating a new layout. You can create an unlimited
00:20amount of layouts based on each table in your database, so don't think that you have to
00:23just stick to one. Let's begin first by creating a List View of the Customer Layout.
00:29Right now, we already have a layout that we're going to call the Customer Detail Layout, and this
00:34is a Form View that has every customer field on it with all sorts of spacing, and this
00:39is something that can be used for data entry or editing existing data. But the reason that
00:44we would want to create a List View for each table on our database is so that we can see
00:49potentially multiple records on screen at a time instead of just one. So the way that
00:53we add new layouts is first by going into Layout mode. We'll go into Layout mode under
00:58the View menu, and we're going to invoke the Layout Report Assistant by clicking on the
01:05Layouts menu and choosing New Layout/Report. The first screen of the New Layout/Report
01:09assistant asks us to make a couple of quick decisions. First and really quite frankly
01:14the most important one is to pick the table that the layout is going to be based off of.
01:19And again, I just want to remind you that any layout needs to be based off of one of
01:25the table occurrences on your relationship graph. So I can create layouts based on Customer
01:30Table, Invoice Table, Products Table or even Invoice Line Items. That is what we call the
01:35context of a layout. So keep in mind that at any given time a user is on only one layout
01:40at a time, which means that any user could be in the context of any one of these tables.
01:45We'll explore this concept further as we move along, but for now, we just need to pick one
01:50of the tables we're going to choose Customers, because as I mentioned before we're going
01:53to a create a List View of Customer records. The next option that we have is to Name the
01:57layout, I'll name it Customer List, and we can choose to see it in the dropdown menu
02:03when we're in Browse mode, and all we've to do to make that happen is to keep the check
02:07box selected. Now we go under Layout Type, and I choose List view, and we see a little
02:12bit of a preview over here on the right-hand side. There is a bunch of different options
02:16though that we've got here, and I'll just quickly review with you what each one of these
02:19may be. A Standard Form is going to show one record at a time, and that's used for detail
02:24views, Table View is the spreadsheet type view where multiple records can be seen on
02:28screen at a time. List View, the one that we selected here, also shows multiple records
02:33on screen at a time but doesn't have that spreadsheet looking view or constraint.
02:37A Report is like a List View, but it groups by certain data. We're going to cover these
02:41extensively in the Reporting Chapter. You can also pick a Blank Layout if you just want
02:45to use all the FileMaker Layout tools to create something from Scratch. Then later we'll be
02:50talking about Labels and Envelopes. These are used for the purpose of sending out mailers
02:54of course to any of the contacts that you might have in your database. So let's go and
02:58select List View and hit the Next button, and now we're asked to move any of the fields
03:05that we want to see on this List View over to the window on the right. Generally, List
03:09views do not need to be as comprehensive as detail views, so you want to put only fields
03:13on this layout that will help you distinguish one record from another, but still enough
03:16for them to make the layout meaningful. So we'll pick AddressCity, AddressState, CompanyName,
03:24ContactFirst, ContactLast, PhoneNumber, and AddressEmail. And then of course we can move
03:32these in a different order if we would like to, we'll keep them in the order that we've
03:35got here, but I could for instance, move AddressEmail up here if I would like. Now we hit Next,
03:43and here we'll choose the Field by which you want to order or sort the records in a list.
03:47So we're going to see multiple records on screen at a time, and we want to know in which
03:52order they are going to be presented. So let's choose ContactNameLast, and we'll make it
03:57sort in Ascending order. Then you can pick a theme for your layout. In this example,
04:02we're just going to stick with the Classic theme so that we can create our own design
04:06as we move ahead. But you can always browse all the different themes that shipped with
04:09FileMaker 12 and see which one might fit with your design aesthetic the best. I'll go back
04:14to Classic and again just another note, this is the area where you should choose one of
04:19the many themes to apply to this layout. As a general rule for consistency, you'd also
04:23want to choose the same theme on all the different layouts. So I'm choosing Classic here, and
04:28I'm going to apply that to the rest of the layouts that I create in this database, but
04:31if you chose Cool, for example, I strongly suggest that you choose those for all new
04:35layouts moving forward. Now we'll hit Next, and it takes us to the Header and Footer Options.
04:42For example, you could pick in the Top center, Page Numbers, and that type of thing.
04:46We'll pick Page Numbers for the Bottom and then now finally, FileMaker asks us to create something
04:52called a script. We're going to cover scripts later in this title, but scripts are a stored
04:57series of events, and in this case what FileMaker can do is create a script that takes you into
05:03Browse mode or sorts by a certain selected field, that type of thing. In this case, we're
05:07going to say not to create a script and just proceed on to the final view, and in this
05:11case, it asks us whether or not we want to View it in Browse mode or Layout mode, so
05:15let's go ahead and finish up, we'll View it in Browse mode. So now you can see that we've
05:19got all 1523 records in a List View, we've got information on the Header that tells us
05:25what it is that we're looking at, and we can scroll through these different records and
05:29see all the different data that we've got. This makes a great layout for being able to
05:33do searches and looking at isolated Found Sets of data, and then if we need to we can
05:38select one of these items and still navigate over to the Customers Table, which keeps our
05:43Found Set, and that's because both layouts are based on the same table or have the same context.
05:48And we can move back and forth from the Form View to the List View if we like.
05:53You'll notice that the List View not only has a very short height here, but it's also
05:59set to View as a List, which are a combination of those things are really what are creating
06:03a List View for us. In the next exercise file, I'll have already created the Products List,
06:08and Invoice List Layouts in the same manner. You can do the same as additional practice
06:12if you would like. Because Layouts are the primary way that users will interact with
06:16your data, the Layout Assistant is a great way to quickly create new layouts in your database.
Collapse this transcript
Using the Layout Assistant to create labels and envelopes
00:00In the previous movie, we looked at using the layout assistant to create a list view.
00:05You can also use the layout assistant to quickly create some specialized layouts, like layouts
00:09for a mailing labels or envelopes. FileMaker has label and envelope sizes built right into
00:13the assistant to make creating layouts like this very easy. In this movie we'll create
00:18Customer Mailing Labels and Envelopes using this assistant. Let's begin by starting with
00:23our customers table and creating a new customer labels layout. First, we'll enter Layout mode
00:29and then we'll click the New Layout/Report button, which will invoke the same New Layout/Report
00:37assistant as we get when you click on the Layouts menu. So now of course we need to
00:41choose the ever-important context of our layout. We are going to choose the Customers table,
00:46because that's the data that we want see in this layout. Next, we want to give this Layout
00:50a Name. So we'll call it Customer Mailing Labels. Then we'll choose whether or not this
00:55layout will appear in the layout dropdown list in Browse mode for users with full access
00:59privileges. We'll say yes, keeping this checked as it is. Next we need to choose what kind
01:04of layout we'll be creating. This option will be easy, since we want to create Labels.
01:08We'll see all the way down on the bottom we have the ability to create Label layouts, and we'll
01:13see the preview change in the right-hand side. Now we hit Next, and we see that FileMaker
01:19has an entire series of Avery labels and DYMO labels all built into the FileMaker
01:26Layout Assistant. So if you went and purchased some labels already, like the ever-popular
01:31Avery 5160, you just choose the number that corresponds to either your Avery or DYMO labels,
01:37and you can hit Next. But before we proceed, I should let you know that you can create
01:40Custom Layouts if you'd like, using different specialized page margins and Heights and Widths
01:46of the actual label itself. So now once we've chosen the Label Style, we have to pick the
01:51fields that are going to appear on each label. Label Layouts are unique in that there will
01:56likely be three columns of records on any one page. So really we don't need to pick
02:00that many fields, because we don't have that much space to work with on the layout. You'll
02:05see what I mean when we're done, plus of course, these are mailing labels, so they only really
02:09need to contain the address and the company name of the customer. So let's pick the CompanyName,
02:16and you see that it's creating merge fields. This is an entire text area with the merge,
02:20so we need to hit the Return button to start a new line. And then StreetAddress, start a
02:26new line, AddressCity--let's put a comma in there and then a space--AddressState, space
02:36and then AddressZip. So you see that we put Returns where they're needed, and we can even
02:41put different texts like a comma, for example, whenever those are needed as well.
02:47Then I can get fancy here if I'd like too. I can go in here and add another Return line and type
02:52in some text, put a little space in there and say ContactFirst, space, ContactLast.
03:02And we're going to copy the fields in the Label contents for use later. So I'll just
03:05select them and hit Copy, and they'll be saved to my clipboard. But now let's hit Next.
03:11And finally, we'll choose whether or not we want to see our new layout in Preview modes.
03:16We can see the data and how it's going to print or in Layout mode. So let's take a look at
03:20it in Preview mode, and now we see we've created is Mailing Labels that print in four columns,
03:26and it's got all the spacing built in so that all you need to do is print these off and
03:30stuff your printer with the Avery 5160 labels. You can pick any one of the Avery labels that
03:35you see in the wizard, and it makes printing labels extremely easy. One of the things that
03:39I'll mention to you is when you're in Layout mode, you can go in and add formatting by
03:47clicking on the Format bar here. This reveals different Fonts that you can choose, different Sizes.
03:53For example, I can just go in here and select the CompanyName field and make
03:57that bold, or I can make the Attention field italic. When I go back into Browse mode and
04:05Save my changes, I can see what these look like on screen. Now if I go into Preview mode,
04:12I can see that the contacts that actually have a Company Name, have that in bold, and
04:16in every case the values that are inside the Attention line are in italic. And you'll notice
04:21that we weren't presented with choosing a theme when we were creating the Mailing Labels,
04:26and that's because FileMaker actually recommends that you use the classic theme for all printable layouts.
04:32That way we are now printing all these extra colors and formats and different
04:35images that are embedded into the background of layouts. Therefore they'll select the classic
04:40theme by default on all Mailing Labels, and Envelope Layouts. Now we're going to very
04:45quickly create some Customer Envelopes Layouts. First, let's go into Layout mode, and we'll
04:53hit New Layout Report. We'll keep it on Customers, because that's going to be the context, we
04:58actually want to see customer data printed out on these envelopes. And we'll add Customer
05:04Envelopes is the name. And go all the way to the bottom and choose Envelope.
05:09I'll hit Next. Now we want to choose the fields that are going to be on each envelope. We are going
05:13to pick CompanyName, StreetAddress, City, State, and Zip. We can either do so by double-clicking
05:18on the field list or selecting the field and pressing the Add field button. If you haven't
05:23cleared your clipboard since the last example, you can simply Paste. And you see that that
05:28value will show up here, and saved us a bunch of clicking. Now we can hit Next, and let's
05:34say, look at our layout in Layout mode. And you see what FileMaker has done is that it's
05:38made the header large enough in the body, which we'll talk about in the next chapter,
05:42large enough so that when you feed an envelope-- a standard number 11 sized envelope into your
05:48printer--it'll print the Contact Name and all the fields that you've chosen, in the
05:52appropriate location. And you can see what this will look like when we go into Preview mode.
05:57In the same way I talked about in the previous version, you can double-click on
06:00these and treat them as text, by applying different format into each line if you'd like.
06:08Now because layouts are the primary way that users interact with your data, the Layout
06:11Assistant is a great way to quickly create new specialized layouts that use columns or
06:15specific templates, like envelopes or labels.
Collapse this transcript
Applying themes to existing layouts
00:00FileMaker 12 has an entirely new set of themes. They are not only available when you're creating
00:05new layouts, but they can also be applied to existing layouts, and in this video, we're
00:10going to look at some of the considerations that you should take into account when applying
00:13a theme to a layout that already has some design style. For example, we're looking at
00:19a file that we've got on screen here, it's Invoices_09_05 in the exercise files.
00:24But this file is actually an old Starter Solution from the previous versions of FileMaker before
00:2912. So it already has some style applied to it, and we're going to see what happens when
00:34we change the theme to one of the new FileMaker 12 themes. So let's say we want to apply a
00:39new theme to this database. First, in order to make any changes to the layout, we have
00:43to go into Layout mode, and now that we're in Layout mode, we're going to go under the
00:47Layouts menu, and choose Change Theme. It tells us that we've got the Classic theme
00:53chosen and really what that means is we don't yet have any themes chosen. Now, you can change
00:59the theme for the layout by choosing Change Theme and then let's look through some of
01:03the options that we've got, how about Cool Gray? It looks nice and subtle, and it's got
01:09some color schemes in there and some rounded fields and looks very attractive.
01:14So let's hit OK, and let's go into Browse mode and hit Save, and we see that our theme translated
01:22reasonably well actually, mostly because the previous layout was designed using specific
01:28field sizes in the older Starter Solution. Now, changing themes is not going to cause
01:32objects to reflow on the designed surface. It's simply going to apply new appearance
01:36attributes according to the new theme style sheet. So really what we've done is we've
01:40chosen a new set of instructions that are going to apply design elements to the layout.
01:45Changing theme really performs two actions, first, it actually changes the layout's theme,
01:50and second, it reverts all the objects into theme defaults. These types of objects are
01:55things like fields that gives a certain height of the field and rounded corners and Tabs,
02:00for example, get bold text and a certain font that's applied. However, we do see that some
02:06things have changed a bit, it may require that they be built from scratch. Notice the
02:10buttons on the top of the screen are still buttons as we can see by the hand over mouse
02:15button, but in the previous version of the layout, they were made using layout tools
02:19that are now not specifically referenced in the new theme style sheet. So for example,
02:23if we look in Layout mode, we notice that these buttons are applied to the top of the screen.
02:29Now, this particular theme that we've chosen Cool Gray apparently doesn't have any
02:34instructions on how to handle buttons, because we see that the button sizes have changed,
02:40they're not aligned like the way that they were before, and we've got bold text in one
02:45button, and the regular text in others. So really what happened here is not that anything
02:49changed, but just that there weren't any instructions to be able to convert this into something
02:53that was consistent with the rest of the theme on the layout. New themes have these things
02:57called Cascading Style Sheets that have basically a list of instructions on how to handle objects,
03:03and this just simply didn't have any instructions on how to handle these objects.
03:07User may need to adjust the layout in order to accommodate the new theme. Like, for example, you'll see
03:11that some of these fields are just a smidge too short, because now, even though the data
03:17is the same height, because we've got these rounded corners, that style requires that
03:22the field be a couple extra pixels higher or lower than the text that it contains.
03:27You also notice that the text up here at the top of the screen has been changed from White
03:32to a Cool Gray, which of course is part of the Cool Gray theme. But since the background
03:38is a black color, we might need to change this to let's say, for example, a white text
03:45to give it more contrast. This of course is because the theme has specific instructions
03:49on how to handle text colors used in parts on the top of the screen, and it didn't take
03:53into account that there would be a black background. Now, you'll also notice something kind of
03:58interesting, there's this question mark here. If we look in Browse mode, you'll see that
04:04this question mark used to be a completely full circle with a question mark icon in the middle.
04:10Little tiny things like that are things that you're going to want to look out for,
04:13because really what happened here is that there was an image, and the image was of a
04:17question mark, and you'll see--just ungroup this here. So now the image is just a square,
04:25but in this theme, the instructions that FileMaker's theme gives to the layout objects is that
04:29if there's any circles, make them transparent. But unfortunately, we needed this circle to
04:34have a gray background in order for it to appear as though--there you go--that you had
04:40a proper fill. So that's something that's going to have to be modified as well. Now
04:44let's look at a database that was built from scratch. This is the Untitled_09_05 file.
04:53This is something where all the elements were built using layout tools, and let's try converting
04:58this into a new theme. We'll go into Layout mode, and let's pick a Change Theme under
05:06the Layouts, and will pick Onyx, pretty dramatic looking layout theme, and we'll hit OK.
05:13The first thing that we see is that the header text color changed to the same color.
05:17The Company Name was in green before, and the Customers Layout text was in black.
05:23Now, they're both the same color, and that's because both of these pieces of text end up in the header.
05:28So the theme basically has instructions on what to do with text that's in the header,
05:32and it gives it all one color. You also see that the graphic that we placed in the header
05:36now kind of sticks out because there's the sliced image that's being used in the Onyx
05:41header theme and our image isn't consistent with that anymore. So, we're going to have
05:46to maybe make that transparent, and make some adjustments there. And you'll also notice
05:50that the customer layout text is no longer contained within the background color, and
05:55that's because you'll notice that in the themes, when you go in to Browse mode, you'll see
06:01that FileMaker gives a little bit of relief around the edge. You will see this little
06:05kind of gray contrast around the edge of the theme. And as a result, anything that was
06:09too close to the edge of the layout is now going to look like it's bleeding into that
06:13relief area. Those are things that you're going to have to take into account, and of
06:17course it's as easy as moving some of these elements down. Same is true for the Add New button.
06:23There are instructions within each theme on how to handle buttons and give them
06:26kind of a gradient look and a stylized look and a different size and some different text.
06:31So in that case, this one got so much larger that it grew over the edge of our Tab Control
06:37feature here. You'll also notice that we had a series of tabs and these actually converted
06:41rather nicely, Onyx has some specific tab design that highlights the chosen tab, makes
06:47them square and sort of flush within a square background and then changes the text and some
06:52of the text styling when it's selected as active. But the biggest item of course is
06:57the Size of the fields or the Height of the fields. Because of the rounded ends on this
07:01theme, the Height of the fields need to be adjusted for the text to be seen. Most themes
07:05will need a Height of 20 pixels to clearly see the text in a rounded field. The layout
07:10that we had prior to this had fields at a standard 17 pixel Height. So even though we
07:16were using standards before, it still wasn't high enough in order to be able to accommodate
07:20these new rounded ends. So, if all this seems like too much work, you can always go back
07:24to Layout mode and choose the Layouts > Change Theme and send it back to Classic.
07:31But you'll notice that much of the old formatting was lost when FileMaker converted the theme, because
07:36what's really happening here is it was stripping out a lot of the components that we had originally
07:41added to our layout and then applying new instructions with the new theme, so all it
07:45was able to do was remove those instructions from the old theme and then some of the stuff
07:49that was stripped out is no longer available to us now. So, keep the following things in
07:53mind. When you change a layout's theme, FileMaker Pro applies the attributes of the new theme
07:57to all objects on the layout except for the following. The Font and Font Size remain in
08:02the original layout, or theme--which we saw when our font sizes were too big for the Onyx
08:07theme--buttons created prior to FileMaker 12 retain their original formatting, but you
08:13might need to resize them and other layout parts in order to fit all the objects on appropriately.
08:18If you want the layouts to look similar to layouts created with the versions earlier
08:22than FileMaker Pro 12, that's where you're going to want to use the underneath the Basic
08:27section, there's this one single Classic theme. If you've created a layout to be used with
08:32FileMaker Go, just simply choose one of the layouts that have the word Touch after it.
08:37Those layouts will all conform to Apple's touch standards. And then finally, an important
08:43one, if you apply a theme to a layout, it's not going to apply the theme to all the layouts
08:49in your database in sort of a master theme way, and you really wouldn't want it to without
08:52some type of editor. But instead, if you apply a new theme to one layout, you should probably
08:57do it to all the layouts in your database and make any adjustments as necessary.
09:01Themes are optional, they're not required, and in the exercises in the rest of this title, we're
09:05going to use the Classic theme, because I want to show you how you can use FileMaker
09:09Layout tools to build your layout elements without the constraints of a theme.
09:13But in the real world, you may want to consider using themes only when you're starting from scratch.
09:19Applying themes is meant to make creating layouts easier and faster. However, changing
09:24themes can actually be rather destructive to original layouts. So really the reason
09:29behind this movie is to suggest that you consider themes only when you're starting
09:32creating layouts from scratch.
Collapse this transcript
10. Working with Layouts
Using the Layout Setup dialog
00:00In the previous chapter we discussed creating layouts in your FileMaker databases.
00:04Once layouts are created, you have various ways to configure them. This chapter is going to
00:08discuss the different options available for modifying and managing existing layouts.
00:13So first, let's look at this Customer layout that we have here but inside Layout mode.
00:18Although we specify the name and context as part of the layout creation process, we could
00:22edit this information and actually a lot of other things at any time in the future using
00:26the Layout Setup dialog. This dialog can be accessed by either clicking the Layout Setup
00:32icon which is this little pencil next to the Layout dropdown, or under the Layout menu,
00:37we can choose Layout Setup. Either way, it takes us to this dialog. Let me show you some
00:41of the options that we see on this dialog. First, we see that there's a tab called General
00:45and under General it shows us what the name of the layout is and whether or not this layout
00:50can be included in our dropdown menus in Browse mode. It also shows us the all too important
00:55context or the table that this layout is based off of. While it's possible to change a layout's
01:00context after it's already created, in practice, you'll find that it can be cumbersome to do
01:04so because you'll need to change the context for all the fields that are on the layout
01:08as well. So be sure to specify the correct table when you're initially setting up the
01:12layout to avoid the need to do this. In addition to the layout's name and context, there are
01:17several other attributes and behaviors that are controlled by settings in the Layout dialog,
01:22you'll see three of them here. By default, the Save record changes automatically option
01:26is selected. This makes it so that any changes that your users make in Browse mode will be
01:31saved when they leave the record. Now if I uncheck this box, we can kind of see what this
01:35see what this behavior will act like. So we go back into Browse mode, save our changes,
01:40and if I go into Notes, and I type Notes, now when I commit the record, you see that
01:45I get this message that says do I want to save the changes to this record. Now interestingly
01:50enough, this is a behavior that's common in other applications. Anytime somebody changes
01:55something, the user is prompted to save. So maybe you have users that are more comfortable
01:59with seeing this, but anyone who is working with FileMaker might find this message a bit
02:03obtrusive because they're assuming any change they make will be saved. So you can control
02:08that in the Layout Setup dialog. We'll change it back to the default, and you see this option
02:14here for showing field frames when a record is active. That's that behavior that we see
02:19in Browse mode where when you click into one of the fields, all the other fields get this
02:24dotted line around them and the one that's active actually gets a solid line.
02:28You can enable or disable the display of field frames in the layout in this view. But be aware that
02:34if you disable the field frames in Find mode, the field indicators will also be disabled.
02:39And what that means there is when you go into Find mode you see that you've got these little
02:44magnifying glasses. That indicates that the user is in Find mode so that they don't think
02:48that they're creating new records in Browse mode, for example. And Show field frames when
02:53record is active is off by default on all new non-classic themed layouts. So although
03:00it's on, on this one that I've created, it's turned off in all the new themes in FileMaker 12.
03:06Now this new option, Delineate fields on current record only--kind of a mouthful--it's
03:11something that's brand new in FileMaker 12. But this option is going to be off by default
03:15for form layouts but will be enabled for list and report layouts created using Layout Assistant.
03:21If we go over to a List View--let's say Customer List--when this option is on, meaning checked,
03:28that means that field borders, backgrounds, and other kind of formatting will not render
03:33on any other row than the currently selected row in the List View. So for example, the
03:38icon for pop-ups, dropdowns, and calendars are also considered part of the field border,
03:43and those will be hidden as well. Let's move over the Product List view, and now we see
03:49that I've got a bunch of fields here, and all I've done is I've Shift-selected these
03:54fields. You see over here in the far right corner, I've applied this yellow fill background.
03:58So what does that look like if we go into Browse mode? Interestingly enough, that formatting
04:03is only being applied to records that I'm selecting. The reason that's happening is
04:08because I've got the Delineate fields on current record only option selected, and if I turn
04:13that off, you'll see what the difference is. Now every one of the records in the List View
04:19has this option applied. This really gives you an opportunity to give sort of a selected
04:24row highlight effect that does work a lot better with this particular type of formatting.
04:30Again, you'll see this back in Browse mode. And then notice what happens when we go into
04:34Preview mode. In Preview mode there is no currently selected item, so then that means
04:38that you don't have to worry about these formats being applied in just some strange fashion
04:43to just one of the rows when you're trying to print or save something as PDF.
04:47Back in Layout mode, in the Layout Setup dialog you'll see that the next option down here in the
04:52bottom enables fields for Quick Find. Now we're going to talk about that when we get
04:57into finding records in FileMaker so we'll skip that and move on to the Views.
05:01I talked about before that any layout can be set up to be viewed in Form, List, or Table View--that
05:07of course is in Browse mode. You can manage these by clicking on any one of these views,
05:13and--by the way--you'll see that the Delineate options are not in effect for Table View.
05:18That shows the formatting on each one of the rows. But sometimes you create a List View
05:23and you don't ever want it to be viewed as a form, for example. So what you can do in
05:28Layout mode, go into Views and then turn off any other options besides the one that you've
05:35designated. Then of course, you can designate that as default. And after you save your changes,
05:40you'll see now that users cannot circumvent those options, and they're grayed out in the
05:44dropdown menu as well. If you look at the views for Table View, you see that you can
05:50do things like Include header and footer parts or do a Horizontal or Vertical Grid. You can
05:56turn off the ability for users to resize column headers as well. You do have to pick at least
06:02one of these views, and then you can set that one as the default. So for example, if we
06:07go back into our Customer Detail view, save the original changes, and we can go in here
06:14and say let's just make that Form View and make the Default view the Form View.
06:19On the Printing tab, you can access settings for fixed page margins or columnar printing.
06:24These are really only applicable with the label- based layouts that actually have columns.
06:29And then finally, the last tab is a pretty important one called Script Triggers, but we're going
06:32to cover that in detail when we get to the chapter on scripts. The Layout Setup dialog
06:37allows you to modify many of the settings for existing layouts and set defaults based
06:41on the type of layout you designed so that users can view the data in a way that you
06:45intended, without being able to accidentally make changes to the layout while they're working
06:49on it in Browse mode.
Collapse this transcript
Understanding layout parts
00:00When you're working with layouts in FileMaker, you're going to notice that they're divided
00:04up into several different parts. Go into Layout mode, and if you take a look at the Customers
00:09layout you'll see that we've got this one section up here that's called the Header and
00:13then in-between the Header and what's called the Footer--which is on the bottom--we have
00:17this area that's called the Body. In this movie, I'm going to describe the different
00:21roles of these parts and how you can manipulate the parts that are currently already on your layout.
00:25First of all, you should know that each layout must have at least one part, and
00:30layout parts can contain fields, layout objects, buttons, text, and any other type of object
00:35that you want to throw on there. The dotted horizontal lines that you see here mark the
00:39division between the layout parts, and the part label appears at the left end of the
00:44divided line. Also notice on the very bottom of your layout there is an option here that
00:49says Click to display part labels horizontally or vertically, and that allows us to toggle
00:56the part names, and you see we just get an abbreviation. This gives us a little bit of
00:59better idea of what space each one of these parts occupies. We'll keep it clicked there
01:03for right now. Layout parts are really broken into two different groups, groups that are
01:08called Non-Summary Parts and then groups that are called Summary Parts. We're going to take
01:13a look at the Non-summary parts in this movie. First, you should know that under the Layout
01:17menu you can go to an option that's called Part Setup. This allows us to see the parts
01:23that are already applied to our layout, and you'll notice that if you hit Create you'll
01:27see all the different parts that are available. Of course, there's three different parts that
01:31are grayed out here, Header, Body, and Footer, and that's because we already have a Header,
01:35Body, and Footer on this layout. But notice that we've got an option for Title Header.
01:40And the Title Header if we selected it, appears above the Header, and anything that we put
01:45in the Title Header will only show up on the top of the very first printed page.
01:50The same is true for a Title Footer but at the end of any printed pages. You'll notice that if
01:56you add a body part, you can simply select it here in this view and hit Delete if you'd
02:00like to. When it comes to Title Headers and Title Footers, though, you should remember
02:04that should really never ever put data in them, because in the case of a Title Header
02:08if you put a field like CompanyName in there, it's actually only going to print the data
02:14from the very first record in your found set. So if you're printing a list of like 10 different
02:18companies and you happened to slip the company name into the Title Header, it's only going
02:22to show the value from the first one, and the same works in sort of the opposite fashion
02:25for the Title Footer. So they're really not meant for putting any data in either the Title
02:29Header or Footer. Conversely, anything you put inside this header will appear on the
02:33top of every page, and you can include field values if you'd like to. You'll use this for
02:38titles or common headings on a column or a report. You might even put column names here,
02:43but you can only have one header on a layout as well, and that's why you see it grayed
02:47out when we try to add new parts. We're going to skip over the Grand Summary, Summary, and
02:53Trailing Grand Summary parts and leave that for our discussion on reports. So what that
02:57leaves us with is the Body. You can have only one body part inside of your layouts and each
03:02object that you put in the body--including fields or text objects--will appear once for
03:06every record in your found set. So the difference between a Customer form layout and let's say
03:14a Customer List layout is actually just the height of the body part. You'll notice here
03:19that the body part is only the height of these fields, and in this case the body part is the
03:25height of the entire layout area. So that's why when we are in Customer List and looking
03:31at that in Browse mode, that we actually see many different records on screen at a time,
03:35because basically the body part is only that high, and we've set it to view as a list so
03:39that it keeps showing different iterations of the body for every record in the found set.
03:43Back in Layout mode, there are different ways that you can add new parts to your layout.
03:48Like let's say we want to add a footer here. We've already talked about going into the
03:51Part Setup and hitting the Create button, but there's also a tool up here in the Status
03:56toolbar area when we're in Layout mode. That's called Part tool, and it allows me to drag
04:00a part--in this case, we'll say after the Browse--and I can choose Footer in this case
04:05and just hit OK. Of course, then I can manipulate the size of the part by just clicking on the
04:11horizontal gray lines, and you can also change the arrangement of parts using the Part Setup.
04:17I can move Body up and down or Header around, and we'll see more of this when we get into
04:21the Layout Summary parts. However, any layout part that has a lock next to it means it
04:26cannot be moved up or down, so header always has to be on top, footer always has to be
04:31on bottom, same with the Title Header and Title Footer. When we close the Part Setup
04:35dialog, you'll notice a couple of vertical lines here in the layout. First of all, we've
04:39got this dotted vertical line, and this indicates the printable edge. You'll also see this when
04:45we go into Preview mode. It's the edge where the print margins will cut off anything that
04:51you see on the layouts. So this is sort of a guide for you to be able to make changes
04:56and be able to view how things are going to look when they print. So the idea is if you
05:00wanted to print this layout you probably want to move all the printable area to the left
05:04of that dotted line. I can manipulate this by choosing a different page setup, so for
05:09example, if I wanted to print at landscape, we see that the printable edge moves much
05:13further over to the right, and it probably makes more sense for me to squeeze up all
05:16these fields to fit them in if I print at landscape. The other edge that you see here
05:21is new in FileMaker 12, and this is what's referred to as the layout's explicit width.
05:26You can place objects in the gray area to the right of the layout, and this lets you
05:30store objects with the layout, yet prevent them from appearing in Browse, Find, or Preview
05:34modes. So if you want to, put like Developer fields or little things that you're experimenting
05:38over on the right-hand side. For example, if we go over to Customer, you see that I
05:42can move this layout edge around if I'd like to, and I can take a Notes field, for example,
05:48and place it over into the gray area. You see that it gets a little bit faded when it's
05:52over in the gray area, and I can make these invisible by placing them there. If I go into
05:57Browse mode now and hit Save, you'll notice that the Notes field is no longer there.
06:02I also can't see it in Preview mode, and I also can't see it in Find mode, but in Layout mode
06:07it's still there. Once you decide where you want to place a field and make it visible,
06:11you can just simply select it, and in this case the Field label, drag it back into the
06:15Body, and now it will be visible in Browse mode. Having an understanding of the different
06:19parts that are available to you will help you when you're planning and creating your
06:23different layouts. You can control the vertical parts using Part Setup and the two horizontal
06:28sections using the Layout Width guide.
Collapse this transcript
Previewing the new Inspector
00:00One of the things that you're going to want to become familiar with when you start working
00:03with modifying layouts is something that's called the Inspector tool. This can be used
00:07to view and modify the settings for all the different objects in Layout mode. You go into
00:12Layout mode--if you don't see a floating palette or the Inspector anywhere, you can
00:16go into View and choose Inspector or simply hit Command+I on your keyboard or Ctrl+I on
00:22Windows. You'll see that each Inspector has three different tabs, the Position Tab, Appearance
00:28Tab, and the Data Tab. Each one of them focuses on a different aspect of formatting, and you
00:33can mouse over the different options on each tab to see a description of what they do.
00:37Once opened, the Inspector window will stay open each time you access Layout mode.
00:42For example, when I go into Browse, we see that it disappears; when I go into Layout mode
00:47it's back in the same position where I left it. Many of the controls in the Inspector
00:50are available in different menu dropdowns but they've all been consolidated into
00:55this one palette so that when you're in Layout mode you don't have to drop menus down or
01:00lose the position of selected objects, for example. Many other applications that you
01:05might have used follow the same palette concept. FileMaker now makes it easy to see nearly
01:09all of your object controls all in one place. We're going to use the Inspector in several
01:14movies throughout the rest of this title, but should you be wondering where many other
01:17controls from the previous versions of FileMaker have gone, first always look in the Inspector.
Collapse this transcript
Exploring layout tools and the Status Area in Layout mode
00:00Once you've created layouts in FileMaker Database, you're going to want to start modifying them
00:04and make them more attractive and useful to users. You want to first make yourself familiar
00:08with the tools that you have available, once you're in Layout mode, before you start planning
00:12any of those changes. We go into Layout mode, you see that the Status tool bar across the
00:17top of the screen--here we'll get rid of Inspector-- has changed from what it looks like in Browse
00:22mode or even any the other modes for that matter. You will see in the upper left-hand
00:26corner where we had Record Navigation tools, those have now given way to Layout Navigation tools.
00:31So the book icon allows us to navigate from layout to layout. You can see the total
00:36number of layouts that we have, and you'll even see that we can navigate each one of
00:40those layouts by clicking on the dropdown menu when in Layout mode as well. To see this
00:45button which allows you to create new layouts using Layout Assistant, it's the same thing
00:50that happens when you do Ctrl+N or Command+N in Layout mode or choose the New Layout/Report option.
00:56By default, you'll notice that you have this thing called the Selection Tool
00:59Active, this allows you to choose different things on screen, move things around if you
01:04so desire, and even click on some of layout tool options that you've got available to you.
01:09And you'll notice that when you select something-- for example, this picture here--you'll
01:14know that it's selected because it's got eight different selection knobs highlighted.
01:19When these knobs are visible, they can be used for horizontal and vertical resizing.
01:24You'll notice by selecting one of these options, it gets highlighted. I can easily change the
01:27height of something, and here I can change the width. And if I choose one of the corners,
01:32I can change the height and width and constrain proportions at the same time.
01:37You'll also notice that when you select multiple items-- I'm holding down the Shift key to do so--you'll
01:43see that all the items look like one selected object. You see you still have eight selection
01:47knobs, this allows you to make changes to the entire group as a whole, whether you're
01:52constraining width, changing the height, all the different options that can be applied
01:58to all selected objects at once. Next on the toolbar, you'll see that we've got this T.
02:03That makes your cursor a little cross-hair that allows you to type different things on screen.
02:07We will go over to the Customers layout, and I'll typing here the text, Customers Layout,
02:15and now it turns back into my selector tool, which allows me to move it around.
02:18You can see that it's selected by the eight selection knobs. I can use this tool to modify Field
02:23Labels if I'd like to, or select different text areas and apply different formatting to it.
02:28You will see that I've got the Formatting bar here underneath the Status tool bar,
02:32I can select some of the text with my selection tool and apply some formatting to it.
02:38Here I'll click into some of the Field Labels and add some spacing to make our fields easier
02:43to read for the users just simply double-clicking and adding spaces, and I can do all that through
02:49the T-bar and Selection tool combinations. The next four items are Shape Drawing tools.
02:54So we've got a Line Drawing tool which of course allows us to draw lines on our layouts
02:59and different combinations of lines if we'd like. Just undid that. And also pretty self-explanatory,
03:04the ability to drop box, rounded corners or oval shapes. Next, you'll see that there are
03:10a series of eight different buttons that allow you to add different layout objects to the layouts.
03:14The first is the Field Control tool, which allows you to add different input types
03:19to your fields, and we'll be covering this in a later movie. This is the button tool,
03:23which allows us to create buttons that can have Scripts or ScriptActions assigned to them.
03:28We'll talk about this when we get into the Scripting Chapter. Then there's the Tab
03:32Control tool, the Tab Control allows you to add Tab Control so that you can recycle certain
03:37space on screen. We are going to cover that in a movie dedicated to the Tab Control later.
03:42Same is true for adding these things called Portals, Charts, and even a Web Viewer.
03:47The last two items on the edge are for Adding fields, the same thing that you can do if
03:52you do Insert field, for example. And then over here is adding parts, like we discussed
03:57in the previous movie, the same thing you can do if you say, for example, Insert Part.
04:01Finally, you should beware of the Format Painter. If you want to apply the same types of formats
04:06like coloring your fonts or font size for example, you can select an item that already
04:11has that font assigned to it. I'll select the Customers Layout, 12pt Helvatica Font
04:16with bold. I'll choose my Format Painter and then choose anything else I'd like to apply
04:22that same formatting to. This is the same type of Format Painter that you're used to in other
04:26applications. Here are a couple of tips that might be useful when you're in Layout mode
04:30using some of these tools. If you want to select multiple objects at a time, you can
04:34actually hold down your mouse and drag, and you see that it's allowed me to group all
04:39these fields together. For example, if I choose all the Address fields, I can treat them all
04:45as one single address object. Also, if I have a field on screen that let's say has some
04:50formatting applied to it, and I want to copy that same formatting for a new field, what
04:55I can do is select the field and then drag it while I'm holding down the Option key on
04:59Mac or the Ctrl key on Windows, and what it does is allows me to check a new field but
05:06it applies that same original formatting to the new field that I have created.
05:10You'll find that to be very handy as you're going to create new layouts. It's best to understand
05:14the tools that you have at your disposal before you continue making any layout changes.
Collapse this transcript
Managing layouts and layout folders
00:00Any single FileMaker Pro database could have dozens or even hundreds of layouts.
00:05Therefore, it's going to be useful to organize layouts in such a way that both you and your users
00:10can easily find what you're looking for. The feature in FileMaker Pro that helps you accomplish
00:14this is what's called the Manage Layouts dialog. You can access this under the File > Manage >
00:20Layouts, and you see the Manage Layouts dialog appear. You can also access this when
00:25you're in Layout mode by clicking on the Layout dropdown and choosing the Manage Layouts on
00:30the top. You'll notice that in either case, once it's open it's treated as a separate
00:35window under your Window toggle screen. So at any given time you can get right back to
00:40it, however you see that you don't need to be in Layout mode to be able to manage the
00:44Layouts window. The Manage Layouts dialog window allows you to organize and manage layouts
00:49in a number of different ways. The check box that you see at the beginning of each row
00:53indicates whether or not this layout will be included in the Layout menu while in Browse
00:57and Preview modes. This is useful for hiding any developer or utility layouts that should
01:02not be directly accessed by any users. So you can see if unchecked, for example, we'll
01:08go over here, navigate off those, and now we see that we don't have access to the Customers
01:13layout anymore. If we go back to Manage Layouts and simply check that, we'll see that now it
01:18appears to our users. Keep in mind that if you get into the more intermediate level of
01:24working with security and accounts inside FileMaker databases, that you'll find that
01:28you can restrict the layouts that are seen in that list based on different user groups,
01:33but this is one way that you can turn them either on and off for your general audience.
01:37However, if you do turn something off, you should keep in mind that you'll always be
01:41able to see it in the Layout mode dropdown menu, otherwise it would be hidden for good.
01:47Notice also in the window that you've got these double arrows, and anytime you see these
01:51in a FileMaker dialog, this means that you can move things around and reorder them on a list.
01:57As you see here, I'm moving all of my Customer layouts or all the layouts that
02:03are based in the Customer table, all in the same location, and I'll my product ones, so
02:08everything is now kind of organized and grouped together. At the top of the Manage Layouts,
02:12you'll see that there's two filtering tools. One of them is a very familiar Apple like
02:17filtering tool that allows you to type in a value like let's say Customer and then it
02:22narrows down your list. Doesn't seem that dramatic but I promise you that as your layouts
02:26grow you're going to have hundreds and hundreds of these at some point, and that filter is
02:29going to be a savior for you. The buttons at the bottom are useful for creating, for
02:35example, a new layout, a new layout folder, or even a separator. You can also select items
02:42and edit them if you'd like to. What that does is bring up a Layout Setup dialog or
02:47you can duplicate an existing layout or delete one that you have selected as well.
02:52Also, if you want to navigate to one you can choose one of these and hit the Open button, and
02:56that will create a new window and navigate you to that selected layout. But back under
03:01this New button, you'll notice that in current versions of FileMaker you have the ability
03:05to organize layouts into folders. Let me create a new folder here, and I will show you how
03:09this works. I'm going to name the folder Customers, and now it becomes another item on the list
03:16that can be turned on or off, and I'll move this to the top of the list, and the way that
03:21I actually add something to a folder is by clicking and dragging and then releasing it
03:26in an indented fashion. You'll notice if you look very closely there's a little blue sort
03:32of thread, a needle hole there, and if I make sure that it's indented rather than over at
03:37this edge, it will end up inside the folder, and that gives a pretty interesting organizational
03:43aesthetic for our users. When we're in Browse mode we can just choose Customers, and there's
03:47all the different customer related layouts. It's a very handy tool. Now actually if I
03:52go and turn off the folder but not any of the layouts that are inside of the folder
03:56you'll notice that it goes back to its normal view. Of course, the opposite is true if I
04:02turn on only the folder and none of the layouts within it all the users are going to see is
04:05the folder itself. But I'll quickly create a folder for the Products and put products
04:13ones in there, and you'll notice that inadvertently I've added that folder to the Customers folder.
04:20You can see that it was indented, and I could do that on purpose if I'd like to by saying
04:24Reports, and I'll add that underneath the Customers folder and then drop these in there,
04:34and let's just take a look at what that looks like in Browse mode. There is the Customers
04:38and then the Reports. I might need to manage that little bit better. There we go.
04:45Same is true for Products, we've got Product Lists, and we'll add one last one for Invoices, drop
04:54three invoices in there, and now we're all set. So this is a great way to clean up the
05:00headache of having tons and tons of layouts. Again, we've only got 20 or so layouts in
05:04the sample files but I assure you that you'll end up having hundreds and even if you just
05:08want to create these folders to organize the layouts even when you're in Layout mode in
05:13your development environment, it's also going to be a great help. And you'll notice that
05:17now when we get these folders created this other filtering item on the left-hand side
05:21allows us to just isolate only scripts based on the folder that they're in.
05:25This again could become very useful when you've got dozens and dozens of folders even inside your Manage Layouts.
05:32With the number of layouts in your solutions constantly growing, it's a good
05:36idea to come up with a strategy for managing the layouts into folders. The new Manage Layouts
05:41window allows you one place to make these changes and any other changes that your layouts require.
Collapse this transcript
11. Formatting Layout Objects
Using guides and arranging, aligning, grouping, and locking layout objects
00:00In FileMaker Pro, layout objects are the building blocks of layouts. Everything you place on
00:06a layout be it a field, an image, a portal, or a label is considered an object, and all
00:11objects have particular attributes that you can manipulate. Keep in mind in order to do
00:15any changes to any layout objects, you have to first be in Layout mode, as you see here.
00:21And once in Layout mode, you can group any combination of objects so that you can edit
00:26or move them together, or you can even change what's called the stacking order of objects
00:30to get different effects when object overlap. The grouping tools can be found in your Inspector
00:35under the Positions tab. And if you can't see the Inspector when you're in Layout mode,
00:39what you need to do is first go to View, and Inspector, and you'll see that it has a corresponding
00:44quick key, so you can just do Command+I or Ctrl+I. Of course, this Inspector will always be available
00:49once you open it until you close it, but it's not seen in other modes like Browse mode.
00:54So let's talk about grouping layout objects together. For example, we see we've got this
00:59series of fields here in the bottom right- hand corner of our layout. And if I select all
01:04of the items, which of course we can do in a couple different ways, I can hold down the
01:07Shift key and select multiple items, then release Shift, or what's more common is I
01:12can grab them by drag-selecting, I click down on my mouse, and I use my Pointer tool, and
01:18I drag, and you see that anything that this area is touching becomes selected. Now right
01:23now, these are a series of independent objects, for example, we have four different fields
01:27and then four different field labels. But if I go over here to the Position tab in our
01:32Inspector, you'll see under Arrange & Align, we've got a whole series of different tools
01:38I'm going to show you in this video. But the one I want to show you is Group. Notice what
01:41happens when I hit the Group button. Now when I select the object, it's treated as one single
01:48object, so you see I can move it around and put to into certain positions. And if I wanted
01:53to, I could even resize them and they all resize proportionate to the resizing action
01:58that I'm doing on screen. Now if at some point, I want to address these items individually
02:04again, don't worry, the grouping isn't permanent. We just select the group and then I can go
02:09into the Inspector under the Position tab again and hit the Ungroup button. Now you
02:13see each of these things becomes an independent object that I can, for example, apply different
02:18formatting to if I need to. In addition, the Inspector also allows us to do some alignment work.
02:24You can see here in the Customer Detail layout in our exercise file that we've got
02:28all sorts of different fields on the screen, but they're all over the place. They're different
02:31widths, they're not aligned properly. Of course, this is something that we could do manually
02:36by selecting different objects and using the Arrow keys on our keyboard, but FileMaker
02:40has all sorts of automated tools here that allow us to do alignments a lot more easily.
02:45It's easy to visually see the alignment, but if you want a precise view of the invisible
02:49edges of an object on the layout, you can use something called the guide.
02:53Guides are not turned on by default, so I'm going to show you how to turn those on. If you go under
02:57the View menu, you'll see there's this option here for Guides, and I'm going to say Show
03:01Guides. So now what you see is we've got these vertical and horizontal pink lines on our
03:07layout, and what we can do is actually manipulate them, and let's say we'll line up the vertical
03:13line here, and we can line up the horizontal line that way. Now what we can do is we can
03:19actually move these objects until we see it overlap the line. These lines are generally
03:24used when you're first designing the layout, and then you can hide them again after your
03:28alignment is set. And notice that a guide is either vertical or horizontal, but never both.
03:33They're intended to allow you to create a access point for aligning everything up
03:38vertically and horizontally in your layout. You can also add more than one guide at a
03:42time if you've got different groups of objects that you want to line up. In order to do that,
03:46you need to first show rulers. You'll notice here that there's an option under the View
03:50menu called Rulers. And then we have the rulers visible, you click on to the ruler area, and
03:56you can now drag down more guides, and I'll do that here as well. And you see they come
04:02in different colors, which makes it helpful for you to see where one axis ends and the
04:05other axis begins. You can have any number of different guides on screen at once if you like.
04:10Conversely, to remove these guides, you just drag it back to the ruler just like
04:15we did when we put it on the layout in the first place, and then you no longer see the
04:24guides on the screen. Keep in mind that each guide can be made local to a layout or global
04:29across all the layouts. So to apply this guide to all layouts, I'll click on the Guide and
04:34do a right-click, and you see I have this option here for Sharing Guides with All Layouts.
04:39So if I select that option, you'll see now that even if I go to Product Detail, you'll
04:46still see the Guide there. If I want to remove the guide, I can really go in here and of
04:53course, I can lock it so that it can't be moved until I unlock it again. But I can also
04:57remove it by right-clicking on it in this same manner, and you'll see that it has removed
05:02it from the Product Detail screen as well. Now if you prefer to sort of visually move
05:10these things around, you'll notice that when I click on the Company Name field, do you
05:14see all these blue lines that are appearing? This is actually what's called dynamic guides.
05:19And if you don't see these in your version of FileMaker, then you'll want to go under
05:23the View menu and choose Dynamic Guides right here. Dynamic Guides provide on the fly confirmation
05:29for aligning, positioning, or resizing objects on the layout through a combination of visual
05:33feedback as well as optional snapping behavior. The result that you see on screen can allow
05:38you really to have a much more rapid precise layout object manipulation experience here
05:44when you're in Layout mode. And you'll notice that the guides show relative distance to
05:48the objects that are near them and other objects on the layout. Like, for example, here I've
05:53selected this field and the blue line in the middle is telling me that it lines up in the
05:58center of all the other fields on the layout, and you'll notice that I also get an X and
06:02Y coordinate here in a little tooltip that pops up. And you'll notice, when I move this
06:08around, you can see that it's telling me that the distance from the height of certain fields
06:12to the bottom of other fields is also presented on screen, so I can sort of make sure that
06:17things are in the middle or have even distribution of fields or objects on screen. So the Dynamic
06:22Guides will appear when an edge aligns with the edge of another object as you see there,
06:28and also if an edge aligns with a guide-- we're going to have a guide on screen.
06:33It tells me the relationship to the guide as well. You'll notice that each one of the text fields
06:39has this little dotted line in there which is a text baseline. It'll also tell me when
06:43the text baselines line up as you see here. And then of course, the centerline, when objects
06:51of the same size are lined up in the center. Now if you'd prefer to do something a little
06:56bit more automatically, you can also line groups of objects with other tools that are
07:00found in the Inspector. So for example, let's say I select, and I'm holding down the Shift
07:05key to select all these objects on the left, these are all field labels, and they should
07:18correspond with all the fields that are on screen, but also they should have a relationship
07:22to each other. So what I can do is select all those items. You can see we have this
07:25series of tools here, and if you just hover over them, you get some feedback as to what
07:29they are, you see that this one is Align left edges, center, and so on. We're going to pick
07:33Align right edges, and now you see all the different field labels have now aligned on
07:38an invisible guide here on the right-hand side. I can do the same thing with the fields.
07:44I'll select all of them, but actually look that we've got this First name here.
07:50So why don't we line up the First name using our dynamic guides? And we can see now it lines
07:57up at the center, and we'll release it right there, so using a combination of these tools,
08:02and we'll do the same with fields. I'll quickly Shift-select all of these field objects and
08:09apply left edges, and now you see that those all line up as well. You'll notice that sometimes
08:15we might need to align things horizontally. For example, here I've got the AddressZip
08:20field, and I've got the Field label, I'll select both of those items and instead I'll
08:24line them across the center. I can move them up using the Arrows on my keyboard. The other
08:29thing you'll notice is that some of the fields have different widths. So I can choose let's
08:34say, the CompanywebSite field, and I can choose the EmailAddress field, and we notice that
08:38they're different lengths, and I'm going to go over here to the Resize tools that you
08:43see in the Inspector, and I've got a couple of options here. I can resize to the smallest
08:47width or the largest Width or the Height, and so on. I'm going to resize to the smallest
08:51Width, and you see that now they're pixel- perfect and in full alignment. All the tools I've
08:56shown you apply to different objects as well, not just field objects. Let me show you an
09:01example of that. We'll move the Inspector over here to the right, move our layout width
09:07over to the right a tad as well, we'll go up here to our tools, and I'm going to choose
09:11the Rounded Rectangle tool. And you'll notice once it's selected that my Pointer tool becomes
09:16a Crosshair, allowing me to draw space on screen, and I'm going to draw an oval so it fully
09:21surrounds all the items that you see on the screen, and now I release, and you see that
09:26we've got this new object on screen as well. And this object then when I move it around
09:32can also use the dynamic guides. You see those lining up to the edges in the center.
09:37But now I'm going to show you a little bit of a trick here. Now that I've got this Rectangle
09:40tool here on screen, extend it up to the full edge of the body part, now I'm going to do
09:45the Square Drawing tool, and I'm actually going to draw it using the dynamic guides
09:50so that it lines up just perfectly with the edges of my Oval tool. So now I've got two
09:58of these objects, and I can also determine whether or not I actually have them at the
10:01same width. So for example, if I choose the Rounded Corner tool, we go over here to the
10:06Inspector in the Position section, and it shows me that the Width is exactly 657 points,
10:11Height 431. But if I select the rectangle, I see it's also 657 points. So if it wasn't,
10:18I could go in here, and I could just manually update the data. So this is a good way to
10:22get precision alignments on the different objects as well. And of course, I could select
10:26both objects and align the left edges if I needed to, and now I know that they're perfectly
10:32snug the relationship to each other. Now I'm going to select the item in the back, and
10:38I'm going to change its color. You'll notice over here in the Formatting toolbar over on
10:43the right-hand side I have this item here where I can change the fill. I am going to
10:47go in and select a different color. You see that the Rectangle tool has turned green.
10:54Now I'm going to select the Box tool or the rectangle in front of it, and I'm going to
10:58make that fill gray. So now it gives this sort of a background effect on the layout
11:06and what I'm going to do is I'm going to select both objects, and I'm going to group them
11:10using the Inspector tool like we did before. And now there's something else that I wanted
11:14to tell you about layouts. You'll notice that when I drew these objects, they are in front
11:18of all the other field objects on the screen. So on any layout in FileMaker, there's something
11:23that's called a Z-order. It's actually the order from front to back in the way that the
11:27user is actually viewing it. So right now, these grouped objects are in front of all
11:31the other objects, but I can move them to the back if I'd like to. You'll notice I've
11:34got some tools down here in the Inspector. These will allow me to send something to back,
11:39bring it to front, or change one layer at a time. So I'm going to send this entire grouped
11:44object to the back, and now we see that it provides a nice little background for us giving
11:48it more of a nice customized layout look. And now that I'm done with the background
11:52shapes, I can actually lock them. You'll notice over here in the Inspect, or we've got the
11:55ability to lock certain items, and you can tell when objects are locked on screen when
11:59you select them, because instead of having the eight handles, they have these eight Xs,
12:03and when I try to move these things around, you see that it won't allow me to move them.
12:07Of course, I can unlock them in any time and then move them around to the desired location.
12:11But since I've actually got them in a nice spot, I'm going to lock it. And the reason
12:16I would do that is because if I'm trying to move other objects around in front of it,
12:20and I accidentally grab this I might inadvertently move the item that I didn't intend to.
12:24So it's a good idea to lock them when you're going around and doing some precision updating to
12:28your layouts. Another thing I wanted to show you is that if you grab multiple items on
12:31the layout and one of them happens to be locked--let's say we select CompanyName and lock it,
12:37and then I'm going to Shift-select and choose DateCreated--you'll notice that the CompanyName
12:43is no longer selected. It's not part of this group. So in order to be able to address things
12:52as a group with other objects, you're going to have to unlock them. So I go in here to
12:56the Position tool, unlock, and now I can Shift- select it and make it part of a group. Then if you're
13:02messing around with your layouts, and you find that you've made some mistakes and want
13:06to kind of go back to where you started, you should know that in FileMaker, only in Layout
13:09mode, you have the ability to undo, which is Command+Z or Ctrl+Z. And you can do multiples
13:15of those. So you see here, I can go back as far as I'd like to. And then when you're ready
13:20to save the changes that you've made on your layout, you can either move back into Browse
13:24mode where you'll be prompted to save, or you can just choose the Ctrl+S or Command+S
13:32options depending on whether or not you're on Windows or Mac, and that'll allow you to
13:35save the changes. You'll notice here that we also have that in the Layouts dropdown
13:39menu. Getting familiar with some of these tools are going to really help you when you
13:43want to fine-tune the layouts that you've created in your new FileMaker database.
Collapse this transcript
Applying Screen Stencils
00:00One of the big benefits of working with FileMaker Pro over any other database is that you can
00:04deploy FileMaker databases on various devices like the iPad, iPhone, or iTouch using FileMaker Go.
00:11Each of these devices has different screen sizes, and you should really design your layouts
00:15to fit the device. Keep it in mind that I could access the same database either on my
00:21Desktop, on the web, or on any one of the devices that I just mentioned. Sometimes it's a good
00:26idea to either make sure all your layouts conform to whatever device or design specialized
00:30layouts for each device. Now sometimes even users on Desktops could have different screens
00:35with various screen resolutions, it doesn't really matter the size of the screen, but
00:39rather the resolution of the screen. So some folks might have to scroll around a little
00:42bit more. So it's a good idea to take all those different users into account when you're
00:46designing your layouts. One of the things that you can use in Layout mode to help you
00:51better visualize what those different screens are going to look like is something that's
00:55called a Screen Stencil, this is a new feature in FileMaker 12, and if you go into Layout
01:00mode, and you'll notice in the Layout Bar, right here you've got this dropdown menu,
01:05you'll notice when I'd select it, it gives us all the most common Desktop, iPhone, and
01:09iPad sizes. So I can choose from the 640x480, 1024x768, all the different common screen resolutions.
01:17Again, doesn't matter what the user's monitor size is it's all about what
01:20the resolution is. So that's something that you're going to want find out when you sort
01:23of pull all the different potential users of your database. And then of course we've
01:27got one for each of the devices, we've got an iPhone portrait and iPhone landscape, because
01:31of course users can turn those screens, and you want to make sure that the layout fits
01:35in either one of those cases. Now when you select a Stencil, let's say for example the
01:39Desktop, 1024x768, you'll notice that there is this orange box around the layout, and
01:47you'll see that I have plenty more room to be able to fit this in the 1024x768, and if
01:52I select it again, it'll disappear, and you'll also notice with some of these devices I can
01:57put both of them on screen at a time if I'd like, so I can say the iPhone in portrait
02:02view, see the orange area there and also iPhone in landscape, so I've got two of them.
02:08So it kind of tells me that this area where they intersect is where both views can be seen,
02:14or I could just design it for one or the other. If I open another database, for example, if
02:18I go in here to the exercise files and open up 11_02b and then go into Layout mode, you'll
02:24notice that these stencils persist even in the second file. So, really this should be
02:28thought of as an application setting rather than a setting that's specific to one database.
02:33So as a result, if you're working in a shared file, your stencils aren't displayed to other
02:37users, because it's specific only to your copy of FileMaker. So, if another designer
02:41opens up the database, they're not going to see the stencils that you put on there, but
02:44if you open up a different database you're going to see your stencils again. So, if you
02:48want to turn the stencils off, you just go in here and select the items again.
02:55Now if you want to choose a custom size, you have some kind of device or something that requires
02:58one of the sizes that you don't see here, you just go to Custom Size and then a window
03:02pops up that allows you to put in the points dimension, so you have 500 points by 500 points
03:08as the default, but you can manipulate this anyway that you want, and you'll see that
03:12that custom size will pop up on screen, and of course that can be removed as well.
03:19Now you can actually select every one of the stencils at one time if you'd like to, so every one
03:23of the default stencils that you see here can be selected and placed on your layouts
03:27at the same time. However, when it comes to custom sizes, you can only have one custom
03:31size at a time, so for example, if go on to the 500x500, and I go in here to Custom Size
03:37again, and I say 200 and hit OK, it's actually going to change the size of the custom stencil,
03:44and then you see I've only got one custom size available to me, even though I can couple
03:47that with all the other stencils if I need to. Stencils are a great way to help you visualize
03:52the estimated viewing area of the device's display, thus allowing you to accurately
03:57create layouts for deployment on any screen resolutions for even iPhone, iPod touch, and iPad devices.
Collapse this transcript
Placing and formatting objects, parts, graphics, and image fills
00:00In addition to adding layout objects or text or fields, you can also add images, and images
00:05then don't need to be contained within a container field if you want to add them to your layout.
00:10These types of graphics can be used to add aesthetic to your layouts or personalize layouts
00:14in your database. Now if you look in your exercise file, you see that I have here on
00:18the right, we've got a series of different files. We've got the file Untitled_11_03,
00:22which I have open right now, I also have another FileMaker file called Graphics and then two
00:27logo files with different sizes that we're going to be using later on in this movie.
00:30I am going to open up the Graphics file. This file is just simply a file that is put together
00:38here because I've got some graphics on the layout. These images that you see here are
00:43graphics that are royalty-free graphics examples that come from the FileMaker Graphics Pack,
00:48which is free to use when you join what's called the FileMaker TechNet. You can see
00:53the filemaker.com site for more information on joining TechNet and then please note the
00:57terms and conditions on the bottom of this layout. You'll see that these graphics are
01:01all graphics that are simply pasted onto the layout, I can select them independently of
01:05each other, and I can copy them to my Clipboard and paste them onto other files. So for example,
01:11let me grab this Email icon, I am going to go ahead and Copy it, and now I am going to
01:16toggle over to my other file, the 11_03, and in Layout mode I'll go to right about here
01:23in the layout, and I am going to Paste the object, and there you see the object kind
01:29of floating around, and you see it also uses Dynamic Guide, so I can position it right
01:36to the center of the AddressEmail field, if I'd like to. And let's do the same for the
01:41Globe field for the web site address. Go under Graphics, select the Globe, Copy, back here--
01:52and I can actually do a right-click, too, if I wanted to--Paste, move it around to the
01:56web site, and move it to the center. Now you'll notice that these objects are a little bit
02:02larger than the field, so if I invoke the Inspector here, what I can do is select the
02:09Email field, and I can go over here and see that that's a height of 14 points.
02:13So what I can do is select this object and make it 14 points high as well. You see that that
02:22distorts the image a little bit, so I can just move it around and then now I can drop
02:26that in line with the field, and we see we've got CompanywebSite, I can also make that 14,
02:35and I'll just make it 14x14 right away. And I could do the same thing here, I can move
02:40this around, and now I see that my Dynamic Guides tell me that it's in line with the
02:45Email icon, as well as the center of the CompanywebSite field, and now they fit a little bit better
02:49into our layout. Now let's say that we want to add a graphic that's going to serve as
02:54a logo onto our layout. Let's say we want to put it up here in the header. The first thing
02:58that we'll need to do is make the header a little bit larger to fit, so if I go and load
03:03the light gray line here that separates the body part from the header, I can drag it down,
03:08and let's say we'll make it about this size. If I want to be a little more precise about
03:13it, I can select the Header, and you'll notice here that it says there is a Height in points
03:17here for the part object. You notice also that we can use different units of measure.
03:25I am going to say 55 points, and now the Header is 55 points high, so we can do that with
03:34some precision as well, and I can take the entire content, Drag-select all of them, move
03:41it up to the edge of the Header, and you'll notice that only certain objects are moving,
03:45and that's because the background objects are locked, so I can do Undo. Select everything,
03:54unlock, and then move them up to the Header, right up to that line. Okay, so now we have
04:01enough room to actually fit our logo, and since we are going to put in the upper corner,
04:04we see that the Header part Label is kind of in the way. I can go all the way down to
04:07the bottom-left corner of the screen and click this icon here that will display the part
04:14Labels Horizontally instead. And by the way, not only can we change the height of the Header
04:19as its own object by using the Inspector, but also if I go over to the Appearance Tab,
04:25you'll see that I can change the color of it if I'd like to. So we see here, we've got
04:28a Fill of a solid color, I can click here, and use the Color Wheel to give it its own
04:33color if I'd like to, or I can switch back to just the white background if I like. So I
04:40can add all sorts of different things to the Header part if I'd like to. But in this example
04:44we're just going to add a white background logo, so we'll just keep the background of
04:48the Header white as well. So now let's go under Insert, and you'll see there is this
04:53option right in the middle of the menu, called Picture, I'll say Insert > Picture, and I'll
04:59go and I'll grab the logo that's 50x40 and hit Insert. Now I see I've got this nice little
05:06logo graphic, and it also uses the Dynamic Guide, so I can line it up to the left edge
05:12of the rest of the items in our background object that we created. And you'll notice
05:16something when we added this if I delete it again, I'll do this one more time where you
05:20can Insert the Picture, and you'll notice that you have the option to Store this only
05:24as a reference to the file, but the problem is if the relationship of the database to
05:28the file that you are embedding ever changes, that's going to show up as a broken link.
05:31So my advice is to make sure that first of all the images that you are going to add to
05:35your layouts are optimized and they are not a ridiculous size. Just use the same principles
05:41as one would do for adding images to a web page, pretty low resolution about 72 dpi.
05:46I'll select this object and not choose the Store only as a reference to the file, and
05:52in that way this file is actually embedded and lives on this specific layout.
05:56And once you have the image on the layout, it's going to act just like any other object on the layout.
06:01Now we notice that when we go back into Browse mode, save our changes, that if we change
06:07the size of the window the object stay anchored in the upper-left corner of our layout.
06:16Sometimes however, we can do what's called Resizing Objects in Layout mode, we'll go back to Layout mode
06:21here, and for example, I could select one of these objects, and you'll notice in the
06:25Inspector, in the Position Tab, you see this thing called Autosizing in the middle.
06:30You see by default that any object that you select is going to be anchored to the top and left,
06:34that's what keeps it in the upper left-hand corner here. All these objects are anchored
06:38to the top and the left. But for example, if I pick the background object and then I
06:42instead now say I am going to anchor to the top and then left and right, what this means
06:47now is that it's going to stretch left to right as I move the window. Let's actually
06:51see what that looks like. So now as users move the window, you'll see that it'll stretch
06:59and expand all the way to the layout width, but as I move over to the left it will never
07:05get smaller than it is in Layout mode, and that can be useful. It's something that you've
07:12got to be careful with, but definitely something that you should know as part of your toolset
07:16here--we'll select that background and actually turn that one off for right now. But the same
07:20can be true for images in the Header. For example, let's get rid of that logo, and I've
07:26got another logo that I am going to place let's go into here, Insert > Picture, and
07:29we'll use the larger of the two, so I can place that here, and I can select it, and
07:36I can do resizing if I'd like to. Let's see how that works in Browse mode. Now unfortunately,
07:43in this case as we resize the layout this logo stretches a bit, you can see that it
07:48gets distorted. Let's say we don't mind if the text itself actually stretches, but instead
07:55we don't want to distort the logo on the left- hand side. Well, in FileMaker 12, we've got some
07:59new tools that allow us to work with images and pick which parts will resize and which
08:04parts will remain static. It's also in the Inspector in the Appearance Tab, you'll see
08:10here in the Graphic section, we've got this option here in the Fill dropdown, where we
08:13can choose Image if we'd like to. Now we've already got the image there, but let's say
08:18instead of having the image placed on top of it, we choose the Header, and like earlier
08:25where we did a solid color, this time I am going to choose the image that we selected.
08:29I am going to say Insert. And now you see that by default it showed up as a Tile, we've
08:34got some other options here though, we can Scale to Fit, Original Size. If I do Original
08:38Size, it places it here in the center, and I can say Scale to Fit as well and then in
08:48Layout mode we see that it actually moves around a little bit, so it might not be the
08:54optimal effect, but just knowing that these tools are available to you, it will help you
08:57when you are planning out your layout designs. But another thing that we can do here is to
09:03do what's called Slicing. So here you notice that when we go into Slice this is a concept
09:08that's common in the web, but you'll see that we've got these red lines that are movable
09:14if I click them with my Selector tool and what it's doing here is I am telling it that
09:18anything to the left of the red line won't stretch, and anything to the right of the
09:24red line will, and it goes up and down as well too, so I'll move these just above the
09:29height of all the elements there and then now let's look how that behaves a little bit
09:32differently when we are in Browse mode. So now we see that even though it's resizing
09:36on the top, you'll notice that it anchors the layout part of the graphic so that it
09:41doesn't move and doesn't distort. And you can create your customized graphics that will
09:46fit a little bit better. A lot of times if you have a graphic that's a solid color--
09:49let's say you've got a solid color with the logo on the left-hand side, in that case what you
09:54would do, select the part, and then you would just let the solid color stretch but leave
10:00the logo untouched on the left-hand side if you'd like to. Of course, you can also just
10:07say None and go back and Insert this Picture, make it a little bit easier for you
10:13so you don't have to worry about some of those resizing. We'll go back and we'll change
10:17that to Solid Color and make it white, there we go. So I'll be making these same changes
10:23to the other layouts in the exercise files, so you'll see some of them in upcoming exercises,
10:27but you can do the same for extra practice if you wish. Images are a great way to add
10:32some style or identification to your FileMaker Layouts. If you find yourself working with
10:37graphics, make sure to use the tools that I've just described, to get the desired look
10:39and feel on each of your layouts.
Collapse this transcript
Applying gradients
00:00The use of gradients are a common design technique that can add a professional style to your
00:04layouts by blending colors together smoothly. FileMaker 12 now allows you to apply gradients
00:10to objects selected in Layout mode. For example, if we go into Layout mode and select our Header
00:16part, once selected under the Inspector in the Appearance Tab, you'll see in this section
00:21called Graphic that we can use the dropdown to select Gradient. Gradients of course, can
00:27be applied to any Layout object. We just happened to be selecting a layout part object for this
00:31example. And now you will see with this element here in the middle that on the very far left-hand
00:37side it is going to be one color and the very far right-hand side is going to be another,
00:40and those are the colors that are going to be blended together. So, right now it's just
00:43two shades of gray, so let's go in here and select a color for the left-hand side and
00:49select another color for the right, we will just blend this color into white.
00:54And now you see that it gives us a nice gradient which actually is a north to south or up and
00:59down vertical gradient. But also if I want to work on it on an angle, you notice that
01:03we've got this Angle tool here. So actually if I select the wheel, what I am doing is
01:09moving it around at an angle. So what I am doing is controlling the angle on which the
01:12gradient appears, and I can do that more precisely if I want to by selecting the degrees in
01:18which the angle is going to be displayed. So you have a lot of control over the gradients,
01:22of course you can move the Color Stop Widgets here, you can drag these along the gradient
01:26to specify the position where the gradient actually begins, and that's true for both sides.
01:31Anything between a Color Stop Widget that I have moved right here in the very far
01:36left end of the gradient will be a solid color. So you'll notice I can do the Solid color
01:40all the way across if I wanted to. The same is true on the right-hand side. The Gradient
01:46Type of course can be either Solid or Radial, depending on which one of these you choose,
01:53and this will reverse the direction of the gradient. So for instance, we've got green
01:56on top and on the bottom I can just swap those out, to turn those around if I'd like to.
02:02This Angle Widget, however, is only available for those who work on Mac. The Angle Widget
02:06will not be available on Windows, users must use the Edit box here with a numerical stepper
02:13arrows as well if they want to change that gradient. If you like the look of gradients,
02:17you can use the tools I demonstrated here in this movie to help you apply these to parts,
02:22fields, or any other object while in Layout mode.
Collapse this transcript
Formatting fields and applying field attributes
00:00When you place fields on a layout in FileMaker, you don't have to settle for just the standard
00:07view that you get, like, for example, here we've got a transparent field where we can
00:11see the gray background. You've full control over how these objects look, and you can format them.
00:16For example, if I choose the CompanyLogo field here in the middle. Of course, you can
00:21see it is selected because I've got the eight handles that are showing. You'll notice over
00:26here in the Inspector under Appearance, under the Graphic section you see that I can apply
00:30Gradients like we did in the previous movie, and Images as well in the previous movie,
00:33but here if I go to Solid Color, I can actually pick different background colors if I would
00:40like to. But we can also control the borderlines here. For example, here the next section where
00:46it says, Line we've got None, and if I show Solid lines, we'll see what that looks like
00:52in Browse mode. You can see now that this field has lines around it, giving it a sharp
00:57edge and then also the background color is white. So it gives us a little bit of contrast,
01:01but I can also change the style of lines if I would like to, I can select Dashed or Dotted
01:07lines, and I can also control how thick they look. So I can go all the way up to like 5
01:13or 6 point. And the same is true with the other lines but here there it's a little more
01:19dramatic because I'm using Dashed, and I can change the color of the line as well.
01:24You'll notice when these lines are solid that we've got sharp corners. Well, one of the things
01:28we can do is select an object, and then you'll notice here we've got this Corner radius tool.
01:35If I change this to 20, we see that it gives us a nice, kind of professional looking Corner radius.
01:43The other thing that I can do, actually, is apply the radius to only certain objects.
01:47So for example, I could apply the radius to only certain corners. So here in this tool
01:51on to the right what I've done is I've deselected the bottom, so now it gives me straight corners
01:56on the bottom and rounded on the top. Now this is an interesting feature that's best
02:00used, for example, if you select two different field objects, and let's move them right now
02:07next to each other. So here we've got a full rectangle, what I'm going to do on this top
02:12one is I'm going to say 10-degree radius, hit Enter, and instead of applying to the whole
02:21field, which of course, we could leave it there--but by the way, if you do that, notice
02:24that you've to change the points on the text within the field. So you might have to do
02:29some adjustments. What I'm going to do here is I'm going to uncheck the bottom Radius
02:34there, and then I'm going to select the one below it, I'm also going to apply 10-degree
02:39radius, but I'm going to deselect the ones on the top. So now what you get is the ability
02:45to make two objects kind of merge together into one, and this is an effect that you see
02:49in a lot of the starter solutions that FileMaker ships with the product. So these are tools
02:53that you can get familiar with in order to be able to add to a different look and feel
02:57to the objects that you have in your layouts. But you see that the data on the fields is
03:02going to be a little bit cut off. So one of the things that we can do to control that
03:06is go into the Appearance tab in the Inspector, and you see that we've got these tools available
03:10to us. If I go in here and change the point size and hit Enter, we see that it will fit
03:15a little bit better. We've some controls over not only the font, the point size, but also
03:20the color if we want to, and these tools here are pretty simple, you've seen all these the
03:25bold, italic and underline, and we've also got additional styles. And this here is just
03:30a highlight, it does a background highlight view. But a lot of people like to do if they
03:34have clickable areas on their layout is they will select Blue and apply an underline to
03:41it so that users know that when they click on it some kind of action can happen, but
03:45you can do all sorts of different combinations using these tools. Another thing that you
03:49can do though is for instance, when you see here, we've moved this Customer ID field up
03:55a little bit. Right now, it's showing the background of the part behind it which is
04:00in this case the desired aesthetic. So one of things that we can do here, if we dismiss
04:05the Inspector, we'll notice that the item that we've got selected here, we could have
04:10control over the fill also in the Formatting bar here below the Status toolbar area.
04:14If I select Fill, you'll notice that we've got all the other colors that we can choose from,
04:18but this one here is important, the one with the white box with a red line through it,
04:22that's what actually make something either you see we can choose a color or if we choose
04:26that item that gives us that transparent look. So if you want the objects to adopt the color
04:32of the object behind it, you can just go under your Fill and make sure that you choose Transparent.
04:37But here to make these fields pop we'll just Shift-select them. For example, all at once
04:46I can apply these formatting, go into Browse mode and save. You can see where the Layout
04:51area is without even having to click into it, if the background color isn't the same
04:56as the fill color of the field. But you can also manipulate the way that the formatting
05:01is applied to the data that's within a field. So for example, if we go over to the Product
05:06Detail, you'll see that some of these records have Extended Cost, Extended Price, some Currency
05:14values. So what we can do here let's use the Cost one, for example. We see that it's got
05:22numbers applied to it, but it doesn't look like its currency. So one way we can do that
05:26is go into Layout mode and select this item, invoke the Inspector, and you'll notice that
05:32under Data, at the very bottom you see this thing called Data Formatting. So I can select
05:36a field that happens to be number, and if I wanted to be displayed as currency, I can
05:40select Currency and then I've got some options here that allow me to choose a Fixed number
05:46of decimals, sse a thousands separator, for example, even the symbol that appears, and
05:50I can even apply a Color if the value is negative. You'll see when we go into Browse mode that
05:57that now looks like it's formatted as currency, but keep in mind, that doesn't affect anything
06:01with the actual underlining data that's in the field. So a Dollar sign symbol, for example,
06:06doesn't go into that field. We can do the same thing, not just for numbers and currency,
06:10but for dates. You'll see that FileMaker will recognize what kind of field that it is that
06:15you've selected, and it will show up in the selected icon above here, because that's the
06:18field type that you chose when you define this field. And I have all sorts of different
06:22ways that I can display dates. I can get as verbose as I'd like there. So we go and hit
06:29Save, and we see that it doesn't change the date in the field, but it gives us a different
06:34way that the Date value is displayed. The same is true for Time and even Images, which
06:41of course we've looked at when we were working with Container Fields. And in the interest
06:45of time, if you have multiple fields on screen at a time you can Shift-select them and apply
06:54the data formatting to all of them at once. So now you see all the fields that reflect
07:04money had been changed all at the same time. I'll be making these same changes on all the
07:08layouts in the database, so you'll see those in upcoming exercise files, and you can do
07:11the same for some extra practice if you wish. So you see that we've got a couple of different
07:15formats that we can choose from here. Even though FileMaker stores data in specific
07:19ways internally, you can use the Field Attribute tool to control how users will view the data
07:24and the fields when they are looking at it in Browse mode.
Collapse this transcript
Understanding object states
00:00In previous movies we looked to how you can apply formatting to objects in your Layout.
00:04In this movie I'm going to show you a pretty cool new feature in FileMaker 12 that allows
00:09the object on your Layout to have different States. And in each one of those States, you
00:13can apply different formatting. So you can specify attributes indicating the state of
00:17an object when they're viewed in Browse mode, which gives a database user some kind of visual
00:21feedback for the actions that they are making on screen. So I can format field, for example,
00:25in Layout mode. I select the CompanyLogo field, for example, and I go under the Inspector
00:31to the Appearance tab. And you'll notice in the very top here we've got this dropdown
00:36and by default it's going to say Normal State. We've got 2 point lines here applied, and let's
00:43say no other features, that's what it's going to look like in Browse mode in its Normal
00:49State. We let's look at what some of the other States are that available to us Normal State
00:53means it's not been interacted with, it's just the default state of the object when
00:56it was placed on the Layout. The In Focus State that we see here, the second one, that
01:00indicates that the object has been activated by a mouse click or the tab key--you can tab
01:05to it--or via a Script. There's a Script step these actions that you can say that, say, for
01:10example, go to a field. Hover is just when the user pauses the pointer over the object,
01:16so as you're moving over the object it recognizes that it's over the field area, and then you
01:21can apply different formatting. And of course Pressed is if there's a clickable object on
01:26screen like a button, for example, you can apply different formatting for when it's actually
01:30being pressed. So now let's say we have the Hover State selected. So right now, because
01:36we haven't made any changes, it's going to give us the same exact formatting as it does
01:40when it's in its Normal State. So let's just say, for example, I add another color to this.
01:47Let's see how that looks in Browse mode, just real simple example here. So now there is
01:52our Normal State, but when I pass my mouse over it we see that it now becomes yellow.
01:57So this is great for buttons, for example, that has going to some kind of action so that
02:00the user knows that oh, if I click here, maybe something might occur. FileMaker 12 allows
02:07you to specify attributes, indicating the state of an object when viewed in Browse mode,
02:11which gives database users visual feedback for actions that they're making, allowing
02:15your Layouts to appear more intuitive and interactive.
Collapse this transcript
Setting field behaviors
00:00Sometimes when you place a field on a FileMaker layout, it's really just there to display the data.
00:05You don't necessarily want users clicking into it or editing or adding new data.
00:09A great example of this is our Customer ID field or our primary key field that we
00:14have here. It will be very detrimental to some of the functions in the system if users
00:18were able to go in and click these and change them. Of course, you can manage this behavior
00:24and manage database. If I go into the field itself, I can say that they Prohibit the modification
00:31of value during data entry, but if that's not checked. I can also make it so the user
00:36can't even click into this field, so we do that in layout mode. I will go into Layout
00:41mode and select the field, we go to the Data tab and in the section here in the middle
00:46it's called Behavior. Keep it in mind that any settings that we make here are only going
00:50to be applied to this field on this layout. If this field appears actually somewhere else
00:55on this layout, we have to apply the same behaviors to it. If it appears on another
01:00layout, well of course, we'll have to go in there and apply Behaviors to it as well.
01:03But once we apply Behaviors to a field, we can then copy it somewhere else and then Behaviors
01:08go along with it. But the one I wanted to focus on here is that by default any field
01:13that you place in the Layout--and you can see that by me clicking around--is going to
01:18be available to the user in Browse mode and Find mode, but let's uncheck this box right
01:24here, and now I'll go into Browse mode, Save our changes, even when we click into these
01:30fields, we'll notice, by the way, that when we click into all the fields that the field
01:33active sort of borders are not applied to the Customer ID, and also as I click I can
01:39see that I can't get into that field, but if I go into Find mode, which we'll be covering
01:43in the next chapter, we see that users can go in here and enter data so that they can
01:49use that as part of their find criteria if they like to. And that can be controlled by
01:56either checking or unchecking the Find mode. But leaving it available for entry in find
02:01mode isn't that dangerous, because all users are doing is using it as a potential criteria
02:05in their searches, it doesn't actually affect the data that's in there. So it's very common
02:10to have fields that you don't want users to change to be deselected in Browse mode but
02:15selected in Find mode. And you'll notice here that if I hold down the Option key on Mac
02:21or Ctrl key on Windows, and drag and create a new field--let's to say I add this address
02:28zip over here--that when I select the field you see that it's adopted the same behavior
02:33as the one that I copied originally. So that's one of the benefits for using that drag/copy
02:37technique to add new fields to your layout if in fact you want them to adopt normally
02:41the same formatting, but the same behavior. There is also a couple of other things that
02:44you can control under the field behaviors dialog. You see here that when I have this
02:49field selected that I can control how the Tab order works. We're going to cover Tab
02:55order later in this chapter, but basically when people are using the Tab key to go from
02:59field to field, we can say that maybe in this particular field they have to hit the
03:04Return key to go to the next object. Those are more advanced techniques, but this is
03:08where you control that. And we'll also talk about in the next chapter in searching the
03:13concept of Quick Find, and this is where you control by either turning off the default
03:18option for including in this Global Quick Find or not and then finally by default there
03:23is this option here for not applying visual spell-checking. Visual spell-checking in the
03:27field is applied by default, meaning you'll see a red line if a word is misspelled, but
03:32here's where you can exclude that from spell- checking if you'd like to, so you can select the field
03:37and then select Do not apply visual spell- checking. I will be making the same changes on other
03:43layouts, and you'll see those in upcoming exercise files, but you can do the same on
03:46these files for extra practice if you wish. Many fields on your FileMaker Layouts are
03:51going to have their own independent usage rules, and working with Field Behavior in
03:55the Field Behavior dialog will allow you to control all of those.
Collapse this transcript
Using the Tab Control feature
00:00A tabbed user interface is a popular design feature for many different applications.
00:05When selected, each tab can display unique set of objects in your data, thereby allowing you
00:09to use the same location of real estate in your layout for multiple different purposes.
00:14Tab control is not a navigation tool, that's actually the tab order which we'll cover in
00:19the next movie. Rather, it's a layout organization tool used to selectively display different
00:24sets of fields or related fields for that matter from the same context or base table.
00:28I'm going to show you how to create a tabbed interface here in the Customer Detail.
00:32First, I have to go into Layout mode. And before we get started, we want to figure out how
00:36these fields can really kind of group together. So right now you see we've got all sorts of
00:40information here on screen. It's a lot for users to process. So it might be easier for
00:45us to compartmentalize these a bit and make it all in the same layout because we don't
00:49want to have users having to go to different layouts and click around. People like that
00:52dashboard view. They want to go to one spot, not have to scroll left or right or scroll
00:56up and down on their screen, but just maybe click a couple of things. So what we need
01:00to do before we create tabs with different panels is figure out how these fields all
01:04maybe logically work together. So for example, I've got a set of contact fields, I've got
01:10the Address, City, State, Zip, Phone and Fax, Email, those types of things, and we'll call
01:15those contacts. So let's say that's one Tab panel. We can see the contact information
01:19is going to be one panel and then we have some financial fields like TaxRate and DiscountRate,
01:24we can put those on a separate tab. And we have a Logo field and a Notes field, and let's
01:30say we want to put those onto their own tabs. What we've got there are four different panels,
01:33Contact, Financial, Notes, and Logo. So once we determine the different groups that our
01:38fields can fit into, fields are actually other layout objects. So for example, you can put
01:42things like charts or portals and web viewers, all different things that we'll cover later
01:46in the title. You can put those into their own tab panels. And again, we can occupy this
01:52whole space here in the middle with several different layers of fields without having
01:58the users having to scroll or move off of this layout. So now that we've determined
02:01that we're going to have these four different panels, I'm going to add this to the area
02:05here in the middle. But before I do that, what I'm going to do is I'm going to select
02:09these objects and move them out of the way just temporarily. Actually let's do it this way.
02:15I'm going to select them all and put those into our Clipboard, so I did a cut,
02:27so I'm going to send those into the Clipboard for the moment, it gives me some space to
02:30work with. And in order to create a Tab Control, we go into the Status toolbar, and you'll
02:35see here that we've got this tool right here in the middle called the Tab Control tool.
02:41And when I select it, it turns my cursor into a Drawing tool, and I'll draw this to fill
02:48up the entire layout space and up pops a Tab Control Setup dialog. This is where it'll
02:54allow us to determine what number of tabs will appear and name each one of the tabs,
02:58so let's go in here first and type in Contact. That'll be the first tab, we'll hit Create.
03:06And then we'll also add Financial, Create, Notes, and Logo. Now those are all the different
03:19tabs, we can move them around and reorder them by moving the handles around if we'd
03:23like to. But over here on the right-hand side, we see we've got some options available to
03:26us, so we've got which one of these tabs is going to be the default front tab, so what
03:30tab is going to be showing when somebody navigates to this layout. We'll keep that at Contact
03:33for right now, but it could be any one of these. And then the tabs will, by default,
03:38be left-justified, so they'll all stack over from the left, but we can change that to Center,
03:43Right, or Full, meaning in the middle. We'll keep it at the default of Left. And then the
03:47Label Width, so you see that we've got different lengths of the words here that for each one
03:52of our titles for the tab. So we can choose to have a specific label width that we can
03:58type in by points or centimeters or inches, and it'll be the width of the label plus a
04:03margin of whatever this value is that we enter. The width of the widest label, so in this
04:08case it would make all of the tabs as wide as Financial, or a Minimum or a Fixed Width,
04:14and we'll go Width of the Widest Label here. So now we hit OK, we see that the tabs appear
04:21on screen and users can click these different tabs, and when we're in Layout mode, it allows
04:26us to bring one of the tabs forward so that we can actually place layout objects inside of it.
04:30And now we're going to want to place the fields back into the appropriate tab,
04:33so I'm going to hit Paste and here comes all the fields. Let's move them over into our
04:42layout space here on the right-hand side. This is a great use of the gray area off to
04:47the right, it's sort of a developer kind of holding area. So first, I'm going to choose
04:51the CompanyName, move those over. Let's say we resize this. You see that I can resize the
05:01panel by clicking on it just like any other object, and we'll move the CompanyName field
05:07up on top if we like and then we'll grab some of the contact related fields. So here we've
05:16got address information and even email, web site, phone number, fax number, and of course,
05:28the names and title. So let's move those over. Now that they're all selected, I can move
05:34them as one big object over to the left, and I can take some time to reorganize these if
05:46I'd like to. But what I'm going to do now is go over and grab the financial fields which
05:51are DiscountRate, TaxRate, and I'm going to copy those to the Clipboard. And now what
05:59I'm going to do is I'm going to move over to this other panel. So now I can just paste
06:03the fields or move them right into this panel, and now you see that when I'm clicking on
06:10Contact, it shows these fields, when I'm clicking on Financial, it shows those. And we'll do
06:13the same with Notes. Let's get the Notes panel forward, drop it in here, and now that we've
06:21got all this extra space to work with, this is a great example of why we'd use a Tab Control.
06:24Let's say the Notes are a huge field. Now we can have the Notes occupy the entire area
06:29of the screen without conflicting with some of the other fields that we want to see, same
06:35thing with the Logo. So let's move that one over. And a lot of times you don't need field
06:49labels anymore because the Tab panel acts as a field label, so we can make this one
06:54rather large, and we can move these fields, the DateCreated and whatnot down to the footer,
07:00for example. So now we see by going through just really the task of creating a Tab Control
07:06and applying it to our layout that we're able to not only organize all the fields into logical
07:13groups, but also place them into the same layout area on our layout without really having
07:19to make a larger layout or navigate the users somewhere else that they might require some
07:25additional training to get to. But here we see that our layout doesn't change--especially
07:29when we're talking about other devices like FileMaker Go devices--the layout panels will
07:34work on those as well. You can also modify the appearance of the Tab Control.
07:38For example, if we go into Layout mode, it's just like any other object. So if we go in here, we
07:44can change the color of the tab if we'd like to. You'll notice that each individual tab
07:48can get its own color if you so desire in any kind of time that you--there you go--make
07:56a selection. You'll see now that we can see when we're in Contact because it's one color
08:04and then the gray here on Financial. And at any time if you want to change any properties
08:08about the Tab Control while you're in Layout mode just simply double-click on it, and you
08:12can change the names or any of the features here on the right-hand side. One of the interesting
08:16things about a Tab panel is now that you've got all these items contained within it, if
08:21I select the Tab panel, I can move it around on my layout, and you'll see that all the
08:24other objects inside of it move along with it. So I don't even have to group it, but
08:29it just automatically groups all the things together. This makes it easy to be able to
08:34move things around without moving the Tab panel and maybe leaving some of your fields behind.
08:38One thing you have to be careful of though is the edges of the Tab panel.
08:42Let's say, for example, this field just goes off the edge just slightly, so it's no longer
08:49contained within the panel. So you'll notice that what happens is it's no longer considered
08:53part of the Tab panel, and it shows up in every one of them. So the area here that you
08:59see is very important and a lot of times this'll get you with field labels because you see
09:04the text doesn't actually extend off but maybe the label area does. So in that case, you
09:13want to be careful that you make sure that it is within this edge. So keep those all
09:19contained within the edge, and in that case, you might run into a problem if you don't.
09:25The other thing that you can do is in Layout mode, you can add another Tab panel inside
09:31this if you'd like to. So you can have a Tab panel here for Logo, Contract, that type of
09:42thing. So now I can take this Logo field, make sure it's contained and then I can have
09:53another one that maybe has a different container that we can embed a file into, for example,
09:57like a signed contract. Now you can resize the entire Tab panel by selecting it and resizing
10:04it, but keep in mind that if some of the items no longer fits, you have to be always aware
10:10of the objects contained within because you want to cut those off. So you've got to make
10:14sure that if you're going to do any kind of resizing after you've put objects inside the
10:17Tab panel already, make sure that you're resizing some of the elements inside of it first,
10:25like this for example. And then you can go in and actually resize the Tab panel. So always size
10:31the elements inside first before you resize the entire Tab panel itself. Tab panels are
10:35a great way to reuse the screen real estate for other information that you want to add
10:40and to get rid of clutter and allow users to have all the information about something
10:44on your layout all at their fingertips. I'm going to be applying these tab panels to the
10:47other exercise files and doing some other finessing here with the layout tools, but
10:52you can use these exercise files for practicing adding tab panels if you like.
10:56The tab user interface is a popular design feature for many applications, not just FileMaker.
11:01So your users are going to be comfortable when they see these on screen. They'll know exactly
11:04what to do because they've seen these before in other applications. So using the Tab Control
11:09feature in FileMaker layouts will help you easily create tabs to organize fields and
11:13other layout objects without having to create new layouts or larger layouts.
Collapse this transcript
Setting the tab order
00:00When users start using your FileMaker Database, you might find out that they would rather
00:04keep their hands on the keyboard and tab through different fields when they're doing data entry,
00:08especially actually in the case of data entry. The alternative of course is users having
00:13to click into each field when they want to add new data, and that can slow people down
00:17when they're doing data entry. So an important aspect of creating an effective User Interface
00:21is managing how users move through the layout. The primary means for doing so is by customizing
00:26something that's called the Tab Order so that you can create smooth and logical progression
00:30throughout your layout. FileMaker creates a default Tab Order in Layout mode, if you
00:36into View > Layout mode, you'll see that under the Layout menu we've got this option down
00:42here for Set Tab Order. This reveals arrows next to every field object or even button
00:48object, buttons will be covered in the scripting chapter, but that's, for example, like a graphic
00:52or something or any other layout object that has a script action assigned to it.
00:56Since users can interact with those buttons, those are also included in the Layout Order.
01:01You see one of those here in the upper right-hand corner, but you see all these numbers already
01:07assigned, FileMaker assigns a default tab order for each layout according to the physical
01:11placement in the order of placements of these objects that you see here. You'll also notice
01:16that Tab controls are included in the Tab Order, but the default option that FileMaker
01:21has given us here is starting with the upper left-hand corner and kind of reading down.
01:26But you see that the AddressStreet field was placed before the contactName, so it's all
01:30kind of messed up. So we actually have the ability to reset this Tab Order and the easiest
01:34way to do it is to choose the Clear All button, and you see now that all the different arrows
01:38are now cleared out. This allows us to do two things, not only reset the order in which
01:42users can tab through the fields, but also to omit certain fields that we don't want users changing.
01:47For example, the primary key field is going to be auto entered so we want
01:50to exclude that completely. So now what I can do is I can just click on the fields in
01:54the order that I want them to be tabbed, so I click on CompanyName, Contact First, Last,
02:02Title, PhoneNumber, you get the idea here, and I can leave all these alone because these
02:09are auto enter ones as well, and I can even include this button there if I'd like.
02:14So let's take a look at how this looks in Browse mode. First, we have to hit OK to apply them,
02:20we are all set, go to Browse, Save our changes. So now let's say we get a new record, automatically
02:26when a new record is created or any time the user lands on this layout, it's going to activate
02:31the first field in the Tab Order, that can also be useful, depending on what sort of
02:35techniques you're using as you navigate from that to layout. And now I'm just going to
02:38hit the Tab button on my keyboard, and you see that it's going in the order that we originally
02:43created, and it's even selecting the buttons. So now when it comes to a button, it'll just
02:47select the button, but it won't run the action that's associated with it. I'll need to actually
02:52hit my spacebar in order to be able to activate it. If I go into Layout mode, and I show the
02:59Tab Order, if I go in here, and I say I want to add the Tab control now, you see that it
03:05adds it to the last one, but I can change that to a number 2, for example, and click
03:09outside the field. And what's nice is that FileMaker then reorders everything after it,
03:13which is a very handy tool so that you don't have to go in and reset the Tab Order from
03:18scratch every time. So you'll notice now I'm tabbing over to the Tab Control, and you see
03:24that it just activates the first panel, but if I want to go to other panels what I can
03:28do here is I'm using my arrows, my left and right arrows on the keyboard, and if I hit
03:33the Spacebar it'll activate whatever panel I'd like to. And then I can continue tabbing
03:38off the panel into other objects onscreen. You will also notice that that dynamic renumbering
03:45works if I want to add a new field to a layout. It'll add it to the end of the Tab Order,
03:56but again, if I go in here, and I select it, it will then move it into the Tab Order and
04:01then move everything that comes after it dynamically. One thing to note however is that if I have
04:06a field let's say, for example, this TaxRate one that I just added, and I move it over
04:12to this gray area, the sort of staging area off to the right, it's not going to be part
04:17of the Tab Order, even if we go under Layout mode here, and we see Set Tab Order, we see
04:21that it's included as the third option. If we go under Browse mode, we click into the
04:27first field, and we say Tab 1, 2, and it should be going to the field that's over here, but
04:33it's been skipped, because it's over in the gray non-active area of the layout.
04:38I'll be going through each one of the layouts in the Excise Files, and applying these same changes,
04:42you can certainly do the same on your own if you'd like some extra practice.
04:46You'll find out that the order in which the users can tab through fields and other objects while
04:50they're doing data entry can really help make the data entry process a lot more efficient.
04:55So the Set Tab Order functionality gives you control over how the Tab Order will be set
04:59on each one of your FileMaker Layouts.
Collapse this transcript
12. Finding Data
Using the basic find functions
00:00One of the key requirements of a database is to store data, but that doesn't really
00:05do you much good if you can't retrieve the data. So in FileMaker we've the ability to
00:09add data to the database, we've been working on that through quite a bit of different movies
00:13throughout this title. But now I'm going to talk about retrieving data and FileMaker provides
00:18this retrieval functionality through the Find mode features. We've been looking at different
00:23modes, of course, the default one is Browse. We've been looking at Layout mode, and now
00:27we're going to move on to Find mode. And in Find mode we're going to perform something
00:31that's called the Find Request. We're going to get real familiar with that. When you perform
00:34a Find Request FileMaker Pro searches through all the records in the table, comparing the
00:39criteria that you've entered in that request to all the data that's in the table and then
00:43it comes back with all the matching records. And these matching records are what are called
00:48the Found Set, and that's going to really important thing when you're working with FileMaker,
00:52this idea of a Found Set. It's basically just the records that come back after you've performed a find.
00:57And records that don't match the criteria are then omitted, but they're still in the database.
01:02So, you know, we've got 1523 records in the Customer Table, but maybe we don't want to
01:06work with all 1500 all the time, so things like printing, exporting all those different
01:12types of things are affected by the found set, they will only export the Found Set,
01:15for example. You can enter Find mode a couple of different ways. You can go under View to
01:20select Find mode. You can do that also here, you can hit the Find button on your Status
01:26toolbar, but what most users end up doing is just using the QuicKey equivalent, which
01:31of course is Command+F on Mac and Ctrl+F on Windows, and that will get you right into
01:36Find mode. Now the first thing you see it's a little dramatic change, it might look like
01:40you've just deleted all the records in your database. But one of the really neat things
01:44about FileMaker that sets it apart from other database systems is that you can use any screen
01:49in your entire database as your search layout or your search screen. This means that any
01:55combination of screens or one screen that you've got or different layouts, those can
01:59all be used so that your users can interact with Find Request. You could of course, create
02:04your own special find screen, but you don't have to. The users can be trained to be able
02:09to extract whatever data it is that they're interested in retrieving from your database
02:13by simply using Find mode. When you're in Find mode, and this is an indicator that tells
02:18you that you're in Find mode and not, creating a new record or having deleted all the records
02:22is that you'll notice in the corner of all the fields you see this little magnifying
02:26glass here. That indicates that you can access this field in Find mode first of all, because
02:32sometimes the field behaviors might be turned off, but also indicates the mode that you're
02:36in. So now what I'm going to do is I'm going to click into a field. Here's the State field, for example.
02:41I can type something in here, I'm just going to type in California, and
02:44I can hit the Perform Find or go under Requests and hit Perform Find as well, but most users
02:49just hit the Enter key on their keyboard. And you'll see now that it gives me a found
02:54set of data. This is what's referred to as a Found Set. I can search on any one of the
02:59fields if I'd like. For example, if I go into the City field and type in L-O-S, hit the Enter
03:05key, and I see that I get four records in this case. So let's take a look at this for a second.
03:09So we'll notice up here in the upper left-hand corner, and this is pretty important,
03:13this is a visual indicator telling me that I've got a 4/1523. So what that tells me
03:19is that I've got 1523 total records in the table that this layout is based off.
03:24So it tells me I've got 1523 customers. But at the moment only four of them are in my active Found Set.
03:30So you'll see if I go to print something, only those four will be printed
03:35or if I go to export these things or save them as an Excel or anything like that, it's
03:39only going to export these four. And, by the way, also Deleting Found Records applies to
03:45only the active Found Set. Now technically speaking, when you hit Show All you've now
03:51made your Found Set all of the records in the database. So it's still a Found Set and
03:56then we'll go back in here and bring those four records up again. I can move through
04:01each of the four records if I'd like you, and I can manipulate these in any way that
04:04I see fit. You'll also notice next to the numbers here is this little Pie Chart, and
04:09what that indicates is that these four records are really this percent of the overall records
04:15in your database so that can be a useful visual indicator. All the other records still exist
04:19in the database, but they're just not visible to the user. For example, I could go under
04:24Records, and I can toggle between them using this Show Omitted Only option, and now what
04:29it does is it switches back and forth. It says, okay, well now all the records that
04:33don't match the Find criteria which was los in the City field, all of those are now part
04:39of the Found Set. Out of the 1523, 1519 are showing, so you can toggle back and forth using that.
04:44The other thing that's important to understand is that each user that's in
04:48the database gets something that's called their own session. So when they login to a
04:51database they are kind of initiating this thing called the Session and they can do things
04:55independently of the other user sessions. So when I'm doing a search, and I'm isolating
04:59four records all the other users that are connected to this database, they are not going
05:03to see my Found Set. They are going to be able to create their own or just see all the records.
05:06So that's another thing that add some additional levels of versatility to working
05:10with Found Sets in FileMaker. The other thing you'll notice is that I did a search for the
05:15search term L-O-S, and you'll notice that I've got Lost Nation, Los Lunas, Lost Creek
05:21and Los Angeles. So even though I put in L-O-S, it still returns back values like L-O-S-T.
05:28So what it's doing is it's finding the L-O-S part in each one of these because what its doing
05:32is doing a search based on the field's index. And that's something that you'll see by, if
05:37you click in here, there is a little trick here. So if I Command+I on Mac or Ctrl+I on
05:42Windows you see that it will pop up the Index. So the way that finds work in FileMaker is
05:48that when I go in and I type in L-O-S, it's not going through all 1523 records and comparing
05:54LOS to each one of those records on at a time. You saw that we've got a really snappy response to searching.
05:58The same would be true if we had 15 million records in this database, it
06:02would take us less than a second to retrieve the matches. Because what FileMaker is actually
06:06doing is it's creating this thing called an Index. So what it's done is it's gone into
06:11the City field, and it's noticed that all these different words exist in the City field.
06:17And what we're not seeing here though is it says that the word Acosta is in at least one
06:23record, we know that. But it's putting the record IDs of each record. It's storing that
06:27in this thing that's called an Index. It's just get stored in the memory of the application,
06:31aside from viewing it here you can't really access that or use it, but FileMaker uses
06:35it all the time. So when I type in L-O-S, it's actually going into its Index looking for
06:40L-O-S, and it's saying, well here is the four record IDs that actually match that.
06:44So that way it's really just comparing the Index which doesn't have any duplicates in it and is a
06:49much smaller list than all the records that we have in the database. So that's the secret
06:53is to how this works. And also it has two different types of indexes, this is what's
06:57called the Value Index, so it's just looking at this as not the word McLean, but M-C-L-E-A-N,
07:03and it also can do individual word. So this is where we actually will see you know the
07:08L-O-S built inside the field. So when FileMaker is doing a search it's just taking whatever
07:13you typed in and comparing it against the Index. Another example of this if I go into
07:19Find mode, type in angel, you see I get Los Angeles and Angels Camp, and this is just
07:26a demonstration of how, it doesn't even have to be the first word. Here the angel is the
07:30second word in a field and here it's a first word. And that doesn't matter to FileMaker
07:34because it's actually breaking apart all these individual words rather than you see we've
07:39Angels Camp right there, but when I break it into individual words it's just going to
07:42be angel and then camp a separate word. It gives you a ton of versatility when you're
07:46searching for these things in FileMaker and make sure your users are trained on this type
07:50of functionality because they are going to be able to do some really interesting things
07:53when searching for data in the database. So these are basic ways to find data inside your
07:57FileMaker database. Keep in mind that in addition to FileMaker's ability to be able to create
08:02the data storage mechanisms and provide a user interface, it also provides this very
08:06powerful data retrieval mechanism.
Collapse this transcript
Reviewing new requests in Find mode
00:00In many cases when you are searching through data in your FileMaker Database, you might
00:03need to search for multiple criteria in one single field. In these instances you will
00:09need to be familiar with something that is called Adding a New Find Request. So for example,
00:13in this exercise file let's say I want to create Found Set of Customers in California
00:18so that I can print a report, and I only need to see the California fields. So, I will go
00:22into Find mode, click into the State Field, simply type in California. Now, when I hit
00:27Enter to perform the Find, I will see that I have got 24 records that match that criteria.
00:33However, now let's say our Boss comes back and says, well, I actually want to see a report
00:37that contains both the State of California and Washington. So now we go into Find mode again,
00:43and I can try California, well, if I put California and Washington in the same field, what I am
00:48actually going to get is an Error that says, No records match this Criteria.
00:51Of course they don't, because there is no State that is CA WA. So the way that we will actually
00:56do this is to go up here, we see this button called New Request, I can create a New Find
01:02Request for the same search. This is important to kind of wrap your head around this you
01:07will notice that it gives me another line and up here in the upper left-hand corner,
01:10we see that this number has turned to 2, and I can navigate back to the original Find Request
01:15and what it allows me to do is now put a different value in the same field. So what I am actually
01:21asking the database to do now is to show me all of the records where the State matches
01:26California or Washington. So you will now, and when I hit Enter, it gives me 57 records,
01:32and it is a mixture between the California records and Washington records. When you are
01:36in Find mode, you can add New Requests, but you can also Duplicate Requests if you want to.
01:43So if you've got a very sophisticated combination of a bunch of different fields
01:47and search criteria, you can simply duplicate it and add new criteria if you would like to.
01:52So what are you really doing when you are searching is you are saying to FileMaker,
01:54give me records that match this value or this value. Now alternatively, if I hit Cancel,
02:02and I go back into Find mode, and now what I am going to do is in the Last Name, I am
02:06going to type in Hanks, and I go into the State, and I enter in CA, but now what I am
02:12asking FileMaker to do is search for any record that has Hanks and the State of California.
02:18So when I do a Perform Find, we see that we get two records that have the Last Name Hanks
02:22or that include Hanks in the index and then also the State of California. I could accomplish
02:29the same thing by going into Find mode, typing in the Last Name Hanks, creating a New Request
02:36and then type in CA. Now when I perform the Find, what it is doing is it is giving me
02:41all the Californias or the Hanks. So, we see here that we have got Hanks that is not in
02:46California, but it was part of my Found Set, because when I went in, I said well, this
02:52way I want to create a Found Set of all the Hanks. There are three of those. But I want
02:57to combine that with the Found Set California, which gives me a combination of both.
03:06This is what is called an Or search. So, really what we are asking FileMaker to do in this
03:10case is saying give me all the records that match this request or this request and my
03:17Found Set showed matching records in either one of those two. Couple of quick notes, when
03:21you are in Find mode, you can continue to Add New Requests as many as you like actually,
03:25but keep in mind that the more you add the less likely you are going to have matching data.
03:29But at some point when you are adding requests, you will notice that this Error
03:33pops up in FileMaker, and it says hey, by the way, You are in find mode and appear that
03:37you think that you are adding new record data rather than entering find criteria.
03:40This happens every so often and really these magnifying glasses here should be an indicator to your
03:45users that they are not creating new records, but instead Find Requests. But it can be rather
03:50disheartening for users if they think they are in Browse mode, creating new records,
03:53but really they are in Find mode by accident and then when they hit Find, it just says
03:57can't find any other criterion and all those records are lost. Another thing that I want
04:01to show you is when we go into Find mode, we see that there are button here called Matching
04:09Records, either Including or Omitting, whatever criteria that we have got here.
04:13So really what I am saying when I am typing California is that I want you to include in my Found Set
04:17any records that match the criteria. However, I could choose the Omit. So what I am saying
04:23here is Omit from my Found Set, any records that have California in it. So, now when we
04:28perform the Find, we see that it's all records besides the ones that have California.
04:34So, sometimes that is useful as well. And actually you can do combinations of these two, so we
04:38go into Find mode, and now I am going to type in California in our First Request, and I
04:45am going to make a New Request, but in this one I am going to say Hanks, but on the second
04:49one I am going to tell it to Omit any of the Hanks, but you will notice when I go to the
04:52first record that it is still, including California. So here I am saying, give me every record
04:58with the State of California, but from that list omit all of the ones that have a Last
05:03Name of Hanks. So now when I hit Perform, before we had 24 records when we searched
05:07for California, but now we have 22, because it is omitting those two records that said Hanks.
05:11So, in addition to just doing basic Finds, you can use the New Requests and even
05:16omit in combination with new request which will allow you to create both And/and Or searches
05:22when retrieving custom Found Sets of data from within your FileMaker Database tables.
Collapse this transcript
Establishing search operators
00:00In FileMaker Pro, when you're searching for data, you don't always have to specify exact search criteria.
00:06For example, in the Exercise 12_03, if I want to find all the invoices
00:10that were created between the years 2000 and 2010, I would enter Find mode, and here we
00:16have an Invoice Date. And what I could do is put-in the year 2000. By the way, when
00:23I enter in a four digit date in Find mode into a Date field, FileMaker automatically
00:27assumes that I'm searching for any date that's within that year. So I could do 2000, 2001,
00:33and you could see here it saw that there were the four characters, so now it does what's
00:37called these wildcards. So it puts an */*. So it says any month, any day of the year 2000.
00:44So, I've got a new one. I could keep doing this doing 2000, all the way up to 2010, and
00:48of course, it would find all those matching records for me. But a much easier way to do
00:53it is to use what's called a Search Operator. So I can type in 2000 and here we see this
01:00dropdown with all these operators in them. This is really a guide that tells you the
01:04different operators that are compatible with FileMaker. I could choose range, and not only
01:08was it a guide, but it actually puts in the three dots for me, but I could easily just
01:12type in the three dots which you'll get used to doing. And I'll say 2010. So in one request,
01:18I can hit Enter, and now it's going to find every invoice that was created between the
01:23years, including the years 2000 all the way up to and, including 2010. There are some
01:29other operators that I want you to be familiar with. I'll go through the most useful ones.
01:33But you'll notice that there's this one called find duplicate values. One thing I can do
01:37is go into a field, type in an Exclamation Point, and simply hit the Enter key, and what
01:43it's going to do is tell me all the different records that have another record that also
01:47match it, so basically, non-unique values. I can do the same in the Invoice # field which
01:52might be useful for us if we're trying to go in and scrub our data and make sure that
01:56we haven't duplicated any invoice numbers. Same can be true when you're bringing in email
02:00addresses, or IDs that you want to make sure that you don't have duplicates of inside your database.
02:05So simply putting an Exclamation Point in will search for non-unique values.
02:09If it finds two records that are duplicates, it's going to actually present both records,
02:14and sometimes if there are five records that are all duplicates, it's going to present all five.
02:17You can't imagine it would have the intelligence anyways that would say, well,
02:21this one is the duplicate, this is one that was created second. You can figure that out
02:25by looking at things like creation dates and modification dates, for example.
02:29Another thing that you can do is go into Find mode and one of the other operators are these Equals signs here.
02:35So let's take a look at how we use those So, if we want to be diligent about entering
02:39data into our database, and we need to figure out where all the missing entries are, we
02:43can use this technique of the Equals sign. So if we go under the Ship Via field, and
02:47put an Equals sign in, the way the Equals sign works is what it's really doing is it's
02:51saying find a match of whatever is following the Equals sign. So, if I say Equals and then
02:56I put nothing after it, what I'm really instructing FileMaker to do is find all the records that equal nothing.
03:01So, if I hit Enter, you see that this tells me I've got five records in
03:05here that don't have a Ship Via value assigned to them. This is a quick way that I can ask
03:09the FileMaker database a question as to hey! How many of these invoices haven't shipped
03:13yet? So here, I go in there, and I search for the empty values. The Equals sign also
03:18means match the whole word or empty. You'll notice here it says match whole word or match empty.
03:24Well, we can use that to our advantage as well. Some of the operators are more obvious,
03:29like, for example, you've got the Less Than, Greater Than, Less Than or Equal To, and so on.
03:33Those can be used either in a number field like Invoice Total, where I can go in here,
03:39and I can say anything that's greater than 1000, for example, and I hit Enter, now it
03:44gives me all the invoices greater than 1000. You can do the same thing for greater than
03:48or equal to. But I can also use these in dates. So here, I can say 2002. The reason that
03:56works if you remember is because dates are entered in, in the Date format, but FileMaker
04:02turns them into an integer that represents the number of days since the beginning of
04:06the calendar for them which is 110001. So really, I'm just saying anything greater than
04:10the first date of the year of 2002. So I hit Enter there, and we see that all these date
04:15fields match that range. So greater than less than greater than or equal to, less than or
04:21equal to work on number fields and date fields, and the same is true for the range function
04:26with the three dots. Those work in the same manner on both of those field types.
04:29You'll see here if I go into Find mode, and I say Invoice Total, 1000... 1500, finds any invoice
04:39that matches that range. There's a couple of other operators as well if you go into
04:43Find mode, and in a date field, if you enter in // it's going to find any dates that match today's date.
04:50So, if you're looking for invoices that were created today, you can just simply
04:54put // in there and FileMaker will know that you're talking about today's date.
04:58There's another one that can be a little bit tricky. Let's go into the Customers, and go into Detail.
05:03We've got a field here in each one of our contact records that has the At symbol in it.
05:08Of course, every email has one of those. So, if I go into the List View, for example,
05:15and go into Find mode, and I type in the At symbol. I want to search for basically any
05:22field that has an At symbol in it, so I can make sure that they're all properly formatted emails.
05:25When I hit Enter, you see that it says No records match this criteria, which
05:30is odd because every record at least visually here matches the criteria. So the reason for
05:35that is because there's actually an operator that means any one character, sort of wildcard character.
05:42I'll show you how that works in a second. But just to show you how we can
05:45actually accomplish that task that we were talking about before, if I take the At symbol,
05:49and I wrap it in quotes, now I've told FileMaker not to use it as the search term or the search
05:54operator, but instead, actually look for that text, the At symbol. So we see that all the
05:58records in our database match that. But the real use of the At symbol--for example, if
06:03I go into City, and I say L@s--what I'm asking FileMaker to do is to use the At symbol as
06:11a wildcard character within other text so that I can find words with one or more unknown
06:16or variable characters, which is what they mean by any one character. For example, in
06:22City, if I add L@s, it's going to find any records with a word that has an L followed
06:28by any character and then an s. So here I've got Las Vegas, Las Vegas, Los Lunas, Los Angeles.
06:34So, it's a good idea to get used to some of these operators here, some of them are a little
06:39bit more obscure. But the more you get familiar with these, the easier it's going to be to
06:43work with the data in your database. So, in addition to doing multiple requests, you can
06:46also insert different search operators like we see here in order to assist you, and your
06:51users in retrieving data with minimal data entry within the search request themselves.
Collapse this transcript
Constraining or extending found sets
00:00I like to introduce you to a technique that's different from doing an inclusive search using
00:04one or more requests like we talked about in previous movies. But instead, there are
00:08going to be times where we may need to add or remove from your current Found Set or Add
00:12Criteria or Remove Criteria from your current Found Set, as opposed to just searching within
00:16the entire database of records. So right now if I did a search, it will search within the
00:201523 and give me anything that matches. But wouldn't it be nice if I could sort of continue
00:25to constrain that Found Set adding additional criteria to it? Well, that's what I am going
00:29to show you how to do here. So for example, we'll go, and we will do our search for California,
00:34hit Enter, and we see we have 23 records in the database. Now I am going to go back in
00:39the Find mode, and I am going to go over to Status, and I'm going to a type in Inactive.
00:46Now if I did a separate search, what it would do is give me 147 records, it's completely
00:51ignoring the previous search criteria that I did. But if I do it in just a slightly different
00:56order, Search for California, and I do Find, and now I am going to type in Inactive.
01:03Now instead of hitting Enter or the Perform Find button, I'm going to go under the Request
01:08dialog here, and I'm going to show something that's called Constrain Found Set instead.
01:13So now what that has done is it has given me four records, so what that's telling
01:16me is that within the Previous Found Set, so I created as Found Set a 24 records, all
01:20the State California, only four of them had a Status of inactive. So the Constrain option
01:26that you find when you're in Find mode, allows you to only search within your Previous Found Set.
01:32So I can search even further if I'd like to, for example, if I go back into Find mode,
01:35and I type in andrew in the First Name field, and I go and Constrain even further, now it's
01:42searching just within the last Found Set. So now I can go back into Find mode, and let's
01:47say I want to go in here, and I say inactive. Another option that I have is to go into Request
01:53and do what's called Extending the Found Set. So now what it's going to do is it can take
01:57the Found Set of onezx, it's going to add to it any records that have a Status equal
02:00to inactive. You see we have 147 records here, and of course, that's going to include that andrew value.
02:06So we did some searches with multiple requests in previous movies, but
02:11we can do same thing here with Extending. For example, if I search for California, then
02:17I go on the Find mode and search for Washington and Extend Found Set, it accomplishes the
02:23same thing as adding multiple requests in one search. But now let's say I want to drill
02:29through the Data and go into Status and say pending, so instead of Extending, now I can
02:34go back and Constrain, and so on. Now the real power of this is when you've thousands
02:39of records on your table, and you want to be able to drill down or drill up from certain
02:43criteria to chase certain Found Sets, whether you are troubleshooting data or whether you
02:47are trying to identify a very specific Found Set of data. Using Constrain and Extend can
02:52really help you find interesting things about the data that you're storing in your FileMaker Database.
Collapse this transcript
Finding records using date, time, or timestamp criteria
00:00Another of the useful benefits when you're searching in FileMaker, are what are called date
00:04and time range searching capabilities. You'll see here in our exercise file that we've got
00:09a list of invoices and they contain some fields that have date, time, and timestamp values.
00:14We've worked with the Invoice Date in previous movies, but there are some interesting enhancements
00:18inside Search mode that you might not be aware of. I showed you one example where we could
00:23just type in a four-digit date inside in Date field, and it recognizes that four-digit date
00:29as a year. If you put a one or two-digit date in here it will search for records using that
00:36one or two-digit number in a Date field as the month, so it will actually search for
00:41this month in the current year, which we don't have any of those, but if you look here when
00:45you search, you see it does 6 and then a wildcard character and then another / and 2012,
00:50so those are just some shortcuts that you should be aware of. However, if I try to go
00:54into a new record and type in just let's say 6/2010, FileMaker is going to say, hey, you're
01:02not allowed to do that. You have to enter it in Month-Date-Year with the proper slashes
01:07and four-digit year and all that type of thing. Delete that record. Browse mode has different
01:12rules than Find mode, so if I go into Find mode, and I say 6/2009 and hit Enter, it tells
01:21me that no records are written up in the month of June in 2009, but I can change it to 2010
01:28and see it finds there's a whole bunch of records in here that were generated, the invoices
01:32were created in the month of June. So the same rules don't apply when you're entering
01:36date into a Date field that's when you're searching inside of Date field.
01:39You could also author those by yourself, you could go on and click into an invoice date, and to
01:44make it so that you can see this little bit better I'm going to click in the bottom lower
01:47left-hand corner to the Plus sign to increase the view to 150%, wildcard character/12/wildcard character.
01:56So now you can see what we're going to search for here is any month and any year,
02:02but the 12th in the day let's see if we have any matching records there. And we do, you
02:07see that regardless of the year or the month that these are all 12. The 12th day of that
02:13month, and the same can happen in any combination of Month-Date-Year. And also, if I just simply
02:19type in 6/2010, gives me anything in the month of June 2010 of course, but I can also use
02:28these sort of quick search formatting to do ranges. So I can say 4/2000... 6/2010, and
02:40it gives me anything, including April or beyond of 2000 all the way up to June of 2010 and,
02:47including that month as well. So combinations of these date and time formatting and other
02:51search operators can provide some interesting results as well. Another way you can search
02:55for values is by entering data that's not in date format typing this right into the Date field.
03:01One of my favorites is when you click into the Invoice Date I can type in
03:05the word Friday and hit Enter, although the word Friday is not stored inside of the Date
03:10field anywhere, FileMaker knows internally because it's got this established date range
03:15of 11 of the year one, all the way through the date of 12/31 4000 there's some algorithm
03:22actually that they use that tells you which of those days is a Friday, Saturday, or Sunday
03:25factoring in leap years and all that kind of stuff. So basically you can go into your
03:29Invoice Table and say, how many of these invoices were generated on a Friday or a Thursday or
03:34a Wednesday, and you can use those inside ranges if you like. We can also use brackets,
03:39by going to a Date field, I'll add this bracket here, that gives me 4... 6. So what I'm doing
03:48is I'm isolating that criteria from the other criteria that I'm about to add here, so I
03:51can say /{2009... 2010}. So what I'm doing here is I'm saying give me any month between
04:03four and six and, including, it's a really any month four, five or six, and any year
04:09'09 or '10, including both of those of course. So we know that if we put a number and then
04:15a / and then a four-digit one, it's going to recognize that month of that year, but
04:18now I can use brackets to really open up that range and say, well it could be April, May
04:23or June of any of the years 2009 or 2010. When I hit Enter we see that it gives us Junes,
04:30Aprils, Mays, 2010 and then some 2009 sprinkled in here, I'm sure, oh, we don't have any 2009s
04:36but they would be included if there were records in the database. Now the same is true for
04:41Time and TimeStamp fields, you see here that I've got a Time field. If I go into that field
04:48here for ShipTime I can simply type in 3pm, for example, and even though that's not properly
04:54formatted time, it'll still tell me anything in the 3 o'clock hour, and using the same
05:02wildcard principles that we talked about with dates, we do wildcard *:15, and what this
05:09is going to do is tell us anything with a ShipTime of 15 after any hour, in that case
05:14we see we have two 3:15s. Also I can enter in just simply AM if I want to, and it'll
05:22tell me anything that is a ShipTime that was in the morning, so these are pretty neat ways
05:26that you can do dynamic searching and the same is true for timestamps. Everything that
05:30I showed you that works in a date or works in a time you can combine those together into
05:34a timestamp search. If you get familiar with the searching syntax, it's not only going
05:39to help you but as you train your users and possibly as you start to work with scripts
05:43which we'll cover later on this syntax can help you more accurately find date, time and
05:47timestamp data within your FileMaker database.
Collapse this transcript
Using Fast Match and Quick Find
00:00FileMaker 12 has two different ways that you can create a Found Set, without even having
00:04to go into Find mode, and you can do both of these while you are within Browse mode.
00:09The first of which is a feature that was released a few versions ago and is called Fast Match.
00:14It's all based on the contextual menu, which is this menu that you see when you click into
00:17a field, and you right-click or Ctrl-click if you don't have a right-click, then you
00:22see all these different options available to you. The one down here is called Find Matching
00:27Records, and you will notice, if you are going to a field and, for example, you click on
00:31one that says California in it and right-click, when you do Find Matching Records without
00:37even having to go into Find mode it's created a Found Set with all the records that match that criteria.
00:42And there are three Fast Match options found in the contextual menu.
00:46See, we have got Find Matching Records, which we just looked at, Constrain Found Set, and Extend Found Set.
00:51These all perform searches for records that have the same data in the given field.
00:55So I can say find all the Californias or constrain the existing Found Set down to
01:00just the ones with the State of California that type of thing. So it's the equivalent
01:04of copying the contents, entering Find mode and then pasting the results, so it would
01:08be akin to this. Copy, Find, Paste, Enter. So all those steps are done in just one right-click.
01:17So let's take a look at an example of this. So we are going to find, and we'll say ME,
01:23and we do a search, and we see that we've got 26 records. So now within this Found Set,
01:28I can click into the Last Name let's say the one here that says Ippolite, and I can right-click
01:32on it and say, Constrain. So I am going to constrain the Found Set, and you see that
01:37it narrows down to the three records that match that criteria. Another way of doing
01:41Finds is up here in the upper left-hand corner, you might be familiar with this sort of Quick
01:46Find area if you use iTunes or other Apple applications, for example. What this allows
01:51us to do is click into the Field, and what it does is it does a global search, almost
01:56kind of like a Google-type search across all the fields on the layout. It's layout-specific,
02:02but here I could put in CA and hit Enter, and now what it's done, as you'll see here
02:08if we look really closely it's on the State of California which we've been doing in these examples.
02:13But also if you look in here Caymus has CA in it, Cascioli has CA in it, and there
02:20might even be some--Captiva Florida. So, what it's doing, it is searching across all
02:23the different fields. It's very handy, if you don't know exactly the context of the
02:28value that you are searching for, and it does really search just like a Google Search does,
02:32but you can control whether certain fields are part of Quick Find. You can do that through Layout mode.
02:37If you go into Layout mode, the first thing that you will notice is that all
02:41these different fields have this little lollipop looking thing on it, and I will go down to
02:46the bottom left-hand corner and zoom up to 150, so you can see. What that little green
02:51thing indicates is that it's what's called the Layout Badge that indicates that this
02:54field is included in the Quick Find. So, by default if you place a field on a layout,
02:59it's automatically going to have Quick Find associated with it, you will see here, it
03:04automatically gets the Quick Find, and I will Undo that by hitting Ctrl+Z or Command+Z.
03:10So what I can do is I can say, well, I want people to be able to search through here but
03:14the last names are kind of tripping things up and the first names are tripping them up.
03:18So I will do Shift-select, and then you will notice, when I go over into the Data Tab,
03:23you will see in the Field, Behavior section by default there is this option here for Include
03:29field for Quick Find. So, if I uncheck that, you will notice that the badges are now gone,
03:36and if I go into Browse mode, and now you see we have 140 records before. So let's do
03:42the CA search again now, and we only get a 138 because some of the ones were omitted
03:48from the Contact Name, First, Name and Last Name field, although Email is part of it and
03:52the First, Name and Last Name are included there. But in some cases where a CA existed,
03:58only in Email and not in First and Last Name, that's where we get this Found Set from.
04:02You can also remove Quick Find functionality from the entire layout all at once. If I go into
04:07Layout mode, choosing the icon here to display the Layout Setup, and you will see here we've
04:12got this check box, which is by default it allows you to Enable Quick Find on the entire
04:18layout or not. If I uncheck that and hit OK, you will see that it didn't remove the badges,
04:24but what it did is it made the badges gray. So, it indicates that if I turn this back
04:27on, these are the ones that will be included in the Quick Find, but right now none of them
04:31are included in the Quick Find. If I go back in there, I also have the ability to check
04:36it and then Reset Quick Find which means that any changes that I have made since the defaults
04:41when they are placed on the layout will be reset. So I hit Yes, hit OK, and you notice
04:47now that the Layout is sort of turned back on and then also the First and Last Name fields
04:52are now included. And the reason that you are going to want to turn some on or off is
04:55really to limit the search to only fields that contain data that you are searching for,
04:59much like we did with the names and emails, for example. There is also going to be three
05:03different color badges. We already looked at what the green means that's included in
05:06Quick Find, and we already looked at the gray that means it was included with the layouts
05:10been turned off. But there is also an option for yellow, we don't have any of those on
05:14the screen right now, but yellow badges indicate slow searches which are un-stored or un-indexed
05:20fields, fields where Indexing is turned off or related fields which we will get into more
05:25in later discussions. And you can see we have got some examples of those at least just visually
05:29inside the Invoice Detail. Any time you see the :: in front of the field in Layout mode
05:34that indicates that it's a field that's related, that's coming from another table.
05:37We will talk more about that in the Relationship chapter. But you can see here that those are fields
05:42that are un-indexed or un-stored and they are going to search a little bit slower.
05:46So FileMaker puts a yellow badge on those. So if you find that your Quick Find searching
05:51is running kind of slow or not so quick find then you may want to consider turning off
05:56Quick Find on some of these yellow badge fields or all of the yellow badge fields, and it
06:01will assuredly increase the performance of your search. So the idea here is that you
06:05might want to train your users on these different ways, they can perform finds using Browse
06:08mode because they are great tools for drilling down or drilling up in data
06:12that you are working with on screen.
Collapse this transcript
Saving find requests
00:00FileMaker actually has a third way that you can perform a Find in Browse mode, and it's
00:04a feature that's called Saved Finds. You see here that we have this Layout Status Bar across
00:10the top of our screen. If you don't already have it, we can add an icon to it that's called Saved Finds.
00:14So if we go into the Status toolbar and either right-click or Ctrl-click on it,
00:19or go into View > Customize Layout toolbar, we can add the Saved Finds icon by dragging
00:25it up to the toolbar. By the way, if you go into Find mode, that won't show up over here,
00:32but you'll notice it over on the far right- hand corner. But you don't actually need to be
00:36in Find mode to be able to do the finds, so if you want to add it to your Browse mode
00:41Status toolbar, it can be a very useful tool for you. So let's talk about how this works.
00:46If we click and hold the Saved Find, you'll notice that it's got a couple different options
00:49on here, Save Current Find or Edit any existing ones. This feature is specific to the user
00:54logged into this copy of the database. So if your Saved Find does not show any Saved
00:59Finds that means that in your account, where you logged into the database on your copy
01:03of FileMaker, you haven't done any or you haven't saved any. So if you look at the Exercise
01:07File, and you don't see the Saved Finds in later exercise files, that's because they're
01:11saved for my account on my copy of FileMaker that I'm using for this title, which is actually
01:16useful, because then the file when it's in multi-user mode allows users to save all their
01:21own without kind of cluttering it up with other users. The only thing that you have
01:24to be aware of though is that this isn't a feature that you can build in and have it
01:28be portable with the database, this is something that's going to be specific just for users.
01:33So let's do a quick search, go into Find mode, search for California, hit Perform Find.
01:39Now when we go under Saved Finds, we see it listed here under Recent Finds, and I can clear all
01:43those Recent Finds if I'd like to, but we'll leave that one in there. Now, if our users
01:47want to store this we can say Save Current Find. You'll notice in the Specify Options
01:52for Saved Find window that we can name this whatever we want, we can call it CA or something
01:57when we see it, it will make more sense, like CA in State, then we can Save that, and now
02:04we see it show up as CA in State. So you see how that works here in Browse mode.
02:08We go into Saved Find, and we do search, and it just executes that find. But we could also
02:13go in here to Edit Saved Finds, and we get a different view, this is the Edit Saved Finds
02:19dialog, and here you can see the Saved Finds listed, and these are going to be all the
02:24different find requests. So just like you can go into Find mode and add multiple requests,
02:28you can list multiple requests here, and you can edit them by adding a new one if you'd
02:33like to or editing it using the Advanced feature. So here you'll see that it's saying Find all
02:41the Request where the Criteria is the AddressState equals California. Well, I can hit Edit again
02:47and select that option, and I can go in and say WA and Change. I can also pick from different
02:54fields, I could say CompanyName equals Inc, and I could Add that if I want. So now what
03:01I'm doing is I'm finding records where this field equals this value, and this field equals that value.
03:07I could also go in here, and I could make the second one an Omit.
03:10If you remember when we did these manually, I could have one of the find requests be an Include
03:15and another be an Omit, the same kind of thing that I'm doing here, and I can go in after
03:19the fact and manipulate these if I need to. So now I'll hit OK, and let's actually make
03:31that a Find, hit OK again. So now I've modified this to say, give me all the customers that
03:40have the State of California and of Washington, and I hit OK. And now let's go into my Saved
03:45Finds, there we go, the second one for Washington finds California and Washington.
03:53And if I go into the Edit Save, instead of having this be two different Saved Finds in my Edit list,
04:00I can go into the first one let's delete that, go into the first one, and now I'm going to
04:06add to this list. So understand that this list is all the individual Saved Finds, but
04:10when you drill down into one of the finds, this list that you see here are all the find
04:15requests, so let's add a new one, State equals Washington, Add. So now this request is going
04:25to search for both California States and Washington States. So let's see how this performs,
04:34change the name, hit OK, Show All, go under Saved Find, and choose California or Washington,
04:41and we see that it automatically does that for us. The idea here is you're able to do
04:45a find in Browse mode, or actually you can even use these in Find mode, because you'll
04:49see that they're available to you here, but if you're working with a search that might
04:53be rather complex or something that you would normally make note of, like let's say there
04:56is something that you have to search for all orders over $1,000 that don't have a ship
05:00via, that have a certain status, whatever it is you can just save that as your find,
05:05and then you can just click on that from the list as time goes by. And also keep in mind
05:09that in these Saved Finds that you're creating, you go into Edit, you can do things like make
05:16the criteria say equal sign, or use another search operator, like the exclamation point.
05:25Or if you do an invoice date, you can do slash, slash, so now you can have a Saved Find that
05:29dynamically goes and finds all invoices let's say, that have today's date on them.
05:33And remember though, that these Saved Finds are specific to a single user in a database, so developers
05:38can't access these lists, nor can other users other than the ones who have set them up.
05:43These aren't bugs, it's a feature that's preventing Saved Find confusion between multiple users
05:47on the same shared database. So Saved Finds are a feature inside FileMaker that should
05:51really change the way you're searching for data inside your FileMaker databases.
Collapse this transcript
13. Sorting Data
Sorting with one criterion
00:00In each of the exercises in this title, we've been working with multiple records.
00:04But you will notice as you open up each file that the records are in order that really doesn't
00:08kind of have any relevance. It's not alphabetical order, not by contact name, or not by state
00:13or anything like that. But what's happening is when you first open up a file, and you
00:16look at these, you're seeing that they're actually being sorted in the order in which
00:20they were created in the database. That's not always meaningful to users though.
00:24So in this movie, I am going to show you how you can sort records in FileMaker, and you
00:28can sort in any layout using what's called the Sort dialog window. You can invoke that
00:32window by going into the Status toolbar and Browse mode and clicking this button right
00:36here or under Records there is a Sort option there, but what's most common is that you
00:41are going to use Command+S or on Windows the Ctrl+S option to preset the Sort dialog window.
00:47And inside the Sort dialog window, you will notice that there might already be some criteria
00:51over here in the Sort Order. It's helpful because FileMaker will actually restore whatever
00:55the most recent sort was in case you're going back and doing it again, and that actually
00:59means even if you close the database. But if it's not what you want to work with, you
01:02can hit this Clear All button. So now what you have got is a blank sort records and basically
01:06what you can do is you can pick from anyone of the fields either on the Current Layout
01:11and FileMaker does that separately than all the fields that are defined in the table,
01:15because a lot of times you are going to only choose values to sort from that are visible
01:19to you on this layout. And as you change from layout to layout, it will show different values
01:24here, or we can say all of the different values in the whole table, getting us everything
01:27to work with. So I am going to say in Customer List, we are going to go in, and we are going
01:32to choose AddressState. I can select the item and hit Move, and I move it over into the
01:37Sort Order window, and I can clear it if I've made a mistake, or I can just double-click
01:41on it, and it moves it over into that window as well. Now once it's in the Sort Order,
01:45you will see that it's got this icon here-- and for those of you using certain cell phone
01:50carriers, you may have never seen this before. But it looks sort of like a reception signal,
01:54but really what it is is it tells you whether or not you are sorting in Ascending order
01:57or Descending order. When it's a text field it will sort alphabetically, A through Z or
02:02you can toggle it to do Z through A, and numerically and date-wise, of course, it goes ascending
02:07or descending numerically. It really just depends on which one of these you would like
02:10to use, and then you can hit the Sort button or just hit Enter, and now you see a couple
02:16of things have happened on screen. So first of all, it looks like it hasn't sorted alphabetically,
02:19but in fact, it has. But what it's done is it's maintained the active record.
02:23If you notice over here, you see this little area where there is that little black line next
02:28to the record. So what that's indicating to us is that was the record that was acted before
02:33we did the sort, and it was at the top of the list, but now you'll notice it's in the
02:37middle of a list. But if we go all the way to the top of our list, we see that it has
02:40in fact, sorted all 1523 records in alphabetical order as we instructed it to. But the record
02:45that we were on at the time we did the sort is now number 704 alphabetically.
02:49The other thing you should note is that once the Sort Order is set, you can make a change to any
02:53of the records in the Sort field, then you can see it automatically update.
02:57Like, for example, if I click into Bahama and say CA and click outside of it, you will notice that
03:02it automatically drop down into the California list automatically. So what's happening there,
03:07if we invoke the Sort dialog is that it's using this default setting which is called
03:11Keep records in sorted order. When left in the default state after the Sort Order dialog
03:16is dismissed, sorting works as it did in previous versions of FileMaker for those of you that
03:20are familiar with it, but if not, basically what it does is it will not resort when any
03:24of the values are changed, but if you uncheck this and then do the sort, now we see here,
03:29we can say Washington, for example. Now it doesn't re-sort those values, and this can
03:34be useful if you are going through a list of items, and you are just trying to update
03:37them, and you don't want everything to re-sort, but sometimes it's useful of course to re-sort
03:41them on the fly. It really depends on how you want your sort to behavior. You can either
03:45go in and uncheck or check the default value. I can reset a Sort Order by going under Records
03:51to Unsort, it goes back to its original creation order. Another thing that you'll notice is
03:56that when you go in, and you Sort by Addresses, notice up here that these values are empty.
04:02So what FileMaker does by default is it will always put empty values in the top of the
04:06list, when it's a text field you're sorting on, and you are doing it in ascending order,
04:11if you Sort descending, it will put them on the bottom of the list. So basically any empty
04:15values are going to come before A, in A to Z search and Z to A, they will end up as the
04:20last ones. That's just something that you should be familiar with. So understanding
04:23how to use basic sorts is going to help you manipulate the data inside Found Sets, so
04:27they can be more meaningful when users are reviewing it on screen. Keep in mind that
04:31the Sort Orders will also affect the order in which users are viewing the records when
04:34they're being printed or exporting, so understanding how to sort can be useful
04:38in all of those functions as well.
Collapse this transcript
Sorting with related fields
00:00When you're looking at data inside FileMaker the layout which you are looking at is based
00:04on a table so that means that most of the data that you're seeing on screen actually
00:07lives inside that table, or more specifically these are fields that were defined in this table.
00:12We discussed this a bit in the relationships chapter, and we'll also talk more about this
00:16concept later in the movie. But for right now one of the things that we are going to
00:19discuss is how you can play something that's called a related field on a layout.
00:23That's given the assumption that if you look at the invoice lists in Layout mode you'll actually
00:27see an example of this. Notice that all these different fields, and I'll go down, and I'll
00:31hit zoom to 150 in the bottom left-hand corner. So that we can see that most of the fields
00:36are all fields that are defined inside the Invoice Table, and we know that because this
00:40one over here if you look closely has a Double Colon on it, I'll increase that to 200.
00:46That indicates that it's a related field and the rest of them are defined within this table.
00:50You also can see if you have the Quick Find Layout badges on, that this one is yellow
00:54because one of the things that makes a quick find search slower is if there is a related
00:58field on the layout. You can also notice that when you select a field that you'll see that
01:02in the Inspector under the Data Tab that says Customers::ContactNameFirst, whereas the rest
01:08of them say Invoices:: so that table designation before the :: tells me that it's coming from another table.
01:14There's a whole movie on this later in the relationships chapter if you
01:17want to learn more information about using related fields. But for now I wanted you to
01:21see that you can actually use these in your sort order. So let's go into Browse mode and
01:26go into the Sort dialog and clear these out so that we can start from scratch, and let's
01:31choose the ContactName field, and we see that that's listed under Invoice List, but if it
01:37wasn't under Invoice List, and were just going into the table, we notice that it's not defined
01:40in this table. So what FileMaker allows you to do is actually pick any tables related
01:45to the active table and use those fields for searching as well. So here I can go inside
01:49of this and say ContactNameFirst and sort alphabetically, and I hit Sort, and if I go
01:56all the way to the top of the list, you can see that it sorts A, B, C, and so on.
02:01So really what it's doing in these cases is just treating that field as if it's defined locally in this table.
02:07So another one of the interesting things you can do when you have relationship set
02:10up between your tables. So the rule here is that any field that you have on your layout
02:13whether it's local field or related field can be used in your sort criteria, and even
02:17if that field isn't on the layout, and it's from a related table you can also use that as a sort.
Collapse this transcript
Sorting with multiple criteria
00:00Often when you're working with FileMaker and you have a large set of records, you may want
00:04to just look at them in a certain order. This of course is where sorting comes into play
00:08and sometimes when you are shorting you may have multiple different criteria that you
00:11need to sort with. For example, in the database that we're looking at here, we've got
00:151523 records, and if I go in to sort them by State alphabetically in ascending order, we'll see
00:25that even within certain states we still have a lot of information that's kind of still
00:30out of order. So it might be useful for us not only to sort by state, but let's say then
00:34to make it more organized anytime the state matches we want it then defer to an alphabetical
00:39sorting in city. So let's take a look at that in the Sort dialog, the way we do that is
00:44by adding another criteria. So I can move City, and it's important of course which order
00:50you can move these above or below. This one of course if I executed this search it would
00:54search everything by City and then whenever the City name matches it would then defer
00:58to sorting by State, but that's probably less likely since a lot of the cities are going
01:03to have the same state, anyways, it really won't have much effect. So you can see how
01:06the order would be very important. So here it's going to sort by State and then when
01:10it finds matches in the State field then and only then is it going to defer to the City.
01:15So here it would sort all these states in within, it would do the As, Bs, and so on.
01:20So let's take a look at how that was going to work? So now if we go to our first record
01:26we see that we've got all the As, and it does A, B, C, E, G, and so on. And then now we
01:31have the AEs that goes A, B, and so on. It's important to remember, however, that the second
01:37sort criterion only kicks in when there's matching records in the first one, and now
01:41I can continue to add multiple criterion here, and I can add as many of these to the list
01:47as I'd like, but keep in mind it's going to become less and less likely that anything
01:51after the first one even comes into play. You'd have to have a record that matches State
01:55and matches City and then it would have to kick in and sort by last name in order for
02:00this to work. That might be likely, but as you continue to add more it becomes less and
02:04less likely that you don't have any records that match the criteria. So it's really about
02:08sort all the records in the foundset by this and then sort any duplicates that it finds
02:12in that criteria by this and sort any duplicates it finds in this criteria, and that criteria
02:18by this one, and I can move them around in order of priority. So in cases where you need
02:21to sort within a sort group just use multiple criteria in your short dialog box.
Collapse this transcript
Sorting using custom values
00:00Many times when you're looking at records in List View you want to sort them so that
00:04you can see them in a specific order. As we've looked at in previous movies in this chapter
00:08you can see that you can add single criteria or multiple criteria to your sorts, much like
00:12I'm doing here, State and then City, and those can also be modified to sort either ascending or descending.
00:19Now of course ascending and descending which are set here after you selected
00:23one of the values in the sort order, will sort differently depending on the field type.
00:26So for example it's a text, it's going to sort A to Z, if it's numbered, it's going to sort
00:30one through whatever number, and so on. However, that might not always work for certain types
00:35of sorts that you're doing in the database. Let's say for example we are going to do a
00:40sort by Status, clear out everything but Status, and so what it's going to do is sort alphabetically.
00:47So that's fine, we've got active here and then we've got inactive, pending.
00:53However, let's see that doesn't actually make sense, so for example, active and inactive, and pending
00:58certainly sort alphabetically but when you're looking at this data or you are printing it
01:01out or you're exporting it, and you're going to adopt the sort order maybe you actually
01:05want to see them in a different order. For example, more naturally they might go in the
01:09order of active, pending, and inactive, maybe that's actually how a customer works with you.
01:14When you first get him, they are active, and if you take them off, some sort of status
01:17they are pending and then maybe eventually they become inactive, but it doesn't make
01:20sense to have them in any other order. So the way that you can do this if you go under
01:24the Sort dialog, and you have Status selected you'll notice that you've got Ascending, Descending,
01:29and then you've got this other option down here which is called a Custom order based
01:33on something called the value list. We'll be covering value list in the next chapter,
01:37but if you're not familiar with them, what a value list is is something that you can
01:41define inside your FileMaker database that is exactly what it sounds like, it's a list
01:45of values, and you can create different list of values and save them in the database, it's
01:48just one of the areas that you can use them. So if I'd already set up a list of values,
01:52and I want to use it I would just select it from this list. However, I don't have any
01:56value list assigned currently in the database, so what I am going to do is I am going to
01:59check this thing that says Manage Value Lists. So what I am going to do is create a new value
02:04list, I hit New, and I can call it Status, and basically all I need to do is just type
02:10the values in here, so I am going to type in Active, and I am going to do a return
02:15character, that's how FileMaker knows it's a new value and then Pending and then Inactive
02:21so they are not in alphabetical order, they are not Z-A either, they are in a custom order,
02:26and so all I do is I just type in the order, I have to make sure I am spelling the names
02:29correctly so that they match the values in the field, but, also make sure that there
02:32is a return character between them. Now I hit OK, hit OK again, and now that I've got
02:37that value list chosen you'll see that the icon has changed a bit as well, and now I
02:42hit Sort, we still see Active at the top, now it's pending and then it finishes with Inactive.
02:48So what we learned here is that you're not just constraint to using your ascending
02:51or descending sort order values when sorting records in FileMaker, but instead you can
02:56create whatever customized value list that you want and set those up inside your manage value list dialog.
Collapse this transcript
Sorting using buttons
00:00FileMaker Pro provides a special interface for sorting your records, and that can be
00:04viewed by clicking the Sort icon in the toolbar or using the menu or the Quick Keys.
00:09But sometimes for your users, they might not be as familiar with this Sort dialog box as you are, so instead
00:13of providing training for them so they can view the records in their desired format,
00:17which you can do instead is allow them to use buttons on screen. This way they can sort
00:21values by just clicking on certain objects on screen, without having to mess around with
00:24the Sort dialog box. The most logical way to do this if you're looking at List View
00:28is to make your column headers clickable. This is something that people are used to
00:31from using the web, and it's very common in other applications. Later in this title
00:35we will be discussing the concept of Scripts in great detail. But I am going to introduce
00:40you now to the idea of attaching an action to a Layout object. So if you look at our
00:44Customer list, and if we go into Layout mode we will notice that we have several different
00:48layout objects on screen, most of them are field layout objects and most of them are
00:53field label layout objects, but you'll notice if I zoom, that we've also got some additional
00:59layout objects here that just happen to be icons or graphics. And in this case they are arrows.
01:04But if we focus on the field labels, these are separate objects independent from
01:08the field themselves. We go back down into 150, if I select for instance the State field
01:14label, what I can do is assign to it in action that when a user clicks on it, it will automatically
01:18run some things, some action. In the way that I invoke that is by either selecting any one
01:23of these layout objects and going to Format Button Setup, or I can Right-click or Ctrl-click
01:29on this and also select button Setup and what this does is present us with the button Setup
01:33dialog and what FileMaker allows us to do is assign any one of these actions steps here
01:38to the user clicking this button or clicking on this object. So you could go to navigate
01:43to another layout or Copy, Paste things or perform a certain Find or whatever it is.
01:48But what are we going to do is we are going to go scroll down through this list until
01:52we find the section that's called Found Sets, and we are going to choose Sort Records.
01:56Now that we have selected Sort Records from the list on the left I have different options
02:00that I have to choose. So you'll notice if I do specify Sort Order, presents us with
02:04the familiar Sort Records dialog box, and so what it's really asking us to do is enter
02:08in the sort values, that every time a user clicks on the State column header it will
02:13sort by these values then. So we are provided an instruction on what to do. So if we hit
02:17Clear All, in this case we say double-click on AddressState and do that in ascending order,
02:23now we hit OK, and we notice there is this other one here, it says Perform without dialog.
02:27If we leave this unchecked, the user is still going to be prompted with the Sort dialog,
02:30even though it will have the AddressState put in there form, but the idea here is that
02:34we don't even bothering with the dialog. So now let's hit OK, go in the Browse mode, and
02:39hit Save, and we see now that when we click on the State header, we notice that there
02:43is this little kind of Mickey Mouse glove thing here that tells us that it's an active
02:46button and users can click on it. So if we instruct our users to just click on the Column
02:50header, you'll notice then that it will sort alphabetically by State. Sometimes they'll
02:54want to sort A to Z or possibly Z to A. So in that way we can use these other arrow objects
03:00to do something similar, but a little bit more comprehensive. We go into Layout mode,
03:04I am going to select the Arrow that's pointing down, and I am going to right-click on it
03:09and go to button Setup. And I am going to do the same thing here. We will go to Sort,
03:14choose Without dialog. So what I am going to do is clear out AddressState, and instead
03:21Sort by City and do that in ascending order and hit OK. And now I am going to select the
03:27other button, say, button Setup, and we will select Sort from our list, Perform without
03:34dialog, and this time we will specify this order. Let's do Clear All and move the City.
03:40But this time we are going to make it sort in descending order, and we will hit OK.
03:45So now this button has a sort ascending assigned to it, and this one has a sort descending
03:49assigned to it. Let's see how that works in Browse mode, so now let's hit ascending, and
03:55we can see that all the cities have sorted in alphabetical order, but if I hit descending,
04:01we see now that they have sorted Z to A. I will be adding Sort buttons to other field
04:06labels in the future exercise files, but you are welcome to do these yourself inside the
04:10exercise files for a little bit more practice. So in addition to having your user trained
04:14on how to use this Sort dialog window, you can also make any of the objects that are
04:18on the Layout, whether they be Field Labels, Fields, or some kind of Graphic, or Icon that
04:22you put on screen, they can use those as a button by assigning a ScriptAction to them
04:27and within that ScriptAction we can define a predefined Sort Order.
Collapse this transcript
14. Value Lists
Introducing control styles
00:00FileMaker Pro provides many tools in Layout mode for configuring the behavior of fields
00:05that make data entry easier and more efficient for your users. Among these is something that's
00:09called the Fields Control Style, which enables you to find something called the value list
00:14for data entry and then to format the field to display the value list as either a pop-up
00:18menu, dropdown list, or a series of check boxes or radio buttons, all of which we'll
00:21review in this movie. There are two primary benefits for formatting fields in this way.
00:26It allows for a faster data entry by users, instead of users having to click inside of
00:30the field and type their own value, you can provide them with a list of the selections,
00:35which will populate the field on their behalf, thereby, allowing faster data entry, along
00:40with greater accuracy. Anytime a user manual enters data into a field, you run the risk
00:44of misspelling or inconsistent data. Providing with a list of values to choose from goes
00:48along way towards ensuring consistent data entry, and user are usually accustomed to
00:52working with data entry devices such as check boxes and dropdowns and other applications as well.
00:56So in addition to consistency, you also get a bit of familiarity, when it comes
01:00to users working with your database. In this movie, I am going to be discussing how to
01:03set up control styles for fields. Typically, you are going to apply a control style to
01:08a field that you've already added to your layout. So if we go in the Layout mode on
01:11the Invoice Detail Layout here, we see all the different fields onscreen, and so in order
01:16to add one of these control styles, I am going to select a field onscreen.
01:19Although it's also possible to add a field control when adding the field to the layout at the same
01:23time by using this Field Control dropdown that you see here. So I can add a field and
01:31select one, and that will automatically ask me to add a control. But instead what we're
01:36going to do is we're going to work with a field that already exists on the layout, and
01:39in this case, it's going to be the InvoiceDate field. Now if you don't have your Inspector
01:43showing, you can go under View Inspector or do the Command+I or Ctrl+I. So now that
01:50we've got the Inspector open, and we've got the InvoiceDate field selected, you'll notice
01:54under the Data tab that we've got information here about Field that says Display data from,
01:59gives us the table and the field name. But you'll notice this dropdown here below that
02:03shows us all these different Control styles that we can apply to a field. Let me take
02:07a moment to review with you what all these Control style options are. For starters, the
02:11Edit box is a style that's given to a field by default, and it means that there is no
02:15action assigned to it. It really just means no control style. A dropdown list, the second
02:21one on the list here, allows users to select from a list that you've already created, and
02:26I'll talk about how to create what are called value lists. And this is a good interface
02:30because when there's a large number of values to choose from, users can then use arrow keys,
02:35or they can type ahead on dropdown lists. But it's also useful because if they choose
02:39not to use the list, they can just click twice in a field and then they can just type something else in.
02:43So, if you are not too worried about data consistency, and instead just trying
02:46to provide suggestions, a dropdown list is a good option. Pop-up menu is nearly identical
02:51to the same look and feel of the dropdown list, but in the case of a Pop-up menu, if
02:56the user double-clicks into a field, they can't bypass the dropdown and instead they
03:00must choose from one of the values that you've set up inside that field. So this is great
03:04if you insist on data consistency. Checkbox set is a style that presents the value list
03:10as a set of check boxes that the user can either click on or off. The selected items
03:14are then stored as return to limited list in the field in the background, even though
03:18when they're clicking on it, it still just looks like a check box where there's either
03:22values that are clicked on or not. What's nice about this option is that you can let
03:26users click multiple different options in a field, and they are not mutually exclusive
03:30of each other. The Radio button is similar. You can still see all the different values
03:34onscreen, of course, you'll have to create a size on screen to be able to accommodate
03:38those, but in the case of the Radio button, when a user selects one value, it's going
03:42to deselect another value. So this is when the values in a value list are mutually exclusive
03:46of each other, very common when you're using things like ON or OFF, or inactive/active,
03:51when you really have it's either/or, one of these options never and. And finally, the
03:56dropdown calendar, which we'll use in this case, doesn't actually display any values
04:00that you set up in a value list. So if we select it right now, and we go under Browse
04:05mode, and Save, you'll see that when I click inside this field, now this window picker pops up.
04:11This will happen whenever somebody clicks into a field or tabs into the field,
04:16but you'll notice that if we go into Layout mode, we have one option here, and that is
04:19to include what's called an icon to show or hide the calendar. We'll need to make sure
04:23that the field actually has borders on it, so if we go into Appearance, and we pick Line,
04:29we'll say Solid, and we'll give it black. That's what's necessary to actually make it
04:34display, So we hit Save, and now we'll see that if a user clicks into the field that
04:38does not automatically drop the calendar down, but the user would then have click on the icon.
04:42So you can have some control over whether it automatically pops in, or whether the user
04:46can use it if they so desire. The thing about these pop-ups is you don't want to use among
04:50every date field, because in the case of a invoice, it might make sense to use it, because
04:55what it's going to do is pop up if the field is empty. It'll pop up to whatever the current date is.
05:01And so if you don't have to do a lot of clicking to find the right invoice
05:05date that's fine. But if you go into like a customer record, and they have got a birth
05:09date, it will make sense for you to click and start at the current day, because you'll
05:12be clicking back you know, tons and tons of years in order to be able to find the right value.
05:16So you want to, you know, be selective when you're using the dropdown calendars.
05:20In the upcoming movies, I am going to show you how to create a value list and then apply
05:23one of these other field controls that I've viewed with you, to the field, in order to
05:27allow the users to choose from values that you've already defined. So providing field
05:31control styles and a list of values to choose from in any of the options that we discussed
05:35here will go a long way towards ensuring consistency of data entry by your database users.
Collapse this transcript
Creating and applying static value lists
00:00Several of the Field Control Style options, the dropdown list, Pop-up menu, Checkbox set
00:06and Radio button, which are the ones that you can find in Layout mode. You select on
00:11a field and go into Data, you'll see these options available to you. But all these options
00:15except for the one on the bottom the dropdown calendar all require that there's something
00:19called a Value List already setup inside the database, and whatever list of values you
00:23create and store in the database you can then reference those and then will also be what
00:27are displayed when the user clicks into the field. In order to be able to create Value
00:31List we will go into the File>Manage>Value List window, and we see that we've got one
00:36in here, we used this in our sorting exercise. But let's create a new one. It's pretty easy
00:41to do, you can just hit the New button, and then you want to give it a name so that way
00:44when it shows up on the list you can differentiate the value list from other value list, so in
00:49this case we're going to add one that's called Shipping Status. We've got Shipping Status
00:53field on our Invoice layout, and we're going to apply this to it. So here we've got the
00:57option of custom values, so this is where we're going to type in all the different values
01:00that we want users to see when they click on the Shipping Status field. So I'm going
01:04to type in Pending, and now here's the important part, I have to hit a Return because this
01:09list will need to be a returned delimited list, and I'll enter in Processing and Shipped.
01:18So again, each value must be separated by carriage Return, and if you want, you can
01:22add a divider by entering a hyphen in there, so we'll go ahead and do that so you can see
01:26what that looks like. So now I hit OK, and now we see that our list has been added to
01:31the Manage Value List window, which means that it's available not only to assign to
01:35a field, but I could then use it in a sort dialog and actually there's a few other areas
01:39where I can use this Value List. So it's universal throughout the whole file, not just specific
01:44to this layout or this field. So now I can select the Status field, and I see in the
01:49Inspector, which if you don't have the Inspector open, you can go under View and choose Inspector,
01:53but I see that its default control style edit box is still selected. So I'm going to choose
01:58dropdown list, and now because the dropdown List Control Style requires a Value List,
02:04I'm prompted to enter the Value List or pick one from the dropdown, so this is where it's
02:08helpful to use a naming convention, because I can see, I can choose the Shipping Status
02:12instead of just Status. And if I want to invoke the Manage Value List dialog I can do that
02:17by hitting this pencil, and it will popup for me. Well, let's go into Browse mode and
02:21see how this looks. And when I select the field I see that here's all the values that
02:26are available to me, and we see that that hyphen turned into a nice clean looking divider.
02:30Now the thing with the dropdown list is that if I click twice into the field, the user
02:33can still type a value in there. So it's helpful if we want them to be able to tab or click
02:38into a field and see these, but if they click again, they can just type some other value
02:42into the field or whatever they desire. But if we want to be a little bit more constrained
02:47and allowing them to do what they want to do, I can instead choose Pop-up menu, Pop-up
02:52menu is more restrictive in that when we're in Browse mode, we see that it only allows
02:58them to choose one of these options. So just to say if you want to do more consistency
03:02in your in the data entry, so you can either choose the drop down list that will popup
03:08any time the user clicks into the field or you can even do a dropdown list where you
03:11show what's called the arrow, and that of course requires that you've got a line that's visible.
03:18So if we go into Browse mode, so now when the user clicks, and it doesn't pop-up
03:24the list, but they can select it on their ownor I can make it so the arrow is not there,
03:28so when they click it, it shows it but then they can click again and they can dismiss
03:32the list or of course I can use the Pop-up menu option. And to show you the other Control
03:40styles in action let's go to the Taxable field down here, it doesn't have a Control style
03:45applied to it yet, but let's say we want to choose whether something is taxable or not,
03:49so Yes or No. So in that case we would want to use something called the Radio button set,
03:54and we'll add a new Yes or No value list, Yes, No. Of course, making sure there's carriage returns.
04:03We hit OK, and now that's available to us, and so we can see that its changes
04:08will give this little bit darker of a color, so it's more pronounced. And now when we go
04:14into Browse mode we can see that the user can pick either Yes or No, but not both.
04:21These options are mutually exclusive of each other, but let's say for whatever reason we want
04:26them to be able to choose Yes, No or both doesn't necessarily make sense in this case,
04:30but if we wanted to do that just to give you demonstration, that's what the check box set
04:35provides, so I can pick one, both or none. Of course in this case the Radio button makes more sense.
04:42By creating a Value List, you can provide users with options to choose from,
04:46rather than having them figure out what data entered in specific fields. Static Value List
04:50will require the manual entry of the items that will appear in the Value List, and you
04:54do so through the Manage Value List window, but after you create your Value List, keep
04:58in mind that you can use them throughout the database, but also that you want to choose
05:01which kind of Control Style makes the most sense for this data. For example, like using
05:05the Radio button instead of Checkbox and the Taxable field. So getting to know the different
05:10values that you can create, storing them in your database and then understanding the Control
05:14Styles at your disposal will really help you make a more intuitive interface for your users.
Collapse this transcript
Creating and applying dynamic value lists
00:00In the previous movie we discussed creating a Static Value List that will contain a preset
00:05range of values. There is also another way that you can populate a Value List, and assign
00:09it to a Field Control on a field in a layout, and that is called creating a Dynamic Value List.
00:14Dynamic Value Lists are created on the fly based on data that is already in a field.
00:18If you remember, in a previous discussion, we have talked about how each field in FileMaker
00:24can have an Index. We can actually see that Index if we click inside of it, do Command+I
00:29or Ctrl+I on windows. So what this tells me is that out of all 146 records in the Invoice
00:34table that only one of these three Options shows up in any one of those fields.
00:38So it could be that there are 100 of them that say Pending and 20 that say Processing and 26
00:44that say Shipped, but all FileMaker does is create a alphabetized and de-duped list of
00:49values in what's called an Index. So we can actually draw on this Index to create a dropdown
00:55Value List for our users to choose from when they are doing data entry, and the way that
00:59we do that of course with any Value List is by going under the File>Manage>Value Lists,
01:05we see the different value that we have created and notice in the middle it says Source, and
01:09it just says Custom Values. But this time, we are going to create a new one, and let's
01:13name it Customers and instead of typing in all the Customer Names, what we are going
01:17to do is choose this Option here that is called Use Values from field. It might make more
01:21sense if was said Use Values from field Index but for those that are unaware of Indexes
01:26just as Use Value from Field. Now you get the specify fields for Value List Customers
01:31window and what we need to do is first pick a table, so let's pick Customers and then
01:36from that table, we want to pick a field. So, what we are going to do here do here is
01:40we are actually going to pick the Primary Key field, and the reason we are doing that
01:45is because when we create an Invoice Detail record, in order for it to be related to a
01:50Customer, we need to populate the Foreign Key field or the __pkCustomerID field with
01:54a primary key from a Customer. If you need more re-fresher on that please take a look
01:58at the prior chapter on Relationships to get reacquainted with the concept of Primary and Foreign keys.
02:03But for the sake of this example, we know that we need to populate the Foreign
02:06Key field on the Invoice Detail child record with the Primary Key from a selected Customer.
02:12What would help is if we had a dropdown list of all the different primary keys for all
02:15the active Customers in our Customer table. So let's do that we select Primary Key, and
02:19we say OK, say OK again and then Dismiss this. Now let's go into Layout mode and in Layout
02:26mode, we will select the __fkCustomerID field which is the Foreign Key Field in the Invoice
02:30table and in the Inspector, we will click on the Data tab, and if your Inspector is
02:35not open, you can always going under View and choose Inspector. In the Data tab, we
02:39see that we have the fields selected in the Invoice table called __fkCustomersID, and
02:44what we are going to do is choose the Pop-up menu from that list, and now we have to choose
02:49which Value List is going to populate that Pop- up menu, and we are going to choose Customers.
02:53So, actually what this is going to do, when we go under Browse mode and Save is when we
02:58create a new Invoice record, the data entry person will click into the Customer ID field
03:04and they are going to see all of the IDs from the Customers that are stored in the Customer table.
03:09Of course, this is one of the things that they have to pick in order to be able
03:12to create this Invoice, and associate it with one of the Customers. However, as we are looking
03:17at this which, by the way, this is the Field Index of the Customer Primary Key Field in
03:23the Customer table. As we are looking at it as useful as it is that they are all in numeric
03:27order, as a user, I do not know what these IDs represent. So one thing that we can do
03:33inside of our Value List under File, Manage Value Lists is to Edit the Value List, and
03:39if we go in to the Use Values from field and hit Specify Field. We will notice over here
03:43we have got a second window, and if we check this box here that says Also Display Values
03:48from second field. Now what we can do is not only display the Primary Key value from the
03:52Customer table but next to it, we will put the Company Name. This way a user will really
03:57be picking the number, and when they choose the number, it will show up that Customer
04:01ID in the field. But they are going to have the Company Name there is a guide.
04:05Let's take a look at how that works. So now we see that we have got IDs, and we also have an actual
04:11Company Name next to it. So now it makes a little bit more sense. Yeah, of course for
04:14all the ones that do have Company Names. But it is a little odd because the users still
04:18see the numbers, so maybe they do not want to see that number there. So instead what
04:21we will do is we will say Value List, and we have some Options down here that say Show
04:26only values from the second field let's see what that looks like. Now what it does is
04:32it narrows it down to just the, the values that we see onscreen and so we can pick an ID.
04:37Now in our Customers table, we have various different records that are all from the same
04:42Company but the idea for this example would be that in your Customers table that you have
04:46got an ID that is associated with the unique Company Name. So that is actually what we
04:49are seeing here, we are seeing that there is a Company called iSolutions and one called
04:52Radley & Friends. So now when we pick it, we see that we have populated the Foreign
04:56Key field, and now all these related fields populate because we have picked the Customer 1529.
05:01I can actually switch over using the Value List to pick a different Customer 1530,
05:06and it populates all the other related values here. This is a common technique, when populating
05:10child records and trying to bring in related values, but in a more common application,
05:15you can use Field Indexes to populate Value Lists for all sorts of different reasons.
05:19They are creating a Value Lists based on the Field Index, you will not have to go and manage
05:23that list inside the Manage Value List dialog, instead every time a new value is added then
05:28the list will be updated, and it will always be de-duped and indexed and make it very easy
05:33and elegant for your users to be able to use as you assign those to fields as a Field Control Style and Layout mode.
Collapse this transcript
15. Printing and Saving
Previewing pages and print options
00:00One of the benefits of FileMaker Pro is that you can print any layout that you can view on screen.
00:04So, this way, you don't have to create special print layouts, but there are
00:08some ways to approach creating layouts that can help you get better results. If you look
00:11at some of the tools that FileMaker gives you to visualize what layouts will look like
00:15when they print, then you can make all your layouts look like print layouts.
00:18The first of those tools is Preview mode. In Preview mode, you can see what a page will look like
00:24when it's printed, and you can also notice that there's page margins around the edge,
00:28those are taken into account as well. You can also change the orientation by clicking
00:33the Page Setup button while you're in Preview mode, and you can toggle between Landscape or Portrait.
00:38But when you're in Layout mode, you actually do have a visual indicator.
00:43You'll notice that you've got this dotted line here. You've got a dotted line on the right-hand side.
00:47You'll see that you've got a dotted line going across the page as well.
00:51So you will see where these two intersect. That's telling you that anything that's on the right
00:54of this page is going to be cut off in the single print, and anything that's below this
00:59will appear as a second page. So ideally, if you just want to create a layout that's
01:03going to print one page, you would make sure that nothing extends off to the right and
01:07then nothing extends below. So that's what we're actually seeing when we go back into Preview mode.
01:12We're seeing that it's cutting off anything that's below this area.
01:17So this is really where that access is in Layout mode. So, that guide is there. It can't be removed.
01:21It's there for you to be able to position things on screen when developing a layout,
01:25that will allow you to see whether or not they're going to get cut off if users try to print.
01:28Now, this is not to say that it's not a bad idea to create special print layouts,
01:33that way you can have layouts with more graphical features on them, and extend off, and use
01:37the entire full screen and then maybe have a button that a user prints to navigate them
01:41to a layout where you set things up that they fall within those parameters. But in case
01:46you want to print the same layouts that you see on screen, you are going to have to use
01:49the guide and then also check in Preview mode before you print something in order to make
01:53sure that it's going to print properly. On the Invoice list, we can use this logic to
01:58say, all right well, maybe I can move some of these fields around to make sure that they
02:03all fit within the print area. So these are kind of things that you do or maybe you decide
02:07that you're going to omit some fields, whatever it might be. But now when you go into Browse
02:13mode, and save and then hit Preview, you see that everything fits in here nicely.
02:18In addition, Preview mode also serves a couple of other proposes. It lets you preview how many pages
02:22will print based on the found set. So here, we see that if we print all the records in
02:27the found set on this layout, it will take five pages to print. It also gives us the
02:31ability to save these as Excel or save as a PDF and like I mentioned earlier to make
02:38Page Setup changes so that we can see how things will change, for example, if we go
02:43with Portrait versus Landscape and then we can actually initiate the print from here as well.
02:47The Print dialog you're seeing on screen is not going to look like the one that you have.
02:50The Print dialog itself is actually driven from your print driver that's installed
02:55when you install your printer. So, the one that I happen to have has a Details button
03:00on it, and you probably have something similar. But you'll notice that when you click on the
03:04details, you see there's going to be a dropdown somewhere, and eventually, you'll be able
03:08to find this dropdown for FileMaker Pro. It's got three options here, one for Records being
03:14browsed, one for Current record and then one just shows a blank record. The Records being
03:19browsed versus Current record is important because for example, if you're in let's go
03:24to Customer Detail, here I am on the Cris Ippolite record. If we go to print this, and
03:30it says Records being browsed, what it's going to print is all 1523 records rather than just
03:36this record that we want to see. Unless that's what we want, we want to print one page for
03:40all 1523 records, but likely, that's not the case. Instead, we would choose Current record
03:46in that case. The opposite could be true if you go back to the list, here you don't want
03:52to necessarily print something as Current record, instead it would be Records being
03:56browsed, and that way you can manipulate the found sets, and you can determine how
03:59many of these rows are actually going to print out. There are some slight changes between
04:03Mac and PC, mainly just the language that's used here in the Status toolbar. In Mac, that's
04:09called Page Setup as you see here, but in Windows, you might see an icon that indicates Print Setup
04:14When it comes to the Mac, you see that you have the ability to scale the output printing.
04:19But on most Windows drivers, you're unable to do so. The most important
04:23takeaway here is that a lot of what's happening when you print relies on the print driver
04:27that you have installed. As a matter of fact, when I go into Layout mode, and we talk about
04:31this line here let's say I go in here, and I tweak this one field to perfectly match
04:36that edge let's say I get really close to the edge like that. Then I handed over to
04:41some other users, or I put it up on the network, and some other user with a different print
04:46driver prints and they say it's cutting off a little bit. Well, that's because some print
04:50drivers are just slightly different than others. So what you really want to do when you're
04:54designing layouts is use your print driver as a guide, but always give yourself a little
04:58bit of bleed room, and that's because things change printer driver to print driver or if
05:02you're really having some complications with it just go to the user's computer that's going
05:05to do all the printing, and go into Layout mode on their machine and modify it so that
05:10it fits their driver. And for the most part, printing in FileMaker Pro is very similar
05:14to printing in other applications. If you get familiar with some of the Printing Preview
05:18tools like the Layout mode dashed line, or Preview mode itself, then FileMaker Pro helps
05:24you take all the guesswork out of the way layouts are going to look when they eventually print.
Collapse this transcript
Printing in different views
00:00When you're printing in FileMaker you really have two different options for how you are
00:03going to print your data. You can either print out one record at a time or you can print
00:07out all the records in a Found Set. When you're looking at printing multiple records or records
00:12in a Found Set, the most common way to do that is in a List View, any layout can be
00:17a List View, for example, you see here all I have to do is toggle between Form View which
00:21just shows me one record on screen at a time, and, by the way, we'll also only print one
00:25record at a time, or I can set it to view as a list. But the thing that really makes
00:29it an efficient printing view is that in Layout mode the body part, which you see here on
00:35the left that contains all of the different fields for this record. Actually is only high
00:40enough so that it can accommodate the fields, that way there is not a lot extra white space.
00:45This will be the most efficient way to be able to print multiple records at a time.
00:48If you go into let's say the Product Detail, for example, and print all 40 of these records,
00:53it's basically going to be 40 pages, which isn't a very efficient way to do printing.
00:58So the rule of thumb here is to get the most efficient use out of your prints that you
01:02want to make sure that you're minimizing the size of the body part. But even when you're
01:07printing lists you have to keep in mind that FileMaker is only ever going to print all
01:12of the records in your current Found Set. So right now if I go to Print, as I can see
01:17in Preview mode, it's going to print four pages because I've got all 146 records chosen.
01:24But instead if I decide to narrow down my Found Set here we have 19 of the 146 that
01:30match the shipping status of shipped criteria. You see that in Preview mode it prints less
01:35than one page. So you don't always need to print everything, so really the first step
01:39that you should be aware of is that you create a Found Set first, and then you'll want to
01:43choose the appropriate layout for printing those records. So remember when you're printing
01:46FileMaker layouts, make sure that you've made the most efficient layout, and of course that's
01:51going to be the one with the smallest body part on it. It's also a good idea to include
01:56as many records on screen at one time as you can to make efficient use of your printing.
02:01And also remember that you control your Found Set so that you are only printing the records
02:04that you need to, and this can help you generate precise and efficient outputs.
Collapse this transcript
Applying object sliding and visibility
00:00When you're thinking about allowing your users to be able to print layouts that you have
00:03created in your FileMaker database, there is a couple of things that you might want
00:06to take into consideration. First of all, you know that you can print any layout that
00:10you can see on screen, so you might want to prevent certain objects that are on the layout from printing.
00:15And also you want to create efficient layout so that when users go to
00:18try to print a layout you can minimize the amount of whitespace that gets printed.
00:22So in order to be able to control both of these, you will use what's called the Sliding & Visibility
00:26section of the Inspector Position tab. We'll go into Layout mode, and if you don't see
00:31the Inspector go under the View menu and choose it. And the Position Tab is the farthest left one.
00:37On the very bottom, we can go ahead and collapse these right now, you will see the
00:41Sliding & Visibility section. So first of all if we go over to the Customer List let's
00:46say we've got these arrows here that are great for assigning buttons, and we use them here
00:51for users be able to sort, but let's say that we don't want those to show up if a user decides
00:55to print this layout. So the simple way to do that is hold down the Shift key, select
01:00all the items that we don't want to have print, and even if there are some fields that we
01:05don't want to print, but in this case we will just select the graphics and in the
01:09Sliding & Visibility section you see Object Visibility Hide when printing. So now after you save
01:15your changes you will notice that they still show up in Browse mode, so it hasn't affected
01:19any of that behavior. But when you switch over to Preview mode you will notice that
01:22they're not going to print. So Preview mode also let's you preview whether or not things
01:26are visible in Print mode. Now the same is true when you save as a PDF. So you're hiding
01:32things from both printing as a hardcopy and also saving as a PDF file. There is also another
01:37way that an object on a layout will not be visible in Browser or Preview mode.
01:40If we go to the Product List, and we go into Layout mode, you will notice that there's this field
01:47here called Category, and it's off to the right, even though it's not selected to hide
01:51when printing it's off the explicit layout width. So it's in the gray area to the right
01:57of our layout area. And we go into Browse mode, we'll see that we can't see in Browse
02:01mode, and we also cannot see it in Preview mode. But if we simply go into Layout mode
02:07and include it in the Layout area, after saving our changes you'll see now that that shows
02:14up not only in Browse, but in Preview. And while we are in Preview mode we notice something
02:19else about this layout. Notice how the whitespace isn't really used efficiently from record to record.
02:25Many times in a list view this could be okay, but let's say that we want
02:29the cost to show up right at the end of the product name, instead of there being all this
02:33whitespace in-between. Since the product name is a different length every time, it's difficult
02:38for us to actually line up the fields right to the edge. So you see here with the
02:41Bonsai Gardens Guide for Beginners, it does actually follow with very minimal whitespace right
02:48after the name of the product. However, if we go into Layout mode there's another option
02:53available to us in the Inspector and Sliding & Visibility, and if we select the Product
02:57Name, and let's hold down the Shift key and select Cost and then while these are selected
03:02let's go under the Inspector, and we'll notice that there's this option here that says Remove
03:06blank space by, and if we choose Sliding left, notice that on-screen, and I will zoom
03:13up for you to 100%, you'll see that there's now these little visual indicators that are
03:17pointing in the left direction. Those are arrows so that tells us when we are looking
03:21at a layout that everything is sliding left. So what does it mean to slide left?
03:25well, let's take a look at Browse mode, save our changes. So we see nothing changes in Browse,
03:30so it doesn't affect the user's interaction with the data. But when we go into Preview
03:34mode we see now that they dynamically collapse based on wherever the data ends in the Product Name field.
03:42So what's actually happening here is that we've instructed FileMaker to start
03:47to display the data in this second field after the text inside the first field ends.
03:52So it's ignoring the edge or the space occupied by the actual field, but instead it's just working
03:58with the space occupied by the data. But while we are in layout mode I am going to show you
04:01another example of this that's even more useful. If we go into Product Print layout, this is
04:06a layout that has been specially created for printing. You see that it falls within the
04:11margins, and if we going into Preview mode we can see what it looks like. So as we go
04:16from page to page we see that we are showing the Product Name, the Category and a Description.
04:20The problem here of course is that in order to fit some of the longer descriptions like,
04:24for example, the one on this one, we had to create a Description field that was large
04:28enough to display all the values, because if it was smaller, it would cut this information off.
04:33Which is fine for the large ones with a lot of data, but then we have a description
04:37that's only one line we've got a tremendous amount of whitespace here, and we are using
04:41a lot more pieces of paper to print than we need to. Plus users really don't like the
04:45aesthetic of this. So in this case we can actually do something that's called sliding up.
04:49Go into Layout mode, and we are going to select the Description field. And now in
04:54our Inspector we see that there's another option here which is called Sliding up.
04:58So if we check Sliding up we have a couple of different options here. The one that we are
05:01going to select here is Sliding up based on All objects above. So what's that saying is
05:07just collapse this field and respect the whitespace between the object above and where this field starts.
05:14So really what we're instructing it to do if we just select one field, we are
05:18just saying collapse based on the text that you have inside the field. If we select multiple
05:23fields, then they will all collapse until they hit the text in whatever field isn't
05:27included in the sliding up. But it's best if I show you an example of this. Now, the field
05:33itself will collapse as we'll see here in Browse mode. This field is actually collapsing,
05:37but we are not seeing any change in the whitespace, and that's because the body part is still large.
05:43So in order to include the body part in this we have to select the field, and you
05:48see here Also resize enclosing part. That combination is the key here. Now we will go
05:53into Preview mode and save our changes, and now we have a very nice compact print that
05:59expands and contracts to the content that's stored within the field of layout.
06:03Now keep in mind though, it's still good practice to create a layout that has a very large let's
06:08say description field in this case. And when you're employed in the Sliding up it's actually
06:13safe for you to even create layouts that have an oversized or enormous description field, for example.
06:20That way you know if you ever get a description that's huge or very long
06:24then it'll print that because remember what you're doing when you're creating the size
06:28of the field is you're saying what the highest length or the greatest space will be occupied
06:33by the field data. And then when you do the sliding, it'll compress both the field and
06:38the enclosing part down to the space only needed to display the data. But again it's
06:42a good idea to create maybe oversized ones, because they'll shrink down dynamically.
06:47Use these options and Layout mode in the Inspector tool, if you want to prevent layout objects
06:51for printing or if you want to control the whitespace in your FileMaker systems so that
06:55you can create cleaner and more professional looking reports and printouts.
Collapse this transcript
Printing merge letters
00:00One very popular request from FileMaker users is the ability to print letters and much like
00:05other applications like Word, for example, FileMaker supports this concept of Merge Fields.
00:11If you navigate over to the layout called Custom Welcome Letter inside the Untitled_15_04
00:17exercise file. I'll show you an example of how this technique works? First, let's go
00:21to Layout mode, and you see what I've got here is really just a big text area, and you
00:26can create this by clicking in some text. And then expanded it out to whatever size
00:31you want to occupy the letter, and that's what we've done here. I'll delete that one,
00:36you can see that with eight handles shows you the area that's occupied there.
00:39And within a text area we can use regular text and change the fonts and the size and style in, and the alignment.
00:46But the key to having a good merged letter is actually having dynamic data show
00:49up in here let's see we could say this is a welcome Letter, and we could put a contact
00:56name in here so let's drag a field, and we could say ContactNameFirst. And let's look
01:04at what happens when we go into Browse mode. You see that as I go from record to record
01:09it's dynamically pulling in the CustomerFirstName so that we can print. But honestly it looks
01:16pretty hacked because the names might have different lengths and they won't expand and
01:22contract appropriately, if they do so instead what you want to do in this case is get rid
01:26of all the whitespace. And then when you're in Layout mode go to Insert and then select
01:31this thing here called Merge Field. And here we can still select a field but this time
01:35I'll select ContactNameFirst, put a little space after it. And now we are going to Browse mode.
01:43You can see that it will pull in the names but all of the text will expand and
01:50contract around the different length of the name and leave and do different line spaces as well.
01:55It's really perfect for doing any kind of merge printing. Also you can select
02:01just this piece of information if you'd like and apply style to it. And here's the another
02:07one where we can add a merge fields. So let's go ahead and do that one as well Insert Merge
02:13Fields CustomerID, and let's look at what this merged letter looks like now.
02:21To see its expanding and contracting, even the number of lines as we go from record to record.
02:28So really the take away here is that you can combine a large text area on a FileMaker layout,
02:34and this concept of merge fields to be able to create these dynamic letter type layouts
02:38so that when you print a found set of letters it will print one-page with all sorts of dynamic
02:43information in there, and you can have as many these merge fields in your letters as you want.
02:47For example, I'll add a merge fields here, we will just say it mean first there
02:56and then, and we want to verify their address so I could say Insert Merge Field AddressStreet,
03:04and it just is treated just like text, so it will do the carriage return and other Merge
03:08Field, AddressCity and then State and Zip and put a space, you got to make sure you're doing
03:20all the proper formatting. And now let's take a look what this look like in Browse mode.
03:26So now we say dear so and so, thank you for signing up such and such. Please verify your
03:32shipping address and call customer service, it doesn't match. Then you can even go down
03:36here and say instead of signing from customer service you could dynamically put whatever
03:40the salesperson is was assigned to the order something or like that. So you get the gist.
03:44Another thing I wanted to show you while we're working with Merge is that in addition to
03:48inserting merge fields let's say on this footer we want to insert the day that the letter
03:53was printed, for example, so if you look it Insert there's a new feature down here which
03:58is new in FileMaker12, that's called Other Symbol, and this brings up a view which has
04:03all these different things, these are Get functions inside calculations which will talk
04:07about in the calculation chapter but their terms that represent some kind of environmental
04:11thing, like something in your session, in your database session, something in your operating
04:15system, something on your system clock that type of thing. Some are a little bit cryptic
04:19you can learn all about these though by going into your help system or even watching the
04:24Calculation chapter in this title. But here I can select current date, for example, and
04:29notice this text that appeared I will put this on the footer and extend it out a little
04:35bit, and I can apply alignment to it, and you know, Italics or whatever, but notice
04:42that it's just simply bracket, bracket and then {{CurrentDate}}. Just take a look at
04:48what that looks like. Now if we go all the way to the bottom we see that we've got the current date.
04:52So if you want more information on what these other symbols are. You should go into
04:59the help system and learn about GetFunctions in FileMaker, everyone of these is a Getfunction
05:04but there's all search of really pretty cool stuff that you can gather and embed as a merge
05:08fields in your printable layouts. So it's a good idea when you're creating letter layouts
05:13that you always use Merge fields, however Merge fields can also be used anywhere in
05:16a layout where you want a field value to be treated as text.
Collapse this transcript
Saving as a PDF or Excel file
00:00FileMaker Pro has built-in functionality that allows you to save data that you're viewing
00:05in a layout is either a Microsoft Excel file or an Adobe PDF file, that has all the engines
00:10built in to be able to do these conversions. You can see these options in Preview mode.
00:14We are going to lay on Preview mode. You'll notice that you got these icons here at the
00:18top of the screen. However, in any layout, you can see that you got the File Save/ Send
00:24Records options and Excel and PDF appeared there as well. The Save/Send Records As Excel
00:29functionality makes it easy for user to export FileMaker data from the current layout and
00:34foundset and work with it as an Excel worksheet. Note that FileMaker12, supports both the
00:40.xsl and .xslx formats for Microsoft Excel when it comes to Saving As. This is a great
00:46option, if you want to share data that's stored in your FileMaker database with someone who
00:49doesn't have access to the database. However, before I show you this feature, I want to
00:53make sure that you understand this is not intended to be an alternative to the data
00:57in your database. You shouldn't create an Excel Spreadsheet, send it to someone who's
01:01then going to make modifications, when they could just make those modifications directly
01:05to the FileMaker database. This is intended to be for people who don't need to update
01:09the data in your database, and it's just someone, like let's say your accountant wants to see
01:13all your orders, and he doesn't have FileMaker Pro or access your database. Then fine, Save
01:18it as Excel and send it off to him that way. But it in fact, somebody contacts you, let
01:22say it's an accounting person and they want some information that's stored in FileMaker,
01:26then this is an excellent tool for being able to share the data, and it's really easy to do too.
01:29So the first thing you will need to do is identify the layout your FileMaker database
01:33that has all the fields on it that you want to export. So that's the key here, if you
01:39decide to use the Export Option, not the Save/Send As Excel but the Export Option which allows
01:45you to save an Excel document, you'll notice that you have the option to pick and choose
01:50all the different fields from the table that you want to include, however if you choose
01:55these Save/Send Records As Excel option, it doesn't even ask you for that so let's say
02:01save it our Desktop, and I am going to automatically open the file, and you see we can choose either
02:07xls or xlsx, and I mentioned that only because FileMaker can only import data as .xlsx in
02:16FileMaker 12, but it can export in both. So the other thing that's important just like
02:20when you are printing is you are saying whether or not you want to choose the records being
02:23browsed or just the current record. So records being browsed means your found set.
02:29So here you'll notice we have got all 40 selected, but if I say in search, I have only get six
02:39records selected then, when I say Save/Send Records As Excel, choose the location, choose
02:46Records being Browsed, Automatically open file, I have also got some other options you
02:50because it's Excel the Worksheet, Title, Subject, Author, I am going to hit Save, and now it's
02:55going to open up this Spreadsheet in Excel and notice that it only exported out the found set.
03:01So just like printing or exporting you have to make sure that you got the correct
03:05found set created before you save the record as Excel. So couple of things here notice
03:10first that FileMaker does do the Excel thing where it creates a first row and then puts
03:17in the field names, these are the FileMaker field names but, puts them in bold and puts
03:21them in a first row which is nice, they act as column headers that way. The one thing
03:25is though you'll notice that it's applying your naming conventions all though Product
03:29Name and Cost make sense, here the _pkProductID might not make sense so you might have to
03:35go in here and just manually change and save it before you share it with somebody.
03:40And if you use related fields, it's going to show the tableName:: and then the related field
03:45so that's definitely something that you will want to change before you share these with anybody.
03:48Other than that it's exactly what you need users can now manipulate this as
03:52raw data, create charts, import it into another system whatever they want to do it.
03:56But again, I would caution you not to create a Spreadsheet so that users can start managing the data
04:00in the Spreadsheet rather than in your database that's a big no, no. So now let's explore
04:08the option for saving as a PDF, so Show All records, in a similar fashion, a user can
04:14create a PDF file in the case of the PDF file, it's going to look exactly like a hard copy
04:20would look if you printed out of this layout. Same thing applies here, allows you to select
04:25the layout, so you got to pick the layout that you want to reflect in PDF and then of
04:29course, you want to, so let's say customer welcome letter, and you want to create the
04:34right found set so let's say before we are go in to the Customer list, we say everybody
04:39from main, se we create a found set of 26. And I'm going to another layout that's based
04:48on the customer table. So I still have 26 records, so I have got the proper layout,
04:54and I have got the found set created. So now I can go to Preview mode if I want or of course,
04:58I can go to File Save/Send Records As PDF. I'll do this one for Preview mode, so I am
05:04going to hit Save as PDF same thing here and tell it where I want to save it and after
05:09saving it, I can automatically open the file. I can even create an email with this file
05:13as an attachment. I will also want to make a decision on whether or not, I am going to
05:17choose all records being browsed the current record. And here's an interesting one, for
05:21blank record, if you have a data entry screen in your database, and it shows all the different
05:25fields that are necessary to set up a customer, for example, you might want to just print
05:29one copy of those as a blank record, and then you can send that over to customer to have
05:33them fill it out by hand so that they know what information is necessary. Just a thought there.
05:37But now, when I hit Save, it's going to take a minute because FileMaker has to
05:41pass this off to the Adobe engine, and now it will pop up, but you will notice that I've
05:45got a letter now printed with dynamic data in PDF form for every record in my found set.
05:53So it's really just a PDF version of exactly what you would print if you were to print
05:57it to a printer. So these are really great tools for FileMaker for sharing information
06:02on the fly, you can either save as Excel or save as PDF allowing you to save out formats
06:07that can be shared by those who do not have access to FileMaker Pro.
Collapse this transcript
16. Reports
Building simple reports with summary fields
00:00One of the most powerful and useful capabilities of FileMaker Pro databases is its capacity
00:05to group and summarize data in a report format, this allows you to do things like aggregate,
00:09organize, and otherwise just manipulate data that users have already entered into your
00:13system in the form of reports and outputs that gave you visibility of data that you
00:17wouldn't normally have. And the most powerful type of report in FileMaker is something that's
00:21called the Subsummary Report. At its essence is Subsummary Report is a way to present a
00:26list of data that's grouped by certain variable, let me give you an example that based on our
00:30Invoice List View. If you look at this in List View, you can see that the Invoice List
00:34layout is really just a list of a bunch of different orders, placed by a customer, to
00:39the tune of about 146 different orders. Now this is great, the information looks just
00:43like it does when the user entered into the system, but with one simple change we can
00:47turn this list into a report. Now this first step isn't going to be the Subsummary Report,
00:51and I'm going to show you sort of the evolution of the Subsummary Report starting from just
00:55modifying this List View. If you go into Layout mode, you'll notice that we have three parts,
00:59we have a header, a body and a footer. So, I'm going to use this footer here as an area
01:05for us to be able to aggregate some of the information let's say the InvoiceTotal from
01:09this list of invoices. In order to be able to do this this is going to require special
01:13type of a field, the type of field that shows this information that's been aggregated rather
01:17than input into the database is called the Subsummary field, let first define one of
01:21these subsummary fields. In the chapter on Fields we discussed all the different field
01:25types, and I told you we'll be talking about subsummary fields in this movie, so if you
01:30remember from that discussion, if you go under File>Manage>Database you can open up the
01:35Manage Database window, and if we go to the Fields Tab and pulldown to the invoices table,
01:41you see that I can add a new field right here, I'm going to add a field called TotalSummary.
01:46Now the key here is the Type of the field. The only field type that we haven't worked
01:50with yet in this title is the Summary field. Now when I hit Create, you'll notice that
01:54the dialog is a little bit different than the dialog that appears in any of the other field options.
01:58A summary field is unique in that it isn't a field that contains data,
02:01you can't actually type any data into it, and rather, it's a field that aggregates data
02:06but unlike a calculation that also can aggregate data this one is specific to just aggregating
02:12data across a Found Set, so it's really almost like a field that's defined in a table rather
02:17than a record. The value in the Summary field will be different based on the records in
02:20the user's current Found Set and of course it'll be different based on each individual
02:24user session, since they could potentially have different found sets. So as you see here
02:28we have a couple of options when we're setting up a Summary field. First, you'll see all
02:33the different aggregates we can use, we can choose a Total, Average, Count, Minimum, Maximum,
02:37and so on. Total can total values from a single number field. Average can determine the average
02:42from a Found Set of values across a number field. Count will actually provide a count
02:46of the number of records that contain a value, so basically a count of nonempty values across
02:52a Found Set. Minimum can determine the minimum date or minimum numerical value from the Found
02:56Set of a single number or date field, and the same is true with Maximum, but the opposite.
03:01So we'll notice that when I select Total I can scroll through all the other fields that
03:05are in the Invoice Table and some of them are grayed out. Those are fields that do not
03:09have supported field types, they're either text fields or their calculations don't result
03:14in a number, but basically what we need is either a date or a number. For this exercise
03:18we're going to use Total, and we're going to select a field that we want to total, there
03:21is one here called InvoiceTotal. So this is going to give us the total of all the invoice
03:26totals for all the records in the Found Set, it's going to give us an overall total of
03:30invoices depending on whatever the user is entered in for search criteria. So let's hit
03:35OK and hit OK again, and we see that we've got this field dropped on the layout just
03:40because I have that setting on preferences, and I am going to go to the Footer and drop
03:45that in the Footer, and I'm going to select these two fields and go into my Inspector,
03:53and I'm going to choose Currency, this is just a formatting thing that we've talked
03:56about of course. All right, so now let's go into Browse mode, I am going to hit Save and
04:04so here we see that we've got all the different invoices with the invoice totals, and if you
04:09look at the bottom of the screen and the Footer, you'll notice that I have a total, so this
04:13tells me that of all the 146 invoices if you total up all their totals it equals 418,390.60.
04:20So, already, this List View is now a type of a very simple report, because it's giving
04:26me information about the data that's stored in the list that I didn't have to enter into the system.
04:30The other thing that's interesting about this is if I search for the ship records,
04:34and now you see that this value has changed to 57,266.75, and this is information that's
04:41specific to the user that's working with the database as I can show you here.
04:46Anytime you want to emulate multiple users in database you can open up at two different windows.
04:51In this window I'm looking at a Found Set of all these Shipment Status equals Shipped
04:55invoices and over here I can do a Found Set of all these SalesPerson equals Jeffrey, and
05:00you'll see in this one my Summary field gives me 32,589.97, in this one it gives me an invoice
05:06total of 57,266.75. Now really we could look at these list views as different reports,
05:12I can say that this is the by shipment status report, and this is the by salesperson report,
05:17it's the same layout, but if you combine a aggregate function of some sort like this
05:22Summary field and modifying found sets, one layout can become multiple different types of reports.
05:27So in just a few minutes you can take any list view and add a Summary field
05:31to it, and you end up having yourself a nice report that can give you aggregate information across any Found Set.
Collapse this transcript
Creating subsummary reports
00:00Adding a Summary field to a List View can turn a static list into a somewhat more compelling
00:04report by showing a user some aggregate data that they did not have to enter into the database.
00:09As you see, for example, here we've done a search for shipping status of shipped, and
00:14it tells us that in that found set, the invoice total equals 57,000 and some change.
00:19However, very large List Views can still be a little too tough to interpret, but a good method
00:24for making them more intuitive is to group the data into lists. This'll break down the
00:28data into easier to consume sets of data. FileMaker has a special layout part that we
00:32can add in Layout mode, and this part is called a sub-summary part. You can use this to give
00:37your layout instructions on how to group the data in the list, and every time it creates
00:41a group, it's actually creating a mini found set of data. So it's really nested found sets
00:45in your overall found set, but setting up a sub-summary part when you're in Layout mode
00:49will give FileMaker instructions on how to group it and by what field. So let's look
00:53at the layout parts that we have right now. If we go into Layouts and Part Setup, you
00:57see that we've got the header body and footer. We are going to hit Create, and you see we
01:00have a series of parts here, Leading Grand Summary, Sub-summary when sorted by, and Trailing Grand Summary.
01:06The one I want to introduce you to is the Sub-summary when sorted by.
01:09Really, it's just a lot of FileMaker speak for saying group by, but it is important that
01:14they put in here when sorted by, because that's going to help you understand how to trigger the groupings.
01:18But basically, what we are doing here is we are selecting the button
01:20here to group by and then we have to pick the field that we want to group by.
01:25And even though we're looking at a list of invoices, what we actually want to do is sort by a field
01:31that is a related field just for this exercise. It's coming from the customer table.
01:36So since every invoice can only have one parent/customer, we are actually going to group by the company
01:40name, and we have a question that's asked to us here every time we add a new sub-summary,
01:45it says well, where do you want the grouping to start? Do you want it to be above the data
01:48that's shown in the body part or below it? We are going to say Print Above. So now you
01:52see that we got a header, and we can see, we now have whitespace here where we added
01:56this Sub-summary group part, and it's followed by the body and the footer. So what we want
02:00to do is actually add the company name to this part. It's pretty traditional that you
02:07go into the part that you just added and add the field which is referred to as a break field.
02:12It's the field that you're using to group everything. So let's say we've got all
02:17these fields right here and just for the sake of cleaning this up a little bit, we are going
02:21to go in, and we are going to get rid of these fields, and let's add SalesPerson over here.
02:29Really, that's because we want to fit it within the bounds of printing. So now what we've
02:34got is a list view that shows an InvoiceNumber, the ContactName, we can get rid of that too,
02:41and we will move the invoice over a little so we have sort of an indenting look here.
02:46So it's still our invoice list, it's still a layout that's based off of invoices, but
02:50what we have decided to do is add a part that's going to allow us to group these invoices
02:53by the company name or the customer that they are associated with. So let's take a look
02:57in Browse mode, go into Browse mode, and we save and for some strange reason, it still
03:01looks like a list view. Well, any layout with a sub-summary part is going to look like a
03:05list view until we do something to trigger the grouping to happen. So first, let's go
03:10Show All and the thing that triggers this group to happen was found in the name of the
03:15sub-summary part. Remember, it said Sub-summary when sorted by. So what we have to do is go
03:20in and do a sort, and we have to sort by the same field that we pointed to when we set
03:25up that part. So that happens to be in the Customers table, CompanyName. It doesn't have
03:29to be related field, by the way. It can be any one of the fields that are on the layout
03:32or any of the fields that are in the invoice table. I just thought this would be more compelling
03:36to sort by the Customers. So now when we sort, we see that it does group by the Customer
03:41name and actually if we go all the way to the top, there's a couple of steps I like
03:44to add here to make it look a little bit more like it's a group. I'll select the sub-summary
03:50part, and I'm going to change the fill to like a light gray, choose the company name,
03:55and hit Bold, and now let's take a look at what it looks like in Browse mode.
03:59Let's go all the way to the beginning, and now we see it's a lot easier to look at these invoices.
04:04We've got the company and then all its invoices, the next company, all their invoices, and
04:08so on and so on. pretty neat stuff. But now I am going to make this even more compelling
04:13of a report, not only is it visually grouped, but if you remember, I mentioned earlier that
04:17the sub-summary part creates many found sets of data so actually, if we look at this in Browse again.
04:23So this is one found set, that's another one, this is another, and so on.
04:28Then there's the overall found set of 146 records, but what do we remember about found sets?
04:32There is a special type of field called the Summary field that will aggregate data across found set.
04:37So we are already doing that in the footer, why don't I copy this by selecting
04:41the Option key or the Ctrl key on Windows, and I am just going to copy the exact same field.
04:46I am not going to make any changes to it. I am just going to take the same field
04:49that's in the footer and put it in this part. Let's take a look at this in Browse mode.
04:54Now we see that we've got the company and then also it tells us what their invoice total is.
04:59So now this is gray. This isn't even a field that we have anywhere, this isn't a
05:02field that's defined in the customer record or anything like that. It's just this Sub-summary
05:07field reacting to these mini found sets. Now in Layout mode, we could go another direction
05:11with this too. We could say, Part Setup, add a Trailing Grand Summary, and that's where
05:22we could put this instead of above, and now we can take a look at this in Browse mode,
05:29and you'll notice what happens on the very last page. Instead of having it in the footer,
05:33we can actually have this at the end of the list of items and the advantage to doing that.
05:39So if we go in here, and we get rid of it here is that when this prints let's go to
05:45the last page, you will see that it doesn't have to go all the way to the bottom.
05:48It kind of slides up wherever the last record so it's truly trailing. But in Layout mode that still
05:54leaves us with not having a subtotal for each company. That's a simple fix. In that case,
05:59we are going to add another one of these Sub-summer parts, and it's also going to be sorted by
06:05the same thing. We can add as many of these as we want. This time we are going to print
06:10below, and we are going to put the copy right there. So now we go into Browse mode, we hit
06:17Save, and now we see we've got the company followed by their subtotal, next company,
06:22subtotal and so on, and if we look at this in Preview mode, let me go to the last page.
06:27We see the last company subtotal and then the grand total listed there. With a little
06:33bit of layout design like a adding a little line there and another little line here, and
06:41maybe making this field bold, select the field, make it bold, now we can see that this can
06:48really come together. Tweak the layout just a tad. So in just a few minutes, you can take
06:53any list view, add a couple sub-summary parts and end up having yourself a group report
06:57which allows you to aggregate, organize, and synthesize or even manipulate the data that
07:01other users have already entered into your database.
Collapse this transcript
Adding charts to reports
00:00Adding sub-summary parts in summary fields to a layout can make the data on a layout
00:05easier for your users to read and interpret. FileMaker also has features that make data
00:09visualization very appealing. This can be achieved by adding a chart to one of your
00:13reports using the FileMaker Charting tool. So you see here in the Exercise File that
00:18I'm on a layout called Invoice by Salesperson Report and in Layout mode, we see that this
00:23is a Sub-summary report when sorted by SalesPerson. With the trailing grand summary and the InvoiceDate,
00:30CompanyName, and the Total for the body, pretty simple stuff. But what I'd like to do is in
00:34addition to just being able to view the report and seeing the breakdown of each salesperson,
00:39what I'd like to instead do is be able to visualize for each found set that I create
00:44what percent of the entire whole the salesperson's total represents. So sure I can look at the
00:49very bottom of the page, and I can see that 41,390 is the total, but I don't have a real
00:56visual representation of that. So what I am going to do is add a chart. Anytime we are
01:01talking about percentage of the whole that means that using a pie chart is going to be
01:04the best option. So first, let's talk about this Charting tool. See I've made some room
01:09for the Charting tool by going into the header and in the gray line that separates the header
01:13and the first sub-summary part I've made it just a tad bit larger. I could do the same
01:17thing by going View Inspector and going into Position and just making it a certain
01:25height if I want. But this looks like it's going to be enough room for us to put a nice
01:28pie chart in there. So now in the toolbar I am going to select this button right here
01:32which is the Chart tool and like many other layout tools once selected it turns the pointer
01:37tool to a crosshair, so I can draw a space for our pie chart. So I am going to draw this
01:42right here and then release. And what this pops up on screen is what's called the Chart Setup window.
01:46The Chart Setup has its own inspector, and we are going to go down the
01:49list and pick all the different features of our chart, and as we do so we are going to
01:53see our chart preview built right here in front of us so that we can make sure that
01:57all the selections that we are making are okay before we are done with the Chart Setup window.
02:00So first, we've got the ability to choose a Title, so I am just going to call
02:05this one By Salesperson. And I could make this based on a calculation or a specific field.
02:12So the sky is the limit for making dynamic names. Anywhere you see one of these
02:17three dots in the Chart Setup window that means that you can connect it to either an
02:21existing field or use the calculation engine to create something dynamic. Next we want
02:25to choose the Type and so we've got a bunch of different types to choose from here.
02:30So a Column chart you see here on the top of the list will compare increases to decreases,
02:36or highest with lowest, how many or how often that type of thing. So it's good if you wanted
02:40to show like monthly sales based on several different products. You can do a Column chart
02:45which is the same type of thing or a Bar chart which is basically a horizontal version of the Column.
02:51The Stacked Column and Stacked Bar are similar except in these cases they
02:56have multiple series. So they compare parts to the whole, the whole in this case is being
03:01one of the bars. So you can have two different data series that will split the bar in half
03:06or three data series will split it into thirds and each one of those parts will have its own color.
03:10You've got Positive Negative Column charts where you're comparing positive and
03:13negative values, and you're determining what the zero point will be, and that can be driven
03:17by the average or a value that's in a field somewhere. Then you've get things like Line
03:23chart which changes continuously over time. It's really good for things like historical
03:27financial data, that type of thing. The Area chart compares data that trends over time
03:31while emphasizing highs and lows and movements between data points. It's also really intended
03:36to have more than one data series. Line needs more than one data series, Area does, and
03:41of course all the stacked options do. You've got a Scatter chart where you can plot X and
03:45Y coordinates as individual values to reveal correlation patterns. For example, you can
03:50compare target wait time to actual wait time at a call center. Again, you will want to
03:54have multiple data series in that case. And a FileMaker favorite, the Bubble chart can
03:59compare individual data points in terms of size. For example, compare market share by
04:03charting the number of products sold, sales figures for per product or percentage of the
04:07total sales in each point. But the one that we are going to use is Pie and the reason
04:11we are using Pie is because you could compare percentage of individual parts within the whole.
04:15So for example, show the percentage of each salesperson's total against the total
04:20number of order sold in a found set. Perfect. So now we are starting to see some of the preview.
04:24We see our name up here. We don't have a legend yet, and we don't have any data
04:28yet, but we'll see the preview of our Pie chart once we select data. So now we have
04:31a few decisions to make as far as category labels and the slicing of the data.
04:36So in a Pie chart you just have to tell FileMaker how to create the pie slices basically and
04:40then each pie slice needs to have a label. These are easier decisions to make than for
04:45example, the Stacked Bar, where you have to say X axis Y axis, and so on. We'll do some
04:51examples of other charts in the last movie in this chapter, but for now we have to pick
04:54something that's going to act as the label for our Pie chart. So in order to choose an
04:58existing field, click on the three buttons there and say Specify Field name.
05:03So this will allow us to select from a field, or we could create our own calculation formula,
05:07but there happens to be a field already, and we're going to choose SalesPerson, because
05:11actually each one of our groups are already being broken down by SalesPerson as you see
05:15here in our sub-summary part. So it makes sense for our Pie to do the same thing.
05:20Now we need the actual data that will determine what the slice of the pie will be.
05:24And in that case we also already have a field that we created for our sub-summary part, and that's
05:30the summary field called TotalSummary. And what that does is it summarizes the invoice
05:36total for each salesperson, and that's the same value that we want inside each slice.
05:40So really what's happening in this pie chart is that whereas in the sub-summary part we
05:45were creating many found sets and then totaling them within each grouped part, we are doing
05:49the same thing here but for a slice of the pie. So now we see a little bit of a preview
05:54on screen, and we can show the Legend too. Here you see this is a listing of all the
05:59different individual salespeople with the color coding corresponding to their slice
06:03of the pie. But right now it's not actually showing our data because we need to still
06:07select some other options. So you see here down below we've got the ability to say whether
06:12or not we want to Show the values on the chart, so we'll will say sure. So now we can see
06:16the values that represent each salesperson. And how about we add percentages as well,
06:21so now you can see what percentage of the overall whole in the found set does any particular
06:25salesperson represents. Fixed number of decimals let's say we make it 1, make it a little bit
06:30cleaner and then we can pick actual values as well. So in the case of actual values you'll
06:36notice that not only is there a percentage underneath it, but there's also the dollar
06:41value that's represented for each one of these salespeople. And we can do a little bit of
06:45formatting, because you see it just looks like a raw number with decimals, so we can
06:48say Data as a Number, formatted as Currency, Use a thousands separator and the Leading Notation.
06:57Same thing we could do with a field that's a number field that's displaying currency
07:01on a layout. But now we've got all the information we need showing in our Pie chart.
07:05But there is still some decisions to make. If we click under Styles, you see that we can change the
07:11style from Flat to maybe Shaded, get a little bit of preview. We'll change it to a solid
07:173D, gives it just like a nice 3D angled look. And the chart background that you see here,
07:23we are going to keep it Transparent. That way we can reveal the color of the header
07:28part behind it. The Legend Position can be toggled, Top, Left, Bottom or Right, we are
07:32going to keep it on the Top. And the Legend also has its own Background, and we'll say
07:37No Border outside the chart, so it kind of seamlessly integrates in with the background.
07:42And we can work with Chart Text if we want to make it customized, but we will be fine
07:45with the default automatic values that we have right now. We can make the Text Size
07:50a little bit smaller if we want to fit a lot of values on screen here so that's how we will do this.
07:54I'll go back to that Size and any kind of styling that we need.
07:58Now finally, the most important part is the Data Source. We see that by default we have Current Found Set selected.
08:05This means that we are drawing data from the Found Set, and that the data
08:08will change as we update the Found Set, which is great, that's just what we want.
08:11We see we've got some other options here, Current Record or even pulling in Related Records,
08:16we will work with those in the last movie in this chapter. Since it's the current found
08:20set, the breakpoint is also taken into account. We see here that the Sort Order that was chosen
08:26is by SalesPerson, because we have a sub-summary part on this layout, FileMaker is able to
08:31make the decisions that we want to work with the Current Found Set, and that we are going
08:34to be using this break as a SalesPerson, because we actually selected that as our label field.
08:39Now, you see Chart display when layout is sorted. Well, what that basically means is Summarized
08:44groups of records, so we'll do that when we are sorting by this field, the Label field,
08:51it'll break down each group and give us the summary total for each pie, and that's how
08:55it will actually draw the pie. If we didn't do that and we just had Individual record
08:59data, we get this kind of weird sort of art looking form here. And what it's doing is
09:04it's creating a slice for every record in the Found Set, there is 146 records in this
09:08Found Set, so it's creating 146 Pie slices with one Legend per each. So as you can see
09:15even visually that's not the desired effect. We are just going to ask it to create one
09:19pie slice per group that it's finding in the Found Set. Now we can hit Done, and we can
09:24see our pie, a little bit of a preview of our pie here, but it will really be great
09:28is if we go into Browse mode and save our changes. Now we can see that not only do we
09:32have this report, and, by the way, we can print this. So if we go under Preview mode,
09:36we'll see that we've got a report that gives us a salesperson, all of their invoices, the
09:41total of their invoice and then the next salesperson, and so on and so on. But also we've got this
09:46chart that breaks down a pie slice for each one of the salespeople and gives us the total
09:52dollar value. You'll notice that Boo 33,980, Boo 33,980 and then we can see more detail here.
09:58So it's a great overview, great data visualization, using a chart at the top of our report.
10:03And then we can break down a group report which really is just a couple of steps
10:07away from being a list that provides us a more compelling way to look at this data.
10:11So in really just a few steps you take a list view, add a grouped part, add a summary part,
10:16and now even a chart. This makes this a great way to look at the data that's been entered
10:20into your database and interpreted in a very compelling manner.
Collapse this transcript
Creating subsummary reports in Table view
00:00Earlier in this title, we discussed working with the quick table view in FileMaker and
00:04how you can add and manipulate fields and look at data in a spreadsheet looking view.
00:09In this movie, I want to show you how you can add a part or at least the functionality
00:12that's produced by a part that will allow you to turn a spreadsheet looking viewing
00:16into more of a report. Specifically speaking we're talking about sub summary parts similar
00:21to how we added some summary parts to list views in our previous movie in order to create reports.
00:25You can allow your users or just yourself as the user to go into any layout
00:29that's in Table view or to switch a layout into table view and then be able to create
00:33reports for themselves. So, here I have the customer list that normally looks like this
00:38but I select the view as table, so we can get into that quick table view, and now we
00:42can pick any one of these column headers to use as our group. So you'll see here that
00:47I have over 1500 customer records here and each one of them has their own state.
00:53If I Unsort them, it'll give you a better idea of the range of the different states that
00:58we've got reflected here. So what I can do is choose any one of these column headers,
01:02and I'm going to choose the state field, because what I'd like to do is see this customer list
01:06grouped by state. So, I'm going to go into the AddressState, and I'm going to click on
01:10the dropdown on the top and the options that were interested in are the Add Leading Grand
01:15Summary or Add Trailing Grand Summary and the rest of the options associated with those.
01:19So what we're going to do is select the Add Leading Group by AddressState. When we select
01:27that we notice that our layout has changed onscreen and what it's done is it's automatically
01:33grouping all the records by each unique value that it finds in the state field. But in just
01:38being able to right click on the column header, I'm able to create what really looks just
01:42like a sub summary report that we've created in our list view earlier. This makes it a
01:46lot easier to be able to look through all this data, we can see we once state abbreviation
01:51begins and the next one ends, but we're not done yet, we can actually add some additional
01:54features to make this spreadsheet looking view look even more like a report. I can go
01:59into this group area here, and I can right-click on it, and I can actually change the part
02:03color to give it a little bit more style. Now we see the groups really pop, but in addition
02:08to that let's say, first, I want to add some subtotals by state. It's very easy to do,
02:12but just for conversation, I want to show you that in the customers table, we don't
02:16have any summary parts created. But now, we're going to create one on the fly by clicking
02:21on the State column header, and you see that we've got options called Add Leading Subtotal
02:27or Trailing Subtotal either one of these. So we're going to add either a Leading Subtotal
02:31or Trailing Subtotal, we'll do a Trailing Subtotal, and now you see what we got available
02:35to us are options similar to what we get when we set up a summary field, so I'm going to say Count.
02:39And now we see at the very bottom of the list is a trailing count of the total
02:46number of records that we have. Also though, I can go in and I can say Subtotals Count,
02:52and do a leading subtotal, and now what that does is for each group, we see that I've got
02:5822 records, this group has 87, so on, and so on. Scrolling all the way down to the very
03:03end where we got our trailing count. So it's really just right clicking on a couple of
03:07column headers we're able to not only turn this layout into a grouped report, but you
03:12see when we go into Manage Database now, we've added two summary fields on the fly
03:18by simply doing some right clicking on certain column headers, all of this being done in
03:22Browse mode in Table View in FileMaker Pro. Creating group layouts helps you turn simple
03:26lists into compelling reports. Adding group aggregate values can create useful data for
03:31you, and your users as you look at different record sets in new database. With FileMaker
03:35Pro, you can easily create group layouts on the fly using quick table view features.
Collapse this transcript
Creating quick charts in Table view
00:00Thus far, we've discussed creating reports in our FileMaker databases that you can set
00:04up and allow users to run against your stored data or even print, and save to a PDF if you like.
00:09Charts, of course, have been adding an additional layer of visibility for the
00:12reports, and in FileMaker 12, now you can allow users to create their own chart reports
00:18on the fly without you having to build a layout for them. This concept is referred to as Quick
00:23Charts, and with a little bit of guidance, users can create and print a Quick Chart in
00:27Browse mode and even create and save their own layout in the FileMaker database.
00:32So you're first going to want to have a layout in your database that contains as many fields as you
00:35want the user to be able to work with and then present that layout in Table View.
00:40So what I've got here is the customer list presented in Table View, and I could have added a ton
00:45more of these columns if I want my users to be able to pick and choose and be creative
00:49with their charting. But for the sake of this example, I've picked about six of them here,
00:53and these are all available to us to be able to chart, and express in sort of a visual
00:57way through the different charting options. Users who are familiar with working with spreadsheets
01:02and other applications should already be familiar with this concept anyways. So if you want
01:07to chart group data, then you're going to want to start by sorting one of the columns.
01:11When you start in Browse mode, FileMaker sets up a chart based on the field type and contents
01:15of the active field, and the active field is going to be the one that you right-click
01:19on when you want to create the chart. It also depends on the sort order specified so that's
01:24why it's important that we go ahead and sort these. So let's try sorting by right-clicking
01:28or Ctrl-clicking on a Mac on the Status field. I am going to sort ascending, and we can tell
01:37it's sorted because we get this little cellphone signal looking icon on the top of the column,
01:42and we also can see that they're all sorted by the different status. Now let's right-click
01:48again and choose Chart by Status. This is one of the new features in 12. We say Chart
01:56by Status, and up pops the Chart Setup window. So, this is something that users can do as
02:01long as you give them access to be able to create the things that are necessary in this
02:05interface. They can do all sorts of really neat things in this view. So now that we have
02:09the chart set up, the window will appear by default, and it has built a bar chart displaying
02:14the three statuses represented in our data set, and it's also displaying the bars as
02:18a count of all the invoices for each status. Quick Charts will work best for Column, Bar,
02:24Pie, Line, and Area charts out of all the options, because they all have single data
02:30series, and one axis, and there's also options for one or more data series on other axes as well.
02:35You can change the Chart Type, for example, to a Pie Chart if you wish, and now
02:42you can see the different statuses shown up as a part of the whole, or any kind of chart
02:47that works best for the data that you're evaluating. But this can get even more interesting if
02:52you decide to work with more than one field at a time. So for example, let's hit Cancel,
02:57and let's sort by state, Sort Ascending and then let's right-click the Invoice Total or
03:06click the arrow, and now we see that the option for Chart By a certain field has changed.
03:11Now, you can see that it's taken into account the two different fields that we've been working
03:15with, we've got Chart by Invoice Total, which we can do, or we can do Chart by Invoice Total
03:20by AddressState. So now what it's done is it's added two data series here, the Invoice
03:25Total is the active field which is determined by the fact that we've clicked on its header
03:30and then the Sort field is the AddressState so that's how FileMaker determines this.
03:34It's generically saying chart by active field sorted by this value. The Chart By value plots individual
03:42data points in a current column, and the Chart by Sort field plots data from the current
03:47column in groups based on the sort order. So let's choose Chart Invoice Total by AddressState,
03:54and up pops the chart setup. When you chart data in Table View, FileMaker users see the
03:59current state of the file and the context of your selection to be able to estimate chart settings.
04:04You can see some of them already added. So the X axis is the AddressState,
04:10the field is already chosen, the title is already given for the Y axis and the field
04:14is already chosen, all sorts of stuff is already done here, and we can see that all in our preview.
04:18And depending on the complexity of your data set and the chart type that you
04:22choose, you might need to use the Chart Setup dialog box to make adjustments to a QuickChart.
04:26We can see that FileMaker has chosen the Bar Chart and plotted each state individually
04:31with the bar representing the total invoices in each state. Keep in mind that we actually
04:35do not have a field to find in FileMaker that totals up the invoices, the Chart tool has
04:39summarized that for us. FileMaker Pro is choosing the appropriate summary type based on the
04:44active field which was the Invoice Total field. But what if we did want to work with more
04:49than one data series? Let's close the Chart Setup and go back to the layout one more time.
04:54This time let's unsort. So let's sort by address state so that's our Sort field, and now I
05:02am going to click on the Invoice Total column header, and when I'm holding down the Command
05:06key on Mac, or Ctrl key on Windows, I'm also going to select the DiscountTotal.
05:12So what I've done is I've established the Sort field, and now I'm actually picking two different
05:16data series, the Invoice Total is one data series and the DiscountTotal is another.
05:21Now when I choose the dropdown on either DiscountTotal, or Invoice Total, we'll just pick DiscountTotal,
05:26I see that my Chart Options get even more extensive. So I can chart just by the one
05:31field DiscountTotalor I can chart by the DiscountTotal sorted by AddressState, so broken down by
05:37the different states or I can do this new option, Chart by DiscountTotal as one data series,
05:44InvoiceTotal as another data series, all broken down by state. Let's choose that one.
05:50Now, up pops our Chart Setup, and you can see that we have two data series represented here,
05:55one of the data series is the total invoices by each state and then the other data series
06:00reflected here in green are the total discounts for each invoice by state. And we can see
06:06those here, you'll notice that the X axis was already determined, we see that along
06:11the bottom where we have all the state abbreviations and then we have the Data field which is the
06:16Customers::AddressState field. But now look and notice that we've got two different data
06:22series, and I could add a third data series here if I'd like to, but instead, we'll just
06:27stick with the two that we've got. So we see the first one is the DiscountTotal field,
06:32the second is the Customers::InvoiceTotal, and we can toggle these and change it to a
06:37calculation or whatever we'd like to do. But what we're doing is also telling it what to
06:41do with this data. These are the fields that it points to, but we're telling it to total
06:46up all those values in the data series. I could also decide to show a legend if I'd
06:50like to, to make it easier for the users to interpret. But what I am going to do here
06:54instead of showing two different side-by-side columns, I am going to go, and I am going
06:58to pick the Stacked Column instead. So now you see what we've got is that we've got the
07:04discount showing on the bottom in the green and then the rest of it is the Invoice Total,
07:09and I'd actually really like to swap these because I think it makes more sense to show
07:12the discount on the tip of the bar. So what I do here is I use the little handles, and
07:17I drag that to the top, and I switch these around. So now, the InvoiceTotal is in the
07:22green, and the DiscountTotal is actually on top represented in the beige color.
07:27I could also choose any of the other chart types that have multiple series like, for example, the
07:31area or line. But I think in this case, it's most compelling to show the Stacked Column,
07:40whichever one makes the most sense for your data. But the great thing about this is that
07:44your users can make all these decisions on their own, and of course, they have all the
07:47other options available to them, you can show the data points on the chart. I can format
07:52those as numbers, currency just like we were doing with fields on a layout, and I can do
08:02the same for the Y axis. Users also have the ability to choose different chart styles,
08:07choosing 3D, different color schemes, making the background transparent if they'd like.
08:15You can show grid lines or minor gridlines or major gridlines, even position the legend
08:24around at different locations, whether or not you want to have a border, all those things
08:28that we saw on the previous view. This is an area where they probably won't do much
08:32changing, but in the Quick Charts, they're going to be able to work against current found
08:37sets, so these options are already chosen for them, and we see that our sort value is
08:41already indicated, because the user had gone in and sorted by state before they created the chart.
08:46So it's pretty intuitive stuff, and it doesn't take much training to get your
08:49users to understand. But the best part is that the users can actually save their chart
08:54as a layout in your database or just print the chart that they just created.
08:58So it's not just for this one session that they're here, working with the chart, they can go
09:01in here, and say, Print Chart, and they can print it to a printer as a hard copy, or if
09:07they've got a PDF option available to them, they can save this as a chart, as a PDF, whatever
09:14they're allowed to do through their normal print drivers, and they can also save as a
09:18layout if they, like so. that they can go back to this later. So for example, I can
09:23say Save as Layout, up pops the screen that ask me to name the layout, we could probably
09:26come up with something a little less for both of these, but that's fine, we'll hit OK, and
09:30now we see a new window popped up with this new layout, and you'll see that even when
09:35we close this and a user navigates over, you'll see that we've got a new Charts folder created,
09:40and we've got a DiscountTotal, InvoiceTotal by AddressState, and when you navigate to
09:46it, it automatically sorts everything, breaks everything down, and displays a resizable
09:51chart inside the new window on screen, and of course, this could be printed at any given
09:58time as well. And if the user wants to make any changes, and of course you've given them
10:02the ability to access Layout mode, they can go in and simply double-click on it and make
10:06any kind of changes that they'd like to. Since the chart will require that the fields be
10:13sorted and show totals, FileMaker has also created a script. This is something that we're
10:18going to get to later on in this title, but it's basically a script or something where
10:21that stores different actions much like the button that we assigned the script to.
10:26But it assigns it to the layout so that anytime it's loaded, it will automatically sort the
10:29records as they need to be so that you can view the layout properly. And when I mentioned
10:34earlier that users must have the correct privileges, I meant that the users account that they use
10:38to log into the database must allow them to create layouts, fields, and scripts in some
10:42cases, because some of those summary fields were being created on the fly, the layout
10:46was being created on the fly and so was the script. So you won't see those options available
10:51if the user has logged in with limited access. And another very important note here is that
10:56you do not have to be in Table View to do a Quick Chart. I demonstrated it here in Table
11:00View, but you can start by right-clicking any field on any layout. If we go into Products
11:12List, for example, you'll see that there's the Chart by option in any of the contextual
11:17menus in any one of the list views. So FileMaker provides an ad hoc patent pending charting
11:22process that can be used even if your users cannot conceive of the graph first.
11:27Now, you can decide on the graph and then tweak it as you go along, plus users can create their
11:32own charts without you having to build it for them. Charting allows the layouts to do
11:36most of the heavy lifting of sorting, grouping, and adding summaries and the context of your
11:41database makes educated guesses about what you might be interested in charting.
Collapse this transcript
17. Calculation Essentials
Introducing calculations
00:00The three core areas of any successful database application are building the proper architecture,
00:06which we've discussed when we built the tables and fields, and the next is allowing users
00:10to input data effectively, which we discussed when we talk about developing layouts and
00:15then finally, we've also touched on the third important core value of a database, and that's
00:20allowing users to output in the form of printing and exporting. But now outputting isn't specific
00:25just to reporting or being able to print out or export data, output also means that you're
00:29putting certain data into a system and then it's been aggregated in spitting out new data
00:34that you didn't have before, and that's the role of calculation fields and the calculation
00:39engine inside the FileMaker database. These are also considered output. A calculation
00:44allows you to drive information from values or data. If you're defining the calculation
00:49in FileMaker, you're using either fields or data that you're feeding into the calculation
00:53formula that will then produce the desired output or result. So calculations have parameters
00:59or inputs and they also have a result and the result is which you're actually seeing
01:02inside of a calculation field if it's put on a layout. But keep in mind that the calculation
01:06engine is used in various different places throughout the database. Calculations will
01:10always return a result so that means you to feed the information in, and it will return
01:14some other value for you. You're probably already familiar with what calculation syntax might be.
01:19For example, if we just created a calculation that's set in text values, 2+2,
01:24well, then the calculation results will always be 4. Now if we're creating a calculation
01:29in our database, instead of saying 2+2, what we'd actually do is put the word, amount,
01:35plus the word, tax. Now in FileMaker we're not actually adding words together, what we're
01:40doing is we've a field that's called amount and a field that's called tax. So when we
01:44are creating the formula, we're actually saying take the value inside the field amount and
01:49add it to the value inside the field tax and in that way it can reevaluate and gives us
01:53a different result for every record that's stored in the table. As you flip from record
01:58to record, the value in the amount field will change the value in the tax field is going to change.
02:02So, therefore, the value returned from your calculation will also change.
02:07There are many different uses for calculations, for example, the most obvious is that fields
02:11can hold and display the results of a calculation. But you remember we set up our fields that
02:15we can also validate based on a calculation and then we can also do auto-entries based on calculations.
02:21You'll also see that when we get into movies on scripting that we can
02:24use calculations to help us run scripts in a dynamic way and to set up specific types of security.
02:29There are really a dozen different places inside the fabric of FileMaker that
02:33allow you to leverage what you know about specifying calculations and understanding
02:37the different parameters and formulas. So, really, to learn how to use calculations,
02:42we're going to want to understand the Calculation dialog and the calculation formulas.
Collapse this transcript
Exploring the Calculation dialog window
00:00In this video I'm going to introduce you to the mechanics involved in the Calculation
00:04dialog so that later when you encounter it when you're defining fields or the various
00:08other areas in FileMaker were you can invoke the Calculation dialog then you have the understanding
00:13needed to write some initial formulas. So the first place that we can see this dialog
00:16is if we do under File>Manage>Database, and we can create just a Sample Calculation Field.
00:25Say we type in any old name, and we are going to choose the Type of Calculation.
00:30Now when we hit Create we will see the Specify Calculation dialog appear. Again, this is just one of
00:35the many areas where you can see the Specify Calculation dialog. Let's take a quick tour
00:39so that you know what all of these different elements are and what role they play in creating
00:42calculation results. The window here on the left -hand side allows you to see all the different
00:48fields that are contained not only in the same table where you're defining the field,
00:52but all of its related tables. When you switch from the table where you're defining the field
00:57to any of the related tables you'll see all the fields in the list had the double colon
01:01prefix which of course means that this is a related value. But it's important to note
01:08that you can use not only local fields, but fields from other tables where you're related.
01:12Another great reason to be able to use related databases over flat files. And remember when
01:18you do choose a field it's really just a placeholder for the data that's going to be found inside
01:23that field. So for example, if I pick DiscountRate that just means that on a record by record
01:28basis go pull the data that's inside DiscountRate and then run that through the formula instead.
01:34So really you're thinking of the field names as just placeholders for the data that's contained
01:37within them. And then in the middle are a series of different operators that you can use when
01:42you're constructing your formula. A quick tour here. The ampersand is a very important
01:47operator in FileMaker Calculation dialogs. What it allows you to do is not only connect two
01:53fields together, for example, if you were to do ContactNameFirst and ContactNameLast
02:03that would actually result in ContactNameFirst & ContactNameLast. But what you also might
02:08want to do is add some text or, for example, a space in-between. Now one of the first rules
02:14that you are going to want to understand about the dialog does involve the ampersand and
02:18what you need to know is that the ampersand must connect any field value, any operator,
02:24or any function to any other field operator function, or even raw text. So in this case
02:31we see that we've got a field, and we've got some text so we needed an ampersand in-between.
02:35An actually if I try to close this FileMaker is going to give me an error, because what
02:39we don't have is an ampersand connecting that text in this field. So the ampersand plays
02:45a very important role and the quote code really just allows us to put either, for example,
02:50here anytime you want to have a blank space, you have to put a quote in there.
02:54Buy any text that's not a field name or not an operator or not a function has to be wrapped in quotes.
03:00That will become more obvious to you as you work with these calculation functions little
03:04bit further. This button here is the carriage return or paragraph return. So if I wanted
03:10to show the first name and then return down to the next line and show the last name, this
03:15is how I would construct it. And every one of the functions has these open parens and close
03:19parens. So if you want to write them by hand you can use the open close parens button here.
03:24These other ones are a little bit easier to understand. The slash is a mathematical operator
03:29that indicates divided by. So if I put that in- between these two fields, this would indicate
03:36the value in the first field divided by the value in the last field. Now keep in mind
03:39when you're using mathematical operators just like in ampersand they can connect to different
03:44fields together or a result of the formula. So you don't need to use the ampersand when
03:49you're using these. So you've got forward slash means divide and the asterisk means
03:53multiply by, and the reason we can't just use the X is because an X is a letter that's
03:58used for different functions and sometimes field names. Then of course you've got the
04:02ability to subtract and add within your formulas as well. Then you have logical operators like equals.
04:07So you can say things like if this value equals that value then do something
04:14or if the first value is not equal to another value or if the result of a function, for
04:18example, is equal to dah-dah-dah, then do something. You can use any one of these, equals,
04:23not equals, greater than, less than, less than or equal to, greater than or, all these as
04:27well as, and, and or, and any of the logical operators that you see in this list. On the
04:33right-hand side are a list of functions, and we're going to talking about these function
04:36groups in detail in the upcoming movies and the rest of this chapter. But this is where
04:40you can find each one either organized alphabetically or organized by type. You'll notice as you select
04:47and double-click on any one of functions you'll see that each function has a name. So FileMaker
04:54knows how to process this information and then in open parens and close parens, and
04:59it'll depend on the type of function, but inside of the function you'll see these things
05:03that are words, this is really just a guide saying this is where you want to put a field
05:06that is a text field and here's where you want to put a value that results in or the
05:11actual value that equals a number of characters. These are what are called Parameters inside
05:16the function. Every function will have at least one parameter, and you can see while
05:20FileMaker warns you know if you try to name a field with the same name as a function.
05:24Like, if you had a field called numberofCharacters, this could be very confusing for FileMaker to process.
05:27Or of you get field with an ampersand in it or an asterisk or a forward slash.
05:33All those would be very confusing to FileMaker. The whole formula entry space that you see
05:37here is where you're going to author all of your formulas and all the other pieces that
05:41you will need to be familiar with are on the bottom of the Calculation dialog are the Result
05:45Options. So for example, here just like any field, if you remember, any field that we
05:49have needs to have a field type, well, since every calculation is going to result in something,
05:55FileMaker needs to know how to handle that result as it stores it if it's going to be storing it.
05:58Here is where you choose the Type or the Handling that FileMaker will apply
06:03whether it's Text, a Number, Date, and so on. So given the wide range of uses for calculation
06:08formulas within FileMaker Pro establishing a solid familiarity with the calculation dialog
06:13as well as the function parameters themselves is essential to becoming a seasoned FileMaker developer.
Collapse this transcript
Using number functions
00:00Understanding and employing calculation functions is really key to being able to make the most
00:05out of your FileMaker developer experience. The number functions as a class are the easiest
00:10ones to manipulate and perform. They're relatively easy to learn as well because many of them
00:14only have one or two parameters. So this is a good starting point for learning calculation
00:19functions and they all just produce a numeric result and may be familiar due to their mathematical
00:24property. So you see here in our file, Untitled_17_03, I've got the Invoice Detail layout.
00:30You see that I have a field here that's somewhat highlighted in yellow that has a number in it, this number
00:35123.4567. First, I'm going to create a couple of quick calculations that result in a number
00:42just to show you how to use these fields and operators to create calculation results.
00:46So you see that we have a field here that's supposed to display the sales tax, we have a tax rate
00:51already, but we of course need to apply this tax rate to the subtotal to be able to get
00:55this value. So rather than have users type a value into the text each time, which of
00:59course could create the potential for error, we're going to create a calculation field
01:03that will result in the proper value for them. So we go under File>Manage>Database, and
01:10we see we have a field called SalesTax which is currently just a Number field.
01:14So we're going to change that to a Calculation and hit the Change button. FileMaker alerts us
01:20that we're changing it, we could lose any data that's in the field. Of course, because
01:23we're changing it to a Calculation, that's not going to store anything, but instead it's
01:26going to result in something. So up pops the Specify Calculation dialog window, and in
01:31this example, the sales tax amount will be the result of the invoice subtotal multiplied
01:36by the sales tax rate. This is a pretty easy formula for us to create. This one is not
01:40using any number functions but instead using mathematical operations. So let's go in here
01:45and say InvoiceSubtotal and then use the mathematical operator which is the Asterisk and multiply
01:52that by the SalesTaxRate, and we want to result this in a Number, and we'll hit OK.
02:02Let's hit OK again, and now if we go into Layout mode, we see that this field SalesTax has
02:10already been added to the layout, so in Browse, we can see our result. So here's the tax
02:151,405. 17 for this order, and as we go from order to order, we gave it the Subtotal field
02:21as a placeholder, but it's actually taking the value in the Subtotal field and the value
02:24in the Tax Rate field and multiplying them and then we're getting this Tax value here.
02:29It cuts down a lot on having to enter data into the system, and it gives us very accurate
02:35results for each sales tax for each record. Another quick example that we see is the Total.
02:42Of course, the Total here is going to be Subtotal minus any Discount plus the Tax plus Shipping.
02:48So again, instead of the users having to add all the stuff up, we can simply go in to File>
02:51Manage>Database, and change InvoiceTotal from a Number to a Calculation and hit Change
03:01and OK. Now what we'll do is just create a mathematical equation using field names and
03:07operators again, but in this case I'll say InvoiceSubtotal - InvoiceDiscount + SalesTax +
03:17ShippingCost, and the result will be a Number. We hit OK and OK again, and now we see that
03:25as we go from record to record, our calculation results in a number. These are both examples
03:31of number results. So what I'm going to now is I'm going to show you in the Calculation
03:36dialog some of the different number functions and then we're going to look at how they give
03:40results. And the field that we're going to use in each one of these examples is the Number
03:43field that you see on screen here. So as I go from record to record, you see that these
03:48all have the same value. Keep in mind that as we're putting these functions together,
03:52we can kind of expect to see what the result might be because we know it's 123.4567.
03:58So if we open up the Manage Database window, and let's create a new field called NumberCalc,
04:07make it a Calculation, and hit Create, and this time, we see the Specify Calculation
04:13dialog, and it's already said Calculation result is a Number, but we could change that.
04:17We're going to keep it Number, but keep it mind you can change it. First, we'll see in
04:20the right-hand window, all of our functions are listed by name. So let's choose the one
04:25by type and select just the number fields. So I'm going to select the number functions,
04:32and you see that we've got several of these, most of which you'll probably never run into
04:35because they're pretty sophisticated for crunching numbers, and some of them are actually pretty
04:39popular. I'll show you a couple of the most used and popular ones, for example, the Round
04:44function. If I double-click on the Round function, you see that FileMaker has highlighted the
04:48parameters inside the parentheses because those are the ones that we need to replace
04:52with either field values or actual numbers. So the Round function is going to round whatever
04:57number or value that we place here by the precision that we indicate here. So you see
05:02it has two parameters, the number and the precision. So we need to add either a number
05:07field formatted as a number for the number parameter and then a number field or field
05:12formatted as a number for the precision parameter. So I'm going to select the field that we call
05:18the number, it might be a little bit confusing because I chose to name the field Number which
05:23is not going to mess this up here for FileMaker. But the precision, I'm going to say let's
05:29round this however many decimal points--let's say 2. So now when I hit OK and hit OK again,
05:35you'll see the Number field or the NumberCalc was added down below. I'll place that right
05:42under the Number field, and let's go into Browse and look at what we've got. So if I
05:46apply the Round function to 123.4567, it outputs a value of 123.46. And of course, I can't
05:54change this value because it's just a result. I can search in it if I want to. I can display
06:00it anywhere I'd like, but I can't make any changes to it. I could change the data in
06:05the field that it's displaying, and that of course, would change the result. But you see
06:09here what Round is doing is it's rounding up to the two points precision that I had
06:15asked it to. Let's try a couple of more number function examples. We go back into Manage
06:20 Database let's modify the NumberCalc by double-clicking on it. I could also choose
06:25to truncate the Number field by 1, and if I do that it's very similar to rounding.
06:35But you'll notice here if we were to round it, it would have rounded this up to 5, but
06:40instead it just chops it off at the certain amount. So the Round will actually do the
06:43rounding of the last number to the decimal places, but Truncate just chops it right off,
06:48and it doesn't do any rounding on the last values. They're very similar functions, but
06:52those are two of the more popular number functions. A couple other ones, for example, we've got
07:00Floor which will give us the next lowest integer to the value that's inside of a field.
07:07So we'll see that that's 126. Of course it changes, 129, whatever it is. So it basically strips
07:13off any decimal places and gives you the next lowest integer. There's also one called Ceiling
07:18that does the next highest integer, and so on. And there's a lot of other ones that are
07:22pretty advanced. Probably remember these from high school algebra or trigonometry, but we
07:30can also use calculation functions as auto-enter instructions, which is another place where
07:34we see the Calculation dialog. For example, in Number, we'll choose the Options field,
07:40and we see that under Auto-Enter we have a Specify button next to Calculation value,
07:45and that'll present the Specify Calculation dialog. However, in this case, it doesn't
07:49allow us to choose what the output is going to be because we already know the output needs
07:53to be Number because the Field Type has been chosen as a Number already. Here what we can
07:59do is refer to the Number field. And what that means when we do that is that the values
08:06that the user is going to type into a field before it commits to the database will then
08:10be run through whatever formula we create. And then eventually, when it hits the database
08:14or commits to the database, it'll be the result of this calculation, not what the user typed in.
08:19So let me show you can example of that. There's a function that just grabs the integer,
08:26so if the user types in 1234567, for example, what it's going to do is it's going to strip
08:32everything but just the 123 integer. So what I've done is even though I'm defining an auto-enter
08:37calculation function inside the Number field, I'm actually referencing the Number field as well.
08:41So this is kind of crazy wacky stuff here. What this means is that the user is
08:47going to type something in when they create a new record. And when they hit Enter, or
08:50they commit the record, it's actually going to run whatever they typed in. That's what
08:55this placeholder represents, what the user is typing into the Number field. It's going
08:59to run that through this calculation and basically it's going to strip out any decimal places
09:03and just leave the integer and then what we see displayed after we commit the record will
09:07be the result of this calculation. Let me show you that. But first, before we do it,
09:11we see there's this other check box here, this is another one of FileMaker's famous
09:14cryptic check boxes. It says Do not replace existing value field (if any). It basically
09:19just means do you want me to change the value that the user is typing into the field using
09:23this calculation? Since we've referenced the same field that we're defining here, we have
09:28to uncheck this. So basically, forgetting what this verbiage says, if you want to use
09:32the technique where we're filtering values that are entered into the field based on this
09:36formula just uncheck the Do not replace option. Now we hit OK, and now I hit a new record,
09:44and I say 113.12... So what I wanted to do, now I haven't committed the record. One of
09:51the things I can do to commit the record is actually click outside the field, so let's do that.
09:53So now even though the NumberCalc is evaluating, what's more important here
09:58is that the actual number field, even though the user typed in a whole long string of decimal
10:02places, it ran it through that integer function and came up with just the integer of 113,
10:07and that's what got saved into the database, and that's what's actually being displayed
10:11here in this field. So in this movie, we focused on the core number functions that are being
10:15most frequently or that are most useful. So it's best to become adept at using these functions
10:20without needing to refer to a reference as the source. So practice and apply these functions
10:24as often as you can, for example, as an auto-enter data entry option.
Collapse this transcript
Using date and time functions
00:00The next group of calculation functions will allow you to manipulate Date/Time and Timestamp data.
00:05This group of functions are among the easiest to learn because of the easy syntax
00:09that each of the functions have. They fall under one of two categories, one of the categories
00:14are the functions that are going to extract a bit of information from Date or Time and
00:18then there's those that actually construct date, time or timestamps from bits of information
00:23that you are going to provide inside your calculation as parameters in the functions.
00:26Well, let's take a look at these. First, we'll go under File, Manage and Database, and you
00:33see that we've got a DateCalc function that's currently a Number. We are going to go ahead
00:37and change that to Calculation and hit Change and confirm, and now we are presenting with
00:42our calculation dialog. So let's isolate these functions on the right, Date functions first,
00:49so you see that nearly every single one of these functions has just one parameter, and
00:55that's where you put in a Date field, those are the functions that are going to extract
00:58something out of a date. So the date field, it already exists that potentially has date
01:03of course and then there's a few of them. You see one here that actually constructs
01:07it, so you have three parameters, they could be a number or a field that represents a number
01:12in each of those three parameters to put together a month, day, year date and then there's a
01:16pretty helpful function here, week of year fiscal where put the date, and then you just
01:21say what the starting day of the fiscal year is. The rest are pretty self-explanatory.
01:26So let's say, for example, we choose day, and we already have a date field here in Invoice
01:30date, so we'll double-click on that and so now you see that we've replaced the placeholder
01:35asking for a date field with an actual field that is a date, even though this is a date
01:40function this results is going to result in a number, so we are going to leave this calculation
01:46result as a Number, and let's hit OK, and OK again. In Browse mode here is where the
01:53Date field is I placed it right next to the Invoice Date on Layout so that we could see
01:57what we are getting as a results. So you see what's happening is it's actually extracting
02:01the day as a Number from the Invoice Date field. And we can make some assumptions here
02:10as well that the Day, Month and Year functions will perform in the same way. Now there is
02:17another group which is Day, Name, and I will InvoiceDate again, so actually make this one
02:25text, say OK, and OK again, this one is kind of interesting, it uses the internal calendar
02:32that FileMaker has that spans its entire date range, and it's able to extract from a date,
02:38any date what the day of the week was at that time. Kind of interesting for you so that
02:43you can, for example, do searches on how many orders were created on Fridays versus Mondays,
02:48that type of thing, and just like with the Day functions, DayName, MonthName, we see
02:56also that we've got YearName but this one is not that what you would expect, this one
03:01is actually a function that returns the Japanese YearName for a given date, and you need to
03:08supply a certain format that you want that in as well. So really in this particular group,
03:12it's more about the DayName and the MonthName but you can extract a numeric year from a
03:19date, InvoiceDate example. That would be a Number and so you see here that it extracts
03:26the four digit date as a year, so then you can perform some math on how many years have
03:31gone by that type of thing. We can also use a Date function to construct a date from three
03:36numerical fields or numbers, and that will give us a proper formatted date, so you see
03:42here, if I were to use this function, I can either just simply place numbers is in here,
03:48so I could say 6, 12, for example or I could replace these with another function, so for
04:01example, I could say, you know the day of the day created and then year of another date that type of thing.
04:10So you get the gist, you can construct these, and of course this would have to be
04:14result of a date. In a similar fashion, we have time functions and you see if we scroll down
04:19here we have a TimeCalc field, we will change that over to a calculation, and hit Change, confirm
04:25the change. So let's isolate the time functions, and we see here this is the shortest list
04:30of functions of any group and really what these do are just extract a numeric value
04:37from an existing time. So we can go to TimeCreated and of course, this is going to result in
04:44a number, so we leave that as a number, we say OK, and now we see what it's doing is
04:48in that case we can extract anything hours, minutes, anything that we want to extract
04:53from components we have. We have Hours there, Minutes and even the Seconds and then we can
04:58do to reverse just like we did with the date, where we can actually construct a time by
05:03inserting a numeric value or a field that represents a number or a series of functions,
05:09that's going to result in a number in any one of those three parameters and of course
05:12we need all three parameters for it to be able to construct the time. Timestamp are
05:18similar to time it's only got one function, and it is just the one that simply constructs
05:22all of the components into a timestamp, so you could take a date field and a time field
05:27and put those both together. So this lesson focused really on the core number of date,
05:31time and timestamp functions, it's a small group easy to understand with easy parameters
05:35that really fall under those two categories, but also easy to understand, in case you need
05:39to refer to them as you are doing your FileMaker development.
Collapse this transcript
Using text functions
00:00The largest group of Calculation Functions in FileMaker Pro pertain to investigating
00:05and manipulating text strings Unlike some groups of functions in which only a few
00:09are used on a regular basis I'd say that nearly half of the text functions are of primary
00:14application and importance. So in this movie I'm going to introduce you to the syntax of
00:19some of the core text functions. So if we open up the Manage Database window in our
00:23Exercise File, and we go to the field called TextCalc let's hit Options, and let's isolate
00:31the Text functions here, they're the first group on the list. You see there's quite a
00:34few of them, but they really boil down to a couple of different groups. So I'll introduce
00:39you to the groups, and you can kind of set some expectations as to what the other functions
00:43in the group might do as well. Let's start with some of the easiest ones to understand,
00:47like, for example, I've got a Length function. Length is simply going to give me the total
00:53number of characters in the text. And so in this case the text is the values that are found
00:58in the CompanyName, so I'm going to hit OK, and let's take a look at it. You see on the
01:04Exercise File I've placed the TextCalc here. So what this is telling me is that there are
01:0910 characters in the CompanyName iSolutions, there are 16 in Radley & Friends, and so on.
01:17Let's take a closer look at this in the Calculation dialog. So Length is similar to other text
01:24functions that are producing a number, so they're counting something, whether it's number
01:28of characters in this case, or there's another example here that I'd like to show you, which
01:33is a popular one, which is PatternCount. And one thing I'll tell you right as we're getting
01:39into this is that you might look at these and say, hmm, these are popular, people really
01:43need to count patterns of something in a calculation, or they really need to count total characters.
01:47Well, really, the text functions of all groups of functions are most commonly nested in with
01:52other functions. Sometimes one of the parameters in another calculation that you're doing you
01:57need to figure out, well, how many times is there an ampersand or a comma or something
02:00like that in this string of information and then that's where you would nest in this entire
02:04function with its parameters to serve as just a single parameter in another Calc. So just
02:09sort of a heads-up there. In the case of PatternCount, if we use CompanyName again, here we'll put
02:15in the text that we're searching and then we actually want to put in what we're searching
02:19for. So let's say R, and what we're going to get as a result is a number. So if I hit
02:24OK, then hit OK again. So first of all, in the CompanyName iSolutions we don't have an
02:29R, but here this is interesting, you'll notice that we have an R here and an R there, and
02:37it's properly counting two of them. The reason I mentioned that it's interesting is because
02:40this R is capitalized, and that r is lowercase. So it's important to know that in some cases,
02:45in some functions case matters, but in this particular one it does not just something
02:49that you want to be aware of. Another function that you might find useful, but in a different
02:54application is something that's called the Trim function, but what I'm going to do is
02:57I'm going to go into the CompanyName field that you see here, and let's double-click
03:01on it in the Options. So you notice that we've got a calculated value here in the Auto-Enter
03:06functions, we've done this in a previous movie, but this is a technique that allows us to
03:11filter the values that a user is typing into a field. So anytime somebody types something
03:16into a new record or typed something into an existing record, we can apply some instructions
03:21to that before it gets committed to the database, and this is how we do that. In the Auto-Enter
03:25function, for the field, we choose Calculated value, and you will see here there's a function
03:30called Trim, and what the Trim function does is it will trim any leading or trailing spaces
03:35from text. So let's say we have an issue here where users are typing into a field and inadvertently
03:41hitting the Enter key, which makes it go to Return, and so we end up with all this text
03:46that has inadvertent return character in it or inadvertent spaces or something like that
03:51whatever the cause may be, we want to eliminate those leading and trailing spaces.
03:55So what we can do in the CompanyName field, and this is another one of these examples where I'm
03:59actually using this field as a parameter in the Auto-Enter calculation for the same field.
04:06So the instructions I'm providing to the CompanyName field are to Trim and then really what this
04:11placeholder stands for here is I want it to trim whatever the user is typing into the
04:15field after they commit it. So after they commit, take the value they've typed in before
04:21commit and apply this function to it. And that only works if we uncheck the default
04:28of Do not replace existing values (if any). This is sort of a weird cryptic jumble of
04:34dialog, but all you need to know is you leave it unchecked if you want to apply the function
04:39to the value that's been entered into the field, or even easier to understand, you check
04:44this value, and you don't check that one anytime you're doing this filtering technique.
04:47So let's see how that works. So if I go into Radley & Friends, here I'll just put some
04:53trailing spaces, and now we're in a pre-commit stage, and you can tell that visually because
04:58the field I'm in has a border around it and these have dotted borders in it, and so of
05:03course one of the many things I can do to commit a record is to click outside the field,
05:06and let's look what happened. So you see that it is trimmed off the trailing spaces in this
05:11case, and it's not just the Trim function that works as a filter, there's all sorts
05:15of different filters that you can apply. Let's open the TextCalc field again, get rid of
05:20the PatternCount by deleting. So now there's a whole series of functions under Text function,
05:27and you'll see here we've got Left, LeftValues, LeftWords, Middle, MiddleValues, MiddleWords
05:34and then Right, RightValues, RightWords. So let me explain what those are. So in the case
05:38of Left, what it does is that you take a piece of text, in this case we'll say Customer Full
05:45Name, and here what it's doing is we're putting in a number, and we're saying, give me a certain
05:50numberOfCharacters starting from the left. So here we've got let's say we want to extract
05:56Boo, so we would say, one, two, three, right, so give me those three characters, make it
06:00text and then we can see what this looks like. So now you see that we've got Boo.
06:05Keep in mind one thing, though, is that if I had said four, it would have given me the space after
06:10that so keep in mind that spaces and punctuation and things like that are considered characters
06:15as well, so you've to be careful. Visually you may not be able to see that you've got
06:19four characters in there, but it only looks like three. So keep that mind. So that's what
06:23Left does. You'll notice the other functions in the family are LeftWords. So if I said
06:34LeftWords, and asked for one of them, I'll get the same value, because I'm pulling one
06:42word from the left. Now, you'll notice that we have them starting from the other side,
06:47so we could just go from the opposite, Right, give me three characters, that would give
06:50me ley. RightWords, text, Customer Full Name, numberOfWords 1, result is a Text.
07:00We see here that gives me the one word from the right. So here is where these functions might come
07:04into play. So let's say, when we imported all this data into our customer records, the
07:09other source of data that created this data only had all the first and last names, all
07:15mixed together inside of one field. But of course as one of our rules that we've discussed
07:19earlier in this title is that we want to break data down to the most granular piece.
07:24So we wisely decided that we would have First and Last names as separate fields. So how do we
07:29get all this data out of the full name and into these fields? Well, certainly we could
07:33go one at a time and add all this data, going record by record, and just simply type that in.
07:38But I'm going to introduce you to a function in FileMaker that also uses the Calculation
07:43dialog and show you a good example of being able to use Calculation functions to make
07:47this task very easy to do. So under the Records menu there's a thing called Replace Field
07:52Contents, and really what this is is it's a batch update feature. What you'll do when
07:57you're going to use Replace Field Contents is you're going to create a found set, because
08:01it's only going to perform or operate against whatever instructions you provide here for
08:05just the records in the found set. So we say Show All so that all 1523 records are affected,
08:11and there are a couple of different things you can do with it. You can say, whatever
08:14the value is in the first record that I have here, apply it to all the other records in
08:18the database. That's usually what this is so you can see here there is nothing in there
08:22so it's saying, well, do you want to apply nothing to all the records? Well, that's not
08:25what we want to do here. There is also this ability to apply serial numbers. But the one
08:29we're focusing on is this one here, Replace with calculated result. So you see here what
08:34we've got is another area where we see this Specify Calculation dialog that has nothing
08:38to do with defining a field, but what we're going to do is say, okay, we're here in the
08:42First, Name field, so what I want to do is go under LeftWords, and from the Customer
08:49Full Name, put the left word into the First, Name field, right? So let's go ahead and do
08:58that. And, by the way, I should caution you that you should be real comfortable with these.
09:02Maybe you can even isolate one record in your found set to test your calculations against,
09:06because there's no undo in a Replace Field Content. It's very powerful and extremely
09:10useful, and it's a great tool to have in your tool belt, but there's no way to back out
09:14of it. So my tip would be to isolate just a couple of test records before you run it
09:20against the full batch just to make sure it's giving you the results that you expected.
09:23So let's take a look at how this would work. We hit Replace, and we see we have no spaces
09:27after it, either first, that one, Boo, Jaxson and so on, and that would apply for all the
09:33records in our entire set of 1523, and it only took about a second to do. So we can
09:37do the same thing in Last real quickly. Hit Calculation, do Text functions, RightWords,
09:49text is the Customer Full Name, numberOfWords one. Take a look at how that works, and now
09:57we see we have last names for everybody in our database, all the way through to 1523
10:03records. So it's just another way to use the Calculation dialog that doesn't have anything
10:07to do with defining fields. Another example just to finish up the tour here is TextCalc,
10:14I'd like to show you a function that's pretty popular, so we've talked about the most common
10:19ones are Left, Middle, Right, and now there is another one--and we talked about Trim,
10:26now we've got Substitute, which I would like to show you. It does what it sounds like it
10:31does, it takes information from let's say, the CompanyName, and we can say we're going
10:37to look for certain text strings, so of course, we have to wrap it in quotations, and the
10:42one we're going to look for is an Ampersand, and we're going to replace it with the word And.
10:46Okay? So let's say, in that calculation, so there is no Ampersand there, but there is
10:54an Ampersand here, and notice that we've got-- this is a good example of understanding how text
10:58works here. So it does replace it, but all we have to do is make a simple tweak in our
11:02calculations. This is something that happens in a lot of calculations so you've got to
11:05be aware of it, but what we're replacing it with is just and, but what we really want
11:09to do is do space and space. That happens in a lot of different calculation functions,
11:15which is something to beware of. Finally, couple other functions just to show you. Text
11:21functions, see all the way down in the bottom. In addition to counting characters, you can
11:26count the number of words, you can count the values, which is in an array, so every time
11:32you have a list of return delimited values, you can count each one of those. And things
11:37like Upper will take the text, for example, in another field and make it all caps for you.
11:45And the opposite of that is a function that's called Proper, that will take all caps
11:48if you're importing it from another source and turn that into a capital letter at the
11:53beginning and then lowercase for the rest. Just a handful of examples to try to get you
11:57familiar with how functions, and in this case the Text functions, work with existing field
12:02values. So it would be good to get familiar with these functions, because they're going
12:05to be used in quite a few areas within FileMaker Pro, and this lesson focused really on the
12:09core text functions, the ones that are used most frequently, but it's best to become adept
12:13at using these functions without needing to refer to the reference as a source. But if
12:17you want more information on some of these functions here that we've covered in the Text
12:20section, feel free to go into the FileMaker Help System where you can learn about these
12:26things outside of the context of actually programming. So the more you can write these
12:30free flow, the better, so do your best to apply these functions as often as you can.
Collapse this transcript
Using get functions
00:00Get functions are a rare breed of function because they pull information about either
00:03the session that you are in, in FileMaker and a session refers to when you login, and
00:07you logout and everything that happens in between or the application, for an instance
00:12the version of FileMaker or even if you are in FileMaker Go or accessing from the web
00:15that type of thing or information about your Operating System. For example, not just whether
00:20you are using Mac or PC or what Operating System level, but also things like what time
00:24is it on your time clock and information from the calendars and time of day, you know those
00:29type things. But these could be really useful if you need to extract this type of info,
00:33and then you have these functions available to you in your scripts. Now we saw this when
00:37we were talking about Layouts because there is way that you can drop and merge fields
00:41that use Get functions as well. So, I would recommend watching the movie in this title
00:46on using merge functions inside reporting. So let's take a look at the Manage Database window,
00:53and you'll see that we have a function here called GetCalc, so let's go into GetCalc and
00:58open it up and take a look at some of the Get functions that are availabl