Copy link to clipboard
Copied
Hi,
I am editing a form i created and trying to save myself having to manually enter as much as possible.
I have a field, lets call it 'A' this field shows the total price. I need it so that if field 'B' is set to 'Yes', then field 'A' will minus the number in field 'C'.
Context is, Total price (A) - VAT (C) if they are exempt (B = Yes)
any help would really be appreciated, i've tried all sorts.
Put this script in custom calculation script of Field D or wherever you want the difference to be:
var a = this.getField("FieldA");
var b = this.getField("FieldB");
var c = this.getField("FieldC");
if(b.value == "Yes"){event.value = a.value - c.value}
else if(b.value != "Yes") {event.value = ""};
Copy link to clipboard
Copied
Put this script in custom calculation script of Field D or wherever you want the difference to be:
var a = this.getField("FieldA");
var b = this.getField("FieldB");
var c = this.getField("FieldC");
if(b.value == "Yes"){event.value = a.value - c.value}
else if(b.value != "Yes") {event.value = ""};
Copy link to clipboard
Copied
Thank you so much 🙂