Skip to main content
brians30546245
Participating Frequently
January 22, 2022
Question

Help with calculated field

  • January 22, 2022
  • 0 replies
  • 279 views

Hello all, 

 

I cannot get the "Balance Due" field to equal the "Contract Price" minus "Down Payment" correctly. 

 

* The contract price is entered manually. 

 

* The down payment script is (10% of Contract Price, not to exceed $1,000.00) --

var v1 = Number(this.getField("Contract Price_es_:prefill").value);

event.value = Math.min(1000, v1*.1);

 

* Balance due script is --

 

var v1 = getField("Contract Price_es_:prefill").value;

var v2 = getField("Down Payment_es_:prefill").value;

event.value = v1 - v2;

 

Thank you for any help!

This topic has been closed for replies.