2
votes

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.

1
What does the agent log say? Click right on agent in Domino Designer and choose "View Log". - Knut Herrmann
The agent log stated: Started running agent 'Agent name' on [today' date and time]. Running on all documents in database: 177 total. Found 177 documents that match search criteria 177 documents were modified by formula Done running agent 'Agent name' on [today's date and time]. - wardokdee

1 Answers

2
votes

Set agent's target option "All documents in database" in addition:

enter image description here

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.

enter image description here

This is an optimized version of your formula code:

SELECT RemindDate != "" & @Today = @Date(RemindDate);
@MailSend(Name;""; ""; "TEST"; ""; ""; [INCLUDEDOCLINK])