I was recently asked to create a user interface in the Lotus Notes client that would allow my users to drag and drop documents from one view (the source) into other views (the destination) in the same window.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
In my example, the source view contained Mail Received and the three destination views were: On Hold, In Process and Completed.
After several attempts using the drag and drop events available in the View and DB event handlers, I found that the events don't work between views. This functionality only seems to works with folders. So I came up with a simple solution.
- Create a frameset and define the source and destination views. Be sure to assign a suitable name to each frame.
- In the QueryDragDrop event of the destination view, include the following LotusScript code:
Call ws.SetTargetFrame("SourceFrame") 'this is the key Set uiview = ws.CurrentView Set DocColl = uiview.Documents
The SetTargetFrame changes the reference to the source view and voila, you get the document collection.
- With the collection in hand, write the required code in the PostDragDrop event of the respective target view.
Note: The trick was figuring out which documents were selected in the source view as they are dragged into the destination view.
That's all it takes. You now have a cool drag and drop feature that users can play without the worry of action buttons.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip library by member Vijay Sreegiriraju. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.