AnsweredAssumed Answered

Multiple Field Parse, Greatest Value Label

Question asked by GEOlson86 on Apr 25, 2013
Latest reply on Apr 26, 2013 by GEOlson86
I'm trying to get a label script to work in ArcMap.  So far it works, but it's not 100% accurate.  For the most part it seems to be working but there are certain labels that are wrong. My code looks at three fields and is supposed to return the specified label/string for whichever field has the greatest value.  I'm very new to working with Python so I don't know what I'm doing wrong.

def FindLabel ( [IND_06] , [RET_06], [OTH_06]  ):   if [IND_06] > [RET_06] and [IND_06]  > [OTH_06] :     return "Industrial"   elif [RET_06] > [IND_06] and [RET_06]  > [OTH_06]:     return "Retail"   elif [OTH_06] > [RET_06] and [OTH_06]  > [IND_06]:     return "Other"   else:     return "None" 



Thank you for any help.

Outcomes