I am trying to use Field Calculator to use a multiple conditional based on a string in another field of the same attribute table.
I have written the code below, but without success.
Pre-Logic Script Code:
def hazardValue( !Group! ) if !Group! = '1.1': return 1 if !Group! = '1.2': return 2 if !Group! = '1.5': return 4 if !Group! = '2.1': return 3 else return 5
hazardValue( !Group! )
It is always returning an error:
There was a failure during processing, check the Geoprocessing Results window for details