Grab 2nd item only from text list

I built this loop to create a string from text list items. However, now I just need the second item in the list. Is there a way to modify this loop to do that, or is there another way to grab just the 2nd item?

Dim Comm As String

y = 0

Forall j In doc.inputhistory

If y = 0 Then

Comm = j

y = 1

Else

Comm = Comm + “,” + j

End If

End Forall

Subject: Grab 2nd item only from text list

Nice routine, but if you’re dealing with Notes and Domino 6 or higher, you could have used:

Comm = Join(doc.InputHistory,“,”)

Field values are zero-based arrays. If you want the second value, then retrieve doc.InputHistory(1).

Subject: RE: Grab 2nd item only from text list

Perfect, thanks. Thanks also for the tip on the Join function, I’ve never used that before - pretty cool!