Bug report #20005
Fields to copy in 'Join attributes by field value' in processing modeler only works with one field
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/Modeller | ||
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 |
Description
- 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']
- field1 and field2 are joined into layer 1
- No field from layer 2 is copied over
- 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:
Input:
['field1','field2']
Output:
'[\'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.
History
#1 Updated by Nyall Dawson about 6 years ago
- Status changed from Open to Feedback
Try with a ; delimited list, no start our end brackets.
Eg
Field1;field2
#2 Updated by David Todd almost 6 years ago
Just tested the suggestion from Nyall and it functions as it should when using a
Field1;Field2
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?
#3 Updated by Giovanni Manghi almost 6 years ago
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?
yes sure!
closing?
#4 Updated by Nyall Dawson almost 6 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