• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PDF ROUNDUP CALCULATION

New Here ,
Jun 24, 2024 Jun 24, 2024

Copy link to clipboard

Copied

Please help a novice = ME!

I am multiplying 2 fields 'Entry1' and 'Entry2' and 'TOTALEntry1' should display the result. I formatted the NUMBER to 0 decimal so I could get the ROUND-UP number. 'Entry3' should be multiplied to 'TOTALEntry1' but picking up the true value of 'TOTALEntry1' which is 1 instead of 0.72.

This is what I want:

Entry1 (12) x Entry2 (6%) = TOTALEntry1 (1) x Entry3 ($6,005) = TOTALEntry2 ($6,005) 

This is what I am getting:

Entry1 (12) x Entry2 (6%) = TOTALEntry1 (0.72) x Entry3 ($6,005) = TOTALEntry2 ($4,323.60)

 

Please help.

TOPICS
PDF , PDF forms

Views

326

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jun 24, 2024 Jun 24, 2024

Copy link to clipboard

Copied

You can use Math.round() to round the number, as Custom calculation script of "TotalEntry1" try this:

var e1 = Number(this.getField("Entry1").valueAsString);
var e2 = Number(this.getField("Entry2").valueAsString);

event.value = Math.round(e1*e2);

View solution in original post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 24, 2024 Jun 24, 2024

Copy link to clipboard

Copied

You can use Math.round() to round the number, as Custom calculation script of "TotalEntry1" try this:

var e1 = Number(this.getField("Entry1").valueAsString);
var e2 = Number(this.getField("Entry2").valueAsString);

event.value = Math.round(e1*e2);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2024 Jun 25, 2024

Copy link to clipboard

Copied

LATEST

It worked! That you very much. You're the best

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines