1 Reply Latest reply on Jan 4, 2010 2:44 PM by philmodjunk

    formatting for SSN

    brucewashington

      Title

      formatting for SSN

      Post

      I need to have people fill in a Social Security Number and then it has to be changed to an EIN and also one without -'s.

       

      123-45-6789

      12-3456789

      123456789

       

      And I would love to have the fields filled in with just the first one filled in. Any suggestions?

       

      Thank you.

        • 1. Re: formatting for SSN
          philmodjunk
            

          Filter(SSNField, "0123456789")

           

          Will strip out everything but the digits and that gives you the last result you asked for.

           

          If you set up an auto-entered calculation you can use

           

          let ( ssn = Filter(Self; "0123456789"); if (length( ssn ) = 9 ; left(ssn ; 3 ) & "-" & Middle(ssn; 4; 2 ) & "-" & right(ssn; 4) ; ssn ) )

           

          To automatically insert hyphens at the appropriate spots. (Just be sure to clear the "do not replace existing value..." check box.)