[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do you specify a key array, where one of the keys has multiple items, in a GetAllDocumentsByKey

Posted on 2006-05-04
6
Medium Priority
?
1,116 Views
Last Modified: 2013-12-18
Good day, goede dag, selamat siang y'all,

OK the preliminaries - I'm on R5.0.12. Now the details - I have the following key array but one of the entries in the key aray I'd like tested for multiple entries. How would I go about doing this so that my collection does not come back with zero documents? Can I only test for one item in each entry? The view in question has the appropriate columns sorted and I cannot change this view. The first column contains the server name categorized, the second column contains the server status, Production, Development, Test or Inactive, also categorized.

Dim collection as NotesDocumentCollection
Dim keyarray (1 to 2) As String
...

keyarray(1) = "Servername"
keyarray(2) = "Production, Development"  <-- I'd like to be able to get documents that have these 2 statuses
...

Set collection = view.GetAllDocumentsByKey(keyarray, True)

Will I have to basically change out the value for keyarray(2) to get both sets of documents? Or will I have to cycle through replacing keyarray(2) with each status that I want?

Thanks, dank u, terima kasih, y'all
0
Comment
Question by:notesrookie
  • 3
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
madheeswar earned 1400 total points
ID: 16606466
u can use Search for this...look into db.search
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16606575
Or FTSearch ...
0
 

Author Comment

by:notesrookie
ID: 16607495
I liked both your suggestions but used madheeswar's to implement. Thanks.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16607533
You'll regret it, when your database gets large... ;)
0
 

Author Comment

by:notesrookie
ID: 16609461
so is the FTSearch is more efficient?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16610254
It's like comparing a rowing boat and a speedboat: db.Search is ready when you are, for an db.FTSearch you have to do more, there is a price to pay, but it is a lot faster.

db.Search:
+ immediately available
+ view-like syntax (easy)
- always goes though entire database sequentially (view-like, first time)
- "fixed": limited syntax and queries

db.FTSearch
- requires full-text index to be built and maintained (additional overhead, larger database)
- more complex syntax
+ fast
+ will allow full-text queries as well (anywhere in the document)
+ once full-text indexed, every new query is quick (depends on the complexity)

If queries are to be done quite (daily) and the database is likely to grow to thousands of documents, or you always need a quick response, then use FTSearch. If there's an occasional query that doesn't have to be available rightaway, then use Search.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question