July 4, 200421 yr I've played around with FileMaker 5 and have ordered version 7. I've been using another database system for 20 years and am considering a switch to FileMaker. So: I'm a rank newbie with FileMaker. Anyway, how can I use "edits" with fields? Suppose for a telephone number, I want the field value to change to the format (xxx) xxx-xxxx, regardless of what the end user types. Or, suppose for a social security number, I want the field value to change to the format xxx-xx-xxxx automatically. As far as I can tell, FileMaker lets you specify only whether a field is text or numbers (or one of six other categories) but doesn't let the developer specify the final format. Prove me wrong, please.
July 6, 200421 yr Author I checked Amazon.com for books available for FMP 7, but there aren't many to choose from now. So I went to MicroCenter and purchased two books for FMP 6: The Book of FileMaker 6 by Kubica and FileMaker Pro 6 Advanced by Baron and Peck. Pages 51 to 56 of this second book have 24 steps for making a phone edit or mask. It boils down to making a separate mask field with this calculation: "(" & Left( Abs(PhoneExtension), 3 ) & ")" & " " & Middle( Abs(PhoneExtension) , 4 , 3 ) & "-" & Right( Abs(PhoneExtension) , 4 ) where I've added an additional space between the area code and the regional code. I expect to receive my upgrade to 7 tomorrow and I'll try the Auto-enter calculation then.
July 6, 200421 yr In the online help for FMP 7, there is the example of the Filter function that lets you do exactly that: format a phone number automatically.
July 10, 200421 yr Author My copy of FileMaker 7.02 finally arrived. The correct method for the phone edit or mask is now: Phone = Let(Phone = Filter(Phone;"0123456789");"(" & Left(Phone;3) & ")" & " " & Middle(Phone;4;3) & "-" & Middle(Phone;7;4)) /* Text calculation */
Create an account or sign in to comment