February 20, 200818 yr 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
February 20, 200818 yr 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
February 20, 200818 yr Just to add... If you have FMS 9 you can have a scripted schedule that does this.
February 20, 200818 yr 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.
February 20, 200818 yr 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
February 21, 200818 yr 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
February 21, 200818 yr 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