Dynamic text

Difficulty level: Difficult

What does the functionality do?

You use this functionality especially, when a participant, after selecting an answer from a single response question, has to assess some products, services, statements, elements, etc. related to the selection made by this participant.

Example: A participant, depending on his/her selected function, is presented with some function-specific statements that he/she has to rate on a 5-point scale in another question. These statements vary by function and should therefore be defined as dynamic text.

Use case and how to set it up?

Suppose you have included a single response question in the survey asking the survey participant to select a country where he/she has recently visited some cities. For example, this question may look like this:

Now, before creating a matrix question with visited cities (defined as dynamic text), you need to create some value assignments. Suppose you want the public gardens of four cities (dynamic1 to dynamic4) to be rated for each of the three countries, you need to create three value assignments for the countries. These can be added to the survey AFTER the single response question, but BEFORE the matrix question.

The following data must be set for the first value assignment:

  • Data type: The data type of the Germany variable must be String.
  • Filter: The Germany value assignment must be executed, if the Germany answer option has been selected in question q1.
  • Execute: the Anytime (immediately after every change to an involved variable) option must be selected.

The following data must be set for the second value assignment:

  • Data type: The data type of the Switzerland variable must be String.
  • Filter: The Switzerland value assignment must be executed, if the Switzerland answer option has been selected in question q1.
  • Execute: the Anytime (immediately after every change to an involved variable) option must be selected.

The following data must be set for the third value assignment:

  • Data type: The data type of the Netherlands variable must be String.
  • Filter: The Netherlands value assignment must be executed, if the The Netherlands answer option has been selected in question q1.
  • Execute: the Anytime (immediately after every change to an involved variable) option must be selected.

Furthermore, 4 more custom variables dynamic1 to dynamic4 with the String data type should be created. The box Is equal to the following term: can be left blank. Depending on the choice of country, the dynamic4 custom variable could, for example, be Cologne (Germany), Berne (Switzerland) or Maastricht (The Netherlands).

After this, the matrix question with visited cities (defined as dynamic text) can be created. At the position of the custom variable placeholders {{custom.dynamic1}} to {{custom.dynamic4}}, the cities belonging to the selected country whose public gardens are to be rated, are displayed.

To provide the rows in a matrix question with these placeholders, proceed as follows:

  • Click at the right under Rows in a row for a link labelled Rich text editor … to appear at the top right of this row.
  • Click this link to launch the RTE window.
  • Click the Placeholder icon (1).
  • Click the triangle in front of Custom Variables (2) at the bottom of the RTE window so that all custom variables created for the corresponding survey are displayed, see the Placeholder column on the right.
  • Specify the position in the window (3) where the corresponding custom variable placeholder should be inserted.
  • Click e.g. the {{custom.dynamic1}} link (4) to insert this placeholder at the indicated position in the window.
  • Click the green Save changes button (5) at the bottom of the window in the RTF editor. The custom variable placeholder will be included in the appropriate row of the matrix question.

After a participant has selected a country in the single response question, the corresponding cities recorded with the custom variables are displayed in the rows of the matrix question. For each of these cities, the respective participant can then indicate whether he/she is not at all satisfied (value 1), satisfied (value 2) or very satisfied (value 3) with the public gardens in that city.

Updated on April 3, 2023
Was this article helpful?

Related Articles

Need Support?
Please login to your Survalyzer account and use the "Create Support Request" form.
Login to Survalyzer