
You should have ended up with (123)-456-7890.Īnd while we're picking nits: what's up with the dash between the area code's closing parenthesis and the prefix? I've always seen a space character there, never a dash.Īn example file that solves all of the above problems and offers customizable mask structures is available here:Ĭlick the "Download" link under the "Field Masking Demo." subhead. Type 1237890, then arrow back so the cursor sits between the 3 and the ), then type 456.

When editing a number, the cursor should advance so that the insertion point always follows the number you just typed. If backspace appears to "step over" formatting characters, the forward space should do the same. Same thing with the parentheses bracketing the area code. The dash is deleted and disappears from the field. With the cursor still to the left of the dash, hit the forward delete. The cursor moves to the left of the dash without apparently deleting it. Put the curser to the right of the "-" and hit the backspace/delete.

In your Full Number field, enter (555) 666-777, then shift left arrow to highlight the last 7, then hit delete: All 7s are gone! Turns out that highlighting any single digit and deleting it will delete all other instances of that digit in the string.Īlso, there's some inconsistency in the way the "formatting characters" are treated. Having written a fairly comprehensive routine for this purpose (Small Company's Ergonomic Stimulus Award winner in February 2009) I was curious to see your implementation. Add any of your tips or suggestions to the bottom of this article! Hopefully, by using this file, and the included video content, you'll realize that the automatic field formatting you've always dreamed of, is actually here. It's easily accomplished with an OnObjectKeystroke trigger, the not-so-easy part is managing all the different possibilities of what can be happening when a user is typing content. Not just post-field-entry masking or using one field to overlay on top of another field, what we're talking about is as-you-type field masking. Well, the day has come and you can now do the type of masking you're actually thinking about. Often as easy as setting the mask into the properties of the field itself - a super simple solution - yet, not so simple in FileMaker. What many other desktop database solutions have offered was an easy way to apply masking.

"Can FileMaker automatically apply formatting to my fields?", this is not just a common question, it's been a critical complaint as well.
