1 Reply Latest reply on Feb 28, 2014 10:11 PM by rgordon

    Record/Related Record Deletion When Client Loses Connection To Server

    willjamesconsulting

      I have a client running Server 12.0.5 and FileMaker Advanced 12.0.5 as a client. If I create a quote in my quote table, then go into the portal and enter line items for that quote and the client is disconnected from the server for any reason, both the quote record and ALL of the line item records disappear. I know that they were there because the serial number (primary key) has a gap in the sequence indicating the quote record and line item records did exist. I can replicate this time and again. I have never experienced this before with FileMaker, but I have a client who has lost several quotes and a lot of time as a result.

       

      Example

      idQuote serial number is at 102. Create the quote record and it is Quote 103. Date field is populated as well as the customer id number in the quote record.

      idQLineItem serial number is at 876. Create 3 line items

      Turn off WiFi (simulating loss of connection for any reason)

      After 30-60 seconds database error window notifies me that I have been disconnected

      Turn on WiFi

      Connect to file and go to Quote table

      Quote 103 is not present by search or by scanning the last records created.

      Creating a new Quote results in Quote 104 (indicating that 103 had been present)

      No line items in line item table (confirmed by search and reviewing last records created)

      Creating a new line item results in a serial number of 880 (indicating 3 line items had been present)

       

      All serial numbers are created on record creation, not record commit.

       

      I have added a 'Commit Record' script step upon the Quote record creation and a script trigger that commits the records on each line item and it seems to keep the data from disappearing upon a disconnect. Has anyone else seen this?

        • 1. Re: Record/Related Record Deletion When Client Loses Connection To Server
          rgordon

          Unfortuanately, this is expected behavior in FileMaker.  Whenever you get disconnected from the server, any uncommitted records will be lost.  This can especially be problematic if you have entered a lot of data into a portal since the new portal records will remain uncommitted until you do an action to commit the records.  When you create a record in FileMaker it isn't saved until you do some action to commit the record.  This is why you can Revert a record before it is committed.  Here is what is happening with the serial number.  Let's say the last serial number is 399.  If you have the Generate on Creation option, 400 will be inserted into the serial number field for the next new record.  If you Revert the record before commiting the record the record will be removed.  If you create another record it will get a serial number of 401 eventhough 400 was not used.  If you would have had the Generate on commit option checked the serial number would have been set at 400 instead of 401.