Delete item from multi-value field

How can I remove item from prefered room/resource list? Can I run same script to all mail db? Find room called “member” and remove from the list then goes to next one. Does same processing then again goes to next one?

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set db=session.CurrentDatabase

Set doc=db.GetProfileDocument(“CalendarProfile”)

Forall x In doc.PrefRoomsList

Msgbox x

If x =“member” Then

Call x.Remove

End If

End Forall

Please advise. My script stop with error at x.remove line.

Subject: You need to copy this into another array…

  • Then update that array, then use doc.replaceItemValue() to put the updated Array back.

  • While NotesDocument does return an array, my experience is it’s not useful for this sort of manipulation. If you need to do this frequently I’d write a function to do it.

Hope this helps…

Subject: working with multivalued data

Writing Code to Deal With Multivalued Data