Launching Attachments from Views on the Web

Currently, in order to launch attachments in a Notes databases on the Web, you must enter the document and click on the attachment icon at the bottom of the document. This code allows you to create an attachment icon in the view and:

1) Hovering over the icon reveals the attachment name in a pop up.

2) Doubleclicking the icon launches the attachment without entering the document.

3) Works with multiple attachments.


REM"Declare DB Name and path";
DBName := @ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName; -1);" ";"+");"\";"/"); open:="?OpenElement";

REM "Declare view name";
view:=@ReplaceSubstring(@ReplaceSubstring(@Subset(@ViewTitle; 1);" ";"+");"\";"/");

REM "Declare document ID";
docid:=@Text(@DocumentUniqueID);

REM "Build URL link to attachment";
url:="[<a href=/"+dbname+"/"+view+"/"+docid+"/$FILE/"+@AttachmentNames+"><img src=/icons/vwicn005.gif border=0 ALT="+@AttachmentNames+"></a>]";

REM "If attachments exist then show, otherwise, don't";
@If(!@Attachments;"";url)

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.