Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As we've discussed in previous movies, in order to add fields to your database, you're first going to need to determine what tables you're going to have, then what fields, and then finally what types of fields. Once you've made all those determinations, there are a couple of different ways that you can define fields within FileMaker Pro. We discussed adding fields via a Table view in the Creating new databases using spreadsheet format movie. Feel free to review that movie for more instruction. But in general, this is a new method in FileMaker 11, which simulates the experience of working with a spreadsheet such as Microsoft Excel, allowing you to define fields on-the-fly as necessary, without even leaving Browse mode.
Those fields that you create in Table view will appear under Manage > Database, under the Fields tab, under the table that your layout was based on. You can also use this to delete fields, but a second, and more standard method of defining fields, is through the Manage Database dialog. We go File > Manage > Database, and you'll see that we have all of our tables listed and then fields where we can toggle between the different tables using this dropdown menu in the upper left-hand corner.
We see that Products already has fields defined because we've imported the table. But if we go up to Customers, we can see here this is the blank palette that allows us to define our fields. In addition for providing a central location for creating and editing fields in any table, the Manage Database dialog also provides tabs for working with Tables and also Relationships. It's a good place to add fields that you've already listed out. For example, we've determined that in the Customer database we're going to need the following fields in Field Types. In this movie, I'm going to add all the fields from that list into the Invoice and Customer tables using the types that we discussed in previous movies.
I may move quickly through some of these fields in order to get them all added efficiently. This, however, should just illustrate how quick and easy it is to add fields to your database. First, a discussion on naming the fields. Many users employ conventions that have the field types denoted, or even special prefixes that you might use to be able to sort the fields in a field list, similar to how we put the double underscore before the pk prefix in our primary key field. FileMaker Pro is also very accommodating when it comes to naming tables and fields. There are only a handful of restrictions to consider.
Watch, for example, as I type in a Field Name with numbers and hit Create. You see this message appear onscreen, and you'll see this dialog whenever you try to create a table or a field that violates one of the restrictions. It's helpful because it shows what the restrictions are, and you'll notice that you really can't use any special characters, or numbers, or anything that contains any And Or, Not and those type of things, also periods and that type of thing. Mainly, they don't want you reference anything that you might find in the Calculation dialog.
We'll be talking about the Calculation dialog later in this title, and when you get there you'll see that numbers and some of these characters perform different functions inside of a formula than they would just by a field name. So by avoiding these characters and following these rules here in the bullet points, you'll be able to safely create fields that will not confuse FileMaker. Even though that message pops up, FileMaker will allow you to create the field, as you see here. But just because certain characters are allowed in a field and table names, it doesn't mean that you should use them. Should you ever need to share data between your database and another application, you may have difficulty because most other applications have even more restrictive naming conventions than FileMaker does.
So it's best to best to err on the side of caution and just simply follow FileMaker's naming convention rules. And for this reason, it's really a best practice to use only alphanumeric characters in a table and field name. Let's add the first couple field names. You'll see here that to add a field, you can type in the name of a field and hit Create, or you can select a field whose name you want to change, like we're doing here and then type over your new name. You'll notice that I'm using another type of naming convention where I'm not putting any spaces inside the fields.
It's not necessary, but it's a good practice because if you ever want a publish your data to the Web or maybe share with another non-FileMaker database application, sometimes even having spaces in the name can trip up that communication. So I've become used to putting all the words all together into one, and using capitalization to kind of make it easier to read. So now in this case, if you remember, we've selected the 2345 field, and now you see the Change button is available. So I'm going to hit Change and you see it's allowed us to now get rid of that field and add a new one all at the same time.
Once a field has been added, you see now that you can Duplicate it, or even Delete it. You also see the Options over here on the right-hand side. Hitting this button will get us to several different field options, all of which we're going to be covering in upcoming movies. Another good idea is to Comment out your fields. For example, if we go to the primary key, you see that we've got the words, "primary key for customers" listed in the Comment field. This isn't necessary. It doesn't affect any of the functionality of the field, but as you're going through your field list, it might provide you some useful information when you're looking for specific types of fields within your list.
You'll also notice that when you hit the Options/Comments, it toggles between your comments and the field options themselves. This could be a good way for you to easily find a field in a very long list of fields inside the Manage Database window. For the next set of fields, I'm going to use another convention that I suggest that you might want to use. We're going to talk about the Address fields: the Street, City, State and Zip fields. One thing that a lot of developers like to do is, in order to group these fields together, you'll put the name of the group of the field, in this case they are all address fields, followed by the name and then hit Create.
And the reason for doing that, as you'll see in a second, is that they'll all show up in a list so that they are clumped together when you're looking at the field list. So if I add AddressCity, AddressState, and you see each time I'm just modifying the name and hitting Create, and it's creating a new field form me, this is an efficient way to do it, because it saves me a couple keystrokes. Now that you see all of the Address fields, they will always be together any time I'm sorting by Field Name. A lot of the naming conventions are based more around seeing fields in not only this field list, but you'll notice that you'll see list of fields and things like Calculation dialogs and various other parts of the FileMaker database application.
So it's a good idea to keep them all together. So if you just follow those naming conventions, at the very least, you'll be in really good shape. So now I'm going to go ahead and use these same naming conventions to define all the rest of the fields inside of our database. You'll notice when I do the Company Name first, I'm using the naming convention twice. So I'm both grouping the Name fields under the Company. I'm also denoting that they are in both name fields, as well. So it sorts first by company and then by name, and then you'll notice that in a couple of cases, like in CompanyLogo, I am choosing the Container as a type, but we'll get to that in a later movie.
And in the case of DateCreated, I can easily use date in both DateCreated and DateModified, but I'm going to use Timestamp in DateModified so that we can use that in upcoming exercises. DiscountRate is something we might use in a mathematical equation. So we'll make that Number, but here you see we've accidentally picked the wrong field, but FileMaker allows us to just click on the field, make a change and then hit the Change button to correct what we've done.
FaxNumber will actually have alpha and numeric characters with the dashes. So we'll just make that Text, so it can contain both. Now that we've got all our fields defined, we'll notice that if we hit the OK button to close out this window, and if we navigate over to a different view, instead of looking at our view in Table view where actually we can see all the different fields that we defined have been added to our layout already.
We can also look at this in Form view so you can see them all listed. If this didn't happen in your version of the database, there are a couple of reasons that could have occurred, first of which, in your Preferences under the FileMaker Pro, or in Windows under Edit, under the Layout tab you may not have this option checked: Add newly defined fields to the current layout. Even if you don't have that checked, a lot of times when you define fields in a new database, they'll still add the fields to the layout, but they only do that the first time around.
Once you've closed the Manage Database window and then open it up again, it won't start adding those fields for you automatically. So don't worry; nothing is broken in your file. Those are just a couple of settings or scenarios that might require you to have to add a field to a layout manually. If you have to do that, you can go under View > Layout mode and choose Insert > Field. But we'll be getting into examples of that in more detail when we start working with layouts. Now you see it's a rather easy and quick process to define all the fields in your tables, if you've gone through and made the decisions on what attributes need to be represented as fields once you're figuring out your tables, and then figuring out what those field types are.
Then you can go into them all at once, and you'll see that in some cases they will even be added to your database layouts for you. In the next exercise file,, you'll notice that we will have already created all the fields in the Invoice table and that there are already be fields inside of the Product table. So if you'd like to play along, you can follow along using the fields that are already in the file in your next exercise. As you can see, after you determine your list of fields and their types, FileMaker provides a couple of different ways to define these fields. You can apply field naming conventions, as well as choose Field Types, all the while you're setting up your fields.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.