Skip to main content
Question

HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

  • September 5, 2018
  • 0 replies
  • 274 views

HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####
This topic has been closed for replies.

  • Registered
  • September 5, 2018
Use a formula-text field "##-##-####" and show that field on the form instead and make sure it shows only in view mode. For add/edit mode, you can use the real field.

  • Author
  • Registered
  • September 5, 2018
I am new to this.  Can you walk me through it please?

  • Registered
  • September 6, 2018
Folks,

Can someone create a screencast for Becky? I don't have access to it from work.

Becky. Is your SSN a text field now or numeric? If you answer that then I will help you with the code to show a formatted formula text field.

  • Registered
  • September 7, 2018
You should have 2 fields:
1 for data entry - on form for add and edit.
2 for showing Xs - on form for view.
I assume it is not to match number for digit, so I would simply create a text formula, if(length([ssn])>0,"XXX-XX-XXXX",""). 

If you do want to match digit for digit you need a different formula, I would use this...
case(length([ssn]),
9,"XXX-XX-XXXX",
8,"XXX-XX-XXX",
7,"XXX-XX-XX",
6,"XXX-XX-X",
5,"XXX-XX",
4,"XXX-X",
3,"XXX",
2,"XX",
1,"X","")





@slider. Becky wants to show the SSN digits but in a formatted manner.


But I will wait and see if Becky responds to my question before I put the effort into a reply.

Becky,
Try this

// desired format is ###-##-####

var text PartOne = Left([SSN],3);
var text PartTwo = Mid([SSN,4,2);
var text PartThree = Right([SSN],4);

IF(Length([SSN]=9,
List("-", $PartOne, $PartTwo, $PartThree))

  • Registered
  • September 22, 2018
I did it like this in my APP

//This pulls the data from the SSN field and masks it. 

var text SSN = ToText([field which contains SSN]);
var text filler = "###";
var text fillerr = "##";

List ("-", $filler, $fillerr, Right($SSN,4))

Hope this helps.

  • Author
  • Registered
  • January 7, 2019
Could someone please screenshot the resolution; like I said I am new to this.