I am trying to clear a rich text field in the querysave of a form but I"m having no luck. Is there some trick to setting a RT field to null? I’ve tried:
Call doc.RemoveItem(“GraphicLayout”)
Set rtitem = New NotesRichTextItem (doc,"GraphicLayout")
Call rtitem.AppendText("")
When I run in debug mode, it appears to be gone and then back with a null value. But when I go back into the doc, it’s still got the old data in it.
I have looked and looked on this forum and doing this is the only thing I can find to do.
No matter what you do in the back-end, the content of the editor will trump it when the UI document is saved. You’d need to use Source.FieldSetText(“GraphicLayout”,“”) to clear the editor.
Bingo - that worked perfect!! Thanks so much for your help. Is this documented someplace because I spent hours today looking through the documentation and couldn’t find anything.
If users don’t need to see the field cleared when they save the doc (e.g., when pressing Ctrl-S), how about deleting the rich text item and re-saving the document in the Queryclose event?