1

I am looking to find the correct syntax for copying a defined set of fields when using the "Join attributes by field value tool" in the graphical modeler in QGIS 3.6.

I would like to know how the syntax for this when selecting multiple fields as I cannot seem to work it out. For example if I only wanted to join "Field_1" and "Field_2".

Please see my image below:

enter image description here

  • Have you tried choosing said fields outside the modeller and copying the style of that notation into the modeller? – Erik May 15 at 14:08
  • I thought about that too but it only shows the number of items selected because you choose from a drop down. – AWGIS May 15 at 14:10
  • Protocol shows the python-code to be 'FIELDS_TO_COPY' : ['column1',column2'] - maybe if you write the columns out using this syntaX? – Erik May 15 at 14:24
  • @Erik thank you for the suggestion - it doesn't appear to work unfortunately. – AWGIS May 15 at 15:10
  • I guess you tried a syntax analogue to the field calculator, like "column1","column2" ? – Erik May 15 at 17:02
3

Seperate them with a semicolon: field1;field2

  • Thank you, I can't believe it was that simple! – AWGIS May 16 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.