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

Adding Field Values To A Email Message in Lotus Script

I am sending a email in the LotusScript and I am wanting to learn how to pull in values from the form in to my message for t he email example in Formula would be something like this

message = Requester + " has sumbitted a action for you." + Requester + " has requested you respond by " + DueDate + "."

Feilds are Requester and DueDate
How would I do this in script

here is what I have today

                mDoc.Subject = doc.Subject      
      mDoc.Form = "Memo"
      mDoc.SourceDocument = doc.UniversalID
      mDoc.SenderList = session.CommonUserName      
      Set rtitem = New NotesRichTextItem(mDoc, "Body" )
      Call rtitem.AppendText( "Your Attention Has Been Requested.")
      Call rtitem.AddNewLine(1)      
      Call rtitem.AppendText( "Please Click the link below to view the action.")
      Call rtitem.AddNewLine(2)            
      Call rtitem.AppendDocLink(doc, "PS&SD Dev. Budget Database Link" )      
      Call mDoc.Send(True)
0
Jaziar
Asked:
Jaziar
  • 5
  • 3
1 Solution
 
mssturgeonCommented:
Is this in an action button from a currently opened document?

If so, you can grab a handle on the current message using:
Dim ws as New NotesUIWorkspace
Set doc = ws.CurrentDocument.Document

0
 
mssturgeonCommented:
Although in looking at your script snippet, it appears as though you are already doing that ... perhaps I don't understand the question.
0
 
JaziarAuthor Commented:
I am trying to add field values to my message

when I try this

 Call rtitem.AppendText( RequestRequester & "Has Requested your attention.")
 Call rtitem.AddNewLine(1)

I get no value from the field - yes the document is open and the values are set before this action takes place    
 
0
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.

 
mssturgeonCommented:
RichText updates cannot be refreshed while the document is open (at least, not in R5).  you will have to close the document and re-open it to see your updates.

Is that the issue?
0
 
JaziarAuthor Commented:
No I want to see the values in the email message - not back on the form

I want the users to see this type of message in the email they get from the action

message = Requester + " has sumbitted a action for you." + Requester + " has requested you respond by " + DueDate + "."

Call rtitem.AppendText( Requester & "Has Requested your attention.")

does Requester need to be Doc.GetValue(Requester) or something like that
0
 
mssturgeonCommented:
yes, it could be:

doc.GetItemValue("Requestor")(0)

or in shorthand:

doc.Requestor(0)


That is assuming Requestor is a single-value field.
0
 
mssturgeonCommented:
or "Requester", rather ... minor spelling difference
0
 
JaziarAuthor Commented:
that was it - thanks
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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