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.