[Novice]...by Matt Petrowsky

Tricks that treat your users better
How to make the return key work for your file

It's one of the stickiest things about teaching users how to use your databases. It's that wonderful "Enter" key that makes things happen. You know the one on the number keypad. Oh, your users don't have a number keypad?

It's almost always misinterpreted when it's even shown in plain english.

"Please hit the enter key to continue"

And what happens after the information is processed? Yes, you guessed it. The user hits the "Return" key. Not the "Enter" key. Many users don't know that there is a difference between the enter key and the return. Aside from the fact that they each have their own ASCII character, the enter key is often used for other functions in different programs where return does your classic carriage return - dating back to the typewriter.

In FileMaker the enter key has historically been the key that will continue your scripts, exit records and do a nice toggle of tools when in layout mode. But learning about what the enter key does is not why you are reading this article. You want to know how you can make the return key be the default key when the user uses the keyboard.

Well, to my knowledge there are only a couple of places that the return key will work. One of these is when you are in the middle of a paused script that is waiting for the user to continue (and you are not in an active field) and the other is when you are in a find mode. Since these are the only two places that I have found, and knowing that if my script takes the user to a field while in browse mode that the cursor will just jump down one more line when hitting the return key, I came up with a solution to making the return key work for me.

What I do is combine the two areas together. Those areas are the find mode and a paused script. Here is what you need to do.

Take the user to the area that you need to get some information from them. This may be something like a dialog box or a data entry screen. (by the way this example will only work for a single entry field, but you can make a script smart and work for multiple pieces of information.) In our example here we're going to say that we want the user to type in their name.

Once in this layout [dialog box for our example] we put the user into a find mode and prompt them with the type of information that we need them to enter. We then go to the field where they need to enter the information. At this point we pause the script. Remember, we are in a find mode and what we have done is set the user into the field into which they will enter their data. Knowing that the return key will continue the script and that the line won't do a line return because we are in find mode, we can make the script copy the piece of information the user typed into the find mode, and then jump right back into the browse mode - without even performing the find.

What we have done is completely ignore the find that we set up. We only used the find mode so that the return key would not do a carriage return and would merely continue a paused script!

This is a very cool trick for using with your own custom dialog boxes as discussed in section one of this issue. Included with the issue is a BONUS file for you to take apart as needed. Use this Power User trick to fully customize your own FileMaker database. It will make data entry faster and more user friendly!

- END -