Create Agent

Greetings!

I am brand new as a Notes Domino developer. I have very little programming background. That said, I have a customer that has asked me to create an agent that will run every day. Reason is to check the date of all new submitted claim forms, and if a claim form is found to have no action taken, then an email will be sent to a Notes Group. to identify the form(s).

Can anyone help me with code to accomplish this?

Thank you!!!

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

Subject: RE: Create Agent

Hi Rubens

Thank you so much for your response!!! I plugged the code you gave me into an agent and managed to place my email address so I could test how this works.

I ran the agent and received about 30 emails. This was good and bad. The good parts are, the email came to me with links to the correct form. The bad, the agent pulled forms submitted in 2004 and not from the past 24 hours.

My instructions were not very clear. I need to learn to be more descriptive. I need the agent to seach for submitted forms, and if the submitted form was not reviewed by a clerk with-in 24 hrs of being submitted then an email will be generated with a link to that form.

Can You help with a LotusScript version, please?!?