I am manually selecting vector features (points from a Spatialite db) in a QGIS project, and then setting values manually for all the selected features using the Field Calculator button. This takes a lot of clicks, entering a value in the expression box and selecting the correct field (out of dozens) from the 'update existing field' option.

2016-09-26 edit: The point layer is > 100,000 rows, so using the attribute table takes a considerable amount of time.

Is there a quicker way to do this, perhaps a one-line Python command from the Python console?

1 Answer 1


Two (better) workflows jump to mind. For both, first select the features and then make the layer editable. Then, either:

  1. From the "edit" menu select "modify attributes of selected features" (requires 2.16 or above). This will let you quickly modify the attributes of all selected features at once.

  2. Open the attribute table. You'll see a bar sitting under the toolbar buttons which allows you to select a destination field and enter a value. Then click the 'update selected' button to the right of this bar.

  • 2.16 ... looks like we Mac users just got the installer, will try (1) out now. (2) is a workflow I've used, but with > 100,000 rows was getting very slow to open the entire attribute table (will update original post on this).
    – Simbamangu
    Sep 26, 2016 at 6:09
  • The new menu item is a good, fast way - especially if tied to a key, considerably reduces the amount of clicking involved.
    – Simbamangu
    Sep 26, 2016 at 16:09

Your Answer

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

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