Link to home
Start Free TrialLog in
Avatar of David Schmalzer
David SchmalzerFlag for United States of America

asked on

Reply button

I have a button in a form that sends a memo to manager asking them a yes or no question. I want the mail memo to contain either a yes or no checkbox or radio buttons(doesn't matter) or even a button to answer the question, update the field on that document. I would rather not use a doc link. How can this be done.  The field name on the form is called LAPTOP(dialog box-radio button).        Thanks.
Avatar of p_partha
p_partha

Use store form in document, and send the document.
and when you send the document , have the parameter as true

i.e Call doc.Send( True )

Partha
You can use several ways to do this... one efficient way is to store the form and send it user as a mail.

1. Enable the form to be stored with the doc
2. Create sendto and replyto (plus server and database path) fields and a button for reply
3. Send to field is used to send the mail to managers
4. The button will incorporate a formula or script which will update or create a document as a reply in the original db


~Hemanth
Avatar of David Schmalzer

ASKER

Remember, I am a script rookie.  Please give more detail.
     Dim ws As New notesuiworkspace
      Dim sess As New notessession
      Dim db As notesdatabase
      Set db = sess.currentdatabase
      Dim uidoc As notesuidocument
      Set uidoc = ws.currentdocument
      Call uidoc.save
      Dim doc As notesdocument
      Set doc = uidoc.document
      doc.sendto = "schmad01"
      Call uidoc.document.send(True)
      
I understand now, after trying your suggestions, but the document itself is cumbersome and would be too overwhelming for the end user. Is there no way to just ask the question in the mail memo with a button or something to answer it and have that update the document?
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gotchya. That'll work!  Thanks, Partha
Thanks Partha, and thanks for your input Heman.
If you want to update the doc.. then carry universal id with the mailed doc...

THis mailed doc doesn't have to be the original doc.. a form (say respcollect )with three fields (server, dbpath, docid)

This is how you create mail

set doc = db.CreateDocument ' Set the db to the current database
doc.Form = "respcollect"
doc.SendTo = "Manager"
doc.Server = db.Server
doc.Dbpath = db.FilePath
doc.docid = thisdoc.UniversalID ' Thisdoc should refer to currently open/processed doc
doc.Send true

And above script need slight modification when updating back


Dim ws as new NotesUIWorkspace
Dim doc as NotesDocument
Dim db as NotesDatabase
Dim s as New NotesSession
set doc = ws.CurrentDocument.Document
set db = s.GetDatabase( doc.Server(0), doc.DBPath(0) ) ' This fields should be present in the mailed copy of the doc
' Check if the doc is updated with response
if doc.RadioButton(0) <> "" then
 set origdoc = db.GetDocumentByUNID(doc.DocId(0))
 if not origdoc is nothing
   origdoc.Response = doc.RadioButton
   origdoc.save true, false
 end if
Else
 Msgbox "Please respond by clicking any of the option in the reply section"
End if
what worked for you ?

Partha
OOPs, I goofed.  I meant thanks to both of you.  I will award P_Partha points in next question. Sorry, I got so excited, I just wasn't thinking!
Both worked, I just haven't decided which one to use, but now I have good options.