Hiding the first 5 digit in a social security number
I need to print out letters which hide or XXXXX out the first 5 digits in the ss# field.
How do I modify the SS# field in the layout to do this?
I am using FM pro 9
Do you need to store the complete SSN but only display it with the first 5 digits hidden?
This expression will change the first 5 digits to X's:
Let ( SSN = Filter ( SSNField ; "0123456789" ) ; "XXXXX" & Right ( SSN ; 4 ) )
You can also use "XXXXX" & "-" & Right ( SSN ; 4 ) if you want to use a hyphen.
If you need to immediately hide the first 5 digits but store the full SSN, you'll need a script trigger to move the full SSN to a different field not shown on your layout and then use this expression to replace the current contents with the Masked version. The OnObjectSave trigger should work well for this. (and an OnObjectEnter script could reverse the process. )
If you just need the contents to be masked without saving the full SSN, you could use this expression in an Auto-enter calculation with the "Do not replace existing value" option cleared.
I know this post is a bit old, but I was wondering what the script steps would be to do the move and replace.
Retrieving data ...