Subject: Create Agent
Hi Michael.
Let´s see if this helps…
Lets assume the “action taken” to these claim forms is stored in a field named “ActionTaken” with “Y” for Yes and “” (empty) for No.
The Notes Group to receive the message would be “NotesGroup”.
I believe you check all documents for all that need an action to be taken (field is empty). If this action is already taken (field contaisn “Y”), there´s no need to issue the alert message, right?
Whenever creating an agent, you specify when and where it will run.
In the agent´s properties, you select…
Shared agent;
Activator will be in programming, instead of event;
Select “Daily”;
Then click the programming button (schedule) and select the start time, say “03:00 AM”, and the server where it will run (usually the same server where the application is hosted).
Remember that, according to rights configured at the server level, maybe you will have to “sign” this agent with the server´s ID…
As for the code…
In the document select property select he Claim form;
e.g.: SELECT form = “ClaimFormName”
In the action, I suggest this code:
REM “------- begin of code ----------------------------”;
@If(ActionTaken=“”;
@MailSend(NotesGroup; “”;“” ; “Claim Form with Action needed.” ; “” ; "Warning: This Claim Form has no action taken. Please check this link to visualize the document → ";[PriorityHigh]:[IncludeDoclink]);
@Success);
REM “------- end of code ----------------------------”;
Don´t forget to “Activate” the agent after saving…
With this, the server will execute this agent everyday at 03:00 AM, in this database, check all documents that use the form “ClaimFormName”, check if the “ActionTaken” field is empty and - if so -, send a mail message to “NotesGroup”, with a text and a link. The users, when clicking this link, will be redirected to the document and may take the necessary action. Whenever closing this document, they will be returned to the mail message…
Hope this helps.
Regards,
Rubens