Tip

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

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.