AnsweredAssumed Answered

Field Calculator Expression Inside a Python Script

Question asked by dosbourne on Oct 28, 2013
Latest reply on Oct 28, 2013 by curtvprice
Ok, imagine there are 3 fields in a table: Field1, Field2, and and empty Field3. All I want to do is multiply Field1 * Field2 and populate the result in Field3. This is easily done in the field calculator in ArcMap, but what does the code look like in a python script? I am assuming that the arcpy tool I need is Calculate Field, but am not 100% certain. The part I am stuck on is what does the 'expression' look like in the code line below... or if a different tool is better, what is it?

CalculateField_management (in_table, field, expression, {expression_type}, {code_block})

Outcomes