March 26, 200718 yr Hi guys, dont know if this is the right forum to ask this, but is there a way of preventing editing a record (and its children) once the user adds another record or goes to another layout without firing a script! I was thinking I could do something using a timestamp, basically, give the user 5 minutes to key a record before it becomes locked, but is there any other 'better' method anyone can suggest? Thanks Jalz
March 27, 200718 yr If you have a serial ID and avoid deleting of records you can restrict editing of records with the calculation ID = Get ( TotalRecordCount ) which allows only the last created record to be edited. -jens
March 27, 200718 yr What if you delete the last record ? Then you'll be able to edit the previous one. Also Ids ( auto-enter serials ) not always have the same number of the records
March 27, 200718 yr I have to rethink my suggestion. Also in multiuser environment there will be difficult behaviour. If first user creates a new record and starts editing he will be interrupted by a second user starting the same. -jens
March 27, 200718 yr OK second try: - Define a global field or a $$variable _edit_id - prohibit creation of new records by accounts and privileges - perform script 'New Record' with full access - set $$_edit_id to ID of new record - set user privilege to allow edit only if ID=$$... -jens
March 27, 200718 yr Author Many Thanks to both of you. I will try jens second approach tomorrow. Jalz
Create an account or sign in to comment