title: field calculator based on attribute values
body: <p>I'm using ArcGIS 10.2.2 basic licence, trying to fill a column in an attribute table based on the following argument:</p>
  
  <pre><code>'If field1 is equal to field2, return field3, if not, return 'null'' 
  </code></pre>
  
  <p>Fields 1 and 2 are text, field 3 is numeric.</p>
  
  <p>I've tried this code in the field calculator:</p>
  
  <p>pre-logic script code block...</p>
  
  <pre><code>def calc(Score):
    if ( !Field1! == !Field2!):
      return !Field3!
    else:
      return 'null'
  
  Score = calc(!Score!)
  </code></pre>
  
  <p>Im really new to coding, so Im really not sure if this even makes sense (sorry), but any help would be appreciated. Also, does anyone know if a good starting point to learn python specifically for ArcGIS?</p>
  
  <p>There seem to be hundreds of tutorials but I can't find anything specifically for editing tables etc. </p>