I need to calculate the PIPEID field to equal the G_KEY_COMP field if PIPEID is null or PIPEID and G_KEY_COMP do not match. I think the first condition of the PIPEID being null is covered by the second condition of the fields not matching? I'm a novice on this topic and can't get the syntax I have to work. Here's what I've piecemealed together:
Pre-Logic Script Code:
def update(PIPEID,G_KEY_COMP):
if PIPEID != G_KEY_COMP
return G_KEY_COMP
else:
return PIPEID
PIPEID = update(!PIPEID!, !G_KEY_COMP!)
I'm posting a screenshot of the field calculator window since I'm not able to get the indentation right in the codeblock.