When I was reading The View article ‘Using AJAX techniques in Domino Applications, Part 2’ I noticed a functionality in the sample application I was not aware of before, but could be very usefull in my applications.
In the sample DB you can move up, downwards and delete documents in a view by icons for each document.
I only needed the delete function so that is what this item is about.
First in the view you define a column, set the property of ‘Display values as icons’, define a column value (a reference to an image resource) and in the last / programmatic use tab you enter a ‘Name’, in this case ‘Delete’:
In the Globals of that same view you make a reference to a Script Library called ‘Controls’:
The Script Library itself is not so spectaculair. In the Declarations you add:
You also add a Sub function, in this case it is called DeleteItem. The main statement in this Sub is the line:
Call Qdoc.Remove ( True )Which is the document the user will click on in the view. In order to make the changes noticeable for the user the following statement is also added:
Set view = db.GetView(“v-projects”)
If you are interested in the function, I advice you to download the application if possible and see for yourself if it is usable for you…