Populate Computed Rich Text Fields on web

I am trying to populate a Computed Rich Text Field (WebField) on the web in a form from another document’s Rich Text Field (DocField).

I have a Webqueryopen agent that seems to work, but it does not populate the WebField.

Here is the code:

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim docText As NotesDocument

Dim view As NotesView

Dim WebContentField As NotesRichTextItem

Dim RTItem As NotesRichTextItem

Dim CurrentUser As String	

Dim Message As String

Dim FormName As String

Dim Continue As Variant

Dim ClientContentField As Variant



Set db = s.CurrentDatabase

Set view = db.GetView("WebContent")		

Set doc = s.DocumentContext

FormName = doc.FormName(0)

Set WebContentField = New NotesRichTextItem(doc, "WebContent")



'Get the document...

Set docText = view.GetDocumentByKey(FormName, True)

If docText Is Nothing Then

Else

	'Let's copy over the Rich Text field...

	Set ClientContentField = docText.GetFirstItem("WCContent")

	If WebContentField.Type = RICHTEXT Then

		If ClientContentField.Type  = RICHTEXT Then

			Call ClientContentField.AppendRTItem(WebContentField)

		End If

	End If		

End If



Exit Sub	

I have placed messageboxes in the script and it does make it to the “AppendRTItem” method.

I found this: http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/4cae0930b6ed132485256ae20043076e?OpenDocument

but it does not have an answer…

What am I missing?

Thanks!

Dan

Subject: Populate Computed Rich Text Fields on web…

Found my own answer…

Used the DBLookup command…

In the document that I am retrieving the value, it is a RTF. On the web form, it is a Text field.

Works great!