July 24, 200223 yr I'm new to FMForums and couldn't figure out which forum this question relates to. Is there a way to freeze a record after some field in that record is set? We have several databases that have records that should no longer be modified while later ones in the list still are active. Thanks for the help. Hope to return the favor soon.
July 24, 200223 yr I doubt if this is they 'best' way, but I find it effective and simple to maintain. I usually attribute several status fields to records, and one of them indicates whether a record is 'archived' or not. I also utilize several Overview layouts that are similar in appearance, but have different access and format settings. Basically when someone clicks to go see it in the Overview layout, the goto script checks to see its Archvie status, and shows the appropriate layout. If it's Archived, it sends you to the Overview layout where you cannot edit anything, and if it's still not Archived, then it takes you to the standard Overview layout where users can still make edits. This is a somewhat simplistic explanation, but it works and is easy to maintain.
July 25, 200223 yr Depending on how many user-entry fields you have on your layouts, you can create a "RecordLockedStatus" field containing Yes/No based on a value list with checkboxes. Then, for the fields you don't want the user to be able to modify if that record is "locked", include a validation of: RecordLockedStatus = "No" and prohibit the user over-riding the validation. Then, control user access to the RecordLockedStatus field. You can have all sorts of variants of this using unstored calcs to give the Yes/No. One would be based on creation date/time and the current date/time so that the user can modify a record for, say, 15 minutes after its creation, and then it automatically locks.
July 25, 200223 yr Author I like the solution but get a standard "not a specified value" message. I know I can prevent an override by setting that up in the password privleges screen. Do you just get the 'standard' message or do you somehow script a new message in? Thanks for the idea. Herb Finger
July 25, 200223 yr Author It works. A little brute force, but the results are pretty good. The only problem is that once the user gets to the entry page (assuming that they've chosen a "unlocked" record, they can modify the other records as well. (The layout is in List View.) Have you done this in Table mode or in Form View? thanks for the idea Herb Finger
July 26, 200223 yr I have a sample file that does exactly what you are wanting to do. If you would like to see it, email me and I will send it to you.
Create an account or sign in to comment