wanewrld Posted January 9, 2003 Posted January 9, 2003 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
jscooper Posted January 10, 2003 Posted January 10, 2003 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
wanewrld Posted January 10, 2003 Author Posted January 10, 2003 Thanks Jeff, I Have seen ads for that company in FMPro magaazine and will look in to it. Wayne
Ugo DI LUCA Posted January 10, 2003 Posted January 10, 2003 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
Recommended Posts
This topic is 7992 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