How to hide an attachment in a Lotus Notes document pasted in a rich text field?
Using attach icon the attachment can be hidden using hide-when formula !@IsNewDoc
, if it is pasted it remains visible even in case of the same hide when formula.
(Lotus Notes 8.5.3 client)
After saving and reopening the document, the attachment is still displayed. (Is seems @isnewdoc does not work)
It does work the way you described BUT after setting hide-when formula you have to close and reopen the document because the formula !@IsNewDoc
hides the attachment only if document is not new.
Even if you edit an existing document you have to
after setting hide-when formula. The hide-when formula doesn't work right away. The document has to be recalculated before hide-when formula takes affect.
EDIT:
You have a form with a RichText field. This has a hide-when formula !@IsNewDoc
. Normally, all content disappears when document is saved and reopened. But, if user copies an attachment from another Notes document's Richtext field the attachment stays visible.
Why? If you copy an attachment from another RichText field then not only the attachment is copied but also all properties. In this case the property hide-when is empty for copied attachment.
Here is a solution:
1
. @If(@IsNewDoc; "AttachmentsNewDoc"; "AttachmentsExistingDoc")