Skip to main content
Participant
August 6, 2019
Question

Divide and Round Up answer

  • August 6, 2019
  • 1 reply
  • 483 views

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);

}

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
August 6, 2019

Did you use the code? Any problem with this?

tmist7Author
Participant
August 6, 2019

No, I cannot get it to work yet. Have any ideas?

Bernd Alheit
Community Expert
Community Expert
August 6, 2019

Any error message? Where does you place the code?