June 19, 200322 yr I was wondering how and when a record gets locked by another user accessing it. For example: does related records gets locked too ? Does the record gets locked even if the user doesn't have write access to it (or to any of the fields in the layout he is on) ? How does SetField[] and Replace[] behave when they try to edit a locked record ? Last question: I'm using data-files to store data and interface-files to display data. "Interface" files have only global fields and one calculated field set to 1. Those files have only one record. In order to have access to data, every user opens the "interface" file. So users are accessing different records on the data files but also, always, the same single record in the interface file. It happened to me that sometimes this record gets locked and only one user is able to operate. What happened? Thank in adavace for any suggestion!
June 20, 200322 yr A record gets locked when any user clicks into a field. It is unlocked when they click out of all fields. AFAIK related records are not locked, unless the user has their cursor in a related field through a portal -- then the msater record and the related records will both be locked. Set Field [] and Replace will fail to update locked records. Regarding your interface, it's reasonable that FMP would lock the record. Bummer. You could make several records (one for the number of users) and get the first guest to use record 1, second guest to use record 2 etc. A clever script might be able to do all this on-the-fly and maybe even delete them as each user leaves the file. Who knows?
June 20, 200322 yr You may also use a Troi Activator Plug-in to send a message to the user viewing the locked record. This is nice especially if the user viewing that record is far from you
June 20, 200322 yr Hi Paolo, Maybe you could have a local copy of the interface file on each users machine. It does not contain data that needs to dynamically updated, if I understood correct. Drawback is of course that you need to copy that file to each users computer when you make a new version. But advantage is that the network does not have to transport the data from the user interface file. Maybe worth a try? Regards, Ernst.
June 20, 200322 yr RE: Maybe you could have a local copy of the interface file on each users machine. That is what I am doing in some cases
June 23, 200322 yr Author Thank you! I'll try the "several records on interface file" option. I just have to set the startup script to create a new record and the closing script to close that record. Every user have its own record for the time he accesses the database.
Create an account or sign in to comment