LotusScript creates drag and drop interface in Lotus Notes client

Using this LotusScript, you can create a drag and drop interface that you can implement in your users' Lotus Notes clients, allowing them to move documents from one view to another.

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.

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.

  1. Create a frameset and define the source and destination views. Be sure to assign a suitable name to each frame.
  2. Note: The trick was figuring out which documents were selected in the source view as they are dragged into the destination view.

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

  4. With the collection in hand, write the required code in the PostDragDrop event of the respective target 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.

This was first published in May 2010

Dig deeper on LotusScript

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close