enableIf, conditional enable/disable

Grey out a field unless an expression returns true. The field stays visible, just locked from editing.

The enableIf rule disables a field unless an expression returns true. Differs from visibleIf in one important way: the field stays visible, just locked from editing. Use it when the user benefits from seeing the field (knowing it exists, planning ahead) but shouldn't be able to change it yet.

The shape

Inline in the designer property panel

{TermsAccepted} == true

Combine conditions

{Status} != "Closed" and {AssignedTo} == [Me:Email]

enableIf vs the static locks

enableIf is the conditional way to lock a field. The others are static, and the runtime renders them differently, so the choice is not just a matter of taste:

PropertyDescription
enableIf
expression
Write the expression for when the field should be editable; while it is false the field is locked. The real control stays on the page, greyed, and becomes editable again the instant the expression turns true.
readOnly
boolean
A permanent lock. The control is replaced by a read-only value display rather than a greyed input, because nothing on the form can unlock it.
readOnlyOnNew / readOnlyOnEdit
boolean
The same permanent lock, limited to one form mode. Use these for "set once at creation" values instead of writing a mode test into the expression.

There is no readOnlyIf. For a "lock it once X has happened" rule, write the enableIf the other way round: {Status} != "Approved" rather than a lock rule for {Status} == "Approved". See the

read-only reference for all six sources of read-only state and how each one renders.

Limiting which form mode the rule applies to

Same shape as visibleIf, the Rules panel under the rule builder exposes three checkboxes (New form / Edit form /

Display form) that restrict where the rule is evaluated. All three checked = applies everywhere (default). Uncheck a mode to make the rule inert there. Persists as data-f365-enable-if-modes CSV; the attribute is dropped when all three are selected. (Note: the whole form is read-only on Display regardless, so including Display in this list is harmless but academic.)

Related articles