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

Help! Calculated fields auto calculating on fields not related to each other

Community Beginner ,
Feb 25, 2025 Feb 25, 2025

I'm about to pull my hair out over this.  I'm no script write, but I can usually fumble my way around and up until this point I've had zero issues.

 

I have cells adding, multiplying, and dividing and they all work perfectly on (lets say) Row A  .. until you move to the row below, Row B,  (which does not pertain to and should not interact with Row A at all)  and then instead of calculating like Row A did, it is adding the calculation from Row B to Row A.  But then sometimes it autopopulates a cell on Row C but nothing on Row B even though everything should be on Row A.  

Then after I preview several times, it gets to where some of the fields won't calculate at all.  
 If I delete the cells and readd and set them up it will again work on Row A, but RowB/C are calucalting into Row A until I preview several times then half the fields stop working.

It's so crazy.

These are not copyed cells, I manually inserted & entered info into each Text Field for each cell that needs calculation.  Each row of cells has the same type of calculations (just for the named cells on each row .. they literally do the same things just different $ amounts in the total).

The boxes should calculate up
Lin Feet 144  -- $3456  -- 24  -- 24 x $15/sq ft = $360

formula is 12'x12=144" (lin ft to lin in) -- lin in 144 x 24 (counter depth) = $3456 -- 3456 is then divided by SQFTm (144) to get the sq ft price which should be $360 as the total

 

I've not had any other forms have this issue, and I just cannot figure out why this form is acting up over this.  Is it the form and it is corrupted and I need to start over, I'm using too many calculted cells close together,  or what?!?! 

I'm so frustrated about this, since my other forms have all worked correctly up until this one.  They're all similar but different.

I can't figure out how to add actual file to this forum (it wants a URL) so I can add that if Dropbox files are allowed.  But I have included a screen shot video so you can get a gist of what it's doing.Help.gifexpand image

 

TOPICS
PDF forms
424
Translate
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 Beginner ,
Feb 26, 2025 Feb 26, 2025

The calculation is changing linear feet to linear inches so that the user can get the square foot price based on the depth of the counter top (standard is 24 but they should be able to change that to 12, 30 or however deep they need the counter to be, the depth is completely custom).  

Currently I have it as *24 but I would like it to multiply by the editable field (which I really want to be a drop down) but I tried *24 because using a field that you could either enter a depth manually or use a drop down menu with choices of depth was also having the same issues .. which is why I posted for help when using *24 didn't work either.

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (just so happens to be 24, but if you enter 13 in linear feet that number would be 26) so that it can be multiplied by the cost ($15) to get the total cost per sq ft ($360). MEL75T =$360


MEL75LF*12 - MEL75LF (total value would be 12x12=144)

MEL75LF*24 = MEL75SUB1 (total value would be 3456)

MEL75SUB1/144 = MEL75SUB2 (total value would be 24)

MELSUB2*15=MEL75T (total value would be $360)

 

The other 2 rows do the exact same thing, but the total will be different because the cost per sq ft is different.

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (24) so that it can be multiplied by the cost ($35) to get the total cost per sq ft ($840). FOR75T =$840

 

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (24) so that it can be multiplied by the cost ($35) to get the total cost per sq ft ($960). FOR125T =$960

 

I've tried this both ways, not using *12, *24, or /144 and giving those values their own named cells and the same thing still happens (you can see they are also in the form I attached; they are just currently not being used to calculate).

 

View solution in original post

Translate
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 ,
Feb 25, 2025 Feb 25, 2025

1)  Have you checked the console for errors?

2)  Is the calculation order correct?

If you are still having issues please post your form.

Translate
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 ,
Feb 26, 2025 Feb 26, 2025

Without seeing the actual file it's very difficult to help. You can attach files to a reply, or you can share them via Dropbox/Google Drive/Adobe Document Cloud/etc.

Translate
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 Beginner ,
Feb 26, 2025 Feb 26, 2025

OK here are is a screen grab of what I have (and I do believe I have the calculations in the right places according to that link provided.Help.gifexpand image

Translate
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 Beginner ,
Feb 26, 2025 Feb 26, 2025

And this is a screen grab of how it's acting when I use the form. THe first line works perfectly but the following 2 lines just go off the rails.  All are set up exactly he same but with different names of course.Help2.gifexpand image

Translate
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 Beginner ,
Feb 26, 2025 Feb 26, 2025
Translate
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 ,
Feb 26, 2025 Feb 26, 2025

You used simplified field notations to calculate products (multiplication), but you used the field name of the field containing the calculation.  Calculations run every time any field value changes.  So if you have thisfieldName*12, it is going to recaluate itself every time any field value in the form changes.  Every time, it will take its previous value and multiply it by 12.  The field I checked was MEL75LF which has a calculation of MEL75LF*12.  If you enter 1 in the field it will show 12.  Change any other field and it becomes 144 then 1728, etc.  I'm not sure what you are attempting to calculate in this field.

With all due respect, a video of you changing values in the form does nothing for us out here trying to help you.  Once you uploaded the form it took less than 5 seconds to troubleshoot.

Translate
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 Beginner ,
Feb 26, 2025 Feb 26, 2025

The calculation is changing linear feet to linear inches so that the user can get the square foot price based on the depth of the counter top (standard is 24 but they should be able to change that to 12, 30 or however deep they need the counter to be, the depth is completely custom).  

Currently I have it as *24 but I would like it to multiply by the editable field (which I really want to be a drop down) but I tried *24 because using a field that you could either enter a depth manually or use a drop down menu with choices of depth was also having the same issues .. which is why I posted for help when using *24 didn't work either.

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (just so happens to be 24, but if you enter 13 in linear feet that number would be 26) so that it can be multiplied by the cost ($15) to get the total cost per sq ft ($360). MEL75T =$360


MEL75LF*12 - MEL75LF (total value would be 12x12=144)

MEL75LF*24 = MEL75SUB1 (total value would be 3456)

MEL75SUB1/144 = MEL75SUB2 (total value would be 24)

MELSUB2*15=MEL75T (total value would be $360)

 

The other 2 rows do the exact same thing, but the total will be different because the cost per sq ft is different.

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (24) so that it can be multiplied by the cost ($35) to get the total cost per sq ft ($840). FOR75T =$840

 

example.  Lin Ft (12) x 12 = 144 *24 (counter depth in inches) = 3456 then it needs to be divided by 144 to convert it to sq ft (24) so that it can be multiplied by the cost ($35) to get the total cost per sq ft ($960). FOR125T =$960

 

I've tried this both ways, not using *12, *24, or /144 and giving those values their own named cells and the same thing still happens (you can see they are also in the form I attached; they are just currently not being used to calculate).

 

Translate
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 ,
Feb 26, 2025 Feb 26, 2025

Your form says "automatically converts to inches".  You can 't use a simplified notation calculation script for this because it will run every time any field value changes, as previously stated.  Here are some articles:

https://pdfautomationstation.substack.com/p/calculation-vs-validation-scripts

https://pdfautomationstation.substack.com/p/calculation-vs-validation-scripts-eb5

https://pdfautomationstation.substack.com/p/another-method-for-calculation-vs

 

Use the following validation script instead:

event.value=event.value*12;

If the user types 1 it will convert to 12, but only once when the 1 is entered.  The value will only change when users change it (2 will change to 24).

Translate
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 Beginner ,
Feb 27, 2025 Feb 27, 2025

That is to alert the user that by entering the linear feet (example 12) it will automatically convert them into linear inches (example 144) so they don't have to break out their phone or carry a calulator .. which is the purpose of this form.  This form is to help reduce the amount of items needed in a sales person hands/scattered around/keep up with while in a client's home.  Those are just words for them, they don't carry any value within the form (and so they don't enter the linear inches on their own and get a huge number as a result) .. the *12 is what converts the linear feet (12) into linear inches (144) .. and whole number of feet multiplied by 12 = the linear inches.

Translate
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 ,
Feb 27, 2025 Feb 27, 2025

This is all fine and well, but you can't use a field own name in its calculation. You need to follow the instructions given above for it to work correctly.

Translate
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 Beginner ,
Feb 27, 2025 Feb 27, 2025

Thank you so much for your help, that corrected the problem!  It works beautifully now.

 

I am pretty good at Excel formulas but using the Adobe form version is new to me.  Not my normal use TBH lol.  However, I'm no expert in that either by far (I don't write javascript, not what I went to college for (or ever wanted to learn) just a need that seems to always arise lol) , so this has been a steep learning experience this week .  I just learned that I could even do this / made my first form on this past Monday.  Doesn't help that I need these like 2 weeks ago, so I'm pretty rushed to boot.

Translate
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 ,
Feb 27, 2025 Feb 27, 2025

Excel has a lot of built-in formulas.  You can do a lot of calculations with PDF forms but a lot of times you have to build your own formulas using JavaScript.

Translate
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 Beginner ,
Mar 05, 2025 Mar 05, 2025
LATEST

I'm having another issue with my form, hopefully this is the right way to ask but if I need ot start a new thread I will.  It works perfectly on my computer but when I email it and someone downloads it .. it no longer works correctly.  I have it open on my laptop and my desktop and it's working completely differently on the 2 different machines.  What could cause this?

Translate
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