Reputation: 45
I am designing a application that will send notification email to mail addressee.
There is a field in the application named 'RemindDate'.
If RemindDate=Today
then send mail to mail address which I will key in later.
What I have done is this;
I selected agent type = formula
, and run it daily.
In the Agent's Document selection, I selected Condition>By form
and chose a form which the filed is located at.
In the Agent's Action, I wrote;
SELECT @All;
@If(@Date(@Now)=@Date(RemindDate);@MailSend(Name;"";"";"TEST ";"";"";[IncludeDoclink]);"")
But unfortunately, until now I still did not get any notification mail.
Kindly assist.
Thank you very much.
Upvotes: 2
Views: 359
Reputation: 30960
Set agent's target option "All documents in database" in addition:
With the default target option "All new & modified documents" it would run the code only once for a document. But, you want to test for field "RemindDate" for every document every day. So, target option "All documents in database" is needed here.
Update
Flag "[IncludeDocLink]" does only work if the database has a default view.
Set this option to one view.
This is an optimized version of your formula code:
SELECT RemindDate != "" & @Today = @Date(RemindDate);
@MailSend(Name;""; ""; "TEST"; ""; ""; [INCLUDEDOCLINK])
Upvotes: 2