Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using Auto Enter options in fields

From: FileMaker Pro 11 Essential Training

Video: Using Auto Enter options in fields

When you're defining fields inside your FileMaker database, you may notice, while you're in the File > Manage > Database window, looking at any field list under the Fields Tab, you see by selecting a field, you'll notice that there's an Options button that becomes available after the field is created. You'll notice that in our _pkCustomerID field, we already have some of these options available. If we click on the Options button, you'll see that we've got a few different decisions to make in the event that we want some of this functionality built-into our field. For example, developers often design a database so that some of the fields are automatically populated with the default data whenever a user creates a new record in that database.

Using Auto Enter options in fields

When you're defining fields inside your FileMaker database, you may notice, while you're in the File > Manage > Database window, looking at any field list under the Fields Tab, you see by selecting a field, you'll notice that there's an Options button that becomes available after the field is created. You'll notice that in our _pkCustomerID field, we already have some of these options available. If we click on the Options button, you'll see that we've got a few different decisions to make in the event that we want some of this functionality built-into our field. For example, developers often design a database so that some of the fields are automatically populated with the default data whenever a user creates a new record in that database.

These types of field options in FileMaker are called Auto-Enter options. And they do just what they say really, it automatically enters a value in the field based on the developer settings. So you'll see this example that we did when we created the primary key fields. We want to automatically enter a serial value into the field _pkCustomerID every time a new record is created. So the best way to think of this is, just read it as it says, Automatically enter the following data into this field, and then if you can imagine after this, it would say, each time a new record is created. That's what Auto-Enter means.

FileMaker allows developers to choose from many different options for automatically populating the contents. You can access these under the Auto-Enter tab. One thing you should be aware of is whatever settings you put in here will only give instructions to FileMaker on what data to put in the field when a record is created. After that point, a user could change that value into any other kind of value that they want. That's of course why we check the Prohibit modification of value during data entry option on the key fields; however, in other fields, we might want to just create an initial value and allow the user to update it if need be.

This of course could help them during data entry to save them a few keystrokes on a couple of fields. There's also a concept that uses Auto- Entry options that FileMaker developers like to call creating housekeeping fields. For example, if we click on DateCreated, and then hit our Options, we'll see that when we go to the Auto-Enter tab, we can choose any one of these options that are available to us. Let's concentrate on these first two options in the tab. They relate to Creation and Modification data. A field can automatically track information about when a record was created, or last modified, and within some limits, by whom it was modified or created.

Both the Creation and Modification options have the same set of choices: Date, Time, Timestamp, Name, and Account Name, meaning when this record is created, put today's date, the current time, or both of those combined as a timestamp, or the name or copy of FileMaker that was used to create the record; however, you'll notice in this case that only one of these options is available. That's because when we defined the DateCreated field, we made that field type Date. It only makes sense to allow a date to be automatically entered into the Date field, because otherwise we'd be violating some of FileMaker's storage rules if we tried to put time in there.

So if we check Create, and Creation, Date, and hit OK, now you see the options show up in the Options column in our field list, and what this means is that every time a record is created, it's automatically going to take the computer date from the machine that the user is using, and put that into the date. These are called housekeeping fields, mainly because every database table usually has these defined. And it's a good idea for you to be able to keep track of your data or clean up your data, or if you ever have any problems, and you're trying to figure out what types of things happened last Thursday, you can just do create a Found set based on that date inside of the DateCreated field; however, if you don't create these types of fields right away, it won't retroactively populate any fields if you decide that you're not going to define these until you've already got thousands of records in your database.

So it's a good idea to do these before you start adding data. Another example of it is RecordCreatedBy. Notice this time this is a text field. I'm going to hit the Options button, and now we'll notice that we've got, under Creation, we've got the ability to choose all of these. That's because any of this type of data can be stored inside of a text field. We could choose current Date, like we did earlier, or the Time, which would be the current time of creation. But in this case, we're going to choose Name, which is the name that's in the Preferences Pane of each user's copy of FileMaker. And when we did our Preference Preview, we looked at how you can modify that.

So now, every time a record is created, we're going to automatically get a new serial number. We're going to put a Creation Date, or we'll put a Creation Name. You also have the option, if you double- click here, that you can check Account Name. And although Name and Account Name may seem similar, they're really different concepts. The Name is the name that's inside the Preferences in your copy of FileMaker Pro. Account Name is going to be the name or account name used when you logged into the database. Those are all settings that you'll create when you set up security for your database. Keep in mind that any user could log in through any number of different machines or copies of FileMaker, so these really do give you two distinctly different types of information.

You'll also notice that we've got Timestamp and quickly, we see DateModified. In this case, we'll choose Modification and have it put a Timestamp in. This one is a little bit different, because instead of putting a value in when the record is created, it's going to wait till any one of the fields that are defined for any given record have been modified, and then it's going to put a Timestamp in there. So that field data will continue to update as records are being modified within your database. All of these are good fields to have and good fields to define early on. There's another use of Auto-Enter. If we go to AddressState, for example, and hit Options, you'll notice that we've got this box here called Data.

When we check this, our cursor goes inside of this text entry box. In this case, let's enter in CA. The reason we're doing so is, let's say, for example, that most of the customers that you're entering into your database happen to be customers from the State of California. So in this case, what we'd be doing is saying, inside of the field AddressState automatically put the abbreviation for the State of California. This way when your users are entering new customers into the database, they won't have to enter any values into this field if they happen to be from the State of California.

But because it's an Auto-Enter field, they could just type over the CA and change it to a different state name, if that one applies. Now let's switch over to the Invoices table, where we see we've got our fields defined. We're going to use another one of the options for Auto-Enter. You'll see we have a field for InvoiceDiscountRate. Now, what's interesting about this field is that even though it's defined inside of an Invoices table, this is actually going to pull data from the customer record. Now, you might think to yourself, why would we define this field inside of Invoices? Well, that's because the discount rate has to have a value at the time the invoice is created.

So we can use an Auto-Enter field in this case, because we want to just pull in the discount rate at the moment that record is created rather than if a record was created last year and the customer discount rate changes, we don't want it to propagate backwards and then screw up our totals and kind of mess up our books. So what we'd rather do is use the Auto-Enter feature to insert a snapshot of data at the moment of creation, and that way it doesn't get updated down the road. Auto-Enter can be useful for savings some keystrokes during data entry, but also for taking a snapshot of data at the time a record is created.

Let's take a look at how that would work. We'd hit Options and choose this value down here: Looked-up value. By hitting Specify, we're going to choose to look up data from customers. Remember that we have a relationship between customers and invoices. So if we're in the context of an invoice layout, and we're looking up to the parent, we know that because Invoices is the child in the parent-child relationship, that means that there will only be one related parent record. That way if we use a look-up, going upstream, so to speak, we can point to one field, and it will only have one matching value.

Now, when a new record is created, it's going to go find the related parent and pull the value that's inside the DiscountRate field in the related parent customer record; however, if I go into this field a month later and change that value, it's not going to change the initial value that was placed inside the invoice discount rate at the time the invoice record was created. So now let's hit OK, and now we're back in Browse mode. So let's take a look at what happens when we create a new record. One of the ways you can create a new record is by hitting the button in your Status toolbar, and now we look onscreen, and we notice we've got a primary key value automatically created, the words CA have been added inside our AddressState, and also the dates that these records were created, and an initial value for modification.

You'll notice, also, when we click into modification, that it gives us a full string, including both the Time and the Date. You'll also notice that if we go and we try to edit the primary key for the customer, by hitting the Delete field, we get a message that says, this action cannot be performed because the field is not modifiable. That's because if we go under File > Manage > Database, we see that it says, can't modify data, Prohibit modification during data entry; however, if we were to go in and change any of these other values, for example, California to Washington, and then click outside to commit the record, we see we don't get that error, and that's because we didn't check the prohibit modification of value during data entry on this field.

Also, you'll notice that the modification time is updated by one minute, because we made a modification to the field after we created it. Using the Auto-Enter field options, developers can design a database so that some fields are automatically populated with default data when a user creates a new record, and these are decisions that you'll want to make when deciding what fields you need to create in your database. So in addition to deciding what tables, what fields, and what field types, you're also going to want to consider some of the field options that you have available to you.

Show transcript

This video is part of

Image for FileMaker Pro 11 Essential Training
FileMaker Pro 11 Essential Training

94 video lessons · 14873 viewers

Cris Ippolite
Author

 
Expand all | Collapse all
  1. 7m 22s
    1. Welcome
      1m 8s
    2. Understanding the FileMaker family
      2m 15s
    3. Using the FileMaker Quick Start screen
      2m 52s
    4. Using the exercise files
      1m 7s
  2. 21m 9s
    1. What is a database?
      2m 26s
    2. Flat vs. relational databases
      2m 29s
    3. How FileMaker works
      4m 48s
    4. Understanding the essential preferences
      3m 13s
    5. Touring the interface
      8m 13s
  3. 11m 44s
    1. Creating databases from templates
      2m 29s
    2. Creating new databases in the spreadsheet-like format
      5m 35s
    3. Importing tables
      3m 40s
  4. 9m 9s
    1. Determining which tables you will need
      5m 10s
    2. Creating tables in the Managing Tables window
      3m 59s
  5. 34m 47s
    1. Understanding relationship types
      6m 58s
    2. Diagramming relationships (with ER diagrams)
      8m 50s
    3. Determining which key fields you need
      5m 18s
    4. Defining primary and foreign keys
      7m 56s
    5. Creating relationships using the relationships graph and table occurrences
      5m 45s
  6. 50m 34s
    1. Deciding what fields you will need
      5m 34s
    2. Understanding field types
      7m 54s
    3. Defining fields
      9m 56s
    4. Using Auto Enter options in fields
      9m 33s
    5. Reviewing field validation options
      8m 16s
    6. Building with container fields
      9m 21s
  7. 14m 8s
    1. Creating and duplicating records
      5m 40s
    2. Editing and locking records
      4m 42s
    3. Deleting records and backing up files
      3m 46s
  8. 21m 6s
    1. Importing data
      9m 57s
    2. Importing records to refresh data
      7m 2s
    3. Exporting data
      4m 7s
  9. 18m 30s
    1. Understanding layouts
      4m 15s
    2. Using the Layout Assistant to create List views
      7m 59s
    3. Using the Layout Assistant to create labels and envelopes
      6m 16s
  10. 27m 11s
    1. Using the Layout Setup dialog box
      4m 54s
    2. Understanding layout parts
      4m 40s
    3. Understanding the new Inspector
      2m 26s
    4. Exploring the Status Area in Layout mode
      6m 46s
    5. Managing layouts and layout folders
      8m 25s
  11. 41m 9s
    1. Arranging, aligning, grouping, and locking layout objects
      11m 5s
    2. Placing and formatting objects, parts, and graphics
      4m 10s
    3. Formatting fields and applying field attributes
      8m 26s
    4. Setting field behaviors
      4m 4s
    5. Using the Tab Control feature
      9m 8s
    6. Setting tab order
      4m 16s
  12. 36m 48s
    1. Using the basic find functions
      7m 31s
    2. Reviewing new requests in the Find mode
      5m 54s
    3. Establishing search operators
      6m 43s
    4. Constraining or extending found sets
      3m 24s
    5. Finding records using date, time, or timestamp criteria
      5m 18s
    6. Using Fast Match and Quick Find
      4m 41s
    7. Working with saved finds
      3m 17s
  13. 17m 28s
    1. Sorting with one criterion
      6m 4s
    2. Sorting with related fields
      2m 18s
    3. Sorting with multiple criteria
      1m 36s
    4. Sorting using custom values
      3m 14s
    5. Sorting using buttons
      4m 16s
  14. 17m 14s
    1. Reviewing Field/Control styles
      5m 43s
    2. Creating and applying static value lists
      5m 20s
    3. Creating and applying dynamic value lists
      6m 11s
  15. 23m 52s
    1. Previewing pages and print options
      6m 20s
    2. Printing in different views
      2m 54s
    3. Sliding objects
      3m 26s
    4. Printing merge letters
      4m 53s
    5. Saving as a PDF or Excel file
      6m 19s
  16. 15m 1s
    1. Building simple reports with summary fields
      4m 36s
    2. Creating subsummary reports
      6m 51s
    3. Creating subsummary reports in Table view
      3m 34s
  17. 52m 19s
    1. Defining calculations
      2m 31s
    2. Exploring the Calculation dialog box
      5m 8s
    3. Using number functions
      12m 41s
    4. Using date and time functions
      4m 58s
    5. Using text functions
      11m 43s
    6. Using get functions
      4m 0s
    7. Using logic functions
      11m 18s
  18. 46m 56s
    1. Understanding scripts and script steps
      2m 23s
    2. Assigning script steps to buttons
      3m 54s
    3. Understanding the ScriptMaker dialog box
      8m 28s
    4. Creating multi-line scripts
      6m 44s
    5. Adding find criteria to a script
      4m 58s
    6. Understanding the If script step
      8m 36s
    7. Using script parameters
      4m 42s
    8. Reviewing the Send Mail option
      7m 11s
  19. 28m 0s
    1. Understanding script triggers
      2m 41s
    2. Using object-based triggers
      11m 58s
    3. Using layout-based triggers
      7m 51s
    4. Using file-based triggers (Open and Close scripts)
      5m 30s
  20. 56m 42s
    1. Using related fields
      7m 18s
    2. Creating portals and using portal filtering
      10m 38s
    3. Using related fields in calculations
      7m 6s
    4. Understanding multi-predicate relationships
      11m 11s
    5. Using the Go to Related Record script step
      7m 26s
    6. Creating a chart
      13m 3s
  21. 30s
    1. Goodbye
      30s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed FileMaker Pro 11 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.