Forum Discussion

BruceKasen's avatar
BruceKasen
Qrew Member
6 years ago

DATA ENTRY

I am a new QB user. How does one add an employee's social security number (numbers and dashes)?  Should I just use the numeric feature and just forget about inserting dates between sets of numbers?

------------------------------
Bruce Kasen
------------------------------
  • I suggest using a numeric field for data entry and then a formula to display with the dashes. I can help with that formula if you like. It would also be possible to have a Custom Data Rule to validate the number. I assume it has to have a certain number of digits and there must be a check digit which could be validated.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      Hi Bruce,
      There are a variety of approaches. If you want to have the data entered as pure numeric, then i would use a numeric field for data entry, and then a formula field to display in the traditional format.

      var text SSN = Trim(ToText([SSN Numeric]));

      var text SSNFormatted=
      List("-",
      Left($SSN,3),
      Mid($SSN,4,2),
      Right($SSN,4));

      IF(
      Length($SSN) = 0, "Missing SSN",
      Length($SSN) <> 9,"Invalid SSN",
      $SSNFormatted)

      Note that for this formula to work, you will need to insert your data entry field name into the first line (or call it [SSN Numeric] like I did) and also set that field's properties to not treat blank as zero.




      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • BruceKasen's avatar
        BruceKasen
        Qrew Member
        Mark, thank you for your Feb 9 reply to my question (Re: Data Entry).
        I'm doing something wrong.
        1. I named the field SSN Number
        2. I used a Numeric - Formula in the Basic, Type section
        3. I typed in the formula as follows:
          • var text SSN = Trim(ToText([SSN Number]));
          • var text SSNFormatted=
          • List("-",
          • Left($SSN,3),
          • Mid($SSN,4,2),
          • Right($SSN,4));
          • If(
          • Length($SSN)=0,"Missing SSN Number",
          • Length($SSN)<>9, "Invalid SSN Number",
          • $SSNFormatted)
        4. I get an error message for the first line that reads " Column: 27>Field [SSN Number] is not identified.
        Thoughts?


        ------------------------------
        Bruce Kasen
        ------------------------------