Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello

I have a field called " startdate"

I would like my database to automatically delete the record containing that date one year later. without any dialog.

What is the best way to do this and not involve the end user.

Kind of a hidden function.

Thanks

Posted

Assuming that your solution gets shut down on a daily basis you could include a routine in your startup script that finds all records that are, to the day, one year old (or older to allow for weekends/leap years etc) and then delete the found set.

HTH

Phil

Posted

Just to add... If you have FMS 9 you can have a scripted schedule that does this.

Posted

FileMaker Server 9 can now schedule and run scripts directly (with certain limitations), so Phil's script could be run daily that way as well.

Posted

what would be the best way to wipe out a record. I would put it in a script that starts with the program.

find all records with a certain date (today) and then delete found set?

Thanks

Dave

Posted

Something like this:

Set Error capture (ON)

Enter Find mode

Set field(startdate ; "<" & Get( CurrentDate ) - 365 )

Perform Find

If( Get( FoundCount ) > 0 )

Delete All Records( no dialog )

Else

Show All Records

End If

Posted

or if you always want it on the same day...

Set field [ startdate ; "<" & Let ( d = Get ( CurrentDate ); Date ( Month (d) ; Day (d); Year(d) -1 ) ) ]

This topic is 6180 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.