DREL for Repeatable Sections

About

Forms with repeatable sections will have multiple answers to the same question. DRELClosed Data Reference Expression Language (DREL) is used to get form data and metadata and add it to a string, such as dates, usernames, or answers to questions in forms. has additional functions to allow referencing answers in Repeatable Sections.

The Data Reference Expression Language can be used to build a string using properties from the Data Record, including answer data. DREL is most commonly used for:

Reference one question in a Repeatable Section

Reference: %a[UniqueID][n]

  • This reference is used to insert answers with Unique IDs matching the text in [ ]. These labels are found in the Pages & Questions tab in the Web Portal:

    In the "Pages & Questions" tab, you can locate the Unique ID of a question in the righthand column marked "Label".

  • [n] will return the numbered answer where the row sequence starts at 0, i.e., %a[UniqueID][1] will return the second answer, and %a[UniqueID][0] will return the first.

  • Example: %a[Make] - this will display all answers to this question.

Reference all questions in a Repeatable Section

Reference: %e[Repeatable SectionClosed A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries. ID]

  • This reference is used to insert all data or answered questions from the section matching the text in [ ].

  • Section labels can be found on the Pages & Questions tab in the Web Portal:

    In the "Pages & Questions" tab, you can locate the Unique ID of a section in the righthand column marked "Label".

  • Example: %e[TireInspection] - this will display all entered data or answered questions within this section.

Reference specific answers in a Repeatable Section

Reference: [n]

  • Each answer to a repeated question or section is given an index number. You can use this reference to pull a particular answer out of the repeated section.
  • Note: Reference numbers start at 0, so the first answer in a repeated section would be called using [0].
  • Example: %e[Equipment][0][%a[Make]: %a[Model]]
    • This will pull out the first answer to Make and Model within the Equipment section.
    • Here is an example result using this DREL string: 
      Equipment Make 2: 2C

Reference Nested Repeatable Sections

Sometimes forms will have a repeatable section nested within another repeatable section. This requires a particular syntax to pull answers to questions.

  • %e[Parent Repeatable Section ID][Child Repeatable Section ID]

Reference a subset of questions in a Repeatable Section

Using %a[UniqueID] will give you all the answers to that question, and %e[Section ID] will give you all the answers to all questions within that section. While this can be useful, it is more common to need to limit your answers further. You can do this by making a string of references. You can also add delimiters between answers, such as punctuation or other symbols.

  • Example: %e[Labor][%a[Technician Name]: %a[Tech Sub-total]][, ]

    An example of a Repeatable Section summary table with an Aggregation footer. The table displays the labor details of multiple technicians.

    • This will return all the answers to the Technician Name and Tech Sub-total questions that are contained within the Labor section. Each linked answer will be separated by a comma.
    • Here is an example using this DREL string:
      Scott Stevenson: $111.48 USD, Christine Banks: $18.04 USD, Mark Miller: $50.40 USD, Peter King: $45.38 USD

Reference a Question's Text

Reference: %q[Unique IDClosed A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents.]

This reference is used to insert the text of a question with a Unique ID that matches the text in [ ]. Learn more about Unique IDs.