0
Custom Calculation Help - Sum of Numbers Over Certain Total
New Here
,
/t5/acrobat-discussions/custom-calculation-help-sum-of-numbers-over-certain-total/td-p/13521143
Jan 24, 2023
Jan 24, 2023
Copy link to clipboard
Copied
Hello,
I am trying to create a custom formula for a fillable PDF. I am a novice at this stuff.
I need one box with a formula for the sum over numbers over 40 in two different boxes. Ths is for payroll if that helps clarify. If Box 1 says 45 and Box 2 says 43 I want Box 3 (with the formula) to caluclate 8.
TOPICS
PDF forms
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-discussions/custom-calculation-help-sum-of-numbers-over-certain-total/m-p/13521455#M396090
Jan 24, 2023
Jan 24, 2023
Copy link to clipboard
Copied
Try this as custom calculation script of "Box 3" field:
var b1 = Number(this.getField("Box 1").valueAsString);
var b2 = Number(this.getField("Box 2").valueAsString);
var B1 = 0;
var B2 = 0;
if(b1>40)B1=b1-40;
if(b2>40)B2=b2-40;
event.value = B1+B2;
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

