Skip to main content
Participating Frequently
April 29, 2019
Question

Converting Xcel conditional statement for Adobe PDF form field

  • April 29, 2019
  • 1 reply
  • 516 views

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”))

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 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.

Participating Frequently
April 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?

try67
Community Expert
Community Expert
April 29, 2019