Jump to content
Sign in to follow this  
hfinger

Freezing a record

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.