AnsweredAssumed Answered

Record Locking strategy ideas sought

Question asked by Radcon on Jul 9, 2010
Latest reply on Jul 9, 2010 by Radcon


Record Locking strategy ideas sought


I use the below script and appropriate privilege sets to lock the records of my database.

Show All Records
Go to Record/Request/Page[ First ]
      Set Field [ Items::Lock; 0 ]
      Go to Record/Request/Page[ Next; Exit after last ]
End Loop

The script runs when the file is opened  (File Options, Open/Close,When  opening this file, perform script).  When a user opens the file via a  "opener file", I want all the records  to be locked so that data is not  casually changed.  Certain users can  unlock individual records as  needed for editing; I just don't want  editing to occur without the user  being reminded that they are about to  make changes to the data.  Is there a better way to ensure that all records are locked when a user logs on?

I would like to get rid of the overhead of looping through  all the records on a frequent basis and could instead re-lock the record when the user is finished editing, but I am concerned that a user  might un-gracefully exit the program before the record lock field was  changed back to 0 and that somehow a 1 ends up where a 0 should  be.  Are my concerns groundless?

Thanks for your ideas...