murray Posted December 11, 2003 Posted December 11, 2003 I'm hoping someone can help me with a solution to my problem. I would like to stop records being deleted irretrievably from a database by a basic level user, which I can do by password control, but I don't want them to remain indefinitely in the existing database as they will affect calculations. What I am hoping to do (as simply as possible) is to "delete" the records by first exporting the so-called deleted records, to be saved in another file somewhere before actually being deleted from the file. This way they can be inspected before being actually deleted from the storage file by someone with more access than the basic user. I would appreciate any advice on the basics of this process, but would also need to do this for about 15 related databases of varying complexity and field count. Ideally, I'd like them all to go to one file rather than having separate "deleted" archives for each database. Any suggestions are appreciated. Thanks, Murray
dbruggmann Posted December 11, 2003 Posted December 11, 2003 "Ideally, I'd like them all to go to one file rather than having separate 'deleted' archives for each database." Theoretically this is possible, I think
murray Posted December 11, 2003 Author Posted December 11, 2003 G'day again Detlev, I thought it would be a pretty hefty challenge but as you know, somethings that are simple for one person are difficult for another. I have the Audit Tracking working in some of my simple dbs and will attempt to get them working in the more complicated ones, but this is a "per record" method, so once the record is deleted, so is the audit track. I'm just trying to get the solution as sturdy as possible but I guess I'll have to accept that some user care and common sense will be important. Thanks for your input. Cheers, Murray
dbruggmann Posted December 11, 2003 Posted December 11, 2003 Hello Murray "I have the Audit Tracking working in some of my simple dbs and will attempt to get them working in the more complicated ones, but this is a 'per record' method, so once the record is deleted, so is the audit track." But Ray's
murray Posted December 13, 2003 Author Posted December 13, 2003 Sorry for the delay Detlev, You make it sound simple! I would like it to be a seamless process without any dialogs. Is it really that simple? I can't find any examples anywhere - have you seen any? Cheers, Murray PS. I had to get Ray to help me with his audit tracking - I got stuck!
CobaltSky Posted December 13, 2003 Posted December 13, 2003 Hi Murray, Hi Detlev, Murray, if you're looking for a relatively simple way to Transfer records to a holding file rather than deleting them, here is a process you might like to consider: 1. Save a clone of the file you're working on and rename the clone appropriately to identify it as a 'hold' file corresponding to the file you cloned it from. 2. Import a record or two from the original; file into the clone using the 'Matching Names' import option and then create a script in the clone which has only the following steps: Import Records [Restore, No Dialog] Show All Records Close [ ] - then delete the sample records you imported and go back to the original file. 3 Now, in the original file, create a new script called 'Delete Record' and set it up as follows: Show All Records Omit Record Show Omitted Perform Script [sub-scripts, External: "YourHoldFile.fp5"] Delete Record/Request [No Dialog] Refresh Window [bring to front] where the external script at step 4 points to the import script you've created in the hold file. That's basically it. When the Delete Record script runs, the current record will disappear from the main file and be transferred to the hold file. If you want to add finesse to the process, there are two more things you may wish to consider: A: add a procedure which 'saves the found set' before the delete procedure and then restores it afterwards (so that, for the sake of convenience, the found set in the main file is not lost when a record is deleted). B: Set up two more scripts exactly like the above but in reverse (ie the script at Step 2 in the main file and the script at step 3 - named 'Reinstate Record' - in the hold file). That will give you a mechanism by which to efficiently 'undo' an erroneous record deletion. The chief limitation of the technique is that it requires a separate hold file for each file in your solution. But you need only ever have one hold file open at a time (and then only while you are actually transferring data to or from it). But it is not difficult to set up and will be robust and easy to use.
murray Posted December 13, 2003 Author Posted December 13, 2003 Thanks for that Ray - I'll give it a go. Cheers, Murray
Kundinger Posted December 16, 2003 Posted December 16, 2003 Hi Murray, Below is a link to a FMForums post similar to your request... <<< http://www.fmforums.com/threads/showflat.php?Number=87992 >>> in it is a reply I posted with some ideas that may work for you. Good Luck! Bob Kundinger [email protected]
murray Posted December 16, 2003 Author Posted December 16, 2003 Thanks Bob, I'll work through this, Cheers, Murray
Recommended Posts
This topic is 7648 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