I am trying to create in Field Calculator (arcmap) a function to assing a numeric value in a column (heighs) based on a text value from another column(building).
'Pre Logic' input box
def a(heighs, building): if (building= '111'): return 50 elif (building= '112'): return 100 else: return 1
'field =' box
a( !heighs! , !building! )
I am always getting this error: "Failed to execute. Parameters are not valid." "ERROR 000989:Python syntax error: Parsing error SyntaxError: invalid syntax (line2)
Is this a indentation error or is an error in the function that I am creating? How can I make the indentation on the Field Calculator window (tab don't work!!)? One space for each line?