Manage Learn to apply best practices and optimize your operations.

Using the "Allow selection of documents" (R. 5.0.5)

Using the "Allow selection of documents" (R. 5.0.5)

As of Release 5.0.5, under the Beanie tab on the properties of a form, there is an option in the Web section labeled "Allow selection of documents." This causes a checkbox to appear next to the document in the view and allows the document to be selected on the Web. Documentation on the use of this is limited (at least in my searches), so I've provided the following.

Here is how it works:

The view HTML that is generated includes an input tag called "$$SelectDoc" like
this one:
<INPUT TYPE=checkbox NAME="$$SelectDoc" 

An input tag is generated for each document so it will become an Array if there 
is more than one document in the view. 

It also includes three JavaScript functions, _SelectAllDocs(), 
_SelectMarkForDelete() and _SelectDelete(); 

_SelectAllDocs() - As this function implies, it will select all the documents 
currently showing - it will not select documents that are not currently in the 
page.  It requires a parameter of 0 or 1, where 0 will deselect any currently 
selected documents and 1 will select. 

_SelectMarkForDelete()  - This will "tag" the currently selected document for 
delete by displaying the "trash" can beside the document check tag.  You still 
need to figure out which are to be deleted and delete them on the server end.

_SelectDelete() - This one will actually select the ones that are to be 
deleted - those tagged for delete by the _SelectMarkForDelete() function. It 
allows you to untag the documents for delete if you change your mind. 

This bit of HTML shows one way of using these built-in functions:
<button class="sbttn" onclick="_SelectAllDocs(1)">Select 
<button class="sbttn" onclick="_SelectAllDocs(0)">Clear All</button>
<button class="sbttn" onclick="_SelectMarkForDelete()">Delete 
<button class="sbttn" onclick="_SelectDelete()">Select 

This code shows the HTML "button" element, with a style class assigned. This 
button element and style. You could use the functions from JavaScript Actions, 
hotspots or anywhere you can call the JavaScript functions. 

Once your user has selected documents to delete, you must delete them yourself 
either from a JavaScript delete routine or an agent (suggested) - If you are 
using a form with a submit, you can delete the documents at the same time by 
have the WebQuerySave agent look for the selected document ids and then remove 

Dig Deeper on Domino Resources - Part 6

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 ...