- Powered by Domino 8.5.2 Domino Accelerator Pack
- DAP know which URLs slow down your site. Do you?
Lotus Triple Search DominoExperts + Blogs + R8 forum -> Script vault -> Lotus Script


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
  GetNthItem = Nothing
 End If
End Function

RSS feed
Subscribe to Forum

Share this page

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