FieldOption isDisabledField

This option has no effect when it is explicitly defined for any field. The option is implicitly defined for any fields of a data element with the name “disabled”.

Disabled field

A disabled field must be defined as type “String”. When a data element has a field with the name “disabled”, the display and deletion behavior of that data element is affected.

By default all entries of the data element will be given the string value “no” for the disabled field upon creation. When the entry is deleted, rather than being removed from the database, the property of disabled will be set to the string value “yes”. Any entry for which the disabled property is not set to “no”, will not be included in any listings or searches by default. This effectively hides it from the user, but retains the data.

Disabled entries can be shown when a search query is executed which specifically includes “Disabled” as a parameter. A query such as this can be defined by adding finders, such as an auto-generated finder named “findByDisabledEq”.