Is there any way in EPDM to find the max value from an array of variables?
I want to use a weighted rating system for checkboxes.
I need to be able to determine the highest point value of the checked boxes, as well as the total of all the checkboxes on the card.
e.g. say I have 5 checkboxes with the following point values:
So if the user were to check:
chk1 and chk5
Then the max value=3 and total=6
Or, if the user were to check:
chk1, chk2, and chk3
Then the max value =2 and the total = 4
Hope that makes sense.
My first thought is that I can tie the checkbox to a non-visible editbox and use control logic to set the point values.
e.g. if chk1 = 0 then edit1=0
if chk1 = 1 then edit1=1
if chk2 = 0 then edit2=0
if chk2 = 1 then edit2=1
if chk3 = 0 then edit3=0
if chk3 = 1 then edit3=2
I could then get the total using an input formula on another editbox and adding all the variables...but what I can't figure out is how to determine the max value??
There doesn't seem to be any support for this in the mathematical operators available.