Ropardo Sowftware development company

Experience software development with ROPARDO S.R.L.

RSS Feed
RSS Feed
  • Home
  • About ROPARDO S.R.L
  • Our websites

Limitations of Lotus Notes ListBox fields

In a previous article I wrote on how to work with Lotus Notes ListBox fields. Unfortunately these type of fields have a major drawback, their limit of only 32 kb of text. So if you want to display thousands of entries you must use an embedded view. This is an small example of using an embedded view in an form, that shows how to retrieve the selected documents or currently highlighted in the view and process those documents:

Sub CopyDocuments(itemName As String)
	Dim session As New NotesSession
	Dim db As NotesDatabase
	Dim uidoc As NotesUIDocument
	Dim uiview As NotesUIView
	Dim doc As NotesDocument
	Dim tempDoc As NotesDocument
	Dim dc As NotesDocumentCollection
	Dim item As NotesItem
	Dim uiw As New NotesUIWorkspace
 
	Set db = session.Currentdatabase
	Set uidoc= uiw.currentdocument
	Set doc = uidoc.Document
	Set item = doc.GetFirstItem(itemName)
	Set uiview = uiw.Currentview
	Set dc = uiview.Documents
 
	'add currently focused document from the embedded view
	If (dc.Count = 0 ) Then
		Set tempDoc = db.GetDocumentByID(uiview.CaretNoteID)
		Call dc.AddDocument(tempDoc)
	End If
 
	Call uiview.Deselectall()
	' process the selected documents
	Call AppendDocumentsToList(item, dc)
	Call uidoc.refresh
End Sub

First we get the current view in the workspace using uiw.Currentview. This returns a NotesUIView class that has an property called Documents that represents the documents selected(checked in the selection margin) in the view.

If there is no document checked in the embedded view(dc.Count = 0) the currently highlighted document will be used.

After retrieving the document(s) we need to process them. In this example some data from these documents are copied  in a ListBox field for displaying. However this code will work correct if it is placed as an action in the embedded view.  So you can create an Lotus Script agent that uses this code and  is called from the a view’s action.  If you try to put this code outside the view(into an button click event for example) you will get an “Object not set” message meaning you have no NotesUIView object.

When working with large number of documents is crucial to be able to search the documents. In order to do this, in the view that is shown in the embedded view you must have an hidden column set as first column. Having this hidden column, when the view is focused and you start to type a “Starts with…” dialog will be opened and on enter key press,  if there are documents with fields matching your criteria they will appear first in the view. If you want to search on multiple fields you can set the embedded view to use different views with different first hidden column.

Another problem that I had was in the AppendDocumentsToList procedure when the embedded view used different views. After processing the documents I wanted to refresh the form to reflect the changes but calling uidoc.refresh caused Lotus Notes client to crash. This issue appeared only when I was using multiple views.  It seams that it is a bug when you use an embedded view in an dialog box. Moving the call to uidoc.refresh out of AppendDocumentsToList code and placing into the CopyDocuments fixed the problem.
References:
IBM Lotus Domino and Notes Information Center

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Get Shareaholic
Tags: embedded view Lotus Notes lotus script

 Posted in: Lotus Notes
February 19, 2010 | Ioan Seicean | 4 Comments

4 Responses

  • Louboutin Shoes
    June 13, 2010
    1

    Nice Information.. Thx for sharing this

    information

  • Cheap Insurance Quotes
    June 15, 2010
    2

    Great post!

  • best registry cleaner
    July 31, 2010
    3

    Nice article. Thank you for this info

  • software
    September 15, 2010
    4

    You have hit the mark. In it something is also to me it seems it is good idea. I agree with you.

Leave a Reply

 


  • « Previous post
  • Next post »
  • Recent Posts

    • Installing PyGraphviz on Windows
    • Convert python object to XML representation
    • Liferay Portlet Development
    • Norway Road Show 2011 private meeting invitation
    • Oracle OpenWorld 2011
  • Ropardo is Hiring

  • Subscribe

    • Add to Google Reader or Homepage Add to netvibes TopOfBlogs
  • Recent Comments

    • Rajkumar Pomaji on Bluetooth PC Remote Control
    • Stelian Morariu on GWT 2.1 – Uploading a file using the RPC mechanism
    • Sergio on GWT 2.1 – Uploading a file using the RPC mechanism
    • Artem on Liferay: Deployment will start in a few seconds… and how to realy start
    • rkd80 on GWT 2.1 – Uploading a file using the RPC mechanism
  • Archives

    • November 2011 (1)
    • September 2011 (4)
    • July 2011 (3)
    • June 2011 (2)
    • May 2011 (4)
    • April 2011 (4)
    • March 2011 (3)
    • February 2011 (2)
    • January 2011 (2)
    • December 2010 (1)
    • November 2010 (4)
    • October 2010 (4)
    • August 2010 (3)
    • July 2010 (3)
    • June 2010 (6)
    • May 2010 (8)
    • April 2010 (7)
    • March 2010 (9)
    • February 2010 (6)
    • January 2010 (5)
    • December 2009 (7)
    • November 2009 (9)
    • October 2009 (10)
    • September 2009 (14)
    • August 2009 (10)
    • July 2009 (1)
    • June 2009 (1)
    • May 2009 (1)
    • April 2009 (1)
    • March 2009 (1)
    • October 2008 (3)
    • October 2007 (3)
    • July 2007 (4)
    • June 2007 (1)
    • May 2007 (3)
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Categories

    • News (15)
    • Ropardo Team (8)
    • Ropardo Products (6)
      • File Tracking Client (4)
      • iManagement (2)
    • Software Development (83)
      • Microsoft.NET (22)
      • Java (40)
      • Oracle (8)
      • Power Builder (3)
      • Liferay (5)
      • Lotus Notes (9)
      • xWiki (4)
    • System Adminstration (13)
      • Linux (10)
      • Windows (3)
    • Programming (1)
    • Uncategorized (3)
    • Databases (10)
      • MSSQL (5)
      • PostgreeSQL (3)
    • Microsoft.NET (1)
    • Web Development (28)
      • ASP/ASPX (3)
      • Content Management Systems (1)
      • HTML/CSS (5)
      • Javascrip/AJAX (8)
      • PHP (7)
    • Oracle E Business Suite (6)
  • Tags

    .NET ajax blog C# certification client CMS control css database Debugging django Domino Eclipse extension file tracking filter fun gentoo google Hibernate how to html image iManagement import Java javascript jQuery liferay Linux Lotus Notes lotus script Oracle Oracle BI Publisher 11g PHP portal PostgreSQL powerbuilder Python SQL Telerik velocity xml Xwiki

© 2010 ROPARDO s.r.l..

Powered by WordPress. Styled by Ropardo