I am getting the message "the value entered does not match the format of the field" when doing a simple subtraction.
This is not during a division by 0, which is when all the other incidents I found by searching on the web occur.
I've put the following JavaScript to function onBlur for the numGrossWt1 field:
var gross = this.getField("numGrossWt1");
var remG = this.getField("numRemGrossWt1");
var net = this.getField("numNetWt1");
var remN = this.getField("numRemNetWt1");
var tare = this.getField("numTareWt1");
remG.value = gross.value; //this works
net.value = gross.value - tare.value;
remN.value = net.value;
When the error occurs, the cursor is in the numRemNetWt1 field, and both it and numNetWt1 are blank. Therefore I presume the error is in putting a value in the numNetWt1 field.
I first thought it was because all fields are formatted as a number with 2 decimal places, and I was only entering one decimal. But it still occurs when two decimal places are entered. I even tried x.valueAsString, but it seems to make no difference.
If you tab to the Gross Wt field and away two times, the Net Wt fills in and errors both times. The third time, the Rem Net Wt fills in and the error does not occur.
There was a leftover calculation on the Net Wt field that interfered with calculating it from the Gross Wt. When calculation from the Calculated tab didn't seem to work, I'd done it onBlur from the Gross Wt, but that apparently is lower precedence to the Calculated tab.
Once failed Calculation removed, it works.