Currently you are not logged in. Before you can download and upload forms and calculations, please .

Obtain the highest value out of a set of (number) fields

Castor EDC Team
18 May, 2022

This calculation takes the values entered in a set of fields and returns the highest value. The fields do not need to be numbers (they can also be radio button or dropdown type), but in that case the label needs to be numerical.

The example code uses 3 variables. Add more “var” declarations or remove any as needed, then adjust the line ‘fullArray.push(variable1, variable2, variable3)’


NOTE. Although having a variable empty returns NaN here, it will work well in the EDC. You can also use Calculation field helper to test

Fields used in calculation
first variable
second variable
third variable
Currently you are not logged in. To see and try this calculation, please .