Jaume Posted July 5, 2004 Posted July 5, 2004 I have a database with a File, say "All". This file contains a date field with a wide range (from 2002 to today). I have created another file, say "Older Than" to export the records "older than a given date" and clear it from the "All" file.
MoonShadow Posted July 5, 2004 Posted July 5, 2004 Hi Jaume, The process is called Pulling, because you can pull the data into OlderThan directly from All without exporting first. You will need two scripts. Create your Import script in OlderThan first by manually importing from All. Then create your script. Your script in All would then be similar to: Set Error Capture [On] Allow User Abort [Off] Enter Find Mode [Pause] ... enter date criteria ... Perform Find [Replace Found Set] If [not Status(CurrentFoundCount)] Show Message [button: OK, "No records found"] Halt Script End If Perform Script [sub-script, External; "OlderThan.fp5" (and select your Import script) Refresh Window [bring to front] Delete All Records[no dialog] ... this will only delete the found set in All. You may want to include protection - capture the original found count in All (in global) then compare to imported set count in OlderThan so you can back out (delete imported set) and halt before it deletes your records in All. You may even want to include an "Are you sure you want to move this found set?" to provide Users a way out.
Jaume Posted July 5, 2004 Author Posted July 5, 2004 Thanks, MoonShadow, You are really quick and accurate. I am very happy. I will add a step for automate the (repetitive) search criteria inserting a calculate result in the "date" field. Thank you very much,
Recommended Posts
This topic is 7449 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