Bug report #20005

Fields to copy in 'Join attributes by field value' in processing modeler only works with one field

Added by Max Stephan about 4 years ago. Updated about 4 years ago.

Affected QGIS version:3.2.3 Regression?:No
Operating System:MacOS High Sierra Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:Yes Copied to github as #:27827


What I am trying?
  • Join two layers and copy only certain fields from layer 2
  • I am doing this in the processing modeler
  • I enter the field names in 'Layer 2 fields to copy', for example
    ['field1', 'field2']
Expected outcome
  • field1 and field2 are joined into layer 1
Actual outcome
  • No field from layer 2 is copied over
Assumptions where the error stems from
  • Every input into the field is treated as a string it seems. Looking at the log output from running the process I see for the algorithm that my input is transformed as follows:




'[\'field1\', \'field2\']'

I.e. it takes the whole entry as string and escapes the quotation marks. Not sure where things are going wrong. The algorithm works properly when just run on its own in the toolbox.


#1 Updated by Nyall Dawson about 4 years ago

  • Status changed from Open to Feedback

Try with a ; delimited list, no start our end brackets.



#2 Updated by David Todd about 4 years ago

Just tested the suggestion from Nyall and it functions as it should when using a


Would adding that piece of information to the doc here: https://github.com/qgis/QGIS-Documentation/blob/master/source/docs/user_manual/processing_algs/qgis/vectorgeneral.rst#join-attributes-by-field-value be appropriate?

#4 Updated by Nyall Dawson about 4 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Note that I also intend to add this in a Tokyo you on the setting, but for boring technical reasons this has to wait until 3.6

Also available in: Atom PDF