Copy link to clipboard
Copied
i am trying to add fields "A" 'B" and Field "C" , they will have numbers in them and display the total in another filed "K", unless that number is 0, and i also need the same thing but that total multiplied by Field "D" and displayed in ather field "L" if not 0 , i have tried built in calculations but they dont seem to update if one of the first field is updated. thanks
Copy link to clipboard
Copied
Use this script in "K" field as custom calculation script:
var total = Number(this.getField("A").value)+Number(this.getField("B").value)+Number(this.getField("C").value);
if(total == 0)
event.value = "";
else event.value = total;
Use this script in "L" field as custom calculation script:
var total = Number(this.getField("A").value)+Number(this.getField("B").value)+Number(this.getField("C").value);
if(total == 0)
event.value = "";
else event.value = total*Number(this.getField("D").value);
Copy link to clipboard
Copied
Sounds like a calculation order issue. Look on the "More Menu" in the "Prepare Forms" Panel. You can set the calc order from there.