#dominoforever | Product Ideas Portal

 

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Sort DocumentCollection in LotusScript

From Ulf Grindstadt

We need the ability to sort Document collections, like NotesDocumentCollection.Sort(FieldNameArray)
  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Jul 19 2018
  • Planning to implement
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    18 Sep 04:53am

    If I recall right, techtarget solution is limited to dc's of same database. As it is just one line of code to fix this (Set db = s.currentdatabase versus set db = dc.'WhatEverItTakesHere' ) this should be corrected when implementing.

  • Admin
    John Curtis commented
    17 Sep 01:31pm

    In plan for v12

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    10 Jan 01:51am

    Use case: User clicks a "report" button and enters a date range and selects customer number, part number or location.  A db.search returns the matching documents in a collection.  The desired field values are then written to Excel for display.  It looks clunky to use Excel's sort after the rows are written. 

    The SearchDomino solution works  fine.  Nevertheless, it would be nice if it was built in.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    10 Jan 12:21am

    Basic Document Collection Sort function:  see https://searchdomino.techtarget.com/tip/LotusScript-sorts-a-Lotus-Notes-document-collection

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    21 Feb, 2019 10:53pm

    Please look at maintainOrder in 10.0.1 on (Notes)ViewEntryCollection intersect and subtract functions.  If you intersect your NotesDocumentCollection with a sorted NotesViewEntryCollection, you get sorted results.

    We'll do more, but I wanted to make sure people knew about it.  It's available in 10.0.1.


    https://www.ibm.com/support/knowledgecenter/SSVRGU_10.0.1/basic/H_INTERSECT_METHOD_VEC_JAVA.html
    https://www.ibm.com/support/knowledgecenter/SSVRGU_10.0.1/basic/H_SUBTRACT_METHOD_VEC_JAVA.html

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    9 Feb, 2019 12:32am

    I have been developing under Lotus since 2001 fulltime, and never needed to sort collections.
    The need to sort collections usually speaks of improperly projected applications.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    4 Feb, 2019 08:32am

    Domino 10.0.1 provides a solution with ViewEntryCollection.intersect(DocumentCollection dc, boolean maintainOrder);

    That way, you can use a sorted view (or sort it in code with View.resortView(String column)), get a ViewEntryCollection via View.getAllEntries() and reduce it to only contain entries of your document collection.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    28 Dec, 2018 08:55pm

    Please add this.  It's somewhat embarrassing that we don't have a sort method.  I will add to Ulf's suggestion, by including another argument:

     

    NotesDocumentCollection.Sort(FieldNameArray, Ascending or Descending)

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    14 Nov, 2018 03:46pm

    Testing DQL via node.js, I also realized that we need sorting for DQL

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    1 Aug, 2018 07:17am

    +1 for "add sorting to DQL"

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    27 Jul, 2018 11:45pm

    Or add sorting to DQL.