1
votes

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)

3

3 Answers

5
votes

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

  • press F9 or
  • select menu View/Refresh

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. Create a subform "AttachmentsNewDoc" with RichText field without any hide-when formula.
  2. Create a subform "AttachmentsExistingDoc" with RichText field inside a collapsed section with hide-when formula 1.
  3. Include in your form a calculated subform with formula @If(@IsNewDoc; "AttachmentsNewDoc"; "AttachmentsExistingDoc")
0
votes

Rich Text fields can not normally be hidden. The rich text itself can contain hide-when formatting. So you have to use a work-around if you need/want to hide the attachments. I would use the computed subform trick for this.

0
votes

Yes, for documents already saved, you need to go to the richtext field and check all items (files) to make sure the hide when on these are set correctly.