Skip to main content
Participating Frequently
Apr 29, 2019 9:48 PM UTC
Question

Converting Xcel conditional statement for Adobe PDF form field

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

try67
Community Expert
Community Expert
Apr 29, 2019 9:52 PM UTC

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
Participating Frequently
Apr 29, 2019 10:03 PM UTC

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
try67
Community Expert
Community Expert
Apr 29, 2019 10:06 PM UTC