AnsweredAssumed Answered

Quick field calculator IF question

Question asked by terrafirma_theo on Nov 16, 2017
Latest reply on Nov 16, 2017 by Dan_Patterson

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

Outcomes