Return an empty document collection

If you need to return an empty document collection, you can use this piece of LotusScript. This is especially useful for simplifying recursive script that put documents into a collection.

Dim session as New NotesSession
Dim db as NotesDatabase
Dim view As NotesView
Dim view_id As String
Dim view_doc As NotesDocument
Dim col As NotesDocumentCollection

Set db = session.CurrentDatabase
Set view = db.Views(0)
Let view_id$ = view.UniversalID
Set view_doc = db.GetDocumentByUnid(view_id$)
Set col = view_doc.Responses

or if you like it quick and dirty,

Dim session as New NotesSession
Dim db as NotesDatabase
Dim col As NotesDocumentCollection

Set db = session.CurrentDatabase
Set col = db.GetDocumentByUnid(db.Views(0).UniversalID).Responses

Dig Deeper on Domino Resources

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

how i can put in folder documents founded in database diferent from database info
Cancel

-ADS BY GOOGLE

SearchWindowsServer

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

SearchDataCenter

SearchContentManagement

Close