Jump to content

Timed alert script


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

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

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.

Link to comment
Share on other sites

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