Adding New Field - Updating Records with Agent

I have added a new field to a form, but now have to refresh about 5,000 records for the field to show in the views.

Can I do this with an agent, and if so, any suggestions on how to write it?

Thanks in advance.

Subject: You can create using NotesItem class

Create an agent with the following code

Dim sess As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim doc As NotesDocument

Set db = sess.CurrentDatabase

Set view = db.GetView(“your view”)

Set doc = view.GetFirstDocument

While Not doc Is Nothing

If Not doc.HasItem( “newfield” ) Then

Set textItem = New NotesItem ( doc, “newfield”, “newval” )

Call doc.ComputeWithForm(False, False)

Call doc.Save(True, False)

End If

Set doc = view.GetNextDocument(doc)

Wend