Loop Sources

As explained above, a looping section provides a quick way to ask the same set of questions about a group of entities.

These entities are grouped by type and are part of a table that is known as a ‘loop source’. The following table is an example of a loop source:

  Region

Country

  Europe  

  Portugal  

  Europe  

  Germany  

  South America  

  Brazil  

Each column header corresponds to a loop item type and each of the records in that column is a loop item. Europe and South America would be loop items of type Region; and Portugal, Germany, and Brazil would be loop items of type Country.

The columns of a loop source should be hierarchically organized, with the column on the left being the parent column of the column on the right. The same is true for the organization of the loop items.

This means that in our example Country is a child of Region, and therefore Portugal is a child of Europe.

In our example we could have two nested looping sections with the parent section iterating over Region and the child section iterating over Country, as seen in the following screenshot.


Filtering Fields


Filtering fields enable respondents to be prompted to answer only questions about particular entities in a loop source that are relevant to them.


A filtering field is associated with one loop item type of a given loop source. When a filtering field is created, the system will add an extra field to the profile of each respondent of that questionnaire, which can then be associated with the relevant loop item for that respondent.


Using the above example, if the filtering field was associated with the item type Country and the respondent had it set to Portugal, the respondent would not be prompted to fill in any questions about Germany.


Extra information for loop items


The ORS allows the association of extra information with each loop item. The information to be associated can be a URL, a string of text or a link to an image.

In Figure 36 the Portuguese and German flags have been added as extra information for the respective loop items.


How to add a loop source

  1. Compile your loop source in the correct format
  2. Go to the questionnaire dashboard page
  3. Follow the ‘Manage’ link by the ‘Loop sources’ section of the dashboard
  4. Click on ‘New Loop Source’;
  5. Choose a name for the loop source and select a file from your computer;
  6. Click on “Submit”. Note: After adding the loop source you will be taken ‚Ä®back to the questionnaire’s list of loop sources. The import of the loop source happens in a background job, but once it is ready you will be able to see it in this page.

How to add extra details to loop items

  1. Go to the questionnaire’s loop sources page, via the questionnaire dashboard.
  2. Select a loop source by clicking on the ‘Show’ link next to it.
  3. Click on the ‘Add extra’ link for the loop item type that you wish to add an extra to
  4. Fill in the name of the extra and choose the type.
  5. Click on the ‘Create’ button; After the extra is created you are taken to the
    loop item type page.
  6. Add the extra information for each loop item by clicking on the ‘Upload source’ link next to the extra field added (e.g.: ‘Flag’ in Figure 40).
  7. Select the file with the information and upload it. Note: Instructions on how to format the source file can be found in the tooltip next to the extra field.
  8. This extra field will then be available to be used in the description of any looping section that loops through ‘Country’, as shown in the following Figure.