5 Replies Latest reply on Jan 17, 2017 5:32 AM by Mike_Mitchell

    Open record exclusively


      In my "immense" (it's really big, now... ) database, when a user try to print a technical report, Filemaker verifies many data, from customer's contract, administration, payments and so on.

      Even if it seems strange whit so many records, the same record could be already open.

      I do not want to simply have a windows with alert message for example using a trigger OnRecordLoad, I want that this script to print could bypass record locked even if the user is working on that record is fired away.


      This is because the same kind of script is useful even when a user wants to print thousands of reports. I don't want mistakes because one of 1000 records is locked, and I don't want the script stops.


      Is it possibile to become the "boss" of record even if another is working on it ?

      I work on FM15ADV but also in 13 and 14.


      Thanks !

        • 1. Re: Open record exclusively

          I'm not 100% certain what you're asking here. Record lock doesn't affect printing. Any user can print any record, whether it's locked or not. So what exactly are you trying to accomplish that's invoking record lock?


          lolli_group wrote:


          Is it possibile to become the "boss" of record even if another is working on it ?


          No. The whole point of record lock is to prevent one user from overwriting another user's changes. But again, what is it you want to do that's causing this issue?

          • 2. Re: Open record exclusively

            Like Mike said, printing should be no problem, unless you are going to write something in that record in order to print?  Maybe you are using a field which should be a global?


            Still you can test for a record lock "open record/request" script step  and use the "set error capture on" script step so you script can handle the lock without getting stuk.


            set errorcapture on

            open record / request

            if ( get ( lasterror ) <> 0 )

            .. handle error

            end if

            • 3. Re: Open record exclusively

              Sorry, I wrote in a wrong way.

              It is not a printing problem, the problem is that a script, BEFORE printing a page, perform some check on records, and sometimes must to write into the record in a specific fields.

              This is the last check before printing a page.


              If a different user "B" user, is working on the same record, the script of user "A" cannot write into that record, and this is the problem.

              I'd like that the user "B" is fired out from that record (like the server admin can disconnect users).

              But I think your answer is "Not possible"...

              • 4. Re: Open record exclusively

                This is what I actually do, but I don't want to stop the script or to restart it later because it has not finished the job.

                I actually write in a table all errors, but after this I must decide what to do, and run again the script for example

                • 5. Re: Open record exclusively

                  No client can disconnect any other client. That would be a horrible security issue.


                  What are you writing to the records in preprocessing? There's probably another way to accomplish the task.