Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 97529

Divide and Round Up answer

$
0
0

I have two fields, field A and field B. Field A needs to be divided by Field B and the answer needs to be rounded up. Example: 2÷5=1

 

How can I code this?

 

var AA = this.getField(“UNITSWEEK”).value;

var BB = this.getField(“MAXDAYSWK”).value;

 

 

if (BB==0) event.value = "";

else event.value = Math.ceil (AA / BB);

}


Viewing all articles
Browse latest Browse all 97529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>