Outdated documentation

The latest documentation was moved to docs.qfield.org

Attribute Form Configuration

QField erzeugt Formulare ähnlich wie, aber nicht komplett gleich wie QGIS

Suppress Attribute Form

The setting „suppress attribute form“ is directly applied to the QField form.

Feldwidget

Die Feldwidgets von QGIS werden nach besten Möglichkeiten unterstützt

Widget type Unterstützung Notiz
Text Edit
  • HTML wird nicht unterstützt
  • Numerische Eingabe wird automatisch eingeschaltet, wenn der Feldtyp dies erfordert
Kontrollkästchen  
Werteabbildung  
Versteckt  
Attachment This field is combined with camera integration. It is also able to open other files like pdf and doc (if the user has an appropriate viewer) Attachment (photo settings)
Datum Zeit  
Beziehungen  
Relation Widget  
Value Relation  
Andere Finanzierung

Relation Widget

For more information refer to the relations chapter of the official QGIS Documentation.

../_images/relation_editor_widget_list.png

The relation widget shows all the referencing child features in a list. It is possible to add, delete and open them.

The visual identification of the list entries are done via the „Display Expression“ of the child layer.

Key handling

Since the parents primary keys are used as foreign keys on the referencing child features, these primary keys must be save to use even after the synchronization back to the original data. Therefore we recommend to use stable values such as UUIDs for primary keys.

It is possible to already add children from a parent that is about to be added. This possibility will be blocked if there is no valid primary key on the parent or the constraints are violated. In case the adding of the parent feature is canceled after some children have been added already, the children are deleted as well.

Many-To-Many relations

On many-to-many relationships, according to the cardinality setting in the QGIS Vector Layer Properties, on adding, deleting or opening an entry in the list effects directly the child layer (on direct cardinality) or the linking table (on many-to-one cardinality).

The second case is usually used when there are additional relation information (e.g. percentage) in the linking table.

../_images/relation_widget_cardinality.png

In case of the many-to-one cardinality on many-to-many relations the Display Expression needs to be set on the linking table.

Attachment (photo settings)

The widget type „Attachment“ is used with fields that store the path to files.

It can be used to:

  • show and take photos
  • show links to external files like pdfs or documents
Attachement field settings

The path should be set to relative. The pictures, pdf and docs are stored then in a sub-directory of the project, where the link stored in the textfield is pointing to.

In QField the picture is displayed. By clicking the camera symbol the camera is started to update the picture with a new photo.

Picture in QField

On synchronization the sub-directory with the pictures, pdf and docs has to be copied as well.

The option „hyperlink“ on the attachment widget will disable the camera functionality and enable a hyperlink to open a document (pdf, doc, …).

hyperlink_option

Value Relation

The widget „Value Relation“ offers values from a related table in a combobox. You can select layer, key column and value column. Several options are available to change the standard behaviors: allow null value, order by value and allow multiple selections. The widget will display a drop-down or multiple-select list of the referenced features.

value_relation_widget

Drag and Drop Designer Formulare

Gruppen und Reiter von Drag and Drop Designer Formularen werden unterstützt.

Bedingte Sichtbarkeit

Gruppen können dynamisch versteckt und angezeigt werden. Dies ist oft nützlich wenn einige Attribute nur unter bestimmten Bedingungen benötigt werden. Ein Beispiel ist die Kartierung von Bäumen. Einige können eine Krankheit haben, die genauer definiert werden kann. Damit das Formular übersichtlich bleibt, kann eine neue Gruppe mit den Feldern, die die Krankheit genauer definieren erstellt werden. Auf dieser Gruppe kann nun ein Sichtbarkeitsausdruck konfiguriert werden, der auf einem separaten Feld „Krankeit“ mit einem Kreuzkästchen basiert. Nur wenn dieses angekreuzt ist, stehen die zusätzlichen Felder zur Verfügung.

Conditional visibility configuration

Konfiguration einer Widget-Gruppe, die nur sichtbar ist, wenn das Auswahl-Kästchen „measure_taken“ angekreut ist.

Let’s see what we got on the field:

Bedingungen

Attributfelder können Bedingungen haben. Bedingungen sind Ausdrücke, die entweder zu True (oder 1) aufgelöst werden müssen, damit das Formular gespeichert werden kann. Bedingungen werden auf Feldebene konfiguriert und eine Beschreibung kann hinzugefügt werden, die dem Nutzer angezeigt wird, wenn eine Bedingung nicht erfüllt ist.

Constraint configuration

Konfiguration einer Bedingung innerhalb eines Bereichs.

Übliche Anwendungsfälle

Es kann keine Höhe eingegeben werden, die höher ist als der höchste Berg in diesem Land.

"elevation" < 5000

Es ist nötig, eine Bezeichnung einzugeben.

"identifier" IS NOT NULL

Standardwerte

Felder können Standardwerte haben. Standardwerte werden automatisch in das Formular eingefügt, wenn ein neues Objekt erzeugt wird. Sie sind für den Nutzer sichtbar und können bearbeitet werden, sofern das Feld editierbar ist. Sie können auch auf der Geometrie oder Ausdrucksvariablen basieren.

Default value configuration

Konfiguration eines formattierten Datums als Standardwert.

Zusätzliche Variablen

For more information regarding storing information related to your position in object attributes, refer to the deticated GNSS documentation.

Übliche Anwendungsfälle

Positionsinformationen als Variable einbinden:

@position_horizontal_accuracy

Aktuelles Datum und Zeit einfüllen.

now()

Die Länge der digitalisierten Linie einfügen:

length($geometry)

Globale Variablen auf dem Gerät konfigurieren und verwenden.

@operator_name

Falls ein neues Objekt ein Code entsprechend der Region, in der es digitalisiert wurde erhalten soll, kann dies mit einem aggregierten Ausdruck gemacht werden:

aggregate( layer:='regions', aggregate:='max', expression:="code", filter:=intersects( $geometry, geometry( @parent ) ) )

To transform the coordinates received from @position_coordinate to the coordinate system of your project:

x(transform(@position_coordinate, 'EPSG:4326', @project_crs ))
y(transform(@position_coordinate, 'EPSG:4326', @project_crs ))

If you want to use the snapping results after drawing a line, you can use the @snapping_results variable. The following code extracts the value of the attribute id of the snapping match of the first point of a line.

with_variable(
  'first_snapped_point',
  array_first( @snapping_results ),
  attribute(
    get_feature_by_id(
      @first_snapped_point['layer'],
      @first_snapped_point['feature_id']
    ),
    'id'
  )

)

Editierbar

Das Flag für Editierbarkeit eines Felds wird berücksichtigt

Letzte Werte erinnern

QField bietet eine viel finkörnigere Kontrolle über das Erinnern von Attributen als QGIS und ignoriert die entsprechende QGIS Einstellung.

Auto-complete value

The “Use completer” checkbox must be checked to be able to use the auto-complete in the value relation.

../_images/autocomplet_form.png

Here a video showing how it works on QField Search in value list.