5 Replies Latest reply on Jan 6, 2013 7:56 AM by philmodjunk

    Serial questions

    EP

      Title

      Serial questions

      Post

           Have a couple of questions regarding serials.  

           1- If I have 10 tables and they each have a parent key that is an  auto entered serial starting at 1, can they coflict in any way (multiple tables with the same parent key value)?

           2- Since FM12, is the new best practice to ditch auto entered serials and opt for text fields with an auto enter UUID?

           thanks!

            

        • 1. Re: Serial questions
          schamblee

               No there can't be a conflict, unless you create one.  Serial Number can be a text field.  If there was a problem with the auto generated serial number then there would be a problem with all auto enter generated fields.  The Serial Number auto enter was designed for the purpose of generating a serial number.  The serial number can also contain text.   The serial number field are the same as any other field in filemaker.  If it was unsafe then all of filemaker would be unsafe.  The best practice is to use the auto serial number built in to filemaker.

          • 2. Re: Serial questions
            EP

                 Thanks. I've read that using serials with zero's in front can cause problems, it seemed to be controversial (i.e. 00001, 00002, etc).  Has anyone found this to be true?

            • 3. Re: Serial questions
              philmodjunk

                   The problem with leading zeroes is that they tend to impose an upper limit on possible values for your serial number and a text field with leading zeroes will differ from a number field.

                   It's better to add in the leading zeroes after the fact for purposes of display rather than value. You can add a second calculation field for adding in the leading zeroes for example to put on layouts while using the original serial number field as your primary key in relationships.

                   Get (UUID) does offer significant advantages--such as being able to import data into a new version and not have to update the auto-enter settings, but it's the "new kid on the block". While I have seen zero problem reports here in the forum in regards to using it, It doesn't have the track record serial numbers--which have been darn near "bullet proof" do and serial number values are easier to work with in many situations. Thus, many FileMaker 12 DB's still use auto-entered serial numbers.

              • 4. Re: Serial questions
                EP

                     Thanks guys.  I've opted to remove the preceding zeros.  I am using a traditional auto-enter serial now with 2letteres before the numbers (i.e. NJ1002).

                     It is my understanding the letters will not cause any harm and is widely used.  Am I incorrect?

                • 5. Re: Serial questions
                  philmodjunk

                       Given the critical nature of primary keys, I prefer to keep them pure serial numbers (or UUID values) with nothing added. The ideal primary key should not have any "added meaning" and should never need to be changed.

                       IF your field is of type number, the letters will be ignored in finds, sorts and when matching values. If text they will not be.

                       What would be the purpose of the added two letters?