Discussions

Expand all | Collapse all

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

Becky Moore09-05-2018 18:04

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

    Posted 09-05-2018 18:04


  • 2.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Bronze
    Contributor
    Posted 09-05-2018 18:14
    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.


  • 3.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-05-2018 18:57
    I am new to this.  Can you walk me through it please?


  • 4.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Bronze
    Contributor
    Posted 09-06-2018 11:21
    Folks,

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


  • 5.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-06-2018 16:58
    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.


  • 6.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-21-2018 13:16
    It was a text field but I changed it to a formula text field but that did not work either. 


  • 7.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-07-2018 19:58
    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","")






  • 8.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-07-2018 20:58
    @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.


  • 9.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-08-2018 17:55
    my mistake. so many ways to take this request.


  • 10.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-21-2018 13:58
    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))


  • 11.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 01-04-2019 16:16
    I tried this and received an error on the "If(Length" line. The error states "The operator '=' can't be applied on types text, number"

    My SSN field was a numeric field, but I had to change it to text to fix the errors in the first 3 lines that begin with "var"


  • 12.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 01-04-2019 16:19
    I found out the issue. I was missing the ")" behind [SSN].


  • 13.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 09-22-2018 01:58
    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.


  • 14.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 01-07-2019 17:46
    Could someone please screenshot the resolution; like I said I am new to this.



  • 15.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 01-07-2019 18:16
    Hey Becky,

    Your solution may be a little different than mine, but I ended up using the formula below. I will be instructing the users of my app to exclude the hyphens from the social security numbers.

    If(Length([SS#]) = 9,

    var text SSN = ToText([SS#]);
    var text filler = "###-##-#";

    List ("", $filler, Right($SSN,3)),

    "Not Formatted")


  • 16.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Posted 01-07-2019 20:06
    I'm not sure what your question is.

    If you are trying to take a text field and  format it with hyphens then formula text field would be

    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))


    If he field was numeric then let me know and it would be slightly different formula


  • 17.  RE: HOW DO I FORMAT A FIELD ON A FORM FOR A SOCIAL SECURITY FIELD TO: ###-##-####

    Bronze
    Contributor
    Posted 01-08-2019 17:14
    Still missing the close paren behind Length, Mark

    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))