I want to take all positive values in a field and multiply them by -1000. To do this, I put together the following code block:
def myCalc(x): if (x > 0): x*(-1000) return x else: return x
and then I call the expression:
myCalc( !FieldName! )
However, when I execute this field calculation, I get no warnings or errors, but the values in my field also don't change. The numbers look like this (before and after the calculation):
What is wrong with my code?