Hi. I have a point FC with 2 text fields. 'Field 1' and 'Field 2'.
I want Field 2 to = 5 IF Field 1 = E
and also
Field 2 to = 4 IF Field 1 = D
So far I've tried this but it returned a syntax error in geoprocessing results:
if [field1] = 'E' then
result = "5"
Could I have any solutions in VB and python if possible? Will help me learn more!
Thanks!
ArcMap 10.5.1
Solved! Go to Solution.
Thanks for the explanation Dan.
Ah both your answers worked for me! Just Jake's was a bit quicker for me to understand. Don't take it personally haha I always appreciate your help!
none taken ... I think I have a few points as a buffer..
Due to the amount of Nulls in the fields (which is expected), I can't sum together my 'score' columns (I have a few) into a final 'Total' field. ie. 4 + NULL + 5 = NULL!!!! argh So I'm going to have to edit the original code provided by Jake to return 0 if D or E values aren't found.
EDIT: solution provided above.