Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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