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
Given a point layer with an attribute name and an attribute time.
Configure the default value for the field name using the expression below. Disable (or enable) apply on update.
Expected behavior: when I add a point on top of an existing one, it will copy the name and I'm able to fine tune the fields.
Observed behavior: when I add a point on top of an existing one, it will copy the name but as soon as I edit the time, the field name is cleared.
This issue is composed of a couple of interleaved issues:
The variable @snapping_result is only populated to pre-evaluate default values before they are sent to the attribute form. If the attribute form later on updates / recalculates default values, map tool capture expression scope is lost.
The functionality to update depending fields as they are filled. This functionality is expected only to work when "apply on update" is toggled (at least that's what the warning on the layer properties -> attribute form dialog suggests). This functionality is still enabled also when apply on update is disabled.
Bonus issue: the dependencies on the layer are calculated based on the required fields. The expression function attribute() propagates that it depends on all fields. So if any other field changes, this field will depend on it and be recalculated.
m-kuhn
added a commit
to m-kuhn/QGIS
that referenced
this issue
Jun 23, 2020
Given a point layer with an attribute
name
and an attributetime
.Configure the default value for the field
name
using the expression below. Disable (or enable) apply on update.Expected behavior: when I add a point on top of an existing one, it will copy the name and I'm able to fine tune the fields.
Observed behavior: when I add a point on top of an existing one, it will copy the name but as soon as I edit the time, the field
name
is cleared.The text was updated successfully, but these errors were encountered: