Copy link to clipboard
Copied
I have a text field, called T1, with a formula in the Simplified field notation box. The formula is to take a number entered in another text field, T2, and multiply it by 5. The formula is T2*5. If there is no number entered in T2, I would like to hide the zero in T1. Normally, I would enter the following as a Custom calculation script in T1: if(event.value == 0) event.value = "";
But, I can't use both a Simplified field notation and a Custom calculation script in T1. Any ideas? Thanks.
Copy link to clipboard
Copied
Or simply use a custom calculation script:
var t2 = Number(this.getField("T2").valueAsString);
if (t2==0) event.value = "";
else event.value = t2*5;
Copy link to clipboard
Copied
Leave your simplified field notation, and enter your script as a custom format script.
Copy link to clipboard
Copied
Or simply use a custom calculation script:
var t2 = Number(this.getField("T2").valueAsString);
if (t2==0) event.value = "";
else event.value = t2*5;
Copy link to clipboard
Copied
Thank you!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now