July 13, 200025 yr I am a FM neophyte. I have a database of records. The first field is the day I entered the information in the database. There is another field for the company name. What I would like to do, is to write a script that will 1) search for a specific company name, and 2) then alert me when 60 days have passed since I entered that record into the database.
July 14, 200025 yr in theory, this should work, and it sort of does. i was running it on open: go to first record, Loop If [DateToText(day entered) < DateToText(Today- 60)] Omit record End If Goto next record Exit Loop if (Status(CurrentRecordID)=(Status(CurrentRecordCount) End Loop Show omitted records then i had it pop up a message that said these records have been in longer than 60 days or whatever. Problem is, it would only find 3 out of the 6 that it should've found (actually, it was omitting them, but same difference here). I haven't spent long on this, only about twenty min., but maybe this will give you an idea of what should work, theoretically (that is if my understanding of the DateToText function is correct). And if anyone out there could explain to me why it doesn't work, i'm sure both of us would appreciate it. you also might want to mess around with a field that calculates Today's date - 60 days which is just DateToText(Today)-60. Good Luck
August 10, 200025 yr Instead of the "Today" function, use "Status(CurrentDate)" it seems to be much more reliable.
August 24, 200025 yr Why use a looped script at all. Create a field that calculates the "age" of the record -- use the Status)CurrentDate) function rather than Today. Then perform a simple Find and you have them.
Create an account or sign in to comment