July 5, 200421 yr 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.
July 5, 200421 yr 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.
July 5, 200421 yr Author 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,
Create an account or sign in to comment