• Resolved newsspider

    (@newsspider)


    Is it possible to apply a minimum value on a calculated field? I am creating a loan calculation, and when the deposit is applied (if it is greater than the loan amount) it is possible for the user to display negative interest rates, monthly payment, etc. so I want to apply a function that will not allow these fields to go below zero.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @newsspider,

    It is possible and easy, for example, if the current equation is: fieldname1-fieldname2, and you want to display as the minimum value the number zero, the equation should be edited as follows:

    MAX(fieldname1-fieldname2,0)

    You simply should edit your equations using a similar logic.

    Best regards.

    Thread Starter newsspider

    (@newsspider)

    So how would I apply this to the following calculation:

    prec(fieldname4*fieldname13,2)

    Plugin Author codepeople

    (@codepeople)

    Hello,

    Simply:

    PREC(MAX(fieldname4*fieldname13,0),2)

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Minimum value on calculated field’ is closed to new replies.