Adding Calculations On a PDF Form

New Here ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I'm trying to create a fillable PDF purchase order form to replace an Excel document. The way I need the PDF form to function is simple. The user enters quantity of a product they want to order into a row for that product. The quantity is multiplied by that product's cost. The total cost for that orders gets into into a cost column for that row. (product A: order quantity x cost = total cost)

I need two separate columns at the bottom of the form. One column will total the order quantities and the other column will total the costs column. It seemed like a simple thing to do but I've run into a LOT of problems.   

There are three pages to this form. When I enter in a quantity in page 1, it shows the correct total for that order but the totals at the end of the form double the total costs. Ex. If I want 2 of a product that costs $10.00 it correctly shows up as $20.00 in its "totals" column; however, the totals at the end of the form are doubled. Pages 2 and 3 don't have that problem.

2.) The form functions somewhat slowly. I check for updates. 

I know Adobe uses javascript to create fillable forms. I thought I had a fundimental understanding of how it works. (I reviewed several articles and watched several videos.) Maybe I don't have the thorough understanding and command on how to create a fillable form. By the way I have the latest version of Adobe Acrobat.

Can someone help?

TOPICS
PDF forms

Views

75

Likes

translate

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
Most Valuable Participant ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

My guess is you selected the total field as one of the ones to sum up, thereby creating a recursive calculation, which would both yield incorrect results and cause it to be slow (because it enters into a loop of adding the field in its own calculation). Make sure you didn't do that, and if so, fix it. If that's not the case then share the form with us for further help.

Likes

translate

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Thanks for your reply.

 

I sent an example of the form in a previous reply. I had to remove some of the proprietary information, but the calculations are exactly as they are on the form I'm working on.

 

Please see attachment.

Likes

translate

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I just checked. The "totals" field is not selected.

Likes

translate

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
Most Valuable Participant ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

You have the same field selected twice in the sum: A1575, A1575.00

It's not a good idea to use a dot followed by a number in the field name.

I recommend you rename all of those fields and then re-select the fields from the list under the Totals field.

Likes

translate

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Thanks for the advice.

Likes

translate

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
Engaged ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

How do you calculate totals?

It would be much easier if you could share file.

Likes

translate

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Thanks for your reply.

 

See attached.

Likes

translate

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
Adobe Community Professional ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

The OP is using the built-in feature in every field to sum all values.

 

Doing so makes the form very slow which is  the same problem I used to have in my PDF. And like try67 recommended definitely renaming the fields will help to elaborate some script to get the array of all of those calculating fields.

 

For a form with a spreadsheet this lengthy I would use a for loop as a mouse up event in a button or combine it with custom keystroke scripts.

Likes

translate

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