3 Replies Latest reply on Jun 18, 2016 6:11 PM by Chrisb

    Entering sequential serial numbers




      New user here.


      I am trying to set up an inventory control database with serial numbers that auto fill sequentially.


      I import machinery, 24 items per container.   each item has its own serial number  E.G.    010601----through to 010624.


      At the moment I use a spreadsheet, I enter the first number and pull the cell tab down. This automatically enters the serial numbers in an increasing value of 1 per cell.


      Is there a similar way to do this in Filemaker or do I need to manually enter each serial number?





        • 1. Re: Entering sequential serial numbers

          If there is a different prefix per container you can do this with an auto enter calculation. Would need to reference the parent container record in some way. Can be done. How depends on the details of what you have.

          • 2. Re: Entering sequential serial numbers

            I assume that your records are already created?


            If so-

            Make certain that only those records are in your found set.

            Choose Records - Replace Field Contents

            There you will find the option to enter serialized numbers.  Give it a starting number and the increment that you want.

            Make note that this will replace the values in the selected field FOR ALL RECORDS in the found set.


            If your records are not already created, and you want to enter the serial number as you create records you have a couple of options:


            1- If you don't particularly care what your serial numbers are, but you just need unique numbers then in the options of your serial number field-

            You could choose the settings for serial number - you can set the starting value and increment there.  Each time you create a new records the field will be increased by 1.  This does not give you much control over your serial numbers - for example - if you delete a record or need to skip around with the sequencing you may want option #2


            2- For more control over the starting number and sequencing-

            Assuming that your serial number field is text or number, choose Options, and on the Auto-Enter tab, choose "calculated value" and enter the following calculation:

            GetNthRecord ( YOUR_SERIAL_FIELD ; Get ( RecordNumber ) - 1 ) + 1

            Set YOUR_SERIAL_FIELD to the name of the field you are working with.  Replace the + 1 in the calculation with whatever your increment needs to be.

            Be sure to check the "Do not replace existing value of field" option.


            Now when you create a record, it will look at the previous record and increment it by 1 (or whatever increment you set).  But this option gives you some flexibility.  For example, say the last record you created left off at 5000.  You create a new record, and it automatically enters 5001 for you.  But say that you want to start this particular sequence at 6000.  Just change the value in the record that you created from 5001 to 6000.  The next record that you create will automatically enter 6001.


            If you need leading zeros (per your example) then set the field to text and change the above auto-enter calculation to:

            Right ( "000000" & GetNthRecord ( YOUR_SERIAL_FIELD ; Get ( RecordNumber ) - 1 ) + 1 ; 6 )

            This calculation would give you a 6 digit number with leading zeros.


            In any case, you may want to set the field validation options to ensure that the field contains unique values.  (Go to the options for the field and choose Validation - Require: Unique value.  Also there you can set the options for whether or not you want to be able to override your validation settings.

            • 3. Re: Entering sequential serial numbers

              Thanks very much for the advice.