Formatting Social Security Numbers

Is there a way to format a field for Social Security Numbers that converts the input ######### into standard ###-##-#### format?

Airtable may not be the best place to put sensitive data like Social Security numbers. But a formula field could reformat text as you’re describing.

Andy,

@Zollie has already given you what I think is the best response, except that he was too nice about it. I wouldn’t say that Airtable “might not” be the best place to store sensitive data like Social Security numbers. I would say that it definitely is not the best place to store that sort of thing.

But if you aren’t deterred by that, there are two other problems.

First, as Zollie said, you could take a string and format using a formula field, but the formula is going to be a pain in the neck to write. I started trying to write it myself just as a test and gave up. The logic for this sort of thing is simple: filter the string for numerals only, count that there are exactly 9 of them, and if there are, insert hyphens after the third and fifth numerals. In a system with a more robust set of calculation formulas, this isn’t a hard formula to write. It’s not so easy in Airtable.

And the other problem is that, as is so often the case, you will end up with TWO fields. In some platforms, you can enter a value and have a calculation process and replace the entered value right in the same field. I do this all the time in FileMaker: User enters a phone number, for example, as 9876543210 and after user tabs out of field, the value in that field gets reformatted as 987-654-3210. But that’s not an option in Airtable. So you need two fields: one for entering the value (“333224444”) and another one to display the nicely formatted result (“333-22-4444”). You have to have the entry field visible so, um, you can type in it; and you have to have the other field visible too so you can enjoy its beautiful formatting. In other words, it’s a lot of trouble to go to for very little benefit.

William

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.