Hi,
I am attempting to create an if statement in Adobe Pro (JavaScript).Below is an example of what I am trying to achieve.
G1 | 50 |
G2 | 10 |
G3 | 30 |
G4 | 10 |
Text1 | 10 |
Text1= G1-G2-G3
At G4: If Text1>0 then Text1, if not greater then 0 then 0.
Thank you for all the help!
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.
Thank you, I will test this out!