I'm tying to set a mask for SSN, ###-##-#### Not sure how to do it. Please help.
Data Entry Masks aren't a built in part of FileMaker and can take some doing to create. Do you really want an input mask or just an auto-enter calculation that takes the data entered and formats it correctly?
Let ( digits = Filter ( self ; 9876543210 ) ;
Left ( Digits ; 3 ) & "-" & Middle ( digits ; 4 ; 2 ) & "-" & Right ( digits ; 3 )
Be sure to clear the "do not replace..." check box.
This custom function by @jaymo works just fine for SSN as well:
PhoneFormat ( "1234567890" ; "###-##-####" )123-456-7890
PhoneFormat ( "1234567890" ; "###-##-####" )
Custom Functions require FMPro Advanced to add, edit, delete. But all versions can use them.
This particular function is "recursive" (it calls itself until there is no more data to process). If you do not have FMPA, then similar function can be gotten with a looping script.
The flexibility of this kind of function is that you can change the format as needed on any length of number-as-text. That is why it works for phone numbers and social security number.
Masking is a good practice for PII (Personally Identfiable Information) fields but is not all you should consider when storing PII.
. You should also make sure that the file is encrypted via Using Encryption At Rest (EAR) functionality with FileMaker products | FileMaker because you may be legally liable in case of a data breach and do not encrypt the data at rest.
Lots of bood best practices in here:
FileMaker 16 Security Guide: Best Practices for Configuring Security Options
What coherentkris said!! formatting is one thing. storing is another!
Having used software that came with data input masks, I have to point out that none of our posts provide that kind of "mask". If that's what you want here, it's not what we have suggested. There's good reason for that: it takes a fair amount of doing to creates something with all the aspects of a classic data entry mask in FileMaker, so it's a LOT simpler not to even try, but instead to use an auto-enter calculation to enforce a standard format on the data.
Ah yes. Don't just hide it, don't store it. Or allow entry at highest level only and use security to encrypt it and hide from others.
CryptEncrypt is a great new function.
I would use a FM concealed field type and specify the data entry to be without dashes. You can add them later in the UI if you feel you need to see them. For data entry let FM do the lifting on this one.
You can use a calc to check for basic entry errors or use an API validation service.
the mask input field is missing a lot in FileMaker. Could it possible to use a small WebViewer with proper coding to create a mask input field ?
"Masking" is just masking. Data may be able to be copied anyway.
Sent from miPhone
I would simply suggest an unformatted data entry global field that is used to get the data and from there is encrypted into a standard container field with the new function. Using a concealed or masked field will depend on how you want to deal with data entry errors.
How you deal with it past that depends on how you use it. If you need to search on the SSN build something that works and keeps it all secure.
At that point you can display a static text string on the layout of "###-##-####" as a visual confirmation that an SSN has been entered.
I understand that masking is not secure. For telephone numbers, security is not a concern. But regarding security, once the value is accepted, it can be set in a (encrypted) field and cleared from the Web Viewer.
Looks like masked fields is not on the map for FMI, so if one can find a way to implement this, that would answer the needs for this. Maybe with the script step that can now be added, one will bring the masked field !
A data entry Mask is a data entry tool, not a security feature. That's what I've been trying to point out. It's intended purpose is to eliminate date entry errors by providing a form of "guided input" where things like the hyphens of a ssn or the parenthesis and hyphens of a phone number are not allowed to be entered, but are visible on the screen as part of the masking characters. You might see:
On the screen before you start data entry. After typing in, say the digits 1,2 3 and 4, you'd see:
The user is never given the chance to enter the - and the mask updates to show what digits remain to be entered. Note that this is more than placeholder text.
This is not a built in feature of FileMaker and while not impossible, in my opinion, it's not worth the effort when we have workable alternatives such as auto-correcting the input with an auto-enter calculation. I prefer this over a data entry mask in the first place.
Retrieving data ...