Copy link to clipboard
Copied
Hi, I am trying out calculations in Acrobat Pro and I am running into an issue with a calculated field that seems to have the correct value but is displaying the value from another calculated field.
I say it seems to have the correct value because when I click into the field, it shows the value I expect and calculations that are dependant on that field seem to be calculating correctly.
The save_fort_con field in the attached pdf is showing 3 when it should be showing 1 as it is a direct reference to the att_con field. It seems to be displaying what is in the save_will_wis field which is coming from att_wis.
There shouldn't be any issue with calculation order as these are completely different sources of data.
I have been copy/pasting calculated fields to save a lot of effort on this complex form but maybe that is not good practice? I don't see how that could be the problem but it's possible.
Any help would be appreciated.
 
Copy link to clipboard
Copied
Never good practice to copy and paste fields with scripts.
You can try to delete fields and recreate new (possibly with new names if just recreating doesn't help) and there is no need to use calculation for this, you can either use validate script in att_con field like this:
this.getField("save_fort_con").value = event.value;
Or even better solution is to just name both fields the same since they both have the same value.
Copy link to clipboard
Copied
Never good practice to copy and paste fields with scripts.
You can try to delete fields and recreate new (possibly with new names if just recreating doesn't help) and there is no need to use calculation for this, you can either use validate script in att_con field like this:
this.getField("save_fort_con").value = event.value;
Or even better solution is to just name both fields the same since they both have the same value.
Copy link to clipboard
Copied
Thank you.
While I wish copy/pasting script didn't cause issue, The alternate solution of naming both fields the same seems to have worked.
Copy link to clipboard
Copied
The advice that "Never good practice to copy and paste fields with scripts" is helpful of course but how do you know that?
How, as a user, are users supposed to figure this out when copying and pasting is a common practice and when the user does copy and paste a calculated field, there is no warning given or error that is displayed? I ask, because I come across problems like this all the time and want some system to help me narrow down all the hundreds of possible things that might be causing the issue. It can be frustrating, and takes so long, to go through all the different potential causes of the problem to find the one that is at fault.
Copy link to clipboard
Copied
Field Naming Conflicts
When you copy and paste form fields, Acrobat often keeps the same internal field name or tries to auto-rename it in a way that can create confusion. Even if the display name looks correct, the internal reference might still point to the original field (like save_will_wis) instead of the intended one.
Calculation Script Caching or Delay
Acrobat can sometimes display stale values due to calculation order or caching, especially when multiple fields are dependent on one another.
Check JavaScript Reference
Open the field properties for save_fort_con, go to the Calculate tab, and make sure it's explicitly referencing att_con, not att_wis or any other field. If you're using a custom script, ensure the script is pulling the correct value.
Recreate the Field from Scratch
As best practice, instead of copy/pasting calculated fields, try creating new fields and writing fresh calculation scripts. This reduces the chance of hidden field linkages or script duplication errors.
If you're doing complex time or value calculations and Acrobat isn’t behaving as expected, consider testing your logic externally. A web-based tool like calculadora de horas can help you verify the results of hour-based or numeric field calculations before implementing them in a PDF.
Would you like help with fixing the script directly or rebuilding the form section properly?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now