...
It is very useful to use templates with repeat controls. Imagine a long list of medications that appear on the form in a collapsed state. It is helpful if the section labels are not simply a static text such as "Medication" but rather dynamic and indicative of the values entered into the form.
Template Syntax for the Comment Field of Selection Controls
The comment field of selection controls (dropdowns, checkboxes and radios) can be accessed in templates. This is supported for templates in forms and flows. The syntax is as follows:
{|your control name} - value of the last option of the selection control
{|your control name.comment} - the value of the selection control comment
{,|dd} {,|dd.comment} - the value of the option or the comment seperated by a comma - useful if control is in a repeat