IBM Support

Unexpected behavior with hidden Notes Rich Text Fields

Technote (FAQ)


When a database uses the paragraph hiding properties to hide a Rich Text field (RTF) on a Lotus Notes form, it does not work as expected. You may see the following problems:

- When you change the field's hide properties in the form design, previously created documents still use the old hide formula.

- If text is pasted in from another application, the Rich Text field's hide properties apply only to the first paragraph of the pasted text.

- If @DbLookup is used in the Rich Text field's default formula to copy text from another document, the text being looked up copies its original hide properties instead of using the hide properties on the form.

- Users can use the Text Properties box (InfoBox) to override the hide properties for the field, making text display in circumstances when the application designer didn't intend it to.


Notes is working as designed. Each paragraph of rich text has its own hide properties. Like the font, color, indentation, etc., attributes, when you copy paragraphs of rich text, you also copy the hide properties of that paragraph. Using the Text Properties box, each paragraph's hide properties can be individually set.

The following may be used to ensure that a Rich Text field's entire contents are hidden:

1. Computed Subform
The easiest way to hide a Rich Text field is to place it on a subform, then use a Computed Subform formula to include or not include the subform based on whether the hiding conditions are met.

For instance, let's say the hide formula you would like to use is DocStatus = "Draft". Create the subform, place the Rich Text field on it, and select a name for the subform (in this example, call it HiddenRTF). On the form, where you want the RTF to appear, select Create, Subform and select the 'Insert Subform Based on Formula' checkbox.

The formula you use should return the value "" if you want the Rich Text field hidden, or the name of the subform if you want the Rich Text field visible. So in this case, you would use the formula @If(DocStatus = "Draft"; ""; "HiddenRTF").

The main advantage of this approach is that it's simple to implement. The disadvantages are:
  • The computed subform formula is evaluated only when the document is opened. In this example, if you change the DocStatus field and press F9 to refresh the form, the RTF will not be hidden or displayed according to the new value. You have to close and reopen the document.
  • If there are file attachments in the RTF, Notes will display the file attachments even if the RTF is not displayed. To overcome this for web applications, refer to the document "How to Hide Attachments from Web Clients" (#1085155).

2. Controlled Access Section
Here are the steps for hiding a RTF using a Controlled Access section:

1. Open the form in Domino Designer. Highlight the RTF and any other paragraphs you want to hide along with it.
2. From the menu select Create, Section, Controlled Access.
3. Use the Form Section properties box to set the section properties as shown below. In this example, you are hiding the RTF if DocStatus = "Draft".
  • Set the section to be collapsed in all modes for non-editors. When the section is collapsed, nothing inside it is visible.
  • Set it to be expanded in all modes for editors. If modal sensitivity is needed (for example, if the field should be hidden only in edit mode) this can be accomplished using the modal expand/collapse settings. This example hides the RTF based on the DocStatus only, regardless of mode.
  • Set the section access formula to 'Computed for Display', and write a formula that returns @UserName or "" if you want the RTF to not be hidden. To hide the RTF, the formula should return a nonexistent name (for example, "-nobody-"). Since the formula is 'Computed for Display', it is recalculated for each different user when they open the document. If you want to hide based on group or role membership, your formula can just name the group(s) or role(s). For example, "[WFEditors]" is the formula you'd use to hide the section from everyone except members of the WFEditors role.
  • In the hide properties of the section, check/select boxes to hide the section always. The section hide properties actually affect only the section header line. The contents of the section are visible if the section is expanded, even if the header line is hidden. With the header hidden, the user can't open or close the section manually, so their editor/non-editor status will determine whether they can see the contents. Note: Be aware of that under specific conditions section contents may not be present as expected.

Hide formulas in the rich text can further hide information, but they can't reveal information that the section access formula says should be hidden. The main advantage of this approach is that it also hides file attachments in the RTF when using either the Notes client or a web browser.

  • When using a local replica, this technique will not work unless the "Enforce a Consistent Access Control List Across All Replicas of this Database" checkbox is selected on the Advanced pane of the database's Access Control List (ACL) dialog.
  • The section editor formula is evaluated only when the document is opened; this means a "refresh" or F9 will not re-evaluate the hiding criteria and change whether the RTF is hidden. You must close and reopen the document.

Supporting Information:

Keep in mind that hiding fields (whether or not they are rich text) is not a security feature. Users can still use the Document Properties box to view the text in the field. To prevent this, you can either encrypt the field, or use a "hidden design", which prevents users from seeing any field information in the properties box.

Related information

How to Hide Attachments from Web Clients
Hide When Formula on Rich Text Field Causes Replication
'Hide When' Formula Hides Only Up to First Carriage Ret

    Cross reference information
    Segment Product Component Platform Version Edition
    Messaging Applications IBM Notes 8.5, 8.0, 7.0, 6.5, 6.0

Document information

More support for: IBM Domino Designer

Software version: 7.0, 8.0, 8.5

Operating system(s): Windows

Reference #: 1099682

Modified date: 19 August 2006