Form fields govern how data is collected and reported on in Apricot. A diverse selection of fields is available in the Form Designer to tailor your forms to your organization's data entry needs.
In the Field Choices palette, fields are organized by category or in alphabetical order within the "All" section. Once you've found the field you want to add to your form, you can drag and drop the name of the field into the main body of the form section.
Most of the numeric fields available to be added on a form are for data entry - users enter relevant information into an empty field. In contrast, calculation fields take information that is added elsewhere on a form and use that to create their own data. With these in-form calculations, you have the ability to perform mathematical functions automatically based on information that users enter into a record. This can reduce the time your users spend on data entry and eliminate errors.
Calculation fields are required to take information from either numeric fields or other calculation fields, so at least two numeric fields are required on a form to use calculation fields. Each calculation field can only perform one mathematical function, but they can be combined to perform more complex functions.
Continue reading below to learn how to utilize the fields available in the Calculation category.
Notes:
If calculations need to run in a specific order, fields should also be ordered appropriately within the form for post-processing to work correctly.
Calculations are only run at the time of entry when users add single or batch records. They do not update when a record is updated.
Changes are not retroactively applied to existing records when adding calculation fields to forms. You can update records via the Import Tool then run post-processing afterward.
This does not apply to Date/Time Calculations. Values must be imported directly onto the numeric or date fields used in the calculation or manually updated in each existing record from before the calculation field was added.
Calculations will re-run when the data changes in any field that feeds into a calculation field. For example, with the calculation "Field A + Field B = Field C", the calculation will only re-run if the value in Field A or Field B is changed.
If your calculation field includes a Decimal and Numeric field or Currency and Numeric field, the resulting value will not be a decimal. The value will be rounded to the nearest whole number based on up to two decimal places.
Calculation (÷) Divide
Calculation (÷) Divide requires two numeric fields and divides one numeric field by the other.
Properties
This field can only be set as Quick View, Searchable, or Hidden in the Standard Properties.
Any numeric or calculation field existing on the form will be available to select for your calculation in the Component Fields dropdown menus.
Calculation (x) Multiply
Calculation (x) Multiply can be used to multiply an unlimited number of fields together.
Properties
This field can only be set as Quick View, Searchable, or Hidden in the Standard Properties.
To add more fields to this calculation, click the "+" icon next to "Component Fields" once for each field you'd like to multiply.
Any numeric or calculation field existing on the form will be available to select for your calculation in the Component Fields dropdown menus.
Calculation (+) Add
Calculation (+) Add can be used to add an unlimited number of fields together.
Properties
This field can only be set as Quick View, Searchable, or Hidden in the Standard Properties.
To add more fields to this calculation, click the "+" icon next to "Component Fields" once for each field you'd like to add.
Any numeric or calculation field existing on the form will be available to select for your calculation in the Component Fields dropdown menus.
Calculations (-) Subtract
Calculations (-) Subtract requires two numeric fields and subtracts one numeric field by the other.
Properties
This field can only be set as Quick View, Searchable, or Hidden in the Standard Properties.
Any numeric or calculation field existing on the form will be available to select for your calculation in the Component Fields dropdown menus.
Calculation Round
Calculation Round requires at least one numeric or calculation field and rounds the numeric value collected.
Properties
This field can only be set as Quick View, Searchable, or Hidden in the Standard Properties.
Select the numeric or calculation field to be rounded in the "Input" dropdown. Then, choose how to round the numeric value in the "Math Function" dropdown:
Round (Whole)
Round (Decimal)
Ceiling (Round Up)
Floor (Round Down)
Calculation Date After
Calculation Date After requires at least one Date field and one numeric field and displays the date something will/should occur or has occurred by adding the numeric value to the date.
Note: If your date calculation will always use the same number (ex. Follow-up appointments always take place the same number of days after intake appointments), you can set a Default Value to the numeric field you're adding to the calculation field.
Expand the "Initial Date" dropdown to select a date field for the calculation. Then, select the numeric field in the "Time Span" dropdown. You can also choose to show the calculated interval in days, weeks, months, or years.
Calculation Date Before
Calculation Date Before requires at least one date field and one numeric field and displays the date something will/should occur or has occurred by adding the numeric value to the date.
Note: If your date calculation will always use the same number, you can set a Default Value to the numeric field you're adding to the calculation field.
Expand the "Initial Date" dropdown to select a date field for the calculation. Then, select the numeric field in the "Time Span" dropdown. You can also choose to show the calculated interval in days, weeks, months, or years.
Calculation Date Difference
Calculation Date Difference requires two date fields and calculates how many days, weeks, months or years have elapsed between the two dates. The calculated value will always be a positive number.
Expand the "Initial Date" and "Follow-up Date" dropdown menus to select the available date fields. You can also choose to show the calculated interval in days, weeks, months, or years.
Note: The Interval property will be locked after publishing the form and cannot be changed.
Calculation Time Difference
Note: Due to MySQL limitations within Apricot, this field should only be used to calculate a time difference within the same date. For example, the calculation "1:00am (04/01/2017) minus 11:00pm (03/31/2017)" will give an incorrect value.
To learn how to accurately calculate the time difference across multiple dates, click here.
Calculation Time Difference requires at least two Time fields and calculates how many minutes or hours have elapsed between the two values.
Expand the "Initial Time" and "Follow-up Time" dropdown menus to select the available time fields. You can also choose to show the calculated interval in days, weeks, months, or years.