Use the high power in Notes Formula to get fast and easy to use search criteria by using a computed field to collect the selected options -- without including the sort conditions.
Use the resulted criteria in your script or agent to get the document collection from the database without having to sort using the method (db.Search(Formula, Nothing, 0) or other conditions.
Here is a simple trick to get a collection of sorted resulst set to specific user options:
- Create one or more hidden folders with columns sorted/categorized to your dialog options.
- Determine the required sort options found in the dialog, and then determine what folder name to use (you may do this in a formula in the dialog, so you get the folder name directly from the dialog).
Empty the folder of any existing documents from a previous operation.
- Put the collection in the folder. Now you have the collection sorted to the user requirements.
- Loop on the collection by getting the first, then next document from the folder.
- Process the document according to the operation tasks.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Sirry Hboos. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.