DREL for Repeatable Sections



Forms with repeatable sections will have multiple answers to the same question. DREL has additional functions to allow referencing answers in repeatable sections.

The Data Record 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[Label][#]

  • This reference is used to insert answers with labels matching the text in [ ]. These labels are found in the Pages and Questions tab in the Web Portal:
  • [#] will return the numbered answer where the sequence starts at 0, i.e., %a[Label][1] will return the second answer, and %a[Label][0] will return the first.
  • Example: %a[Make] - this will display all answers to this question.

[ top ]

Reference all questions in a Repeatable Section

Reference: %e[sectionLabel]

  • 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 and Questions tab in the Web Portal:
  • Example: %e[Equipment] - this will display all entered data or answered questions within this section.

[ top ]

Reference specific answers in a Repeatable Section

Reference: [index number]

  • 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

[ top ]

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 Repeat Section Label][Child repeat section label]

[ top ]

Reference a subset of questions in a Repeatable Section

Using %a[questionLabel] will give you all the answers to that question, and %e[sectionLabel] 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]][, ]
    • This will display 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

[ top ]

Reference a Question's Text

Reference: %q[QuestionLabel]

This reference is used to insert the text of a question with a label matching the text in [ ]. Question labels are most easily found in the form builder, in grey to the right of the question. Learn more about using Labels.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request