I have a polygon featureclass containing an integer field 'gridcode'. I've added 2 new float fields VB_calc and Python_calc, both of which should be equal to gridcode / 1,000,000
.
If I calculate the field using the Field Calculator with the VB Script [fieldname]
syntax, the result is as expected.
If I use the Python !fieldname!
syntax, the results are all zero.
What am I doing wrong here? I entered those expressions by double-clicking the gridcode fieldname in the calculator. (My goal is to use this within a stand-alone Python script but I'm debugging it here since the script isn't working either.) Both fields are definitely of type FLOAT.
inValue / 1000000 => 0
whilefloat(invalue) / 1000000 => 0.03563
. Reckon this is a bug, or a known issue?feature
of python ;) PS put this as an answer and I'll accept it