The original version of this document is located at https://docs.qfield.org/how-to/advanced-how-tos/variables
QField supports creating and editing QGIS expression variables.
Variables can be used for data-defined symbology, default attribute values, print layout controls, dynamic feature labels, and application behavior settings.
Read more in the QGIS Variables Documentation.
QField supports two types of custom variables:
.qgs or .qgz).Project variables are defined and managed inside QGIS project properties on your desktop computer.
Project variables store custom values relevant to specific projects.
QField users can edit project variables on mobile devices, and modified values persist across app sessions.
QField includes pre-configured, read-only system variables accessible under Side Dashboard > Settings > Variables.
Custom global variables can be added or modified in QField and remain available across all local projects on the device.
Note
Read-only system variables vary depending on device platforms and hardware specs.
These reflect the global variables available in the QGIS release used to build the installed QField version.
Manage variables on your mobile device to share custom values across all QField projects.
Access the variables list under Side Dashboard > Settings > Variables for a consolidated view of all available variables.
📱 Fieldwork
Workflow
Common expression variables used in field workflows include:
@cloud_username: Captures the username of the active QFieldCloud account.@qgis_locale: Retrieves the current system language code set in QField or QGIS.Tip
If you do not use QFieldCloud, create a custom global variable (such as @user_id or @field_worker) on each device to record user identifiers in feature attribute forms.
