What is the value of strField are you certain it is a string that can be implicitly converted to a number?
Your first code block doen't care whether strField is a string or a numeric value but your second code block requires a numeric value to successfully perform the arithmetic calculation x = strFiled * 1
let me try to help showing you some examples.
Firstly, think that FDMEE is passing string parameters to the import script
In this example you can see that what you basically need is to convert into float your strfield and 9th field of the record.
In that way, you would be able to reverse sign.
Note that x = x * -1 is also valid although the jythonic way would be x *= -1
But what would happen if any of strfield or 9th field cannot be converted to float?
As you can see it would fail due to ValueError exception.
In Jython when type conversions are needed like float() using try/except is recommended.
In the following example, if any of the two fields are not number the record will be skipped during the import:
I hope that helps.
Thank you Francisco for your help. You provided great guidance regarding my issue which is now solved!
I though that typing were manfatory with Jython.