I am trying to write a script to calculate values if there are null values in a table however it never calculates any values and I am pretty sure my code is right.
Where (Operator) is a field with values and null values
and (PointID) is a field with coded values and the Operator name as a 3 letter code stored within the text.
Where (Operator) is a field with values and null values
and (PointID) is a field with coded values and the Operator name as a 3 letter code stored within the text.
Code:
Expression:
Calc (!Operator!)
Code Block:
def Calc (Operator):
while (Operator is null):
if (re.search ("DWS", PointID) is TRUE):
return "Don"
elif (re.search ("GMS", PointID) is TRUE):
return "Gordon"
elif (re.search ("JZL", PointID) is TRUE):
return "Julian"
elif (re.search ("AWM", PointID) is TRUE):
return "Anthony"
else return (Operator)