On Apr 30, 2012, at 3:24 AM, John Mitchell wrote: "Error -1011: Data is being accessed by another user, script or transaction" I have an applescript being executed from FMPro 12 and its bombing here
John,
I'm no expert, but it sounds like either you or someone on your network may be accessing this record when you ran this script. If you issue a 'Go To Field' or 'Commit Records' script step first, that might solve your problem. However, that may not work if it's another person on the network.
If that doesn't work, you may want to try wrapping your code using "with transaction". It prevents other Apple Events from talking to FMPro while a transaction is running.
tell application "FileMaker Pro Advanced" with transaction try tell record ID currentRec of table 1 of document odbActivities set cell "Activity_mailbox_loc" to catMailPath end tell on error errMsg number errMsg -- failed display alert "Could not update Category Mail folder name" message ¬ "Check folder <" & catMailPath & ¬ ">, redo operation (folders may exist now) or reset manually" as warning buttons {"Cancel"} default button 1 return {false} end try end transaction end tell
As a side note, if this is being run from within FMPro, you don't need to use tell application "FileMaker Pro Advanced". That's only necessary when being called from outside FMPro.
Marc |