Discussions

 View Only
  • 1.  Dealing with "Zero"

    Posted 10-26-2020 18:28

    Hi all:
    I have a client id that is 7 numbers long and sometimes starts with Zero.  Is there a way to "force" QB to recognize my ids that start with 0.  Right now, after saving the record, it will truncate it to six digits if the first one is 0.  Sometimes I have ids that begin with two zeros.  

    Please advise.

    Thanks.



    ------------------------------
    Melissa Freel
    ------------------------------


  • 2.  RE: Dealing with "Zero"

    Posted 10-26-2020 20:33
    You will need to change your Client ID# to be a text field after considering the implications of where it is used.  You may want to  to make a duplicate of that field and then change the type to text, fix the ones that need the leading zeros, and then see where the numeric field was used and replace it with the text field in any formulas and lookups.  But if you need it as a lookup, then you need to make a new lookup field as the Type if different (ie text and not numeric)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Dealing with "Zero"

    Posted 10-28-2020 16:54
    Thanks Mark!  I thought this was the process.  Was just trying to save myself some steps if there was a more simple way!  Thanks again!

    ------------------------------
    Melissa Freel
    ------------------------------



  • 4.  RE: Dealing with "Zero"

    Posted 10-28-2020 16:59
    There is another method too.  You can make an additional formula field which will zero pad the field.

    PadLeft(ToText([my numeric field]),7,"0")

    Then use that for all reports and forms in view mode. But I'm not sure if that makes it simpler.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------