Question setup agent?

Hi,

In formA , I having a field contain the project leader name, I would like to setup an agent that will send an email every Friday morning to the project leader. So it need to loop through all the project document to see if the project status is open then send the email out.

Can I do it by using formula or I have to use script? any sample is really appreicated.

Thanks!

Subject: question setup agent?

Hi!

It is better to use an script in making an schedule agent.

And im recommending that you do your searching/filtering in view for the searching all status open, this will do fast filtering.

sample:

Set view = s.CurrentDatabase.getview(“newsletterStatusOpen”)

Set nav = view.CreateViewNav

Set entry = nav.GetFirst

While Not entry Is Nothing

… statement

End With 'doc

Set vc=view.getallentriesbykey(entry.ColumnValues(0),True)

Set entry2 = vc.GetFirstEntry

…

…

Hope this will help you.

Allen.

Subject: RE: question setup agent?

Actually there is no reason to use script over formula, unless you need to do something with the script which you can’t do otherwise.

If you are more comfortable with formula - do it that way. Use @MailSend (check out designer help as this has a whole lot of parameters).

If you have very little programming experience and your body text is simple, you can actually use the Simple Actions and ‘Send Mail Message’ to accomplish this. The ‘More’ button next in the dialog box lets you enter short formulas for the To, CC & Subject fields, and you can append a doc-link.

Don’t forget you can use the document selection settings on a scheduled agent (i.e to select by field such as Status contains Open), rather than looping through a view to select documents. If you have many thousands of documents a view and script is the better choice though.

Subject: RE: question setup agent?

Yes i agree with you Michelle.