Home > Domino Tips > Developer > LotusScript > LotusScript button saves time searching large Lotus Notes databases
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

LotusScript button saves time searching large Lotus Notes databases


Niranjan Singh
12.09.2008
Rating: -2.72- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


If you have a Lotus Notes database containing a large amount of data (more than 10 GB), searching for a single word or couple of words can take a great deal of time and may not always produce accurate results. This LotusScript code performs the search activity in your Lotus Notes database and replaces the view selection criteria per the search query. This accurately searches your Lotus Notes database and generates a result in just a few seconds.


While working on a project, I came across a Lotus Notes database that had approximately 20 GB of data. One part of the project requirements from the client side was to develop a search functionality with the following criterion:

  1. Work on multiple search criteria
  2. Take as little time as possible
  3. Use a minimal amount of system resources
  4. Be easy to use
  5. Display the correct results

The following elements were used in the test environment:

  • One Lotus Notes database with a large amount of data (20 GB)
  • One search form
  • One frameset to show the view
  • One view to display the search results by changing the view selection formula

There are nine multi-value fields on the search form. Lotus Notes users can select single or multiple search criteria using these fields.
Related resources from SearchDomino.com:
How to clear a Lotus Notes local cache with LotusScript

LotusScript to update and save Lotus Notes profile documents

Display a custom message box using a LotusScript-generated button

Once the search criteria is defined on the search form -- after selecting multi-value fields -- the user clicks on the search button. The LotusScript code shown below is placed in that button. When the button is selected, the code written on its click event will be triggered as follows:

  1. It will declare variables.
  2. It will create a view selection formula based on the selection of multi-value fields.
  3. The code will put the search query into an array, remove null values and put "&" after each search criteria.
  4. Obtain the handle of the view through a back-end object.
  5. Set the view-selection formula according to the newly created view selection formula from the LotusScript code.
  6. Open the same view inside the frameset.

Note: These steps will take some time during your initial database search.

LotusScript to search large Lotus Notes databases
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Niranjan Singh. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication
LotusScript filters and attaches files to a Notes form

LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
Run or restart Notes/Domino agents via text messages
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication

Lotus Notes Domino Database Management
Domino Domain Monitoring hints and gotchas
LotusScript code rebuilds corrupted busytime.nsf file
LotusScript agent automates selective mail file replication
Configuring Domino Domain Monitoring (DDM)
How to move Notes databases off Domino 8 servers and save disk space
What is Notes 8.5's DAOS (Domino Attachment and Object Storage) feature?
LotusScript agent indexes Lotus Notes/Domino databases
An introduction to Domino Domain Monitoring (DDM)
'Customize this view' options are disabled in Lotus Notes databases
Batch file runs scheduled Lotus Notes database maintenance tasks

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts