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

asked Apr 29, 2017 at 17:25

2 Answers 2

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

answered Apr 29, 2017 at 17:53
4
  • 1
    Thanks a lot! But then the "add field" button in Refactor Fields should be removed I guess to make things clear. Thanks again! Commented Apr 29, 2017 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? Commented Apr 29, 2017 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? Commented Apr 29, 2017 at 18:32
  • 1
    Yes, thanks! That's what I will do; the reloading takes so much each time in between though. Thanks again! Commented Apr 30, 2017 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.

answered Apr 29, 2017 at 20:57
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.