Data properties
Table of contents
Beyond choosing a field’s data type, you can configure data properties to control validation rules, search behavior, display priority, and access restrictions for each field in your model:
- Required
- Field must be filled before saving a record
- Unique
- Value must be unique across all records in this model
- Identity field
- Field serves as the primary visual label representing the record
- Sortable
- Field can be used to order list views
- Searchable
- Field is indexed for full-text search in list views
- Protected
- Field is read-only for standard users and editable only by administrators
Required
Marking a field as Required enforces mandatory input validation. When a user submits a form, Doypp ensures that the field is not empty. If the user attempts to submit without completing a required field, the application blocks submission and highlights the missing field.
Unique
The Unique property prevents duplicate values across records in the same model. This is critical for fields that must uniquely identify an entity, such as an email address, employee ID, SKU number, or username. If a user attempts to enter a value that already exists in the database, the record cannot be saved until the conflict is resolved.
Identity field
Every data record receives an internal, system-generated unique ID when saved to the database. By default, this system ID is used as the record’s label.
However, you can designate any text field as the Identity field to give your records a human-readable title. This title will represent the record wherever it is referenced throughout your application—such as inside relationship dropdowns, breadcrumbs, search results, and child lists.
Only one field per model can be configured as the identity field.
Example: In an issue-tracking system, a task record displays its System ID, while a user record displays the Full Name of the member:
Sortable
By default, list views sort items in reverse chronological order based on their creation time (created_at).
Enabling the Sortable property on a field allows the list to be reordered by that attribute (e.g., sorting apartments by price, tasks by due_date, or articles by title). In the list view settings, you can define a custom default sort field or enable user-facing sorting so your app users can toggle the sort order themselves.
Searchable
Enabling Searchable adds the field to the model’s full-text search index. When users type a query into the search bar of a list view, Doypp filters records by matching keywords across all searchable fields.
You can configure multiple text fields as searchable on a single model (such as searching a post by both its title and content).
Protected
Protected fields are read-only for standard app users by default. They can only be modified by administrators, preventing unauthorized changes to sensitive operational data.
If you need a protected field to be editable by specific roles or on dedicated admin pages, you can selectively override this default in the page’s Access Control settings.
Example: In a community forum, users can write and edit their post content, but should not be allowed to change its moderation status. By defining state (e.g., Published, Flagged, Archived) as a protected field, only administrators or moderators can alter the publication status.
Related Topics
- Define model attributes in Data Fields.
- Connect models together in Data Relationships.
- Learn how permissions interact with protected fields in Access Control.