Adding a Calculated field

Adding a Calculated field automates calculations and allows you to get direct results out of other fields. You can write Formulas for your Calculated fields using Codes of other fields in the Formula editor.

You can use such Calculated fields in a variety of ways, such as:

  • add, subtract, multiply and divide indicators
  • find the count, count distinct, average, median, max, min of indicators
  • search in text values
  • concatenate (merge) text values
  • use date functions
  • use logical functions
  • use geographic functions
  • and many more!

Take a look at all the available Formulas in the Formulas Manual and read more on Writing an Expression.

Calculated fields don't appear in the Data Entry page to avoid confusing users adding Records. You can view the results of the Calculated fields directly on the Table View of the Form or Subform.

Maximum length of a calculated field formula: 1024 characters

How to add a Calculated field

Adding Codes to fields
  • In the Form Design page, find the fields that you want to use in your calculations and add a Code to them to make them more readable in the Formula editor.

Maximum length of a field Code: 32 characters

Adding the Calculated field
  • Click on "Calculated" to select the field from the Fields palette.

Fill in the Properties of the Calculated field by providing:

  • Label: give a descriptive label to the field
  • Description: optionally provide a description
  • Code: optionally provide a code

In the Settings check the boxes you want to apply for the field.

The Calculated field will not appear in the Data Entry page to avoid confusing users adding Records. It will appear however in the Table View. To hide it from Table View make sure you tick the 'Hide from entry' property.

If you set Relevance rules to the field, then it will appear in Table View only if the conditions of the Relevance rules are met.

Using the Formula section
  • In the Formula section add the expression for your Formula. Use the codes you assigned to the fields you need.
  • Make sure you Formula is verified. A verified Formula will be marked with green. A Formula that is not correct will be marked with red.
  • Click on "Done" to add the field to the Form.

Take a look at all the available Formulas in the Formulas Manual and learn more about Writing an Expression.

  • When you finish adding fields, click on "Save" to save the Form.
Using the Formula editor
  • Alternatively click on "Formula editor"  in the Formula section to navigate to the Formula editor.
  • The Formula editor provides you with a list of all available Functions and all available fields.
  • Enter your Formula in the Formula editor. Click on a field to directly select it. If you haven't assigned a code to it, it will appear as a number.

Take a look at all the available Formulas in the Formulas Manual and learn more about Writing an Expression.

  • If you enter an invalid Formula you will get a warning.
  • When you Formula is ready, click on "Done" to add it.
  • Click on "Done" to add the field to the Form.
  • When you finish adding fields, click on "Save" to save the Form.