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

Level 0 of Simplified Field Notation not working

New Here ,
Jun 01, 2016 Jun 01, 2016

Hi there,

I want to do one of the most basic operation in a form.

I have 2 fields only, with names that contain only letters.

I would like FieldA to be equal to FieldB * 5.

I thus go to the Calculate tab for FieldA, select Simplified Field Notation, click Edit, type "FieldB * 5." (without the quotes), click OK ...

and the Calculate tab still indicates "Value is not calculated"

If I use the "Value is the sum of the following fields" instead, just to see if the whole thing works, and select FieldB only, then after clicking on OK, the "Value is the sum of the following fields" is checked, but nothing appears in the box below it. If I close the edit, and enter a value in FieldB, nothing changes in FieldA.

These seem to be the most basic operations possible, and they are obviously not working.

Can anybody tell me what I am missing?

Many thanks!
Nicolas

TOPICS
Acrobat SDK and JavaScript
2.4K
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

correct answers 1 Correct answer

Community Expert , Jun 03, 2016 Jun 03, 2016

In Acrobat you can use an external JavaScript editor. In the preferences of Acrobat you can specify this.

Translate
LEGEND ,
Jun 02, 2016 Jun 02, 2016

As a test, what happens if you use the following custom calculation JavaScript:

event.value = 5 * getField("FieldB").value;

Be sure to check the JavaScript console (command+J) to see if any errors are reported if nothing appears to happen.

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
New Here ,
Jun 02, 2016 Jun 02, 2016

Upon clicking OK in the custom calculation JavaScript, the Calculate tab still indicates "Value is not calculated", as it does when I use the simplified notation ...

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
LEGEND ,
Jun 02, 2016 Jun 02, 2016

It's either a problem with the PDF you're working with or Acrobat. You can try doing a test with another simple PDF form that just contains a single input field and the calculated field.

If that doesn't work either, then be sure you have the latest Acrobat update, and if it doesn't work try repairing, and if that doesn't work try reinstalling.

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
New Here ,
Jun 02, 2016 Jun 02, 2016

I opened an empty pdf (Create PDF > Blank Page), created 2 fields (via Prepare Form) and tried the operation again: simplified notation and custom calculation JavaScript lead again to the same result

I updated Acrobat Pro to version 15.16.20045 ... issue still there.

I then uninstalled and reinstalled Acrobat via Cloud Creative ... issue still there.

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 ,
Jun 02, 2016 Jun 02, 2016

What happens when you use a external javascript editor?

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
New Here ,
Jun 02, 2016 Jun 02, 2016

Not entirely sure that this answer your question: I can execute commands using the JavaScript Console in Chrome ...

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 ,
Jun 03, 2016 Jun 03, 2016

In Acrobat you can use an external JavaScript editor. In the preferences of Acrobat you can specify 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
New Here ,
Jun 03, 2016 Jun 03, 2016

YES!!!

I used Emacs as the Editor and the simplified notation now works!

However, it seems like I need to quit Emacs and not just close the tab with .js file each time.

This is a bit annoying because I use Emacs for many other things too.

For now, this is a very good fix, though I'd like to understand why it was not working with Acrobat JS editor ...

Thanks a lot Bernd!

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 ,
Jun 03, 2016 Jun 03, 2016
LATEST

NicolasFlagey wrote:

...

For now, this is a very good fix, though I'd like to understand why it was not working with Acrobat JS editor ...

Looks like pressing the OK button acts as a Cancel.

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 ,
Jun 02, 2016 Jun 02, 2016

Hi.

Be sure that the first checkbox (about calculation) is ticked in Preferences : Form


Acrobate du PDF, InDesigner et Photoshopographe
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
New Here ,
Jun 02, 2016 Jun 02, 2016

Yes, it is checked by default.

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