Form calculations: ages, totals, counts and if()
Short answer: A calculation turns answers into a number your team or your rules can use: an age from a date of birth, a total income, a count of risky answers, the days since a date, or a formula like if(Q2 = yes, 10, 0). In SealDrop the server works it out when the form is submitted, shows it in the summary, and any rule can use it to branch, stop, flag or ask for a document.
The kinds of calculation
| Calculation | Example | Use it to |
|---|---|---|
| Age | Age from the date of birth | Ask for a guardian's consent under 18 |
| Time since | Months since the last renewal | Flag a renewal due within 60 days |
| Sum | Total income from three questions | Ask for more proof above a threshold |
| Count | How many answers are "Often" or more | Flag four or more |
| Formula | round((Q4 + Q5) / 2, 1) | An average, a ratio, a difference |
| if() | if(Q2 = yes and Q3 >= 5, 10, 0) | Points that depend on two answers |
if() in plain words
if(condition, value if true, value if not). Conditions compare with = ≠ > ≥ < ≤ and join with and / or. Yes / No answers count as 1 and 0, so if(Q2 = yes, 5, 0) gives 5 points for a Yes. An unanswered question makes the condition untrue, so the second value is used.
Good habits
- Name calculations for what they mean ("Household income"), not how they're made.
- Round where people will read the number.
- Test the edges: an empty answer, zero, the largest value you allow.
- Keep the formula with the form, so whoever changes it later sees why.
General information for Canadian businesses, not legal advice. Laws and professional rules change — check the current version with your regulator or lawyer.
SealDrop sends your clients a secure link to upload documents and fill in forms. Everything is stored in Canada and deleted once you have filed it. See scores and calculations in SealDrop →
Questions
Can a calculation use another calculation?
Yes, by name in square brackets, as long as it doesn’t depend on itself.
Do clients see calculated values?
No. They’re for your team and your rules.