3 Replies Latest reply on Dec 19, 2012 10:10 AM by BTimm

    Record-locking and error capture with ESS

    BTimm

      I have a solution running on FM11 that uses a robot client to run several schedule scripts 24/7. I've run this for years and have used error capture to prevent robot client from pausing on benign errors, which has worked fine in many different scenarios. I recently set up a new script that this is still pausing on robot with error message regarding record lock and prompting for client to choose to revert their changes or overwrite changes another user has made. (If actual staff had made a change but neglected to exit or commit record before the robot client picked up the record change to force another step).

       

      The nature of the robot script is that when a specific set of fields in a record are changed, it marks a flag field. The robot script finds the flagged / changed records and executes a step to make changes to related SQL record using an ESS relationship. It then also clears the flag in the native FM record.

       

      Part of this was a strategic error on my part. I originally set up the robot schedule to run frequently so often it would be trying to jump and do the ESS update while staff was still in the record. However, I moved this routine back to a once-nightly script during off-hours and it is still getting caught with the record lock error.

       

      I also had attempted to resolve by adding a check for RecordOpenState, to skip the update if OpenState did not equal 0, i.e. record was closed or committed.

       

      I can't figure out what is unique about this specific record update process, that throws the error message in a way I have not seen elsewhere. Happy to post script if needed but appreciate any insight on this.

        • 1. Re: Record-locking and error capture with ESS
          LSNOVER

          If your getting this message, the data has been changed sometime during your edit process.  A couple of things to help....

           

          1.) Be sure to "refresh" the data before going into edit mode.  Filemaker is not proactive in updating records that have been changed, so your ESS data cache can get outdated fairly quickly.  Make sure the record is "fresh" before going in and updating it.  This will alleviate many locks.

           

          2.) Consider updating to Filemaker 12, where you can over-ride the ESS update lock dialog.  Note, you HAVE to be careful about this, as again, if you data is "old", you may end up over-writing legitimate updates to the data that took place prior to the current update.  If your confident that is safe, this feature of FM 12 will get you around the dialog hosing things up for you.

           

          Regards,
          Lee

          1 of 1 people found this helpful
          • 2. Re: Record-locking and error capture with ESS
            BTimm

            Thanks, Lee. More reason to schedule my jump to 12.

            • 3. Re: Record-locking and error capture with ESS
              BTimm

              Lee,

               

              In pondering your answer, I'm realizing that this is more likely an issue with ESS and refresh, since the error does indicate that there have been other changes to the record since I opened it. I'll try a few things with refresh steps.