4 Replies Latest reply on Jul 12, 2013 2:32 PM by pmconaway

    Syncing and Serial numbers

    pmconaway

      I'm needing to know how to handle the following situation.

       

      Database A is served on a Filemaker Advanced Server. Users have iPads and will be using a local copy of Database A on said iPads. These users will be completing a Site visit Form locally. From what I have determined is that they will not have a reliable internet connection most of the time. So my decision is to sync the site visit records (new records only) to the served database when users return to the office. The site visit table is related to organization table via a keyfield that is generated by a numeric field with the auto generate serial number option enabled. (see below) Here is what I see as the problem: User 1 creates a new site visit record FMP creates a new serial number (ID = 5) User 2 creates a new site visit record (ID =5) each users copy has no way of knowing that another user has created a new record. So I'm going to have multiple records with the same ID.

       

      Organization Table

      ID (number, auto-enter serial number) - Primary Key for Organization table

      Org Name

      Field 1.....

       

       

      Site Visit Table

      ID (number ,auto-enter serial number ) Primary key for Site Visit table.

      IDF_Organization (foriegn key ) set when Site visit record is created. (A new site visit can only be created from a layout that is based on the organization table

       

      My question is: What is the best method to prevent multiple records with the same ID value in the Site Visit Table?

       

      One of my thoughts was not set the value of the ID when the App is running on the ipad. And then set it as part of an Import script, when the new site visit records are sent to the Served version of the database. Any suggestions are greatly appreciated. Thanks.

       

       

      Paul