3

I want to add a new field named 'TEST' to an existing attribute table (SHP) using Refactor Fields, but when I want to save as new shape, it says:

Evaluation error in expression ""test"": Column 'test' not found

Of course it's not found, since I want to add it as a new field!

Anyone a clue?

It happens both with versions 2.14 as with 2.18

3

The Refactor Fields tool is useful for reordering the fields that you have already created.

For solving your issue, I think you should use the Add field to attributes table algorithm, available from the Processing Toolbox:

enter image description here

  • 1
    Thanks a lot! But then the "add field" button in Refactor Fields should be removed I guess to make things clear. Thanks again! – Rob Apr 29 '17 at 18:16
  • If I want to add 20 new fields, do you know whether I have to "save as" the attribute table 20 times too? – Rob Apr 29 '17 at 18:18
  • @Rob I'm glad it was helpful! If you want to 20 new fields, why don't you do it directly from the Attribute Table? Or are you working with a python code? – mgri Apr 29 '17 at 18:32
  • 1
    Yes, thanks! That's what I will do; the reloading takes so much each time in between though. Thanks again! – Rob Apr 30 '17 at 10:11
2

You could just add new columns by opening the attribute table in edit mode and use the 'Add new field' icon (or just Ctrl+W)

enter image description here

Then use the Refactor fields to reorder them as you want.

I have also found the Refactor fields not to work for adding a field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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