.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: Retrieving entries from a view entry collection
1. This example finds an entry in the collection and places it in a folder.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entryOne As NotesViewEntry
Dim entryTwo As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set vc = view.GetAllEntriesByKey("Books")
Set entryOne = vc.GetNthEntry(2)
Set entryTwo = vc.GetEntry(entryOne)
Set doc = entryTwo.Document
Call doc.PutInFolder("Shopping Cart")
End Sub
2. This example finds the first and last entries in a collection.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim entry2 As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim doc As NotesDocument
Dim doc2 As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set vc = view.GetAllEntriesByKey("Products")
Set entry = vc.GetFirstEntry()
Set entry2 = vc.GetLastEntry()
Set doc = entry.Document
Set doc2 = entry2.Document
Call doc.PutInFolder("First entries")
Call doc2.PutInfolder("First entries")
End Sub
3. This example collects all of the entries in a view with the
GetAllEntriesByKey
method of NotesView, and traverses the collection by using the
GetFirstEntry
and
GetNextEntry
methods of NotesViewEntryCollection. Alternatively you can use the
GetLastEntry
and
GetPrevEntry
methods to traverse the collection backwards.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set vc = view.GetAllEntriesByKey("Products")
Set entry = vc.GetFirstEntry()
While Not(Entry Is Nothing)
Set entry = vc.GetNextEntry(entry)
Wend
End Sub
See Also
Retrieving entries from a view entry collection
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents