Manage Learn to apply best practices and optimize your operations.

Web attachment icons - A thing of the past

Developers are always complaining about the way in which Domino displays attachments on a Web page

Developers are always complaining about the way in which Domino displays attachments on a Web page. When you attach a file through the File Upload Control - they appear at the bottom of the page and they can be hidden by using a <noscript> tag.

This is a very simple method for doing away with both the icons and the flawed <noscript> tags.

Using the following steps you can create an example form which can be improved for your own look and feel with increased functionality should you desire. This example is kept to the basics for ease of understanding.

(With big thankx to Alan Hurt.)
Create a new form

1) Add the field "$V2AttachmentOptions" - value "0" - hidden from web browsers

2) Add the field "ShowAttachments" - multivalue field (new entries on a new
line) - computed for display - value (see below)

DatabasePath:="/"+@ReplaceSubstring(@Subset(@DbName; -1); "\\"; "/")+"/";


temp1:=@If(@IsDocBeingEdited; "<INPUT TYPE=checkbox NAME=\"%%Detach\" VALUE=\""+temp+"\"> - ";"");

ahref:="<a title=\""+temp+"\" target=_blank href=""+DatabasePath+"0/"+@Text(@DocumentUniqueID)+"/$FILE/"+temp+"\">";

@If(temp=""; ""; "["+temp1+ahref+temp+"</a>"+"]")

3) Add your File Upload Control

4) Add save button hidden for reading - @Command([FileSave])

5) add edit button hidden for editing - @Command([EditDocument])

6) add save and exit button hidden for reading -
@Command([FileSave]); @Command([FileCloseWindow])

7) add $$Return field computed for display value - hidden from web browsers -

8) Open the form on the web - upload and save some attachments - see the checkbox appear!!

9) "Save and Exit" so that you can see then in read mode - click the link to show they exist

10) Edit

11) Check the boxes and save - They are deleted!

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...