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

help deciphering error message

Contributor ,
Aug 16, 2023 Aug 16, 2023

Hoping somebody may be able to help me decipher this error code. I'm at my wits end on this one.  Thanks in advance Community!

 

RangeError: Invalid argument value.
Field.display:44:Field ResetForm:Mouse Up

TOPICS
General troubleshooting , How to , JavaScript , PDF
952
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Aug 16, 2023 Aug 16, 2023

Yep, display.Print is not a valid value. But if it's removed it and the error is still reported, then something else is going on. You could try changing display.hidden to the value 1.  

But it may be that things didn't change as you thought. Double check it. 

 

 

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
Contributor ,
Aug 16, 2023 Aug 16, 2023

Yeah it passed the console this time??? thanks Thom for your help!!!

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 ,
Aug 16, 2023 Aug 16, 2023

Hi, can you give us more context so we can reproduce the error.

Can you share the exact version of your operating system and software version?

Can you also share the steps you took to reach this error message?

 

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 ,
Aug 16, 2023 Aug 16, 2023

I suspect there is an invalid assignment to a field.display property, but you 'll need to provide  more information. 

What is the script in the "ResetForm" button? Specifically, what code is on line 44. 

 

 

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
Contributor ,
Aug 16, 2023 Aug 16, 2023

Hi Thom; this was there but I deleted it hours ago and still get the error in the console. Tried shutting down computer to eliminate cache possibility, still no luck.

this.getField("Stamp").display = display.hidden; (kept)

this.getField("Stamp").display = display.Print; (deleted)

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 ,
Aug 16, 2023 Aug 16, 2023

Yep, display.Print is not a valid value. But if it's removed it and the error is still reported, then something else is going on. You could try changing display.hidden to the value 1.  

But it may be that things didn't change as you thought. Double check it. 

 

 

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
Contributor ,
Aug 16, 2023 Aug 16, 2023

Yeah it passed the console this time??? thanks Thom for your help!!!

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 ,
Aug 16, 2023 Aug 16, 2023
LATEST

The valid options for the display property are:

display.visible : Field is visible on screen and in print
display.hidden : Field is hidden on screen and in print
display.noPrint : Field is visible on screen but does not print
display.noView : Field is hidden on screen but prints

 

You can also replace them with a number. They are 0-3, resp.

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