Computed Fields

This would appear to be a simple task however I am at a loss.

I have a database that runs a nighty agent (Lotus Script) that will create new documents base on the values of another document. There are a few fields in the new document that need to be computed and some of these computed fields use @DBLookup. I tried to use a “ComputeWithForm” solution in another agent; however it just does not compute the values in those fields.

How should I be doing this?

Thanks in advance.

Subject: post your code, all of it

Subject: Sorry…

Subject: Sorry…

%REM Agent Compute With Form

Created Jun 30, 2011 by Bob Brindza/NWF

Description: Comments for Agent

%END REM

Option Public

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim dc As NotesDocumentCollection

Set db = s.CurrentDatabase

Set dc = db.UnprocessedDocuments

Dim doc As NotesDocument

Set doc = dc.GetFirstDocument

While Not doc Is Nothing

	Call doc.ComputeWithForm(False, False)

	Call doc.Save(True, False)

	Set doc = dc.GetNextDocument(doc)

Wend

End Sub

Subject: This could help you…

The problem might be that you aren’t doing anything else in the script other than the ComputeWithForm. This KB article (https://www-304.ibm.com/support/docview.wss?uid=swg1LO55409)might be of assistance.