Jalz Posted March 26, 2007 Posted March 26, 2007 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
jteich Posted March 27, 2007 Posted March 27, 2007 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
Raybaudi Posted March 27, 2007 Posted March 27, 2007 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
jteich Posted March 27, 2007 Posted March 27, 2007 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
jteich Posted March 27, 2007 Posted March 27, 2007 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
Jalz Posted March 27, 2007 Author Posted March 27, 2007 Many Thanks to both of you. I will try jens second approach tomorrow. Jalz
Recommended Posts
This topic is 6450 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now