2 Replies Latest reply on Apr 5, 2012 12:25 PM by VerneArase

    Import Records is asynchronous

    BatMan

      Title

      Import Records is asynchronous

      Post

      Hi

      I have an AppleScript that calls a FileMaker script, which contains the Import Records command. The import usually takes a few seconds to finish as hundreds of records are imported. After this call, the AppleScript sends further Apple Events to FileMaker Pro Advanced.

      So far, so good. The problem is that the FM script doesn't wait until the import is finished, but goes on (and finally terminates) while the import is still running. This causes the AppleScript to continue with sending the subsequent Apple Events to FMP, which then fail with the infamous error -10011: “Data is being accessed by another user, script or transaction.” How can I force the import to be synchronous? Delaying the AppleScript a fixed number of seconds is no option, because the import time varies a lot, and the process must be robust.

      I'm using FileMaker Pro Advanced 11.0.3 under Mac OS X 10.6.7. Any help is greatly appreciated.