From the course: FileMaker Pro Essential Training

Creating and duplicating records - FileMaker Pro Tutorial

From the course: FileMaker Pro Essential Training

Start my 1-month free trial

Creating and duplicating records

- So far in this course, we've discussed how to work with FileMaker to set up tables and fields in a FileMaker database for you to store your data. Now we're going to turn to the discussion of working with data within those tables, and in this chapter, I'm going to be talking specifically about working with records of data. If you look at the exercise file, you'll notice that it already has two records of data in it. And for those of you that are new to FileMaker, a record in the database is an instance of whatever we're storing in the database. So in this case, this is a customer table, and we're storing information about customers. It's very similar to having a row inside of a spreadsheet. As a matter of fact, it's the same thing. Now there's different ways that you can add records to a database and the most common is to go under the records menu that you see here and you can choose new records, or the absolute most common way to do it is just use the short keys. I'm on a Mac, so it's command N. If you're on Windows, it's control N. Or you can hit the button on screen or after you learn a little bit about scripting, you can create buttons that, when a user clicks on it, amongst the various things that can happen, is that you can have a record created. So let's take a look at look at creating a record. First of all that you'll notice that even though we created a new record, some of the fields actually have data in them already and that's because we have set those fields up with auto enter options. For example, this field here is automatically populating the primary key field. This one's doing the address, state, and some of the other default fields that were created in the table when we created a new table, were giving us things like the account that the record was created by, and date created, and so on. Now the users can go ahead and enter any data that they want into the system. You'll notice that in the upper left-hand corner it's incremented by one. Pretty simple concept here. But one of the things that's kind of interesting about FileMaker is the fact that you will not find a save option anywhere. So this record has been created and it's automatically saved into the database. Now the same is true if I were to go in here and put in Curly's Landscaping. Notice that while I'm clicking into the field, that it's highlighted. The field itself is highlighted around there. What this means is that I have not yet committed the change to this record. Committing is a concept in FileMaker that really means saving. So even though the record's already created, we've got the third record created here, I'm going to click outside of that field and now that subtle thing that I just did there is actually what's saved it. As a matter of fact, it'll be evidenced by the fact that the modification of the field will only change after I do my commit. So, for example, if I do 123 Main Street, you notice that nothing's changed on the date modified until I click this and now it's actually changed. So the concept of committing is very important. That is how you save things in FileMaker. There are various different ways that you should be aware of that you're committing changes to a database. Let's take a look at those. As you saw, if you click outside the field area while you're editing fields, that is one way to commit the changes that you've made. Pressing the ENTER key, unless you've changed the behavior of the ENTER key, will also commit. If you switch from, let's say, browse mode into find mode, whatever changes you've made before switching into find mode will be committed. Switching layouts. You could be editing a record in the customer layout and then change to the products layout. Whatever changes you had made before you left are automatically committed. Creating new records will commit the previous record's changes, and closing a file. So you don't have to worry about whether or not changes you were making before you closed a FileMaker file were saved or not. There's other ways to create records that we'll explore when we talk about scripting, but you should also be aware that you can duplicate records. Let's say when you duplicate this record, you want to keep everything but you want to just change the state. So you could go under record to duplicate record, and you'll notice that everything changes except for the primary key value, because FileMaker has promised you that it will always keep a unique value in there. So now we've got two records with the same values, but let's say I just wanted to make a quick change, so this was a lot easier than creating something and having to enter all that information from scratch. So this albeit simple exercise is how you get data into your database because if you have containers to store it, you need to have some way to get the data in there.

Contents