Labeling Issue

1893
2
11-21-2011 03:27 AM
MatthewVance
New Contributor II
I need to label some features the following way: Label by field "Name". If "Name" is null, label by field "Number".

I would like to label one feature using two fields.  If the first field (Name) contains a null value I'd like to label by a second field (Number).  I've been trying different thing with expressions but I'm not all that familiar with VBScript or JScript. Any help is appreciated.  Thanks in advance.
Tags (2)
0 Kudos
2 Replies
JoshuaCrough
New Contributor III
Under the Labels tab change the Method from Label all the features the same way to Define classes of features and label each class differently.

Click on the SQL Query. In the Select Box just add "Name" IS NOT NULL and click OK (you can rename this from Default by choosing Rename). Make the Label Field = Name

Then click Add (to add a new class). Name it. Click the SQL Query and in the Select Box just add "Name" IS NULL and click OK. Make the Label Field = Number.

That should do the trick.
0 Kudos
MatthewVance
New Contributor II
Under the Labels tab change the Method from Label all the features the same way to Define classes of features and label each class differently.

Click on the SQL Query. In the Select Box just add "Name" IS NOT NULL and click OK (you can rename this from Default by choosing Rename). Make the Label Field = Name

Then click Add (to add a new class). Name it. Click the SQL Query and in the Select Box just add "Name" IS NULL and click OK. Make the Label Field = Number.

That should do the trick.


Thanks, Joshua.  I started to get on the right track with using SQL, but you put me over the edge.  I appreciate it.
0 Kudos