AnsweredAssumed Answered

Python Label Expression

Question asked by mizzou14 on Oct 1, 2013
Latest reply on Oct 7, 2014 by serysian
I am trying to create one label expression that has two label options.  The first option will stack the parcel number on top of the lot number and the other option would stack the parcel number on top of deeded acreage.  The [LOTNUMBER] field, [PARCEL] field, are text fields the [DEEDACRES] is a double.  I have no python experience, did not think this expression would be this difficult to come up with.  I would appreciate any help.


def FindLabel ( [PARCEL] , [LOTNUMBER] , [DEEDACRES] ):
  if long([LOTNUMBER]) >1:
    return "<CLR yellow='255'>" +  [PARCEL] + "</CLR>" + '\n' + [LOTNUMBER]
  else:
    return "<CLR yellow='255'>" +  [PARCEL] + "</CLR>" + '\n' + [DEEDACRES]

Outcomes