Add a minimum value to a calculation script


i working on new form , need add minimum value calculation script calculates based on loan amount, if calculation <$175, fills out $175 , not go below that.

 

current script is:

 

function myround(nvalue, ndec) {

var nround =util.printf("%,1 1." + ndec +"f",  nvalue)

return number(nround);

} // end myround funciton;

 

 

 

// custom calculation script  lenderstitlebase;

// lenderstitlebase = (loanamount * .0030) round neareast 0;

// compute value;

var lenderstitlebase = this.getfield("loanamount").value * 0.0030;

// round value;

event.value = myround(lenderstitlebase, 1);

 

thanks!

at end of code add line:

 

if (event.value<175) event.value = 175;



More discussions in PDF Forms


adobe

Comments

Popular posts from this blog

after effects warning: unable to create drawing surface

Maximum number of authorizations reached!