Bug report #18166

QGIS virtual field calculations fail for selected features

Added by Sini Pöytäniemi about 5 years ago. Updated about 5 years ago.

Category:Field calculator
Affected QGIS version:2.18.16 Regression?:No
Operating System:Windows 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:26057


I have tried using the virtual field option in Field calculator.

On the top of the Field calculator window it says "Only update 2143 selected features", however, this feature doesn't work as expected, but the given value will be given to all features, including those that were not selected.

I am using data from PostGIS.

fieldcalc2.JPG (14.5 KB) Sini Pöytäniemi, 2018-02-21 03:50 PM

fieldcalc.JPG (33 KB) Sini Pöytäniemi, 2018-02-21 03:50 PM


#1 Updated by Nyall Dawson about 5 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

Virtual fields can't be applied only to selections - They are a brand new field, present for every feature in the layer (and for any newly added features too).

Also available in: Atom PDF