Jump to content

Script to send email based on date field


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

Recommended Posts

Hi

I have been asked to set up something that will send out email automaticly when the date in the "review date" field is 14 days prior to the current date, can someone help me with a script that would be able to perfom this task? I have also created and email field that will hold the email address.

thank you

Kassy

Link to comment
Share on other sites

Something like:

Enter Find Mode
Set Field[ review date ; Get(CurrentDate) - 14 ]
Set Error Capture [ON]
Perform Find
If[ Get(FoundCount) > 0 ]
  Send Mail
End If

 

Link to comment
Share on other sites

On 9/13/2017 at 2:01 PM, KassK said:

send out email automaticly when the date in the "review date" field is 14 days prior to the current date

There is no way you can tell Filemaker to watch a date field and run a script when it passes some threshold. The best that you can do is run a script every day on startup, find the records that have passed the threshold and send the notification/s.

You will also want to mark these records and exclude marked records from the find. That way you won't skip a bunch of records when the script did not run for some reason (e.g. on a holiday) nor send a notification twice if you restart.

Link to comment
Share on other sites

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