2

I am trying to use the graphical modeler to delete multiple fields in QGIS 3.10.14.

enter image description here

When i try to use the Drop Fields algorithm to delete multiple fields from the required layer, it deletes only the first field and not all the specified fields. enter image description here

From the console result it states that the other fields not deleted don't exist.

enter image description here

I tried using different delimiters to separate each value i.e. comma, semicolon. It did not work either.

However if I run the Drop Fields multiple times, it removes all field in each of the operations.

enter image description here

So will it be possible to delete the fields in one operation?

3
  • 2
    Does the semicolon without spaces work as here gis.stackexchange.com/questions/303760/…?
    – user30184
    Commented Mar 18, 2021 at 10:57
  • @user30184 Just tried your suggestion and that solves it.
    – mapperx
    Commented Mar 18, 2021 at 11:05
  • 1
    @BERA I was using Refactor fields previously to manually to remove the unwanted columns. I have been able to get it to work based on the suggestion of user30184
    – mapperx
    Commented Mar 18, 2021 at 11:25

2 Answers 2

1

Based on the suggestion (solution) from @user30184, removing the spaces between the field names i.e. offset;instance;cat

enter image description here

and not offset; instance; cat

enter image description here

solves the problem. As such it produces the result I wanted.

enter image description here

0

In Processing Toolbox, for "Fields to drop" choose "Pre-Calculated Value" and enter field names without spaces, semicolon delimited, all enclosed in single quotes

QGIS Drop field(2) GUI

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.