In many cases your forms may include repeating data models within the main data model. Anytime you are able to click an 'Add' button (it may be called something else) to add another response to the same question, you are working in a repeating data model.
Repeating data models make reports more complex, as you are now working with a one to many relationship. You will always have a data model for the form itself which can only have one set of responses. However, each repeating data model may have one or many responses.
When creating a report you must decide if you include repeating data models and if so how you wish the data to display.
Finding views for repeating data models
Views extract data from a form or a repeating data model in a form. Views are created automatically for all your apps and follow this naming convention:
[APP NAME} - [DATA OBJECT NAME] - [REPEAT NAME]
See the following screenshot for an example of this.
If you wish to include data from a repeating data model, be sure to select both the form data model and the repeat data model.
Joining views for repeating data models
Once you have selected your views you must now join them. Joining them tells the report how to extract and join the data that you need. When joining repeat data models you have two choices for how to display the data:
Join type | What this means | How it will display on the report |
Document ID | You are joining the data in the form to the data in the repeat using the form ID to connect them both | The report will show a separate line for every row of data in each repeat. If you have two repeats and they each have two responses then you will see four separate rows in the report |
Row sequence | You are joining the data in one repeat to data in another repeat using the row sequence number to connect them both | The report will match all data from the first row of each report onto one line. If a repeat has a second row of data then that will be matched with the second row of data from other repeats. If they have no data in that row then the column will be blank. If you have two repeats and they each have two responses then you will see two separate rows in the report |
How to join views when you have more than one repeating data model
If you have more than one repeating data model in your form then you may use either of the options above. If you wish to join by document ID then your joins will be as follows:
Form view is joined by document ID to repeat view by document ID
If you wish to join by row sequence then your joins will be as follows:
Repeat view 1 is joined by row sequence to repeat view 2 by row sequence
Repeat view 2 is joined by row sequence to repeat view 3 by row seqeunce
Repeat view 3 is joined by document ID to form view by document ID