Using Advanced Expression Piping within your forms you can create mathematical formulas in order to calculate a value. This article will explain how to use the STR function to string together responses to a question in a list format.
The STR function allows a single value to be converted into a string. If trying to use an STR function on text response fields, the string will be pulled as a list, separating the values of each text response with a comma (no spaces).
If you are looking to use an STR function on a closed-ended question (i.e. Checkbox) the scores to the selected responses will be pulled as a list, separating the values of each choice with a comma (no spaces).
TIP! If you wish to pull the choice labels of a closed-ended question into a list, consider In-Form Piping.
The setup and formatting of the STR expression is imperative in preventing an error message from appearing on your form where the result of your expression would normally appear. The first line of the STR expression should be set up as follows:
{{ STR(variable) }} |
STR of a Column | {{ STR(q1[:0]) }} | Based on Grid Indexing, this will pull the string of column 1. |
STR of a Row | {{ STR(q2[1:]) }} | Based on Grid Indexing, this will pull the string of Row 2. |
STR of a Range | {{ STR(q1[0:4]) }} | Based on Grid Indexing, this will pull the string of the first 4 cells. |
STR of the Whole Question | {{ STR(q1) }} | This will string together all responses to question 1. |