1

I'm trying to do what seems like a very simple operation (It's SUPER easy in ArcMap...). I'm kind of a novice with QGIS, so it's probably something really simple that I'm doing incorrectly. The release is 2.18.12. Basically, I want to create concatenated labels with values from three separate fields, separated in the text by a comma and a space. The fields I'm trying to concatenate are numeric and have no null values (unless zero is considered null). Here is my expression:

enter image description here

Here is the error summary:

enter image description here

This is ridiculously easy in ArcMap using a JavaScript expression. Heeeeelp!

1 Answer 1

4

You're mixing two functions. You could use either:

TOWNSHIP || ',' || RANGE || ',' || ISP_SECTIO

or

concat( TOWNSHIP, ',', RANGE, ',', ISP_SECTIO )

The concat version is a bit safer, since it will automatically treat NULL values like an empty string.

  • Note use of "concat", not "concatenate" (which is a different function)
2
  • Thanks! For some reason, the coalesce function only returns one value per feature. The first format that you suggested did the trick, though.
    – user109434
    Commented Jan 23, 2018 at 3:22
  • Ah sorry, I meant concat
    – ndawson
    Commented Jan 23, 2018 at 8:04

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.