dominoExperts.com - Powered by Domino 8.5.2 Domino Accelerator Pack
- Accelerate your web applications
Lotus Triple Search DominoExperts + Blogs + R8 forum
dominoExperts.com -> Script vault -> Lotus Script

 GetNthItem


Jonas IsraelssonPost date: 2007-01-15 09:25

Function I made to retrieve the Nth item when multiple notes items are stored in one document. Note: This has not been tested yet.

Function GetNthItem(Byval Itemname As String, Byval Index As Long, Byval doc As NotesDocument) As NotesItem
 Dim item As NotesItem
 Dim Counter As Long
 Dim found As Boolean

 Forall item In doc.Items
    If ( item.Name = Itemname ) Then
   If ( Counter = Index ) Then
    found = True
    Exit ForAll
   End If
   Counter = Counter + 1
  End If
 End Forall

 If found Then
  GetNthItem = item
 Else
  GetNthItem = Nothing
 End If
End Function




RSS feed
Subscribe to Forum

Share this page

Top posters
Tomas Nielsen212
Joacim Boive27
Fredrik Stöckel27
Danne14
Niklas Waller13
Kenneth Haggman11
Bryan Kuhn10
Daniel Lehtihet9
Jonas Israelsson8
dm997