Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reply button

Posted on 2004-09-20
12
Medium Priority
?
275 Views
Last Modified: 2013-12-18
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.
0
Comment
Question by:schmad01
  • 6
  • 3
  • 3
12 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 12105037
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
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12105054
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
0
 

Author Comment

by:schmad01
ID: 12105058
Remember, I am a script rookie.  Please give more detail.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:p_partha
ID: 12105155
     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)
      
0
 

Author Comment

by:schmad01
ID: 12105577
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?
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 1000 total points
ID: 12105588
Actually you want to post back the reply to the db...And I don't have clue what your db looks like. I would copy the entire form back to the db and so you have original content and response in the db

So the button (with the doc bein mailed ) should contain the script plus the radio button with yes or no option

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
 doc.Save true, false
 call doc.CopyToDatabase(db) ' Post the doc back to the db
Else
 Msgbox "Please respond by clicking any of the option in the reply section"
End if


PS: Ignore Replyto field.. as it is not needed unless your db is mail-in db
0
 

Author Comment

by:schmad01
ID: 12105627
Gotchya. That'll work!  Thanks, Partha
0
 

Author Comment

by:schmad01
ID: 12105642
Thanks Partha, and thanks for your input Heman.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12105650
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
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12105654
what worked for you ?

Partha
0
 

Author Comment

by:schmad01
ID: 12105662
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!
0
 

Author Comment

by:schmad01
ID: 12105697
Both worked, I just haven't decided which one to use, but now I have good options.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Integration Management Part 2
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question