January 9, 200323 yr Hi, I have yet to try and write a script. Can this be done? I want to have my DB clear old data automatically? One time perday, say at 9:00am, I want the script to search all the records and check for any dates that are 1 day past the current date and when found either delete them and/or save them to a new DB. I will have a date field that has end of life of the record. So if today's date is Jan 9th, the script will look for records dated Jan 8th, and when found will either delete them and/or save them to a new DB. I use FMPro 4.0 but may be getting 5.0 soon. Thanks for your help, Wayne
January 10, 200323 yr A script to find records based on date/time information is fairly easy. Problem is, FileMaker scripts can't be set up to run automatically at a particular time; not without a plug-in anyway (I've used Oazium Events -- I think that's how it's spelled -- before and it worked pretty well). Anyway, you can have your script go into find mode, set your "lastdate" field to something like "<" & datetotext(status(currentdate)) and do a find. Then you can export or delete the set. Jeff
January 10, 200323 yr Author Thanks Jeff, I Have seen ads for that company in FMPro magaazine and will look in to it. Wayne
January 10, 200323 yr If this should be an automated task, why not put it together (if you already have one) to the script you run when opening the file. If Today Perform script End If Perform other script
Create an account or sign in to comment