How to add new entries into readers field

I have a reader field with some entries (usernames and roles) I want to replace the existing user name with new username.

Say for example If A,B,C are the members in readers field. I want to replace ‘C’ with ‘D’’

Need to handle through script in click event.

Thanks in Advance

Subject: How to add new entries into readers field

You could do:

Dim doc As NotesDocument

Dim item As NotesItem

Redim myreaders(0) As String

Dim nrnames As Integer

Set item = doc.GetFirstItem(“”)

nrnames = -1

Forall n In item.Values

nrnames = nrnames + 1

Redim Preserve myreaders(nrnames)

If n = “xxx” Then

myreaders(nrnames) = “yyy”

Else

myreaders(names) = n

End If

End Forall

Call doc.ReplaceItemValue(“”, readers)