def FindLabel ( [PARCEL] , [LOTNUMBER] , [DEEDACRES] ): if not [LOTNUMBER]: return "<CLR yellow='255'>" + [PARCEL] + "</CLR>\n" + str([DEEDACRES]) else: return "<CLR yellow='255'>" + [PARCEL] + "</CLR>\n" + [LOTNUMBER]
Siran,
To label numbers divisible by 100, use the modulo operator. In the label expression advanced box, set the parser to Python. Then use a function like below:
def FindLabel(somefield):
if somefield % 100 == 0: return somefield
if you want to label with a different field based on somefield:
def FindLabel(somefield, anotherfield):
if somefield % 100 == 0: return anotherfield
this did not work:
I used 50% since I want to label every 50' contour
tried it without brackets around Contour also but it didn';t work.
You're not using 50%. You're using modulo 50; the modulo operator is the % sign in Python. It's like regular division, except it gives you the remainder.
Primarily though, you need parentheses around the field name in the first line - def FindLabel([Contour]):
You also need to see whether the expression if [Contour] % 50 == 0: You left the 0 out above.
Thanks. I re do and be more careful next time....