4 Replies Latest reply on Aug 9, 2017 3:00 PM by andyk3005

    File locking issue using FileMaker Server.

    andyk3005

      In simple terms I want a list of job numbers on the left hand side of a layout and the full job details for the selected job built on the rest of the screen.

      I have job file linked to a copy of the job file using a calculated global field of value 1.   I add a portal based on the copy to a layout referencing the job file.  I have the job file related to a second copy of the job file through a global in the job file linked to the job number in the second copy.  The fields from the second copy are added to the layout.  When a job number is selected from the list a script sets the value of the JobNumberGlobal and the details of the job are displayed in full.   These details can be edited and when the cache is updated the changes are posted to other users correctly.   Where the same record is edited by another user a blocking message appears correctly indicating that the record is being edited by another user.

       

      My problem is that when a user selects and tries to edit any of the other listed entries the message is repeated meaning that the whole file is effectively blocked until the first user is complete.

       

      This is a serious issue affecting a development and I would appreciate comments and pointers.

        • 1. Re: File locking issue using FileMaker Server.
          wimdecorte

          Record locking is a critical part of multi-user operations so it is entirely normal that only one person at a time can work on a record.

           

          From your description though it sounds like all users in essence share the same 'parent' record to show the selected items in a portal.  Even though users may be looking at different record sets in the portal, by editing records in the portal the parent record is also locked.

           

          The solution is for each user to have its own parent record.

          • 2. Re: File locking issue using FileMaker Server.
            keywords

            It might just be the form of words you used, but when you say "I have the job file related to a second copy of the job file through a global in the job file linked to the job number in the second copy." do you really mean a second copy, or do you mean view/connect through a second relationship?

            Either way, since the relationship you describe is global, I suspect that might lock up all records—as described by Wim.

            • 3. Re: File locking issue using FileMaker Server.
              philmodjunk

              Another approach, instead of using a second relationship to link to the record in order to show/edit it's details is to use a script to find that record when the portal button or row is clicked and make it the current record. This puts each user on a different current record in the layout's table and should also avoid the edit lock that is described here.

              • 4. Re: File locking issue using FileMaker Server.
                andyk3005

                Phil your method was the first that i used but did not test with multiple users.  I changed as I thought it saved a find.  Wim thanks for the pointer.  I have added 'Show all records' to the script executed when selecting from the portal and that seems to have sorted the problem.  The job file file was showing a single record when the problem was  occurring.  Thanks to keywords as well.

                Regards

                Andy