Manage Learn to apply best practices and optimize your operations.

Fast Notes searches on database over Web

Awesome fast, easy and efficient searches on a Notes database over the web using javascript. A client had requested that we create search functionality for our Corporate directory. The key was that they wanted a custom look on the page and that the search be applied to only certain fields in this database and that the results be displayed in alphabetical order without the relevence boxes?. Outch! We tried to build the search in Lotusscript? it seemed to work great at first, but as soon as we added any type of user load it would take a long time to return the results (3-4 minutes), it's a huge database. We then tried the following method which has worked like a charm! Enjoy!

"Elements involved:
Search form where the entry field is contained: SideBar
The search results form: $$SearchTemplate for WebSearch
View that will contain the search results: (WebSearch)

I added this script around the $$ViewBody in the $$SearchTemplate for WebSearch:

sortit=new Array();
for (i = 0; i < sortit.length ; i++)

ss = sortit[i].toString();
pos = ss.indexOf("[");
disp = ss.substr(pos+1);



I have a field called ?namesearch? where the user will enter a name to search on:
?namesearch? (editable text field)

In the form where the user is entering the name to search on, the following code must be added to the $$Return This code builds the url to be used in the search that will bring back the specific info we need from designated fields only.

criteria := @If(@Contains(namesearch;" ");@ReplaceSubstring(namesearch;"


In the view ?(WebSearch)? I added the following code to the first column that displays the information to the web client? all the HTML formatting is used to display the information returned in a pleasing manner:

"sortit[j]="" + LastName + "," + FirstName + "[" +
This was last published in November 2000

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials'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 ...