×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Stumped on an Agent I'am writting

Stumped on an Agent I'am writting

Stumped on an Agent I'am writting

(OP)
I am trying to write an Agent in Domino Designer using Formula. I think I am running in the wrong direction.

I have a form with 6 fields. Field A, B, C, and D and also 1 and 2. If field A (which is a date) is less than todays date I want an e-mail to be sent to me with the contents of Field C.

Also the same with field B(a date) and Field D to be added into the e-mail.

But if Field 1 is Checked (a checkbox with the value of Yes) then I do not want Field C to be in the e-mail body.

Likewise with field 2, if it is checked field D should not be in the body.

BUT if none of the fields A or B comes before todays date I want no e-mail sent.

Hope this was descriptive enough and that someone can point me in the right direction.

BH2

RE: Stumped on an Agent I'am writting

Do you have to use an agent and formula?  I've done something similar with LotusScript in the PostSave event of my form.  

So something along these lines (obviously not "real" code, but enough to get the idea):

Sub Postsave(Source As Notesuidocument)

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument

Dim language As String, docket As String, fname As String, lname As String, interveiwer As String, notify As String
Dim Comments As String
Dim intdate As Variant
    
    
If (source.FieldGetText("InterviewLanguage") = "Other" And source.FieldGetText("OtherLanguage") <> "") Then

    notify = "Put Name Here"
        
    Set db = session.CurrentDatabase
    Set doc = New NotesDocument( db )
    If source.document.IsNewNote Then
         language = source.FieldGetText("OtherLanguage")
      docket = source.FieldGetText("DocketNo")
      fname = source.FieldGetText("FirstName")
      lname = source.FieldGetText("LastName")
      intdate = source.FieldGetText("InterviewDate")
      interviewer = source.FieldGetText("Interviewer")
    
      doc.Form = "Memo"
      doc.SendTo = notify
      doc.Subject = "Translator Needed"
        
      doc.Body = "Case Number: " + docket + ".      " + fname + " " + lname  + " , interviewed on " + intdate + " by " + interviewer + ", requires a " + language + " translator.  Thank you."
            
      Call doc.Send( False )
   Else
      Exit Sub
   End If
End If
End Sub

Hope this helps!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close