1

I want to add multiple fields to my layer using the QGIS graphic modeler. I am trying to do this with the field calculator, but I ́m unable to add all the fields to the same layer. I always end up with multiple layers that have only one of the new fields.

Is there a way to add all the fields (I need 8) to the same layer?

enter image description here

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Aug 28, 2023 at 7:13

2 Answers 2

4

Try Refactor fields. Make sure to include all existing fields (for example by pressing Load fields from template layer), then press Add new field, to add new fields

enter image description here

answered Aug 28, 2023 at 7:23
0
0

Although the question is a bit old, my answer may be helfpul to others.

Tested on QGIS 3.28.11.

You can skip the "load fields from template" or in other words, you can skip creating the template by using a cascade of "Add field to attributes table".

Important here is to set input layer as Using algorithm output starting from the second "Add field..." command

QGIS Model to add many fields

Using algorithm output

answered Feb 11 at 10:02

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.