I'm doing some labeling and have my labels stacked using python by using the following: [field1] + 'n\' + [field2]. But I'd like to keep the label stacked and add parentheses to [field2] as well as ">= 1". I tried using the following with little success. So really I don't know how to combine everything correctly to get it to work properly.
def FindLabel ( [field1], [field2] ):
if long([field2]) >= 1:
return "[field1] + '\n' + [field2]"
else:
return [field1]
Ideally, I want my label to look like this:
Field1
(field2).
Got it to work besides the parentheses. I would still like to add them if possible.
def FindLabel ( [NAME], [Deaths] ): if long([Deaths]) >=1: return [NAME] + '\n' + [Deaths]