Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Label Expression Bug

$
0
0
I have used the following example from the help file substitution my own fields:

Code:

def FindLabel ( [Parcel_No], [Owner_Name] ):
  if  [Parcel_No]  >= 0:
    return "<CLR red='255'><FNT size = '14'>" + unicode( [Owner_Name]) + "</FNT></CLR>"
  else:
    return [Owner_Name]

The label shows in my feature class as:
<CLR red='255'><FNT size = '14'>Doe, John & Linda</FNT></CLR>

not in the color red. It shows correctly in the verify box in the expression verification. Also, why do I have to use unicode([FIELD_NAME]) to avoid an error?

Viewing all articles
Browse latest Browse all 2485

Trending Articles