I am trying to figure out how to automatically send a link of a document to a specific user based on the selected value in one of my checkbox fields. A colleague suggested that I use an Inputbox combined with @SendMail, but I just can’t figure out how to do this exactly.
On my form, I have a checkbox field called “Yes_3” (2 options: Yes, No). If the user selects “Yes”, I want to automatically e-mail a link of the document to another user. I was hoping I could use the InputBox function so that if the user selects “Yes” as the value for the “Yes_3” checkbox field, a popup window would occur, displaying the following text “By clicking Yes, a copy of this form will be e-mailed to Jim”, and that Popup Window would also give the user the option to click “OK” or “Cancel.” If the user clicks “OK”, I would then like to use the @MailSend function to send a link of the document to Jim, but if the user selects “Cancel” then the @MailSend function would not send out a link of the document.
Is this the correct approach that I should take? If so, would anyone be able to guide me as exactly how to set this up?
I appreciate any help or advice you could send my way! I’m just not an experienced enough developer to figure this out on my own yet.
Thanks so much in advance
Subject: Using an Imput Box & @SendMail function together
here’s the message box part…
answer = Messagebox (“This form is about to be routed for approval.” + " " + " Are you sure you would like to send it now?" , 4, “Cancel?”)
If answer = "7" Then
'mail part goes here
End If
And here’s the mail part…
'send to someone else
Set maildoc = New NotesDocument (db)
Set rtitem = New NotesRichTextItem (maildoc, "Body")
maildoc.Form = "Memo"
If doc.Yes_3(0) = "somevalue" Then
maildoc.SendTo = "someone"
End If
maildoc.Subject = "enter subject herel"
Call rtitem.Appendtext(doc.Name(0)+"enter some text here... Please review. ")
Call rtitem.AppendDocLink(doc, {})
Call maildoc.Send(True)
Subject: RE: Using an Imput Box & @SendMail function together
place the mail code inside the if answer = “7” then statement
Subject: RE: Using an Imput Box & @SendMail function together
Thank you very much! I’m going to try this right now.Thank you again!
Subject: RE: Using an Imput Box & @SendMail function together
Sorry - quick question - where exactly do I type in the message box formula? In the formula area of my “Yes_3” combobox field?
Subject: RE: Using an Imput Box & @SendMail function together
I wouldn’t use the message box. It’s not needed.
You are already asking a question in the Yes_3 field, correct?
If doc.Yes_3(0) = “Yes” Then
maildoc.SendTo = “someone”
maildoc.Subject = “enter subject herel”
Call rtitem.Appendtext(doc.Name(0)+"enter some text here… Please review. ")
Call rtitem.AppendDocLink(doc, {})
Call maildoc.Send(True)
End If