This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 7, 2011, 10:01 AM
149 Posts

Re: I am facing problem in lotus notes view search on a XPage.

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: otus notes view search
  • Replies: 7
 
well, the only way I could think of is to create your own sorting, you then need to add your own sort buttons
 
- If you are using view control to return and search I guess you can use the "diamond" to control the sort column as well. ( there is a property for sort column)
- if you are using SSJS to do the search you need to sort the collection.
 
 
 
hope it helps.
Thomas
Apr 7, 2011, 10:37 AM
6 Posts
Re: I am facing problem in lotus notes view search on a XPage.
Hello Thomas, 
 
Thank You for the options provided by you.
 
For the first option, if I search a view by writing the code in Search properties of view. Then the "diamond" to control the sort column disappears.
For the second option, I have also tried to sort the collection by writing following SSJS Function.
 
function SortDocumentCollection(vc, strKeyFieldName)
{
 var a=0
 var sortkeyarray=new Array(); 
 
 var ent:NotesViewEntry=vc.getFirstEntry();
 var UNIDStr="";
 while(ent!=null)
 { 
  sortkeyarray[a]=new Array(2);
  sortkeyarray[a][0]=ent.getColumnValues()[0];
  sortkeyarray[a][1]=ent.getUniversalID();
  ent=vc.getNextEntry(ent)
  a=a+1
 }
 
 sortkeyarray.sort();
 sortkeyarray.reverse();
 for(c=0;c<@Elements(sortkeyarray);c++)
 {
  doc=db.getDocumentByUNID(sortkeyarray[c][1])
  sdc.addDocument(doc)
 }
return sdc;
  
 
But it takes hell lot of time to sort data and for 6000+ data (I have around 20000-25000 data to display), it eventually fails and doesn't return any result.
Could you please help me with any faster SSJS method for sorting Collection ore any other way to sort the results.
 
Anirban

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal