Skip to main content
Participating Frequently
January 15, 2016
Answered

Convert IF function into Custom Calculation Script

  • January 15, 2016
  • 1 reply
  • 715 views

Can anyone help me with converting "IF(Line7<Line8)Line7,Line8" into a Custom Calculation Script?

This topic has been closed for replies.
Correct answer try67

var L7 = Number(this.getField("Line7").value);

var L8 = Number(this.getField("Line8").value);

event.value = (L7<L8) ? L7 : L8;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
January 15, 2016

var L7 = Number(this.getField("Line7").value);

var L8 = Number(this.getField("Line8").value);

event.value = (L7<L8) ? L7 : L8;

Participating Frequently
January 15, 2016

Thank you!