Display Rules

A display rule shows a field on the record form only when other fields on the same form meet the conditions you set. This page covers the conditions, how to combine them, and what happens to the values of hidden fields.

What Are Display Rules?

A field with a display rule appears on the record form only while its conditions are true. For example, show "Determined By" only when "Date Determined" is not empty. Date Determined is the rule's Control Field: the field whose value decides whether the other one is shown. The form re-checks the rule as people fill it in, so the field appears and disappears immediately. A field without a display rule is always shown. A field hidden by its display rule affects saved data: - When a record is created, values in hidden fields aren't saved. - When an existing record is saved, a value already stored in a field that is now hidden is deleted. - A Required field is only required while it's shown. Saving a display rule doesn't change any values, and Cnidarity doesn't warn you or count the records affected. Values are deleted one record at a time, when each record is saved while the field is hidden. Before adding a rule to a field that already has values, filter the records table on the Control Field to see which records would hide it (Finding and Filtering). Only display rules delete values this way. A field that Access Restriction makes Readonly or Hidden for members keeps its value when a member saves (Roles and Permissions). One exception: when a member saves, a Control Field that is Readonly or Hidden for them counts as empty. If that makes the rule hide a field, its value is deleted. Avoid using a restricted field as a Control Field. Display rules are available on every tier.

Configuring a Display Rule

Open the field that should appear conditionally and go to its Display Rules section. 1. Click Add Display Condition. 2. Pick the Control Field. Any other field of the same data model can be used, including fields in groups. Relationships and their Additional Fields can't. 3. Pick a Condition (listed in the next section) and, if it needs one, enter a Value. 4. Add more conditions or groups if needed, then click Update Field.
display-rule-builder-step2The display rule builder with Control Field set to Date Determined and Condition set to Is Not Empty

A one-condition rule: show this field when Date Determined is not empty.

Condition Types

The conditions offered depend on the type of the Control Field. Any type: - Is Empty, Is Not Empty Every type except Multiple Choice with Multiple Selections: - Equals, Doesn't Equal, Starts With, Ends With Short Text and Long Text also: - Contains, Doesn't Contain Short Text, Number, and single-selection Multiple Choice also: - Less Than, Less Than or Equal To, Greater Than, Greater Than or Equal To Multiple Choice with Multiple Selections: - Selected Options Include, Selected Options Don't Include - Any Selection Starts With, Any Selection Ends With, Any Selection Contains, No Selections Contain - Number of Selections compared with >, ≥, <, ≤, =, or ≠ Is Empty and Is Not Empty don't take a value. All other conditions compare with the Value you type. For a Yes/No Control Field, type 1 for yes and 0 for no, whatever labels the field shows. With labels Present/Absent, "Equals 1" matches Present, and "Equals Present" never matches.

AND / OR Logic

A rule can have several conditions, joined by AND (all must be true) or OR (any one is enough). For logic like "A, or both B and C," use Group with New Condition to make a nested group with its own AND or OR. Groups can be nested two levels deep, with up to 4 conditions in each group.
display-rule-multi-conditionThe display rule builder with two conditions joined by OR: Preparations starts with HERB, or Catalog Number is not empty

Two conditions joined by OR. Either one shows the field.

Testing Display Rules

Check a rule with Show Form Preview on the field's edit page. Change the Control Field's value in the preview and confirm the field appears and disappears as expected. Values typed into the preview aren't saved (Form Preview).
display-rule-preview-hiddenThe form preview with Date Determined empty and no Determined By field

Date Determined is empty, so Determined By is hidden.

display-rule-preview-shownThe form preview with Date Determined filled in and the Determined By field now visible below it

Once Date Determined has a value, Determined By appears.