FileMaker Pro – Staying on the Keyboard

In this video, Martha Zink shows how FileMaker Pro developers can help users enter data efficiently. See how using placeholders can allow a user to move within a pre-populated notes field.

Download the Demo


Video Transcript:

Hi, my name is Martha Zink, and I’m with Soliant Consulting.

In this video, I’m going to talk about a cool way to stay on the keyboard and make your users more efficient.

I was at the doctor’s office with my daughter, and I noticed that the nurse was entering data into their system. I was impressed at how quick it was. She was within a notes field and could tap through it to enter data really quickly.

I took notes of what she was doing and decided to create a similar demo file. In this record, I have the data pre-populated. But, let me make a new record, and I’ll show you what we get.

We have our regular fields, the visit date and the reason. Then we have this notes field with a bunch of brackets. The idea is that I can enter the visit data and the reason. We’ll say “neck pain.” When I hit the tab key, I jump into the notes field. If I hit the tab key again, it drops me to that empty bracket. If I hit the tab key again, it will take me to the next one. Then if I hit the shift tab, the equivalent of tabbing backward, it takes me to the previous one.

Now I can go into the notes field and just fill this out. The patient complained about neck pain and shoulder pain. The patient showed signs of weakness. The following were examined, let’s say, “head, neck, and back.” The nice thing about this bracket situation is that while it’s structured, it also allows room for change.

Let’s say I don’t know the next visit. The next visit will be TBD. I can go and clean up some of that, such as removing that word “on.” I could add a bunch more text. I could add paragraphs. There again, I can hit the tab key and say “slouching, works in front of a computer all day.”

Now when you look at it, it just looks like a normal record. But, really, it was pretty efficient for a nurse or a doctor to go in here and enter notes and use the tab key to navigate.

Let me make a new record just so we can see what came in to begin with. This is the auto-enter part of the field. That’s why it’s coming in automatically. If we look at the script triggers on here, you’ll see that there is a script trigger called “Notes – Jump to Next Blank.” By blank, I mean that next bracket that is available.

Let’s look at that script. This script is responsible for deciding what should happen when the user is within that notes field. So, the first questions is – we need to see if the trigger keystroke is tab or not. If the user typed an “A” or a “1” or a “7” or a space, or anything else, we’re going to ignore that because we don’t care. We’re just going to allow them to type that in there. It’s when they hit the tab key, which is the code of nine, that is when we care. That’s when we need to pay attention.

So, we go into that notes field. Here, I am allowing us to define what the marker is. You could change it. It doesn’t have to be this bracket. It could be asterisks, it could be a bunch of Xs, it could be anything. Use something unique enough that the user wouldn’t actually type.

Then, we figure out where the current location of the cursor is. The only reason I have this If/Else is because I need to know if the user hit the shift key when they hit the tab key. Because if they do, then again, they are tabbing backward versus if it’s just the tab key, then we’re tabbing forward.

Let’s look at the forward one. These are just a little bit different from each other. But, if we look at the start, basically I’m trying to calculate where I need to tab next. So, I say the field is called “Data.” We’ve got the marker, which is that bracket space bracket, and then we talk about the current location. These are grabbed from those variables that we set earlier. Then, I just figure out the position.

Find the position in the notes field for the bracket open bracket, and our starting location is going to be the current locations plus one. Now the reason we do a plus one is if I’m on a bracket already and I want to tab to the next one. Let’s say, I want to ignore that bracket for a little bit, or I don’t want to enter the data I want to be able to move forward and I don’t want to get stuck on the bracket. By doing a plus one, I make sure that I’m not going to find the marker which is bracket space bracket. The plus one is just a way to allow me to scooch over just one character.

This is going to tell us the position of our next starting place. Then, the direction is just to tell me whether or not I am moving forward or backward. The logic for the if statement, where the user is holding down the shift key, that is where we’re doing the exact same thing. We’re still looking at the notes field. We’re using that marker and figuring out our current location. But, the only difference is that we’re doing the current location minus one. Again, it’s just the ability to be able to move away from the current position of the bracket space bracket and making sure that I can move to the previous one or the next one.

With the position function, you can actually use negative numbers. Let’s say we’re on the second occurrence of the bracket by going backward, we actually want to go to the previous one. Instead of doing a one, which is what we normally do, we’re actually saying negative one. This is basically the equivalent of just going backward.

Then, farther down, we have the end variable. We basically check to make sure that we have a number to start with. The reason we add two is that it’s the length of the marker. We have bracket space brackets, so we want to start at the first character and then we want to end up two characters after that.

As long as our start is greater than zero, we’re going to use this function set selection. Set selection tells us what field do we want to go to. Then, we get to say where we want to start and where we want to end. This function doesn’t get used too often because it has to do with the cursor’s position.

In most cases, as developers, we don’t really mess with that. We let users jump around. The most that we do normally is allowing tabbing through fields. We’re not necessarily worried about what a user will do within that field. But, in this case, it’s a great way of really navigating the user and letting them move through the field in a more efficient and structured way.

The only caveat here is that, if the start was equal to zero, which means there were no more brackets to move through, then it just says, well am I going backward for forwards. Depending on that, it’s going to either go to the previous field or the next field.

This script below is a really important one. That’s the exit script with a result of “false.” I put a little note to clarify what that meant. Basically, once the user hits the tab key, we don’t actually want them to tab outside of the field.

If we didn’t exit the script as false, then it would actually execute a tab command which would mean that the user would tab out of the field. The exit script is there as a way to say that the tab already did its job. Then, we’re done with the script. We’ll close that. Again, if I click in that Notes field and hit the tab key, there I am on the first bracket. If I hit it again, I can go to the next one. If I shift tab, I can go backward.

I hope this is a technique that you can incorporate into your existing solutions of new solutions. It’s not going to be a perfect solution for every database out there. But, there are places where we want to structure the user a little bit, but still give them a lot of freedom. I think this is a great way to get that done.

Thank you for watching and please check out more of our videos at Soliant TV. Let us know if you have any idea for other video topics. Thanks!

8 thoughts on “FileMaker Pro – Staying on the Keyboard”

    1. That’s a good question. I think in a lot of cases, you would create fields for some of the data. But there is something to be said about the flexibility of one big field that allows for a user to enter a narrative and some detail, without much limit. I think this technique is something that can be applied where there is a lot of variability and the database should loosely guide the user.

  1. Nice work, Martha! I like the concept and think it will work well with other data entry techniques.

    The link to the download is not working, however.

  2. I really like your FileMaker ΓÇ£tab and select marker textΓÇ¥ idea.

    One use case for the technique is in a FileMaker Help Request system where you have buttons setting a single field with one of many template requests like:

    Add/Change Button Script:
    Button Name: QQDoubleClickAndReplaceQQ
    Button Location: QQDoubleClickAndReplaceQQ

    Or

    Add an Export Button/Script:
    Button Name (if you want a button): QQDoubleClickAndReplaceQQ
    Export File Name: QQDoubleClickAndReplaceQQ
    Export Folder Location: QQDoubleClickAndReplaceQQ

    Include YYYY-MM-DD_HH-MM-SS in the file name?: QQDoubleClickAndReplaceQQ

    Field(s) to export: QQDoubleClickAndReplaceQQ
    Current record or all records in found set?: QQDoubleClickAndReplaceQQ

    Etc.

    Few tweaks/mods to your awesome implementation…

    1. One thing that is cool about the script step: Set Selection is that it can be made to be ΓÇ£field context freeΓÇ¥ (and therefore more portable) by clearing the ΓÇ£Go to target fieldΓÇ¥ checkbox.
    I added your technique to our FileMaker Help Request system ΓÇ£field context freeΓÇ¥ and it works great/the same!

    2. We added …[or Get ( TriggerModifierKeys ) =┬á8 or Get ( TriggerModifierKeys ) = 10] to the initial If conditional so that the user can enter a TAB char using the option key.

    3. We changed a line to read…
    Get ( TriggerModifierKeys ) = 1 or Get ( TriggerModifierKeys ) = 3 // 1 = Shift ; 2 = Caps lock)
    …in case the user has the caps lock key down.

    Really nice idea…very useful…have not see it before in the FileMaker community.

    Thanks!

    Tony White

    1. I love this! Thanks for sharing your tweaks! Glad to hear you were able to implement this technique.

Leave a Comment

Your email address will not be published.