Solved

Reply button

Posted on 2004-09-20
12
265 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
 
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 250 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now