Copy link to clipboard
Copied
hi, i'm using bellow calculating script & it's working. what i want to do is, if any of field is empty, calculation result field should be empty. pls help me. thanks in advance. thanks..
var v1 = Number(this.getField("amt11").value);
var v2 = Number(this.getField("EX").value);
if (v1==0) event.value = "";
else event.value = v1/v2;
Just add all fields to the existing "if" statement
Like this:
var v1 = Number(this.getField("amt11").value);
var v2 = Number(this.getField("EX").value);
if ((v1==0) || (v2==0)) event.value = "";
else event.value = v1/v2;
Copy link to clipboard
Copied
Just add all fields to the existing "if" statement
Like this:
var v1 = Number(this.getField("amt11").value);
var v2 = Number(this.getField("EX").value);
if ((v1==0) || (v2==0)) event.value = "";
else event.value = v1/v2;
Copy link to clipboard
Copied
https://forums.adobe.com/people/Thom+Parker wrote
Just add all fields to the existing "if" statement
Like this:
var v1 = Number(this.getField("amt11").value);
var v2 = Number(this.getField("EX").value);
if ((v1==0) || (v2==0)) event.value = "";
else event.value = v1/v2;
thanks a lot & it's work. thanks..