Help With Nag Mail

I have a Request Form on the form I have multiple Fields.  I want to add the ability to send Nag mail if there is no response to the Request by a certain date.  Right now I have a Response Form that is a response to the Request.

On the Request Form I have added a Date Field named DueDate.  I would like to also add a field named NagMail - It would ask if the requester wants a response my the due date.  If they select yes then the day it is due and everyday after the people in the SendTo Field would get a email telling them to respond.  This can be a agent that runs everynight.

Some questions I have - if there are 2 people in the SendTo and Joe responds and Jack don't only Jack should get the NagMail.  If you need more information please ask.
JaziarAsked:
Who is Participating?
 
qwaleteeConnect With a Mentor Commented:
Have an extra field called NagList that at send time copies the recipient list ONLY IF THE NAG OPTION IS REQUESTED, and otherwise remains blank.  Change the response form so that as each response is created, it checks the nag list in the main document, and if the author is listed, removes the author from the list.

Create a view whose selection formula is something like:
overdue := @Today <= NagDate;
naggies := @Trim(NagList);
empty := naggies = "";
SELECT overdue & !empty;

Have your agent process all documents in that view, and send reminders to the NagList field.
0
 
Sjef BosmanGroupware ConsultantCommented:
I assume both the Request and the Responses share a common unique key? Make a view containing only the Responses, sorted by that key, with a column containing the name of the respondent, and do a @dblookup for the respondents column:
    list:= @DbLookup("";"";"RespView"; key; column);

Then you can match the respondents with the SendTo field. The mail should be sent only to the people not having responded, i.e.
    @Trim(@Replace(SendTo; list; ""))
0
 
JaziarAuthor Commented:
Could You give me a hand on some of the code for this part

Change the response form so that as each response is created, it checks the nag list in the main document, and if the author is listed, removes the author from the list.

I am not sure how to check the field on the main document from the reponse document
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
JaziarAuthor Commented:
I need to get this working as soon as possible.

0
 
Sjef BosmanGroupware ConsultantCommented:
I need to go as soon as possible, to have supper and then to play a volleyball-match. And then a promotion party (I hope). So I'll be back tomorrow, I hope for you that someone else will assist you in the meantime.

Do you mind if it's LotusScript? Does it have to fit in somewhere?
0
 
JaziarAuthor Commented:
Here is the reply button action.  That the user clicks to reply to the main document.

Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim ws As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim thisUIDoc As NotesUIDocument
      Dim uiDoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim nDoc As NotesDocument
      Dim sDoc As NotesDocument
      Dim strServer As String
      Dim strFilename As String
      
      Set thisUIDoc = ws.CurrentDocument
      Set doc = thisUIDoc.Document
      strServer = doc.DatabaseServer(0)
      strFilename = doc.DatabaseName(0)
      
      Set db = New NotesDatabase(strServer, strFilename)
      If Not(db.IsOpen) Then
            Call db.Open("", "")
      End If
      
      Set sDoc = db.GetDocumentByUNID(doc.SourceDocument(0))
      Set nDoc = New NotesDocument(db)
      
      Call nDoc.MakeResponse(sDoc)
      nDoc.Subject = doc.Subject(0)      
      nDoc.ServerReaders = doc.ServerReaders(0)
      nDoc.BossReaders = doc.BossReaders(0)
      nDoc.DocReaders = doc.DocReaders
      nDoc.RequestSecurity = doc.RequestSecurity(0)      
      nDoc.RequestRequester = doc.RequestRequester(0)
      nDoc.RequestDate = doc.RequestDate(0)
      nDoc.Message = doc.PoopMessage(0)
      nDoc.Form = "Response Form"
      nDoc.Creator = session.CommonUserName
      nDoc.SendTo = session.UserName
      nDoc.SourceDocument = doc.SourceDocument(0)      
      Set uiDoc = ws.EditDocument(True, nDoc)
      Call thisUIDoc.Close(True)
End Sub

Good luck on the vollyball match
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.