The values stored in form fields can be calculated using an expression.
TABLE OF CONTENTS
Use the BETWEEN expression in a Yes/no field to determine whether a value is between certain parameters. For example, I am storing client turnover in a Money field and use this BETWEEN expression in my Yes/no field to return "Yes" or "No" based on whether the client turnover is between £50,000 and £100,000:
BETWEEN(client.clientturnover, 50000, 100000)
If the value is between £50,000 and £100,000, the Yes/no field will return "Yes":
If value is outside of £50,000 and £100,000, the Yes/no field will return "No":
The field "Annual fees" could be automatically calculated using this expression:
IF(client.paymentmethod = "Monthly", client.fees*12, client.fees)
MIN / MAX
We can use the MIN and MAX expressions to return either the lowest or highest value of fields. For example, if I store the turnover for each quarter for my client and can add a field for "Lowest turnover quarter", I can use the MIN expression to return the lowest value from these four fields.
MIN (client.q1turnover, client.q2turnover, client.q3turnover, client.q4turnover)
The calculated field will return the lowest value of these four fields:
Use SUM to calculate the total of multiple fields. For example, I will calculate the total of Net cost and VAT cost using this expression:
These are the fields on the form with Total Cost being our calculated field: