I am attempting to learn how to update a field using Python with Codeblock showing.
The script is supposed to return a value to a text field based on a numerical value in two float fields but I keep getting an error:
Pre-Logic Script Code:
def wType(SWPULP):
if SWPULP>=75:
return "SP"
elseif HWPULP>=75:
return "HP"
else:
return "MW"
Expression
STANDTYPE = wType(!SWPULP!)
error message:
ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 4)
I have standard 4 space indent (solved that error previously) but now I am stuck as to why it will not work.
Best Answer
The syntax should be:
Call with: