Looking for information about ProntoForms features and functionality? Visit our Product Documentation Portal.
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 section. 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:
In the Form Builder, Aggregation questions appear as shown below:
The Question Edit screen for the Aggregation question type has three tabs: General, Properties, and Help Options. This article will go through each of the tabs.
The Unique ID 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 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:
Restrictions control how your mobile users interact with a question. They can be set on the question itself, or controlled by Conditional Logic.
|Required||Read-Only||Hidden on Device||Hidden in 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 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.
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.
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 would 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.
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 HTML-formatted work instructions.
For more information on Help Content, please read: V2 Forms: Adding Help Content to Questions