Copy link to clipboard
Copied
from another field if another field is zero. This would go after the code: event.value=Number(this.getField("EE Net Prem").valueAsString)/ Number(this.getField("multiplier").valueAsString);
Not sure what you're asking, but if you use this code you have to make sure that the value of "multiplier" is not zero first.
Copy link to clipboard
Copied
Not sure what you're asking, but if you use this code you have to make sure that the value of "multiplier" is not zero first.
Copy link to clipboard
Copied
the multiplier is the commission base- so usually I use the net premium/multiplier (typically .85) to populate into the gross premium field. Not all groups have commission. I keep getting an error for "the value entered does not match the format of the field (EE Gross Prem)" when the multiplier is zero.
Is there another way I should write it so it will accept a number or zero?
Copy link to clipboard
Copied
Use this code:
var v1 = Number(this.getField("EE Net Prem").valueAsString);
var v2 = Number(this.getField("multiplier").valueAsString);
if (v2==0) event.value = "";
else event.value = v1/v2;