Data properties
Table of contents
A data field of a model may have the following properties:
- Required
- field is required
- Unique
- field must be unique
- Label field
- field is used as the label of the data record
- Sortable
- field can be sorted in a list view
- Searchable
- field can be searched in a list view
- Protected
- field can not be modified by an app user by default
Identity field
Every data record will be given a system ID when stored in the database. The system ID is also used as the default identity of the record. But you can also use another field for the default identity by defining the field as a identity field. Only one field of a modal can be defined as an identity field.
Example - The link of an issue shows the system ID, while the link of a member shows the name of the member:
Sortable
List items are sorted by the created time by default. You can define your sort field or add more sort options..
Searchable
List items are searchable by text. You can add text fields to the search index by using the searchable property.
Protected
Protected fields are read-only fields for users by default. If you want a protected field to be editable on certain pages, you can overwrite the default in the access setttings of the page.
Example: We have many posts and we want to hide some of them on the public list. But users should not hide posts themselves. Instead, only administrators are allowed to do this. In this case, we can define a protected field “state” and make it accessible only to the administrator.