Remove first value from dynamic array

Hi I have a code snippet posted below that gives the reviewers list as an array called TempArray. I need to remove the first value from it for example TempArray could contain values like

John, Joe, Mark, John

I just need to remove first John from it so the new list should contain Joe, Mark, John.

I have tried Split, Mid, Replace, RemoveNthEntries but all of these functions give me a type mismatch error.

GetReviewers = Doc.GetItemValue(“Reviewers”)

i = Ubound(GetReviewers)

If i <> 0 Then

	i = Ubound(GetReviewers)-1

Else

	i = Ubound(GetReviewers)		

End If

	Redim Preserve TempArray(0 To i)

Forall X In GetReviewers

	If X <> "" Then

		TempArray(j) = X

		j = j + 1

	End If

End Forall

Thanks

Subject: Remove first value from dynamic array

you could use

Erase TempArray( 0 )

to remove the element in position zero (the first in the array),

erase TempArray to remove everything, etc.

This works for lists as well. Depends what you are doing, but, lists are great.

Subject: RE: Remove first value from dynamic array

Thank you very much. Your code worked great:

Dim a() As Variant

Redim a(Ubound(TempArray)) As Variant

For i=0 To Ubound(TempArray)-1

	a(i)=TempArray(i+1)

Next

CurrDoc.Reviewers=a

Subject: Remove first value from dynamic array

I hope this piece of code will help you

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim a() As Variant

Set uidoc=ws.CurrentDocument

Set doc=uidoc.Document

Redim a(Ubound(doc.tesr)) As Variant

Msgbox(Ubound(doc.tesr))

For i=0 To Ubound(doc.tesr)-1

	a(i)=doc.tesr(i+1)

’ msgbox(

Next

Call doc.ReplaceItemValue("tesr",a)