Hi Hope you can help - giving probably way to much detail here:
I am getting "the value entered does not match the format of the field [text1]
I changed the format of all fields to 0 decimal points because I am trying to calcualte sheet count ( whole numbers) needed for print production:
F1 is record count
F2 is # of pages
F3 is simplex or duplex
F4 is imposition
I have to multiply the Record count * number of pages * (1 simplex) or (2 duplex) then divide the imposition to get the total sheets needed for production ex: 10 records x 4 pages = 40 x simplex = 40 / imposition lets say "2" = 20 sheets of paper to complete the job.
I think I have this covered in my calculation below, except the error is at F4. I do not know how to clear it.
var f1 = this.getField("calc1A").value; var f2 = this.getField("calc1B").value; var f3 = this.getField("calc1C").value; var f4 = this.getField("calc1D").value; if (f2&&f3&&f4==0) event.value=0; var f5=f1*f2*f3; event.value= f5/f4;
Most Valuable Participant, Apr 02, 2021Apr 02, 2021
try67 • Most Valuable Participant, Apr 02, 2021Apr 02, 2021
Replace this part of the code:
if (f2&&f3&&f4==0) event.value=0;
if (f4==0) event.value=""; // I changed it because zero is NOT the correct result. It should be nothing at all, as division by zero is not allowed.
In this case you probably want to use OR, not AND, and also this is not needed at all, since if f1 or f2 or f3 are zero the result will be zero anyway. It's only f4's value that needs to be tested in this way.