Repeater control
Repeat a set of controls for multiple items
You can add any number of these to the layout of a flow document.
The Repeater control is similar to the Vertical stack control. It acts as a container that you can add any number of other controls to. The "child" controls inside are automatically arranged into a vertical formation.
However, the big difference is that these child controls will be repeated for each item fetched from a particular AQS data source.
For example, imagine a report about an asset's inspections. It contains an Item data source for the user to specify the asset when they run the report. This gets used as a parameter in an AQS data source, so it only fetches inspections for that asset. The document layout contains a Repeater control which uses that AQS data source. The Repeater contains several Field controls and a File image control, which will collectively appear once for each inspection fetched.
Add a Repeater control
In the Document Layout Editor, select at the bottom (or within another container control) and then choose Repeater.
Configuration
Select the control to show its properties in the top toolbar.
Layout properties
-
Relative width - Auto by default. The control automatically sizes itself to display its content in full (space permitting). Alternatively, you can set a constant width. See Flow control width.
-
Margins - adjust the gap between each side of the control and the content inside. See Flow control margins.
Repeater properties
-
Data source - choose the AQS data source that will provide the items you wish to repeat on.
-
Header to repeat on - by default, all items from the chosen data source will be repeated on. However, if you select a header, items without a value for that header will be skipped.
-
Edit description - customise the control's description (shown in the toolbar).
-
Remove - delete the control.
Adding child controls to a Repeater
You can drag any existing control into a Repeater. Alternatively, select within a Repeater to add a new control inside it.
If you want a child control to use the same data source as its Repeater (e.g. a Field control that represents an attribute from the items being repeated on), you must choose Parent context when setting the child's data source.
If the child control is positioned within a container control (Horizontal stack, Vertical stack, another Repeater) within the Repeater, both the child and container controls must be configured to use the Parent context data source.
Repeaters in containers
If a Repeater is positioned within another container control, its layout properties will be ignored in favour of the container's.
Therefore, if the container is a Horizontal stack, the Repeater's child controls will be arranged horizontally instead of vertically!
To ensure content is displayed correctly, enable the Horizontal stack's Wrap child controls property.
Demonstration
For a detailed demonstration of using controls within multiple nested Repeaters, see Using controls within a Repeater.