|
Using Formula Fields
to do Labels
You can use formulas to label features
on a map that have more than one data field. Keep in mind that
when you want to label features with your own data, the data
must be joined to the map.
EXAMPLE 1
Suppose you want to label a project with two fields that you
have in your database: the type of project and its funding
source. You want a label to look like these examples:
Infrastructure
CDBG
Housing
HOME
To do this, go to Dataview-Formula Fields.
Your formula needs to look like this:
Activity + ì|î
+ Source
ìActivityî is the field
name for the type of project. You choose this from the Field
list. Then you type in a plus sign and a quotation mark. Choose
the vertical bar from the Operator list. Type in another quotation
mark and another plus sign. ìSourceî is the field
name for the funding source. Choose this from the Field list.
If you want the two parts of the label to be on the same line,
leave a blank space between the quotation marks.
EXAMPLE 2
When you combine fields this way, this formula will work if your
fields are character fields, not real numbers or integers. If
your fields are not characters, your formula needs to look like
this:
Activity + ì | ì
+ String(Funding)
In this example, Activity is a character
field, but Funding is not.
|