Remove item value in multivalues field

My problem is that I have a document with a field ID with theses values :

ID(0) = 1

ID(1) = 3

ID(2) = 16

ID(3) = 8

I want to remove ID(2) to have value like this :

ID(0) = 1

ID(1) = 3

ID(2) = 8

How I can do this using lotusscript

Thanks

Subject: Remove item value in multivalues field

Heres a function I use to do this (think I might have found it on notes.net somewhere before!). Pass the function the value you want to remove, and the complete list. It returns the list with the value removed…

Function RemoveFromList (Value As Variant, ValueList As Variant)

Dim tmpValueList() As String

x = 0

Redim Preserve tmpValueList(x)

Forall vals In ValueList

	If Not Value = vals Then

		Redim Preserve tmpValueList(x)

		tmpValueList(x) = vals

		x = x + 1

	End If

End Forall

RemoveFromList = tmpValueList

End Function

Subject: Remove item value in multivalues field

Hi Eric,

have alook at the Replace function in LS - I think it’s new in R6. Use it to replace the value with a null, then use Fulltrim to remove the blank element.

hth

Tony