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

Converting Xcel conditional statement for Adobe PDF form field

New Here ,
Apr 29, 2019 Apr 29, 2019

I have a pdf with form fields and need to do conditional formatting. Below is the formula as it would be in Excel. The Adobe field names are named the same). I am getting a SyntaxError when I past this into the custom calculation script box. Is there a better way to do this?

=If(and(SoftCosts/(MSRPPricing+SoftCosts)<.25),(EquipmentMSRPPricing/(MSRPPricing+SoftCosts)>.25),”Yes”,”No”))

TOPICS
Acrobat SDK and JavaScript , Windows
454
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 ,
Apr 29, 2019 Apr 29, 2019

You can't use Excel formulas in a PDF form. You need to study the core JavaScript syntax to learn how to do if-statements, boolean logic and basic mathematical operations. In addition, you'll need to learn Acrobat JavaScript to learn how to access the values of other fields and how to apply a value to a field using the Calculation event.

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 ,
Apr 29, 2019 Apr 29, 2019

I've tried using other articles on here and have been unable to get the formula to work. Do you know of any specific articles that are a basic interpretation of how to do 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
Community Expert ,
Apr 29, 2019 Apr 29, 2019
LATEST
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