Overview
Form variables and calculations can be used to automate calculations and certain functions. They allow you to perform advanced calculations of data across multiple fields.
From sales and expenses to customer feedback and safety scores, this easy-to-use feature helps reduce human error and streamline data collection. You can even save your calculations and reference them in your rules.
Traditionally, calculations would require the use of a script in a Calculation Field, but you can perform many common functions without a script in the Calculations/Variables tab (Advanced Options > Advanced Rules > Calculations/Variables).
How to Set Up a Variable
1. Go to Advanced Options > Advanced Rules in the Form Builder. You will then see the following screen:
2. Click the Calculations/Variables tab, and then click Add Variable as shown below:
3. Name your variable.
-
- It's important to give your variable a logical name since this name will be used in your rules and possibly other areas of your forms.
- For example, if you are calculating a person's age in 20 years, a good name for the variable would be Age in 20 Years.
4. Select the function you want to perform.
-
-
- Depending on the function you chose, you will be presented with different parameters or options to configure.
- For example, with mathematical functions, you will be asked to select from a list of numeric fields you want to add together. For date/time operations, you will be asked to select from a list of date/time fields.
-
5, After selecting the type(s) and value(s), click Save.
Using the Variable List Filter
If your form contains many variables, a filter or search utility is available to find all variables that reference a particular field:
- Locate the Filter search box in the Calculations/Variables tab.
- Type in a field name in the Filter search box and your list of variables will be narrowed to variables that are linked to that field.