1. For better exposure. I would place questions about FM in the "Discussions" space. "Community Feedback" is more for issues related to this website and the Jive software that runs it.
2. Revert record will take the record back to the beginning state, and allow the user to move off of that record.
Thank you for your post!
As jormond suggested, I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive more views and potentially more advice!
Hi Joshua - thanks for your comments and your answer. Unfortunately when the error message appears about the record being locked the user cannot access the menu to revert the record so they are stuck until the other user exits the record or until they force quit the application.
Is the user attempting to access the record via some scripted process? Are there any Script Triggers associated with either the layout, the record, or the particular object being accessed?
Thanks for your question.
The answer is yes, the record is accessed via a scripted process. I have a primary table named CLIENT and another table named PROJECTS which has a relationship to CLIENT via a clientID field in both tables. The linked PROJECT records are shown on the CLIENT screen via a portal and the user accesses the appropriate PROJECT record by selecting a line in the portal. This triggers a script which does a number of things, such as writing an audit record in an AUDIT table but it also calculates some financial totals in the PROJECT screen.
Hope this helps you understand what is happening.
I suspect this is the source of the issue. It sounds like the script needs to check for record lock (error code 301) and take appropriate action if such is received.
Thanks Mike - I will check it tomorrow and post accordingly. It is now
Tuesday evening (8.00pm) in Sydney Australia.
To avoid issues like these....Is there a reason why there aren't "optimistic" record and even table locking schemes in FMP?
Visual FoxPro, for example, had 5 so-called buffering modes:
2. Pessimistic row (what FMP does)
3. Pessimistic Table
4. Optimistic Row
5. Optimistic Table
There were built in VFP functions to work with the various buffering modes as well, naturally.
You were absolutely correct and I have been able to overcome the issue by inserting the following into my script
Set Error Capture On
Set variable [$Error ; Value: Get(Last Error)]
Go to Next Field
If [ $Error = 301 ]
Show Custom Dialog [ "W A R N I N G" ; "Record locked by another user - please try again shortly." ]
This allows the second user to proceed to the child record and they still receive the standard error locking message if they attempt to modify the record when someone else is already modifying it.
Thank you very much for your assistance.