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

Change calculation in several forms via script

New Here ,
Feb 23, 2017 Feb 23, 2017

I have several password protected filled forms with a calculation error. Is it possible to change the calculation without open and change all the forms?

TOPICS
Acrobat SDK and JavaScript , Windows
609
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 24, 2017 Feb 24, 2017

What kind of protection? What kind of calculation?

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 ,
Feb 24, 2017 Feb 24, 2017

It is password protected.

A custom calculation script:

var mid = 2.5;
var max = mid + 0.125;
var min = mid - 0.125;
var val = +getField("Rcoil").value;


if (val <= max && val >= min) {
    event.value = "OK";
    event.target.fillColor = color.green;
} else {
    event.value = "Not OK";
   event.target.fillColor = color.red;
}

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 24, 2017 Feb 24, 2017

What kind of password protection?

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 ,
Feb 26, 2017 Feb 26, 2017

It is protected so that user are allowed to fill in but not edit the document

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, 2017 Feb 27, 2017
LATEST

First remove the security, then you can change the calculation with the JavaScript method setAction.

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