You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QField allows user to add and edit expression variables.
8
+
QField allows users to add and edit expression variables.
9
9
These can be used for a wide range of applications, including data-defined symbology, setting default field values, controlling print layout and application behavior, and much more.
10
-
See [the relevant QGIS documentation](https://docs.qgis.org/3.40/en/docs/user_manual/introduction/general_tools.html#storing-values-in-variables) for more information.
10
+
See [the relevant QGIS documentation](https://docs.qgis.org/latest/en/docs/user_manual/introduction/general_tools.html#storing-values-in-variables) for more information.
11
11
12
-
QField supports two main types of variables:
12
+
QField supports two main types of custom variables:
13
13
14
14
-**Project Variables:** Project-bound variables defined within the project file.
15
-
-**Global Variables:** Application-wide global variables with a set of read-only variables matching those found in QGIS.
15
+
-**Global Variables:** Application-wide global variables with a set of read-only variables.
16
+
17
+
16
18
17
19
## Project Variables
18
20
19
-
Project variables are defined and managed directly within your QGIS project.
21
+
Project variables are defined and managed directly within the QGIS project on your desktop.
20
22
They allow you to add custom variables that are only relevant in the context of a specific project.
21
23
QField users can edit those variables, with modified values remembered across sessions.
22
24
23
25
## Global Variables
24
26
25
-
New global variables can be added or modified once and will be injected into all projects opened in QField across sessions.
26
-
Global variables can be used to add a unique identifier across a fleet of QField devices for example, or determine the language for a given QField user.
27
-
Since they are not bound to specific projects and are defined locally, they make for a great way to customize experience for multiple users sharing the same projects.
27
+
QField comes pre-configured with some read-only global variables which are visible in *Settings > Variables*.
28
+
New variables can be added or modified and will be available in QField across sessions.
29
+
30
+
!!! Information
31
+
The read-only variables differ from device to device. These reflect the global variables from the specific QGIS version that was being used to develop the installed version of QField.
28
32
29
33
## Variable Management in QField
30
34
31
35
Variables are managed directly on your device and are accessible in all available QField projects.
32
-
When you access the variables list in QField ( Settings > Variables ), you will find a consolidated and organized view of all available variables.
36
+
When you access the variables list in QField ( *Settings > Variables* ), you will find a consolidated and organized view of all available variables.
33
37
34
38
### Variable configuration
35
39
36
40
:material-tablet: Fieldwork
37
41
38
-
To configure a device-specific variable, follow these steps:
42
+
To configure a application-specific variable, follow these steps:
39
43
40
44
1. Open **Settings** in QField.
41
45
2. Navigate to the **Variables** tab.
@@ -44,7 +48,19 @@ Here you will see a list of all variables currently applicable to your project.
44
48
To add a new variable:
45
49
46
50
1. Click on *Add a new variable* at the bottom of the variable list.
47
-
2. Enter the name and value for your new variable.
51
+
2. Enter the name and value for your new variable and save.
52
+
53
+
### Useful Examples
54
+
55
+
Common variables to use are:
56
+
57
+
-**@cloud_username** to incorporate the details of the individual users in a project.
58
+
59
+
**Note**: If you are not using QFieldCloud you can add a unique identifier instead.
60
+
61
+
-**@qgis_locale** to use the currently set language of QGIS/QField.
62
+
63
+
Since the application-wide variables are not bound to specific projects and are defined locally, they are a great way to optimize the fieldwork experience for multiple users sharing the same projects.
48
64
49
65
!
0 commit comments