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

interactive PDFs with boolean operations

Explorer ,
Mar 07, 2022 Mar 07, 2022

If an inputted number is outside of a specific range, I would like the word "fail" to appear in another field otherwise the word "pass" should populate that field

TOPICS
PDF forms
487
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
1 ACCEPTED SOLUTION
Community Expert ,
Mar 07, 2022 Mar 07, 2022

Put a custom validation script on the field that needs to be tested. Something like this:

var nMin = 3, nMax = 10;
if((event.value > nMin) && (event.value < nMax))
   this.getField("FieldStatus").value = "Pass";
else
   this.getField("FieldStatus").value = "Fail";

 

Replace "FieldStatus" with the name of the field where the status text will be displayed

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

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 ,
Mar 07, 2022 Mar 07, 2022

Put a custom validation script on the field that needs to be tested. Something like this:

var nMin = 3, nMax = 10;
if((event.value > nMin) && (event.value < nMax))
   this.getField("FieldStatus").value = "Pass";
else
   this.getField("FieldStatus").value = "Fail";

 

Replace "FieldStatus" with the name of the field where the status text will be displayed

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Explorer ,
Mar 07, 2022 Mar 07, 2022
LATEST

BOOM !

Worked flawlessly on first test.

THANKS A ton

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