0

Is it possible to preform multiplication on several fields of an attribute table together and then use an update cursor to assign the resulting value to a specific field?

6
  • 1
    Uh, yes, but do you have any code that you can post in your question? What calculation is it you're trying to perform? Is it like A = B * C? A = B * Constant?.. Commented Mar 30, 2015 at 22:51
  • 2
    Check the documentation here: resources.arcgis.com/en/help/main/10.1/index.html#//…. It would be along the lines of row[3] = row[0] * row[1] * row[2]
    – phloem
    Commented Mar 30, 2015 at 22:53
  • 1
    That's it @phloem, but make sure your data is numeric type. Bad things happen if the numbers are stored in a TEXT or DATE field. In these instances the values need to be cast to a number, multiplied and then stored. Commented Mar 30, 2015 at 23:07
  • 2
    While easy to do with a cursor, unless you want to learn some simple ArcPy, the field calculator will be even easier to use.
    – PolyGeo
    Commented Mar 30, 2015 at 23:32
  • Yes, @MichaelMiles-Stimson, you are correct that results may differ based on data type, but that's really an answer to an unasked question.
    – phloem
    Commented Mar 31, 2015 at 21:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.