Let's say I have a bunch of postcodes. After making a selection and having the records highlighted in the attribute table, how to update all of them and give them the same category?

In ArcGIS, after having the features selected, you simply had to use field editor and say for example: name = asd.

In QGIS that doesn't work. How to do it in QGIS?

2 Answers 2

  1. make sure the layer is in edit mode (otherwise changes will not happen)
  2. Select features to change (however you like)
  3. then open attribute table
  4. select the attribute to change
  5. type in what you want it to be (anything you like) - if it is a string then enclose it in '
  6. hit the update selected button (be careful here as it is right next to the update all button)
  7. Save your changes and exit edit mode.

enter image description here

  • Damn I tried that so many times but forgot the '. thanks
    – Luffydude
    Jul 5, 2016 at 16:16

In Field Calculator, you have a check box 'update only selected feature' in top left corner.

qgis field calculator

  • Okay but how do you actually update it??? 'fieldname' = NEWVALUE apparently isn't the way to do it. Feb 26, 2022 at 4:06
  • ”fieldname”= is what is assumed after you select the field from the update field dropdown. So all you need is to add is what you want the new value to be with single quotes.
    – Baswein
    Feb 27, 2022 at 13:07
  • @ThesaurusRex the field is selected in the selector underneath the checkBox 'update existing field'. In my exemple the field name is ORIGINE. just set newValue you want in expression
    – j666
    Feb 27, 2022 at 17:16
  • 1
    If you are familiar with PostgreSQL's philosophy about data formatting it helps a lot. For instance, strings are enclosed with single quotes ' and double quotes " are reserved for field names that are not in standard format (i.e. which aren't all in small case letters). Coming from a language such as R that doesn't differentiate between single or double quotes, you get easily confused. Nov 15, 2022 at 7:44

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.