Readers names via agent in Lotus Notes
Posted on 2011-03-04
I have created a field in a Notes document which I have populated with a list of user names and groups. Although I updated the form to include the new field I popoulated my existing documents with an agent and as a consequence the field types are not flagged as Readers, just TEXT LIST.
I therefore ran this agent
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim item As NotesItem
Set db = session.Currentdatabase
Set view = db.getView("Restricted Purchase Orders")
Set doc = view.GetFirstDocument
Do While Not(doc Is Nothing)
Set item = doc.GetFirstItem("RestrictedViewers")
item.IsNames = True
item.IsReaders = True
Set doc = view.GetNextDocument(doc)
which fails to update the field types. The field Restricted Viewers still shows as Text List and doesn't have the READERS or NAMES flags against it.
What is the easiest way to accomplish this ?
Thanks - Andy