3

I use Qgis 2.18.3 and tried to set default values in new column in a existing shapefile via the layer properties as described here: Setting a default value in a QGIS field or here How to set a default value for attributes in shapefiles?.

But fields are not populated, tried several field combinations: text, real, integer but always no result. Tried some combinations with editing layer/not editing layer. Is there kowen issue or bug with this function? Do I miss an crucial step?

2
  • 1
    You have set a default value for new features. What you want to do is to update all existing features.
    – user30184
    Commented Jan 24, 2017 at 11:35
  • 1
    The reason was explained by @user30184. Going into edit mode by pressing "toggle editing" and start adding features, let's say add points on Points layer, you will immediately notice these new records are populated by your default value.
    – Kazuhito
    Commented Jan 24, 2017 at 11:44

1 Answer 1

5

As the comments suggest, this only applies to new features. If you want the default value to be applied to existing features, toggle editing on the layer and then use the field calculator (ctrl+i) to populate the column with the desired values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.