Hi, I'm creating a form with a calculation that basically equals the "Large" function in Excel. For example, I need the 'Total' Field to be the sum of the 3 highest amounts from 4 amount fields. I've been looking everywhere for an example, but can't find anything. Is there any way to convert this formula to JavaScript?? I'm clueless! Thanks very much!
You put them in an array, sort it, and then grab just the last 3 three items.
var arr = new Array(field1, field2, field3, field4);
arr.sort();
var result = arr[1]+arr[2]+arr[3];
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com