How can I concatenate attributes into a single new attribute?

03-08-2017 01:42 AM
New Contributor III

I have a set of point data containing attributes for their assignation code and the number of each feature found at that particular point. I want to label the features with both of these attribute concatenated together. eg; if the code is BC and the number is 12, the label reads 12BC. How do I set up a new attribute which combines both of these so I can assign the labels. Also, is there a way to filter out the concatenation where the number value is 1. eg; code = BC, number = 1 resulting label = BC?


0 Kudos
2 Replies
MVP Esteemed Contributor

You could Use label classes to label features from the same layer differently.

Class 1::

Use SQL Query : [Number] = 1

Label Expression:

Class 2::

Use SQL Query: [Number] > 1

Label Expression: [Number] +

Think Location
MVP Legendary Contributor

Or you can add a new text field and concatenate the results of the two fields and use that field for labelling

python parser

!field1! + str(!field2!)

where field1 is the field with BC in it and field2 is the one with the numbers