Calculate Percentages.
I have created quite a lengthy form with several simple calculations with no issues. But there is one that I am really struggling to resolve
I have 3 Input fields to generate 2 calculations as percentages, FieldE, FieldG & FieldH
FieldAA = FieldG/(FieldE*52)
FieldBB = (FieldG+FieldH)/(FieldE*52)
The issue is when entering field values;
If the AA & BB format is set to None, then I see NaN; if the are formatted to number (percentage) then I see the message; 'The value entered does not match the format of the field'.
I have spent some time combing through several threads on this but cannot seem to find an answer that works for me.
I've tried simple notation, custom calculations and custom format scripts; now not sure which I should be using! ![]()
I've several including:
FieldAA
var x = this.getField("FieldG");
var y = this.getField("FieldE");
if (y ==0)
{
event.value = "";
}
else
{
event.value = (x.value / (y.value * 52));
}
Any help would be massive thanks.