Skip to main content
February 3, 2017
Question

Conditional Formatting/ If Statement Help-

Hi,

I am attempting to create an if statement in Adobe Pro (JavaScript).Below is an example of what I am trying to achieve.

  

G150
G210
G330
G410
Text110

Text1= G1-G2-G3

At G4: If Text1>0 then Text1, if not greater then 0 then 0.

Thank you for all the help!

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

try67
Community Expert
Community Expert
February 3, 2017

As the custom calculation script of G4 use this code:

var v = Number(this.getField("Text1").value);

if (v>0) event.value = v;

else event.value = 0;

You need to make sure that the G4 field is located lower in the field calculation order list than Text1 for it to work correctly.

Translate
February 3, 2017

Thank you, I will test this out!

Translate