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

Calculated field displaying value from another calculated field except when clicked.

New Here ,
Jan 01, 2025 Jan 01, 2025

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.

20250101_calcfielddisplayingwrongvalue.png

TOPICS
General troubleshooting , JavaScript , PDF forms

Views

160

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 ,
Jan 01, 2025 Jan 01, 2025

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.

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 ,
Jan 01, 2025 Jan 01, 2025

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.

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 ,
Jan 04, 2025 Jan 04, 2025

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. 

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 Beginner ,
Jan 20, 2025 Jan 20, 2025

Copy link to clipboard

Copied

LATEST

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. 

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