4 Replies Latest reply on Jul 29, 2010 8:19 AM by LaRetta_1

    Auto-Enter Serial Number problems



      Auto-Enter Serial Number problems


      I dragged an Excel spreadsheet that had been saved from a Numbers document onto the Filemaker icon to create a database. This file didn't have any ClientID numbers, so I had to create a new field in the new database for this. I wanted the ClientID to be an auto-enter serial number on creation so that new records would have an automatically assigned ID number.

      Before any relationships could be set up all of the empty ClientID fields had to be filled with numbers in order for relationships to work correctly, so I did this manually. This created records 1 to 90. My problem is that when I created my first New client, instead of creating the number 91, it created a second ClientID number 1.

      How do I get the serial numbers to work correctly? Probably something straightforward, but I'm a Filemaker newbie and welcome any help as I'm clueless right now!


        • 1. Re: Auto-Enter Serial Number problems

            Show all records and then use Replace Contents[] and specify 'serial number' beginning with 1.  Make sure the checkbox 'update auto-enter options' is checked.

          Then when creating new records, they will inherit the next incrementing number.  When importing new records, be sure you select 'perform auto-enter' during the import (when you are asked).

          • 2. Re: Auto-Enter Serial Number problems

            Thanks again for your help. Will this also update those fields in linked tables that contain the Serial No as a foreign key?

            • 3. Re: Auto-Enter Serial Number problems

              I just realised, that was a silly question! My manually entered "serial numbers" were from 1 to 90, and the ones I am replacing them with that will be Auto-enter Serial Numbers are also from 1 to 90 so I don't have anything to worry about - in effect I'm changing the number type, not the number itself.

              Presumably I would have problems if I wanted to replace existing numbers with different ones? The linked tables would then link to the wrong records I suppose... is that correct?

              • 4. Re: Auto-Enter Serial Number problems

                you are correct ... once you relate records by this unique ID, changing it will break your relationships.  But this is why it is important to use an FM-generated, auto-enter (meaningless) serial.  If you use an ID with meaning, and the meaning changes, it will break your relationships.  If the meaning changes might be Name (person was woman and she married and changed her last name), phone (person moved and changed their phone number) and so forth.

                It is good that you are thinking of these things; most don't think of it until the first time they change their serials and then turn pale realizing it all broke on them.  :^)