Managing attachments on Web browser
This tip describes a procedure for managing attachments in a Web browser.
How often we have face the problem of managing attachment files on web browser. By default DOMINO shows the attachments at the bottom of the web page. But nobody likes this interface, so we generally like to hide them by creating a computed for display filed called $V2AttachmentOptions and putting its value as 0.
There is a very simple way to show the attachment names along with a checkbox and allowing users to select single or multiple attachment names for deletion.
The following code can be used in a computed text field, to display attachments on a browser along with check boxes. Just selecting the checkbox and submitting the document will delete the attachment(s).
tmpattachments := @Implode("<input type= checkbox name="%%Detach" value=""+@AttachmentNames+ "">" + @AttachmentNames; "<br>") + "<br>"; editDisplay := @If(@ Attachments = 0;" ";tmpattachments); readDisplay := @Implode (@AttachmentNames;"<br>"); @If(@IsDocBeingEdited ; editDisplay;readDisplay)