From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer
When a FileMaker database is being hosted over a network, only one user can modify the same record at one time. If you try to modify a record that another FileMaker user is currently browsing or editing, you will get a message telling you that modifications cannot be done. The dialog box will also provide the name of the user that is on that record. This is how databases protect themselves from record editing conflicts.
When a user clicks into a portal row, the parent and child records are locked. If the user clicks one of the portal scroll arrows, the parent and the first child record in the portal are locked. If a user locks the first record in the portal and another user has that same first record, then the portal is locked from the second user.
Some developers may jump to the conclusion that if a global field is used as the parent key, the record will not be locked. This is NOT the case with the locking of a portal.
This is an advanced topic but there are some FileMaker solutions that use a single file to view the data in many files. This technique is often referred to as a dashboard in my FileMaker conversations. A dashboard technique is when you design an interface that is like a car dashboard. All the critical information is found in one place and you don’t need to turn your head. The idea is that one layout may have all your critical information and you don’t need to leave that layout to get your work done.
By clever uses of fields, calculations, relationships and scripts ... a very sophisticated solution can be created. To help prevent record locking, each user needs to be on an individual parent record and as much care as possible needs to be taken to keep from locking portal child records.
Many times in a single file views many files type of interface, a user is only allowed to see their own records. This will help prevent portal lock because it’s the first record in the portal that locks the portal. Most users would have a different first portal record if they are only viewing their own records.
If you have a high number or users that may be looking at the same data sets, you should try to disable the ability for users to click directly into a portal row or one of the fields in the portal row. You can do this a variety of ways but the most common is to take off the Allow Entry In Field option in the Field Format dialog box. This will limit your ability to click into the field to do searches however.
Remember that security settings can also be of help to prevent record locking. A user without the ability to edit records cannot lock them. Normally, you would do this via a privilege setting but it can also be done via field validation. In this method a field can be made editable or not based upon the value in another field. This allows you to control the locking via a field setting, a calculation or a script.
Global fields that can normally be used to prevent record locking when creating or editing an existing record. This resembles a Submit type of environment that is popular in most database systems other than FileMaker.
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 2007 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.