3 Replies Latest reply on Apr 19, 2015 8:34 AM by philmodjunk

    Time Based record locking



      Time Based record locking


      FileMaker Pro 12

      I am a total newbie and looking for a solution for the following:

      We have a notes records inside a portal. Additional notes can be added to by users. Each note is a record contained 8 fields. Each note is time stamped on entry.

      The requirement is to lock each note record in the portal to prevent data entry users from changing records in the future, but we wish to allow them some temporary to review and amend the record if they have made a mistake or want to correct spelling, grammar.

      One idea is to leave the record editable for nn minutes and then have some script or trigger to lock the record to all but admin users after that time has expired.

      I'm presuming various requirements for locking records come up all the time - is this suggestion viable or is there a better way of allowing temporary editing and subsequent locking

        • 1. Re: Time Based record locking

          It's possible to lock them as specified. You will need an auto-entered TimeStamp that enters the creation date and time and this appears to be the case.

          Then you can set up a "lock expression" in the data entry users' privilege set such as:

          ( Get ( CurrentTimeStamp ) - CreationTimeStampField ) / 60 < nn

          replacing "nn" with the desired number of minutes.

          See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.

          • 2. Re: Time Based record locking

            Thankyou for your response PhilModJunk.

            I made a copy of the test database

            With [Full Access ] I went in and applied that formula change (inserting our field name in lieu of CreationTimeStampField) to the [Data Entry Only] Privilege Set.

            The result is that it appears to lock the existing record in the portal immediately and it also appears now the portal is locked totally and prevented me as a [Data Entry Operator] from adding any new records to the portal.

            I closed the database and re-logged in with [Full Access] and reversed out the change and removed all limiting controls from the record and its fields.

            On accessing the portal even [Full Access] now can't delete records or add records to that portal - it is totally locked from change by any user even though there are no controls in "security" on the applicable record. 

            I will make another copy of the test database in the next day or so when I get the time and try and find out where I went wrong or if the problem is replicated again.

            • 3. Re: Time Based record locking

              If you really have the database file open as a full access user, any settings in the privilege set used with another account will not have any effect on what you can or cannot do with the database.