Select to view content in your preferred language

Displaying multiple label features in one feature class

11735
26
07-09-2015 09:00 AM
KatyW
by
Occasional Contributor

Man I hope I typed out the title of this thread correctly! 

I'm trying to display multiple label fields like the one in the first image.  The feature class is underground nap in the splice closure layer.  I want to show the enc_size and fiberassignments as labels for the underground nap.  How do I do this?  I tired reading all kinds of resources on labeling and annotation but I'm falling short on understanding how the hell to do this!  I provided my MXD in the second image.

Thanks for the help!

Tags (2)
0 Kudos
26 Replies
JohnWarden
Deactivated User

cut and paste the expression below into your Label Expression window, then select the verify button

[fiberassignments] & vbCrLf & "Size: " & [enc_size]

0 Kudos
KatyW
by
Occasional Contributor

Untitled.jpg

Still getting the error...

0 Kudos
JohnWarden
Deactivated User

I'm stumped. Can you attach a zip file of your data so I can try it on my system?

0 Kudos
DarrenWiens2
MVP Honored Contributor

You get this error when you specify a field that does not exist in your data. The fields you are trying to use are not listed in the field list, although they may be listed further down. Can you take a screen shot showing the fields you are trying to reference?

edit: you can also see this error if there are no features matching the SQL statement you've set for the class. I see you're using classes for labeling. Are you sure some features match?

0 Kudos
KatyW
by
Occasional Contributor

Untitled.jpg

I'm not sure what you mean by "Are you sure some features match?" 

0 Kudos
DarrenWiens2
MVP Honored Contributor

I'm not sure what you mean by "Are you sure some features match?"

For example, if you've got a field called "MyNumber" with values of 1 and 2 only, and your SQL Query for a label class is: "MyNumber" = 3 (meaning, label those features where the value is 3), and then you try to verify a label expression of [MyNumber], you will receive the error you mention because no features match that SQL expression.

0 Kudos
KatyW
by
Occasional Contributor

I'm not sure how to figure that one out.  I just want to see the ENC_SIZE and FIBERASSIGNMENTS value as a label on each UG_NAP

0 Kudos
DarrenWiens2
MVP Honored Contributor

Your screenshot shows the word "Method:" behind the Label Expression dialog box. Change it to "Label all the features the same way" and try your expression again.

KatyW
by
Occasional Contributor

Ding! Ding! Ding!  You solved the problem!  Thank you so very much!

0 Kudos
KatyW
by
Occasional Contributor

I've tried to add another attribute to this script to be displayed and when I go to verify it deletes one of the other attributes.  Can I only do two at a time?

0 Kudos