Jump to content

Locking Records


Randy

This topic is 8154 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

I have a need to allow the data on certain layout to be editable up to a time at which that data is used to create an invoice. After the invoice is created that data needs to be "locked". I know I can accomplish this by directing users to a locked version of the layout and an unlock version based on a status field.

My problem starts when users have performed a search and found an unlocked record. If they use the keyboard command to perform another search from the unlocked layout and find a record that has the status of being locked, it will be displayed in the unlocked layout. And my protection is out the window...

Any ideas, please don't suggest asking users not to use the keyboard command. Old habits die hard!!

Thanks,

Randy

Link to comment
Share on other sites

Just off the top of my head; it may be too kludgy, but... ???

Create a "LockRecord" field and have it auto-enter an "X".

Any time an invoice is created, clear this new field.

Create a "Find" button (as well as other buttons which will be needed -- you'll see why) that goes to a "Find" layout where the "LockRecord" field is hidden behind another field and manual entry is disallowed, then enters and "X" in the field and goes to the first tabbed field. Have buttons in this layout to create a new record/request, repeating the other steps.

Set menu commands to "Editing Only" in the Passwords section. This also disallows the corresponding keyboard commands (this is why you'll need some more buttons).

Create an "Open" script that shows only records with an "X" in the LockRecord field.

HTH,

Dan

Link to comment
Share on other sites

A couple of solutions were posted late last year. One involves scripts attached to each field on the layout that either Go TO Field or xit Record/Request depending upon whether the record is locked or not, but it only works if the fields are removed from the tab order and only provides protection for the one layout.

The other solution used field-level validqtion. The details escape me right now (seach the forum) but it sounded good to me.

Link to comment
Share on other sites

Or you could create a new file where records can't be created, deleted or edited. Then create a script that does the following:

Finds all records that need to be locked

Performs an external script in the "Locked" file that imports the records

Deletes the records from the original file.

Now you can see the locked records in the other file, but you can't mess with 'em (without the sysop's password, of course).

HTH,

Dan

Link to comment
Share on other sites

This topic is 8154 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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