4 Replies Latest reply on Mar 16, 2015 9:18 PM by fred@kca-inc.com

    Occasional Duplicate Serial Number with WebDirect App



      Occasional Duplicate Serial Number with WebDirect App


      Occasionally, my multi-user WebDirect application seems to generate a duplicate serial number (Auto-Enter Serial Number, on creation, prohibit modification).  It seems to happen in different tables, too.  I have tried to tightly control record locking by having users enter all data into Globals in an independent table.  Once all of the data is entered and validated, a "no fields" layout is opened, a new record is added, the data from the Globals is pushed into the proper fields and the layout is closed.  Theoretically, the record should only be locked for milliseconds.  There are many users accessing the system, but usually only a few at a time.  It seems that it would take 2 or more users hitting Save at exactly the same time to create a duplicate serial number????  This, obviously, messes up the relationships when the records are duplicated.

      I don't do any data imports, etc., so I don't believe I've created any duplicates that way.

      I'm looking for suggestions on how to track down the culprit or how to eliminate the possibility of the duplicates.  I thought I remembered that there was a way to create a Serial Number that was unique to the system and not just the table.  Would that help?  The actual record number is irrelevant as long as it's unique to the table (and, at this point in the development cycle, all numeric).

      Any input would be appreciated.


        • 1. Re: Occasional Duplicate Serial Number with WebDirect App

          Such duplicates should not be possible, period. This is a long established feature of FileMaker for which there have been no known issues for a very long time. So while I can't say this is impossible, I find it highly unlikely. I suggest looking at other possible causes for your duplicate values. Might you have imported some records from one copy of this file into another?

          • 2. Re: Occasional Duplicate Serial Number with WebDirect App

            I'm really glad to hear that it should not happen.  It happens enough (maybe 6 times now) that I have created a script to detect duplicate serial numbers.  A little more information I neglected to include:

            * It's a dual file system (App and Data).  No data is stored in the app file.  All user IDs and passwords are sync'd between the 2 files. Both files have identical Entity Relationship Diagrams.

            * I've never done a data import from another FileMaker file or any other external file.

            * One culprit I've considered is that I have uploaded a test version of the App file to the server (app_test.fmp12), logged into it and connected to the Data file.  I guess that someone could have been logged into the App.fmp12 version while I was testing.  In this case, would the Serial Number be created/tracked by the App file or the Data file?  If it's the App file, I could see the possibility to duplicate serial numbers.


            • 3. Re: Occasional Duplicate Serial Number with WebDirect App

              The serial number auto-enter field option should be part of the field definition in the data file. The UI file that you use to create new records in the table shouldn't matter. Are you sure that this is really an auto-entered serial number field option and not a value entered by a script? Is there ever a need to reset the next serial value such as a system where the serial sequence is intended to start over each month or each year?

              Another possibility is that you are not looking at the correct field. Example: Say you have an invoice system with a related Invoice Data table of line items for each invoice. The InvoiceID field found in the invoice table could be set up as an auto-entered serial number and would always be a unique value in that table, but the match field in Invoice Data would also store these serial numbers, but in this table, the values are not unique as all the Invoice Data records for a given invoice would have the same Serial number value. So if you search for duplicates in the Invoice Data table, you'll find them even though none exist in the Invoice table.

              Note: if this auto-enter field option failed to produce unique values, Report an Issue would be flooded with impassioned posts demanding an ASAP update to correct the problem as this would spell disaster for a relational database system like FileMaker. I just don't see any such reports now or in the past.

              • 4. Re: Occasional Duplicate Serial Number with WebDirect App

                I'm clueless then on why it's happening.  Here is the __pk field properties for one of the 70 tables (and hundreds of instances) in the database.  All are structured the same.  All are Auto-Enter Serial Number, on creation, prohibit modification.  The sequence number is irrelevant to the application so they never get reset.  I am definitely looking at the correct field.  Each table has a single __pk*******ID field which is the auto-enter serial number field.

                With the properties (per the picture) on that field, is it even possible to overwrite the unique value?

                I agree that it would be reported en masse if it happened often.  If it happens again, what can I send you to check into the issue?