Purpose: I have 1 field in a large table with numbers in mm, want to show in m. Want to use python to multiply by 1000. Want to use the Python Field Calculator for this.
Code:
def func( height ): return (height*1000)
HEIGHT_MM= func(!HEIGHT_MM)
Result: the code succeeds (no syntax errors), but nothing happens to the numbers in my field!
You need another exclamation mark around the field name. I'm a little bit surprised that it ran at all. It may be interpretting the one exclamation as "if HEIGHT_MM does not exist".
You need another exclamation mark around the field name. I'm a little bit surprised that it ran at all. It may be interpretting the one exclamation as "if HEIGHT_MM does not exist".