Hi,
I’ve got a difficult things to do.
I’ve got a view with the first column orderer for make a getAllEntriesByKey on this column.
The prob is that I want to get the entries where the first column value is ‘A’ or ‘B’ or …
can someone help me ?
Thanks
Subject: Try something like this:
Dim finalCol As NotesViewEntryCollection Dim sCol As NotesViewEntryCollection
first = True
Forall key1 In Keys
If first Then
Set finalCol = view.GetAllEntriesByKey(key1, True)
first = False
Else
Set sCol = view.GetAllEntriesByKey(key1, True)
For i = 1 To sCol.Count
Call finalCol.AddEntry(sCol.GetNthEntry(i))
Next
End If
End Forall
Subject: RE: Try something like this:
Bill great code, but if I can suggest-- you can lose the “first” variable by using Lbound:
Dim finalCol As NotesViewEntryCollection
Dim sCol As NotesViewEntryCollection
Forall key1 In Keys
If key1 = Keys(Lbound(Keys)) Then
Set finalCol = view.GetAllEntriesByKey(key1, True)
Else
Set sCol = view.GetAllEntriesByKey(key1, True)
For i = 1 To sCol.Count
Call finalCol.AddEntry(sCol.GetNthEntry(i))
Next
End If
End Forall
HTH
Subject: getAllEntriesByKey : several values for one key
How about building another view (hidden) and include value A and value B into the first column of the new view.
Then use something like to following example to get the values.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Set db = session.CurrentDatabase
Set view = db.GetView(“By Category”)
key = InputBox$(“enter value here!”)
Set vc = view.GetAllEntriesByKey(key, False)