Live default value

Live default value

The original version of this document is located at https://docs.qfield.org/how-to/advanced-how-tos/live-default-value

Live Default Values

QField supports live updating of default attribute values when editing features.
Modifying one attribute value automatically updates dependent attribute fields configured with dynamic default expressions.
For example, selecting a scientific species name can automatically populate a common species name or retrieve a corresponding image.

Configuring Live Default Values

🖥️ Desktop preparation

Configure live default values in QGIS layer properties by combining default value expressions with the Apply default value on update setting.

Workflow

  1. In QGIS, navigate to Vector Layer Properties… > Attribute Form.
  2. Select the target field that should update automatically (such as photos).
  3. Enter your dynamic expression in the Default value field.
  4. Enable Apply default value on update.
    Live default value image configuration
  5. Select the triggering attribute field (such as plant_species) configured with a Value Relation or Value Map widget.
  6. Configure the widget properties and default expressions as needed.
    Live default value relation configuration
  7. Click OK and save your project.

Usage Example

📱 Fieldwork

When editing feature attributes in QField, changing a value in a parent field immediately re-evaluates expressions and updates dependent default fields in real time.