Presentation of repeated variables in the questionnaire

When working with repeats (particularly nested repeats), it is important to ensure that the presentation of the Questionnaire is clear so end users can easily read and understand the information presented to them.
The presentation of repeats in the questionnaire is driven by the settings of the page and group that those repeated variables are allocated to. Variables that are in the same repeat span should be allocated to the same group and should not share the same groups with variables that are not repeated. Variables with different repetition contexts appearing in the same group will cause the following error:
Window displaying errors in questionnaire.
To fix this, ensure that only variables in the same repetition context appear in a group. This way the questions will be repeated on the questionnaire in a logical order.

Simple repeats

The simplest type of repeat span is one which is not located within another repeat span. For example:
<
Repeat BoardMemberCount
{BoardMemberName}{BoardMemberEmail}>
Customising the Group Repeat Title
The Repeat Title is the sub-title which appears under the group title and identifies each repeat instance. By default, the repeat title will appear as “[current number of the repetition] of [total number of repetitions]”. In the example below, "1 of 2" and "2 of 2" are the Repeat Titles:
Repeat tiles window.
You can customise the Group Repeat Title to better guide your users through the template by using the RepeatCounter function to identify each repeat instance. The RepeatCounter function will return the index number of the repeat instance when repeating by a number and the list item when repeating by a list.
For example, for the repeat described above, by customising the Repeat Title to "{RepeatCounter Format "wth"} Board Member" the questionnaire group titles will display as "First Board Member", "Second Board Member" etc.
These modifications to the repeat title can also be applied to the non-default presentation options for repeats.
Customising the Group Layout
By default, the group layout will be expanded. Depending on the number of questions and type of information you collect, you may want to switch to collapsed, side by side or grid layout.
For example, let’s say you have a repeat for share types and amounts:
<
Repeat ShareTypeCount
{ShareType} {Amount1}>
Grid, repeat rows
The Grid, repeat rows layout will display the questions of the repeated variables as the column headers in the grid, the data for each repetition will be added as a new row in the grid. The left most column will be docked in the grid and display the Repeat Title.
Option to choose layout as Grid, repeat rows.
Output of Grid, repeat rows layout.
Grid, repeat columns
The Grid, repeat columns layout will display the questions of the repeated variables each on a separate row of the leftmost column of the grid, the data for each repetition will be added as a new column in the grid. The top row will be docked in the grid and display the Repeat Title.
Option to choose layout as Grid, repeat columns.
Output of Grid, repeat columns layout.
Collapsed
Collapsed presentation will display only one repetition at a time, allowing the user to flip between repetitions using the arrows on the top right corner of the group.
Option to choose layout as collapsed.
Output of Collapsed layout.
Side by side
Side by side presentation will display the question on the left of the fields in the group
Option to choose layout as side-by-side.
Output of side-by-side layout.

Nested repeats

A nested repeat refers to a scenario where there are repeat spans within repeat spans. For example, if there is a repeat for companies and within each company there is another repeat for directors, this would be considered a nested repeat. It allows a hierarchical presentation of related information.
For example:
<
Repeat CompanyCount
{CompanyName} with directors <
Repeat DirectorCount
{DirectorName}>>
Customising Repeat Titles for Nested Repeats
Customising the Repeat Titles for nested repeats can help display the relationship between the questions more clearly and can make navigating the groups easier.
Repeated groups that are nested will automatically display a breadcrumb link in the Repeat Titles to help the user understand the variables’ relationship with the parent group and easily navigate to it. The breadcrumb will follow the pattern “of [Parent Repeat title]”. They will appear differently depending on whether the groups are collated or not.
You can use {repeatcounter} to customize the Repeat Titles to clearly display which parent group the variables are related to. For example, for a repeat of 3 nested levels such as:
<
Repeat CompanyCount
{CompanyName}, <
Repeat EmployeeCount
{EmployeeName}, <
Repeat PhoneNumberCount
{PhoneNumber}>>>
By customising the Repeat Titles of the groups nested across 3 levels as follows:
  • Companies: “Company {repeatcounter}”
  • Employees: “Employee {repeatcounter}”
  • Phone number:“Phone number {repeatcounter}”
The questionnaire group titles will display in the questionnaire as “Company 1”, “Employee 1 of Company 1” and “Phone number 1 of Employee 1” for the first repetition of the respective repeated groups.
You might also want to display variable data in the Repeat Title to make it easier for your users to follow. For example, by customising the Repeat Titles of groups nested across 3 levels as follows:
  • Companies: “{ifknownelse(Company, concatenate("Company #"+repeatcounter))}”
  • Employees: “{ifknownelse(Employee, concatenate("Employee #"+repeatcounter))}”
  • Phone number: “Phone number {repeatcounter}”
This will display in the questionnaire as “Thomson Reuters”, “Employee #1 of Thomson Reuters” and “Phone number #1 of Employee #1” for the first repetition of the respective repeated groups:
Layout options for Nested repeats
Nested repeats can be displayed in two primary layouts, collated and non-collated. This setting is applied at the page level containing the nested repeated groups.
Nested repeats collate/non-collate option.
Collated
When nested repeats are collated, they are grouped together with their corresponding parent repeat instance. The indentation between the groups indicates the nesting level to make the hierarchy between the groups clear.
For example, for a nested repeat such as
<
Repeat CompanyCount
{CompanyName}, <
Repeat EmployeeCount
{EmployeeName}, <
Repeat PhoneNumberCount
{PhoneNumber}>>>,
the order of information that will be presented in the questionnaire is as follows:
1. Company Name #1
1.1. Employee #1
1.1.1. Phone #1
1.2. Employee #2
1.2.1. Phone #1
1.2.2. Phone #2
2. Company Name #2
2.1. Employee #1
2.1.1. Phone #1
2.2. Employee #2
2.2.1. Phone #1
In the example below, the nested groups are in a page that is collated and the Repeat titles for the groups Companies, Employees and Phone Numbers are left blank:
Collated view of nested groups.
Expanded view of collated groups.
Note that grid layout option is not compatible with the collated of nested repeats.
Non-Collated
The non-collated presentation of repeat groups maintains the original groups together in their respective nesting level.
For example, for a nested repeat such as
<
Repeat CompanyCount
{CompanyName}, <
Repeat EmployeeCount
{EmployeeName}, <
Repeat PhoneNumberCount
{PhoneNumber}>>>,
the order of information that will be presented in the questionnaire is as follows:
  • Companies:
    • Company #1
    • Company #2
  • Employees of Company #1:
    • Employee #1
    • Employee #2
  • Phone numbers of Employee #1 of Company #1:
    • Phone number #1
    • Phone number #2
  • Phone numbers of Employee #2 of Company #1:
    • Phone number #1
  • Employees of Company #2:
    • Employee #1
  • Phone numbers of Employee #1 of Company #1:
    • Phone number #1
Non-collated view of nested groups.Expandable view of non-collated nested groups.