I use the z(gnss_coordinate) and gnss_horizontal_accuracy expressions as a default value in my qfield forms to track the altitude and horizontal accuracy of my entries, with “apply default value on update” activated. When creating a new point or moving a point in a point-layer the fields are auto-populated with the given values of the sensor and saved. When I then click the feature again to edit the form, upon saving (no matter if I enter sthg new or not) the “gnss” values disappear. I just cannot figure out how to get around this.
My Qfield Version is : 3.5.5
QGIS Version 3.40.5
Any help would be greatly appreciated
J
Imported from GitHub discussion by @JP-vie on 2025-05-19T14:01:07Z
JP-vie , simply uncheck the apply default value on update checkbox. After a feature was created, there is no additional awareness of the GNSS position, hence why the variables are null, and why you end up with values “disappearing”.
Imported from GitHub comment by @nirvn on 2025-05-20T01:56:50Z
Thank you nirvn for the answer it inspired me for a different solution. If I only uncheck “apply defaullt value on update” the fields would not be updated when moving the points.
The solution which seems to work now is to use as a default value for the field “horizontal_accuracy”:
If(gnss_horizontal_accuracy IS NOT NULL, gnss_horizontal_accuracy, “horizontal_accuracy”)
This updates the gnss positions on creation and change of geometry but does not change the field value when only the form is updated and the gnss expression value is NULL.
Imported from GitHub comment by @JP-vie on 2025-05-20T08:07:29Z