: 4537 | 107852 | 12223

Create empty NotesDocumentCollection  
Use this IdeaSpace to post ideas about Domino Designer.

: 178
: 183
: 5
: Domino Designer
: lotusscript
: Randy Smith3908 30 Oct 2007
:
: / Email
LotusScript needs a method for creating an empty NotesDocumentCollection object.  Many of us have "silly looking" techniques to create an empty collection anyway.  A sort method for a NotesDocumentCollection would also be nice.



1) Mika Heinonen3556 (30 Oct 2007)
Doesn't "If col is Nothing" do the same?
2) James Summerton1402 (30 Oct 2007)
Correct me if I am wrong, but I think what Randy is getting at is having something like:

set dc = New NotesDocumentCollection(db)

That would give you an empty documentcollection to do things with, instead of having to do a null search or something else that costs extra processing to achieve the same result.
3) Randy Smith3908 (31 Oct 2007)
Exactly James. Without a New method to instantiate an object of this class, we have to be a bit creative (and as a result, less efficient) by using methods of other classes to create the empty collection (bogus search, responses to a bogus profile document, etc.).

If I create subs/functions that take a NotesDocucumentCollection as one of the arguments, I want an easy method for creating an empty collection and then adding the documents that need to be processed by the sub/function to the collection.
4) Keil Wilson110 (08 Nov 2007)
I like the idea of a creating an empty collection. I too have some goofy code for getting an empty collection. But I think the sorting thing is redundant. The ViewEntryCollection already allows you to do this. It is a little more complicated than working with a doc collection, but it's not very difficult to do.
5) Carl Tyler5446 (15 Nov 2007)
I think NotesDocumentCollection.sort should really be called out on it's own, it is a much wanted feature.
6) Scott Cochrane1949 (20 Nov 2007)
Yes, a 'new' method would be nice - and less silly :-)
7) Corey Davis1739 (28 Nov 2007)
I don't think I have ever had the need to create an empty document collection. What would be a reason for needing this?
8) Randy Smith3908 (29 Nov 2007)
@7 - It isn't a technique that I use often, but at times I do have a need to create an empty document collection (for folder processing, workflow processing, etc.). Having an empty collection is not the goal though. The goal is to have total programmatic contol over which documents are included in the collection and not be at the mercy of methods of other classes that are used to create a collection.
9) Peter Presnell26511 (15 Dec 2007)
There must be a lot of us employing the "silly search" technique to get an empty Notesdocumentcollection. If new NotesDocumentCollection is too hard perhaps IBM coluld give use a NotesDatabase.doSillySearch method to simplify the code a little!
10) Marko Bonaci10 (16 Jan 2008)
The reason could be that e.g. you created the function that does some processing on collection of docs and then afterwards you would like to call that function on a few docs that aren't gathered using one collection's init. methods so you have to call profileDoc.Responses in order to create empty collection, but then the profileDoc remains in your db, unless you dereference it and delete it using it's noteID...

It's simply fundamental in OO development.
11) Scott O'Keefe187 (27 Feb 2008)
This is actually available - right now! Try this:

do some dimmin', then

Set yourDocCollection = yourDb.CreateDocumentCollection()

Voila! You've got an empty NotesDocumentCollection. It doesn't appear to be documented, but it is used in the LotusInboxCleanup agent in the mail8.ntf.
12) Frank Strunzkus150 (17 Mar 2009)
Yes please give an option to sort collections ! I'am looking for this since years.
13) Michael Schlömp26 (07 Sep 2009)
I agree. The sorting of a DocumentCollection would be great.
14) Erik Brooks795 (21 Feb 2010)
This feature was delivered (though undocumented) in (I believe) 8.0.2.
15) Bruce Elgort8054 (21 Feb 2010)
Erik and way you can help us ensure that this idea is actually complete?
16) Randy Smith3908 (02 Mar 2010)
The CreateDocumentCollection method of the NotesDatabase class is still not documented in Domino Designer 8.5 Help.
17) Erik Brooks795 (04 Mar 2010)
SPR # DMAT72JLWW Fixed in release: 7.0.4

Product Area: Designer Technical Area: LotusScript Platform: Cross Platform

Lotus Customer Support APAR: LO28240 What is an APAR?

SPR# DMAT72JLWW - Added NotesDatabase.CreateDocumentCollection method to create empty doc collection.


Might be in 8.5.1's documentation, I'd have to check.
18) Bas van Gestel2808 (12 Aug 2010)
Please note that createdocumentcollection still has issues. Using the Subtract and Merge functions fail. That's probabably why it's undocumented.
19) Jim Fricker43 (04 Sep 2012)
My preference is to use...
Set dc = db.GetProfileDocCollection(Chr$(13))
I consider a Carriage Return (CR) (ascii 13) character a very safe (unused) profile name as it is very difficult to create a form name (which is what a profile name is) that only consists of a single CR char. Better in my opinion than profileDoc.Responses as you don't have any profile docs to clean up.










:
:

Welcome to IdeaJam™


You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>


1
Inbox Zero for Notes
5
XWork Server Community Edition
7
Allow groups, domains etc. to be used to set background or ink colours in the ($inbox)
4
Allow more than Database Icons on the Workspace?
6
Dynamic favicon
9
Save snoozed alarms
6
Add functionality in IdeaJam to Automatically create an SPR for the enhancement request with IBM
18
One-click way to add participants to a Lotus Notes Meeting Invite
3
Sametime group chat with all meeting invites
7
Make Notes Not Crash when Home Server is Down / Restarts
0
Add Signature to new calendar entry
8
Clicking the Quickflag icon on an already flagged e-mail should remove the flag
5
Propose to download attachments before forwarding mail (Android)
-3
put sent items in folders
3
Traveler refresh by pull down
-2
Provide A doc-Load option in each object to load just the first 40k of rich text fields in a doc
36
Calendar current time visual indicator
22
IBM needs to implement some of the ideas on this site
-1
Allow more granular control of the Database Administrators security setting on the server document for roaming upgrade
6
Message Recall available to Administrators (SPR # Included)
3
Have the "Folder" column of the "All Docs" view also available in iNotes
3
I wish evaluate() would throw errors (again)
6
Replication and Sync Sametime contacts
5
Allow predefined notifications to be sent automatically when a task is completed in an Activity
4
I wish @Eval returned errors much like other @Functions






IdeaJam developed by

Elguji Software Logo