• Resolved rphrus

    (@rphrus)


    Hi,
    I have an equation:

    1-2mg/kg/day, maximum 60mg/day.
    fieldname1 would be input field in kg which is then multiply 1 to 2 mg that will give me a value fieldname2 in mg/day. If the calculated value exceeds 60mg/day then display 60mg/day in fieldname2.

    I am thinking of breaking the equation into 2 separate equations with 1mg/kg/day max 60mg/day and 2mg/kg/day with maximum 60mg/day. I am not sure how to achieve this and display the maximum value 60mg/day if the calculated value is greater than 60mg/day, if not then display the calculated value. I would appreciate your expertise.

    Thank you.

    https://www.ads-software.com/plugins/calculated-fields-form/

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    The equations for each calculated field would be:

    For 1mg/kg/day:

    MIN(fieldname1,60)+'mg/day'

    For 2mg/kg/day:

    MIN(fieldname1*2,60)+'mg/day'

    and that’s all, really simple.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Display range, if over maximum value is reached then display the maximum value’ is closed to new replies.