RenterRTItem into a field

Is it possible to render a form into a single field on a form? I ask because I can render a document, I can see it in the debugger, but I can’t seem to display it on the other form! My code goes:

Set db = s.CurrentDatabase

Set uidoc = uiws.CurrentDocument

Set doc = uidoc.Document

Set rowdoc = db.CreateDocument( )

rowdoc.ReplaceItemValue “Form”, “NoteEntry”

Call uiws.DialogBox( “NoteDialog”,“Notes Entry”, rowdoc)

Set rtf = New NotesRichTextItem( doc, “NoteHolder”)

Call doc.Save(True, True)

If rtf Is Nothing Then

Set rtf = doc.CreateRichTextItem("NoteHolder")

End If

Call uidoc.Save

sucess = rowdoc.RenderToRTItem(rtf)

Call rtf.Update( )

Call uidoc.Refresh(True)

Call uidoc.Save

I can see the info under rowdoc, rtf and under the doc items, under NoteEntry, but it will not show up on the field. Thanks in advance.

Janice

Subject: RenterRTItem into a field

Like all rich text, you have to close and open the form to see it. Though you might think that the call

Call uidoc.Refresh(True)

would take care of this, but it does not.

Subject: RE: RenterRTItem into a field

The problem seems to be that although I can see the values in NotesHolder, I cannot seem to assign it to a field to actually view on the form. I have tried to assign it within the script, I have tried an computed field with the value of “NotesHolder”, I have tried to assign it on close or save, nothing I do seems to work! And, if instead of the fictional value NotesHolder (this is not really a field on the form, just a temporary holding) I try to use the “Notes” field, it will not work at all. I KNOW I am doing something wrong but can’t figure it out for anything. I also made sure I didn’t have a hide/when formula specified because I read in the technotes how that can be a problem as well. Any other ideas? I really want to use this functionality as it will be perfect for what I am trying to accomplish! Thanks

Janice

Subject: RE: RenterRTItem into a field

If the actual field is not on the form, you won’t see it after you add the content to the document. A form is there to tell you which values on the document to show. So, simply add a field on the form called NotesHolder and write to that.

Subject: One more thing…

I have multiple Rich Text fields on the form. Could this possibly be affecting the outcome of my script???

Subject: RE: One more thing…

The fact that you multiple rich text fields is not a problem, but there are a few things that don’t render well.

Subject: RE: One more thing…

One thing I have noticed is that when people figure out the answer they rarely post it here. So I will. The answer is, you cannot save the UIDoc because the field value on it is blank. So that was my problem, you write to the doc, then save it, then reopen it and it forces the UIDoc to refresh. My problem is that I was saving the UIDoc and that would force the “blankness” on the field back to the Doc, making it blank as well. thanks for your help!

Subject: RE: RenterRTItem into a field

I guess that’s what I was getting at. If the field is on the form, then I can never see the data, not even in the properties. It’s like it was never assigned although I can SEE it being assigned when I step through. I put the field on the form (just to be fair, I would check) and now I get no results at all. Just a blank field “NotesHolder.”

Anything else at all???