• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

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.
0
Jaziar
Asked:
Jaziar
  • 3
  • 2
1 Solution
 
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
 
qwaleteeCommented:
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
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now