Question Type: Aggregation

Contents

About

Aggregation questions are only used in the footer of a repeatable section. They are similar to a calculation: they are used to "aggregate" all the answers to a single question inside a repeatable sectionClosed A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries.. For example, they may add up all the hours in a timesheet or add up all the "line amounts" to provide a total dollar amount for an invoice.

For more information on repeatable sections, please read our documentation: Overview: Repeatable Sections.

An example of three different Aggregation questions on an iOS device is shown below:

2019-01-22-iOS-Aggregation01.png

Form Builder

In the Form Builder, Aggregation questions appear as shown below:

2019-01-22-FB-Aggregation01.png

The Question Edit screen for the Aggregation question type has three tabs: General, Properties, and Help OptionsClosed Help Options are ways to add help content, such as YouTube videos, web pages, text, or images, to questions in a form. Mobile users simply tap the help icon next to a question to see the help that the form designer provided.. This article will go through each of the tabs.

2019-01-15-FB-Aggregation02.png

General

Unique ID

The Unique IDClosed A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents. is the reference for the question. For more information on Unique IDs, read: Overview: Unique IDs. It can either be auto-generated based on the question text, or customized.

Data Types

Data Types are the kind of information used in the question. Setting a data type for the aggregation question ensures that the entered data can be used elsewhere in your business process, whether that's by other questions in the form, or in a data destination.

The Aggregation question type supports the following data types:

Integer Decimal Currency Duration
Aggregation

Restrictions

Restrictions control how your mobile users interact with a question. They can be set on the question itself or controlled by Conditional Logic.

The following table shows which restrictions you can set for the question type. Note that:

  • indicates a restriction that you can configure.

  • * indicates a restriction that is always on.

  • ✘* indicates a restriction that is always off.

Required Read-Only Hidden on Device Hidden on Reports
Aggregation * ✓*

* Aggregations are Read-Only by default, as the mobile user cannot interact with them. The question is also always answered ("0" is an answer), the question cannot be set to Required.

Properties

Properties allow you to set up your question in various ways. Aggregation questions allow you to select the aggregation type and set the question it pulls from.

2019-01-22-FB-Aggregation02.png

Aggregation Type

The aggregation type sets up different kinds of processing or calculations based on all the answers to your source question inside the repeatable section entries.

  • Sum: Add all of the answers to your source question together to arrive at a total value across all repeatable section entries. This is the most common aggregation type and is often used for things such as subtotals and hours-worked. In our example below, the Part Total is a sum aggregation of the Subtotal entries.
  • Count: Count the number of times the source question is answered across repeatable section entries. For example, if the repeatable section has 12 entries, but the source question was only answered in 10 of them, the Count aggregation will output '10'. In our example below, the Count Test is a count aggregation.
  • Average: Adds all the answered questions to your source question up and then divides them by the number of answered questions to create an average value. In our example below, the Average Test is the average of the Subtotal. Note: rows without a value in the answered question will not be added to the average.
  • Minimum Value: Displays the lowest value answer to your source question from all the repeatable section entries. In our example below, the Minimum Value Test is based on the Quantity column.
  • Maximum Value: Displays the highest value answer in your source question from all the repeatable section entries. In our example below, the Maximum Value Test is based on the Quantity column.
  • Standard Deviation: Quantifies the amount of variance or deviation within all entries in your source question, and outputs it as a number. In our example below, the Standard Deviation Test is a standard deviation aggregation based on the Subtotal entries. Note: rows without a value in the answered question will not be used in this calculation.

2017-11-13-AggregationTypes.png

Source Question

Aggregations use information from a source question to perform different actions (based on the aggregation type). For example, if you want to know the average cost of parts within a repeatable section, you will select the "Parts Subtotal" question as the source question and set the aggregation type to Average. This would take all answers to the "Parts Subtotal" within the repeatable section, add them all together, and then divide by the number of answers to create an average price. Please note:

  • the source question must be within:
    • the repeatable section, or
    • a footer item in a nested repeat.
  • the data type you set for the aggregation should match the data type of the source question.

Data Type Properties

Some question properties change depending on the data type of the question.

Integer/Decimal/Currency Duration
  • Allowable Range (Min/Max)
  • Decimal Place Precision (Decimal Data Type)
  • Currency
  • Precision (Hours, Hours & Minutes, etc.)
  • Min/Max Value

Help Options

Adding "Help" content to forms gives mobile users access to support and other resources out in the field. Help content is available to users through a button embedded beside a question. Any question in the form can include a link to YouTube videos, web pages, or work instructions. 

For more information on Help Content, please read: Add Help Options to Questions