If we configure a field of a dataset as “Display field” in the Form Editor, the stored content of it will be used for:
- Searching for records in the mobile application when using the “Copy from…” tool.
- The displayed values in the related table column of the child dataset.
The Display Field will be the "key" content to identify/display the records.
Display field when using the "Copy from ..." tool
In this dataset called "vegetacion" (vegetation), we select as "Display Field" the "ogc_fid" field that contains numerical and sequential values of each record.
Display Field ogc_fid
Notice that using the “Copy from…” tool will show us the records using the values of the ogc_fid field:
Index of records showing ogc_fid
If we use the "n_especie" field that contains the scientific name of the species we will see a result like this:
Display Field n_especie
Index of records showing n_especie
Display Field shown in related tables:
When we configure "Display Field" to be used in related tables, we will find the values of the parent dataset in the children. For didactic purposes, we will use two datasets that represent part of the cadastral information of a district: "manzanas" (blocks) and "lotes" (parcels). The type of the relationship between them is one to many. This means that for each manzana (block) record, there is the possibility of containing several related lotes (parcel) records.
Keeping that in mind:
- manzana (block) is the parent dataset.
- lotes (parcel) is the child dataset.
- the related table field in lote (parcel) is "manzana_lotes"
The "amigo_id" values of manzana dataset have been configured as Display Field. This dataset is the parent of lotes dataset.
Display Field amigo_id
In the parent dataset viewer, we have chosen the manzana record with the "amigo_id": 'd07d9d4367aa4b729d8b33eea29fa995' and then explore their children by selecting “View related records” (View Related Records).
In this new view, if we look for that value in the search bar of lotes dataset, we will find all the related records to that parent record. The amigo_id values of manzana are shown in the related table fields "manzana_lotes".
Related lotes records and related table field "manzana_lotes" showing ‘amigo_id’ values of manzana
This is particularly useful if we want to find specific information about the parent dataset in the child dataset. For example, if we set values of the "area" of manzana as the display field:
Display field area
Now the values of the manzana_lote in the child dataset display manzana area values. This is the easiest way to compare the area of the parcel with the block to which they belong.