1 Reply Latest reply on Feb 28, 2012 12:59 PM by philmodjunk

    Having a auto-entered serial with leading zeros?



      Having a auto-entered serial with leading zeros?


      How do you have an auto entered serial number with leading zeros?   The director of a company I just built a purchase order system wants to have the leading zeros showing, such as "000050" for the 50th purchase order.  Any ideas?  I don't see how to do that... within the field values.




        • 1. Re: Having a auto-entered serial with leading zeros?

          It's possible to configure your auto-entered serial number with a text data type to get this as actual data in the field, but I recommend against it.

          Instead, add a calculation field used soley for display purposes with this calculation:

          Right ( "000000" & SerialNumberField ; 6 )

          and select 'text' as the return type. You can use this field on your layouts anywhere you need it while keeping the serial number as a simple serial number for use as a primary key.

          I recommend keeping FileMaker primary keys setup as simple serial numbers without any added "extras" to provide additional info to your users or just to suit their preferences. Once you add such to the actual value used as your primary key, you open the door to users demanding additional changes to your primary keys in the future and such changes can seriously complicate your efforts to protext data integrity and to keep your system design simple.

          So meet such requirements by adding a "label" field that suits their needs and preferences while keeping your primary key "unique and meaningless".