Computed rich Text field problem!

Hi,

In a form, I have two Rich Text. 1 Editable and one computed. When the user save the document, I copy the Editable Rich Text field into the computed one. Everything is working fine. (See code Bellow)

(PostSave)

Set rtitemA = doc.GetFirstItem( “CCFITCommentsC” )

Set rtitemB = doc.GetFirstItem( “CCFITCommentsCmpC” )

Call rtitemB.AppendText(“****************************************************************”)

Call rtitemB.AddNewLine( 1 )

Call rtitemB.AppendText(nam.Abbreviated + " on " + Str(Now))

Call rtitemB.AddNewLine( 1 )

Call rtitemB.AddNewLine( 1 )

Call rtitemB.AppendRTItem(rtitemA)

Call rtitemB.AddNewLine( 1 )

Call rtitemB.AddNewLine( 1 )

I have the same problem describe in this SPR!

http://www-1.ibm.com/support/docview.wss?rs=475&context=SSKTWP&q1=computed+rich+text&uid=swg21097112&loc=en_US&cs=utf-8&lang=en

“Ignoring Portion of Document that Uses a Feature from Another Version of Notes” When Opening Doc

Their Workaround is to use a Control Access Section. My problem is that my editable and Computed rich text field is already in a Control Accress Section.

At the moment, I put my computed rich text field to Editable but I have to find a way to block user to be able to modify it.

Do someone have other workaround to help me?

Thank you,

Alexandre

Subject: Would this help?

Try using a computed text field with @Text(bodyfieldname). It works and the information can also be displayed in a view.

Subject: RE: Computed rich Text field problem!!

I’m going to add another workaround to this technote.

The problem (according to the technote) occurs when you do a back-end save of the document that you obtained with uidoc.Document. You only showed the code that manipulates the rich text field, so I can’t be sure that’s what you’re doing, but let’s suppose it is.

Don’t do a back-end save (NotesDocument.Save) and you should not have the problem. Do a front-end save (NotesUIDocument.Save) or don’t save at all.

If you’re only saving so that you can close and reopen the document to show the changed rich text, it is not necessary to save. See this posting.

Subject: RE: Computed rich Text field problem!!

Thank you for your help.

I will try that and let you know!!

Subject: RE: Computed rich Text field problem!!

Hi,

I’m not sure how I cannot save the document.

Then I click on save, the first thing is that I save the uidoc and then I have some script the run on the doc and save it at the end.

(More script that change some field in the document according to the user selection)

Set rtitemA = doc.GetFirstItem( “CCFITCommentsC” )

		Set rtitemB = doc.GetFirstItem( "CCFITCommentsCmpC" )

		

		Call rtitemB.AppendText("****************************************************************")

		Call rtitemB.AddNewLine( 1 ) 

		Call rtitemB.AppendText(nam.Abbreviated + " on " + Str(Now))

		Call rtitemB.AddNewLine( 1 ) 

		Call rtitemB.AddNewLine( 1 )     	

		Call rtitemB.AppendRTItem(rtitemA)

		Call rtitemB.AddNewLine( 1 )     

		Call rtitemB.AddNewLine( 1 )  

		

		doc.CCFITCommentsC = ""

Call doc.save(True,False)

	doc.SaveOptions = "0"

	Call source.close()

Any other idea how I can fix this problem.

Thank you!

Alexandre

Subject: Find a Simple Work around to my problem!

Hi,

I found a Simple Work around to my problem.

First, I remove the field parameters to my rich test field, Also I left it as editable.

I insert the following script code in the Entering function.

Dim ws As New NotesUIWorkspace

Set uidoc = ws.CurrentDocument

uidoc.GoToField("CCFITCommentsC")

Alexandre

Subject: RE: Find a Simple Work around to my problem!

But with this solution, how do you prevent user to edit the field ?