Arcmap Python Label Expression Function "Null"

9875
30
Jump to solution
11-02-2016 03:26 PM
DevinUnderwood2
Occasional Contributor

I am having difficulty with python parser label function to replace null values with "Unknown Plan" and leave everything else as is. The Unknown Plan is not displaying in the map label.

I have the following:

def FindLabel ( [PLAN] ):
    if  ([PLAN]) is  None:
         return "Unknown Plan"
    else:
        return [PLAN]

Any idea it is not working ?

0 Kudos
30 Replies
DevinUnderwood2
Occasional Contributor

Interesting, I went ahead and changed it to the following.

"999" is the coded value for "unknown"

My retired line labels are still showing.

 

elif [DIAMETER] == "999" and shapeDict[oid] > 50:
        return "Size ?" +  '\x22' + " " + [MATERIAL]
0 Kudos