Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

automate the deleting of a record on date from a field.

Featured Replies

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

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

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

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.

  • Author

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

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

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 ) ) ]

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.