Send document notification from a view

Posted on 2010-01-04
Medium Priority
Last Modified: 2013-12-18

I have code attached to a button that looks at a field in the form for a list of names to send an email notification to a list of users, back to the document. This code (included in the attached section) was on a button in the TeamRoom application (called "send link to assignees") and I've tweaked it to work on a simple database design.

The list of users are pulled up from a view -- using a keyword form/document concept.  This code, (listed below) looks up the values via a @Dbcolumn formula and pops it into the form.

@DbColumn("":"nocache"; ""; "KeywordView"; 1)

What I'm looking for is a way to be able to have users select more than one document from a specific view by selecting / checking in the selection margin and then click a button on the view to send a simple email alert.  Is that possible using the list of names from the keyword field from the KeywordView  -- view.  And, is there a way to be able to select (via a dialogue box or form?) to select a subset of the names that are in the first column of the keyword view?

Maybe there is a simpler way to do what I need?
TRName := "Ready to Sell";
REM {Variables to be translated};
Title := "Mail Send";
UntitledTxt := "[Untitled]";
MailSentTxt := "Mail has been sent successfully";
MailErrorTxt := "Thre was an error sending the email.";
AssignBlank := "There are no names specified in the notification list.";

REM {subj1 is not translated};
Subj1 := @If(Subject = ""; UntitledTxt; Subject);
Subj2 := "Please review: " + Subj1;
Body1 := "An item requiring your attention has been posted to the Ready to Sell database." + @NewLine + @NewLine;
Body2 :="Please review:  " + Subj1+ "  ";
REM {End variables to be translated};

sendto := NotifyGroup;
Send := @If(@IsDocBeingLoaded; @Return(""); @IsDocBeingSaved; @Return("");
SendTo="" & @LowerCase(DocType) != @LowerCase(DefaultDocType); @Return(@Prompt([Ok]; Title; AssignBlank));

@MailSend(SendTo; ""; ""; Subj2; ""; Body1 :  Body2; [IncludeDoclink]));
FIELD mailsent := MailSent;
@If(@IsError(Send); @Return(@Prompt([Ok]; Title; MailErrorTxt));
@Prompt([Ok]; Title; MailSentTxt));

REM {ensure doc is saved and closed};
REM {if r = 0 then save has failed due to querysave or input validation checks.};
@If (r = 0;@Return("");"");

Open in new window

Question by:AliciaVee
  • 2
  • 2
LVL 19

Accepted Solution

madheeswar earned 2000 total points
ID: 26176680
Instead of using @DbColumn("":"nocache"; ""; "KeywordView"; 1); why can't you use @Picklist to display a view in a dialog box? They can select multiple documents as well.
Pls refer to Designer Help for sample codes.

Author Closing Comment

ID: 31672443
Provided some guidance which directed me to the help -- took a while to figure it out but was able to come up with a somewhat suitable solution
LVL 19

Expert Comment

ID: 26434077
Hi AliciaVee,
I am not sure what made you to grant a grade "B". Otherside you are telling my suggestion helped you in resolving the issue.
Pls change the grade to "A" as my suggestion helped you. We are here to assist you and sometimes we may not be able to provide 100% soltuion without knowing full details.
Thanks and regards,

Author Comment

ID: 26436863
Certainly, I understand now - makes sense. How do I change the grade?

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
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.
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

839 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