Copy link to clipboard
Copied
Use this for "Text Field 21" also update other fields with same script just change field names:
var subtotal= Number(this.getField("Text Field 18").value)*Number(this.getField("Text Field 181").value);
var tax_rate = 0.13;
if (this.getField("AddTax").valueAsString=="Off")
event.value = subtotal;
else event.value = subtotal * (1+tax_rate);
And don't forget about field calculation order.
Copy link to clipboard
Copied
Are you using any other scripts? Can you share file?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You need to change field calculation order. Select prepare form tool -> click on 'More' -> then 'Set field calculation order' make sure fields that should calculate first are up on the list and fields that calculate last are down.
EDIT: it should look something like this:
Copy link to clipboard
Copied
Hi Nesa,
Copy link to clipboard
Copied
Use this for "Text Field 21" also update other fields with same script just change field names:
var subtotal= Number(this.getField("Text Field 18").value)*Number(this.getField("Text Field 181").value);
var tax_rate = 0.13;
if (this.getField("AddTax").valueAsString=="Off")
event.value = subtotal;
else event.value = subtotal * (1+tax_rate);
And don't forget about field calculation order.
Copy link to clipboard
Copied
Hi Nesa, It work fine!!! š