The solution in VB for the base process is at If/then VBScript/Python code equivalent to SQL IN ('x','y',z') expression in ArcGIS Field Calculator? works great but I was trying to nest 'if' statements and can't.
So pre-logic code of
if [grid_code] = 1 then f2= 2 end if if [grid_code] = 2 then f2=3.5 end if
...etc. but this doesn't work.
What am I doing wrong?
I tried the second 'if' before the 'end if' and also tried 'elif' but these give script errors.
Also I am seeing a warning message about "The calculated value is invalid for the row with objectID=1" and when you click click 'yes' to continue it works fine.