Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7992 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.