My situation is that in the design mode, the rich text “Sample” field do not exisit. My code is to create a dynamice rich text field “Sample” and insert an attachment in the field. and copy the field to desinated document.
where “Sample” is dynamic rich text field with =1…unlimited
When I open the desinated document, there is an attachment icons at the bottom. Can this rich text field be hidded.
You need to know one thing, in fact, attachment are not in RTF but Notes/Domino creates a “$File” field for each attachment (look that in properties a document > “Field” tab).
To hide your attachments, on you form, create a “$V2AttachmentOptions” (Notes reserved name) computer for display text field, value can be :
“0” = attachments hidden
or
“1” = attachments visible
also, in this field, you can use a formula for display or not your attachment, e.g.:
The only really effective way to hide just the documents in that rich text field is to put the field inside a collapsed section and put the hide formula on the section, not on the rich text. You can then force the section open and set the title to not display. That works pretty well.
You aren’t really asking about hiding a rich text field, you are asking about hiding an attachment. Attachments aren’t “in” rich text fields – they are referenced by rich text fields. The attachment is still present on the document, and will display as a “V2-style attachment” when the field that references the attachment is not displayed. That is, the attachment will show up below a horizontal line at the bottom of the document. That display can be controlled by a special field called V2AttachmentOptions – search the forum for more information on how to use the field.