1. Home
  2. Survey
  3. Build Survey
  4. Survey Placeholders in Survalyzer

Survey Placeholders in Survalyzer

Within a survey, the following Placeholders are available:

  • Sample / Panel placeholder
  • Question placeholder
  • URL Variable placeholder
  • Survey placeholder
  • Custom Variable placeholder

Note: Each placeholder must have double curly brackets “{{” and “}}” to work correctly.

To see all available placeholders, open the RTE and click on “Show available placeholders“, located just below it.

Sample / Panel placeholder

Sample / Panel placeholders are also available to use in surveys. To use Sample / Panel placeholders, take a look at Message placeholders.

Question placeholder

Question placeholders can be used within a survey to show answers to preceding questions.

Note: Question placeholders do not have any prefix. If the question code is “q1” then the placeholder is {{q1}}.

By using a question placeholder you can, for example, show the given answer to a question within the question text of a later question:

Example: Let’s say you ask in question A (let’s assume the question code is qA) which product a respondent most prefers. In question B, you ask them why they most prefer “Product X”. The placeholder for “Product X” is {{qA}}.

In rare cases you don’t want to see the label of the given answer, but rather the corresponding value. In this case, you can get Survalyzer to also show the value (or code) by using additional syntax.

Example: If you use a single choice question (let’s give it the code “q1”) each option has a code, which also can be seen as a value. So if you want to show the value instead of the label it would look like this: {{q1.code}}

Another value that can be shown, is the count of choice (this only works with single choice questions – Single Choice, Discrete Slider, Drop-down). Count means the number of respondents who selected this particular option in this survey at the time when the respondent is completing it. In this case, you can also get Survalyzer to show the count, again by using additional syntax.

Example: If you use a single choice question (let’s give it the code “q1”) with two options, and you want to show the respondent which option was selected most to date. Here you can show the count (instead of the label for the second option) by using: {{q1.count(2)}}
The text in the standard brackets (in example 2) is the code of the answer option.

To understand how your variable name is created and defined, please take a look at “Calculations & Variable Names”.

URL Variable placeholders

In Survalyzer, each survey has 20 URL variables by default. For more information please take a look at the URL Variables page.

As a placeholder, a URL variable looks like this: {{url.var01}}

So we have a prefix of “url” here, followed by the variable number. Since URL variables are numbered from 1 to 20, you can’t name these. One digit numbers always have a preceding 0, so it’s {{url.var01}} and not {{url.var1}}

Survey placeholder

Survey placeholders can be used in certain cases. Survey placeholders always start with the prefix “survey” followed by the placeholder name.

{{survey.answers}}

This placeholder gets replaced by a URL to a page where the whole survey is shown on one page, including all given answers of the respondent. This is useful on the thank you page, to show the respondent their selected answers.

{{survey.language_selector}}

This placeholder gets replaced by the language selector. This is useful if you want to show the language selector on the first page of the survey, when you can use this placeholder in a textblock.

{{survey.locale}}

This placeholder gets replaced by the code of the language (for example, “en” for english) the respondent is currently using. This may be useful for links where you can add the locale to your URL.

This placeholder is actually not needed in the context of a survey. If you want to create a personal link for a survey, please refer to the next placeholder.

This placeholder will be replaced by a freshly created, personal link. The ‘id’ must be replaced by the ID of the target survey. You’ll find the ID of your survey in the URL of the build page.

For example:

target survey build page URL:
https://documentation.survalyzer.ch/workspace-4552#/survey/21751/build

placeholder example:
{{survey(21751).personal_link}}

Example: When someone registers to your Panel by filling out your registration survey, you can send them an invitation to the profile survey by creating a personal link to it.

{{survey.response_id}}

The response ID placeholder will be replaced by the current response ID of the respondent. You can use this placeholder to give an anonymous respondent the opportunity to fill out their survey on another device.

This can be achieved when you create a link as follows:

Anonymous Link:
https://documentation.datacoll.net/mlqaawfylf?l=en

Placeholder:
{{survey.response_id}}

Combined:
https://documentation.datacoll.net/mlqaawfylf?l=en&responseid= {{survey.response_id}}

Result in Survey:
https://documentation.datacoll.net/mlqaawfylf?l=en&responseid= 09CE5986-1E41-4A98-A241-000322075A9E

This link could be opened on any other device / browser to continue the survey from the page where it was paused.

{{survey.countstarted}} & {{survey.countcomplete}}

The {{survey.countstarted}} and the {{survey.countcomplete}} each contain the count of respondents. In other words, {{survey.countstarted}} contains the number of respondents who have started the survey but did not yet complete it.

The {{survey.countcomplete}} contains the number of respondents who have already completed the survey, up to the time the respondent sees the placeholder.

These placeholders can be used in value assignments. In combination with the modulo operator for calculations, it’s possible to create an almost perfect nominal distribution.

Example:

The numbers of all started and all completed interviews are added together. The sum is divided by 2. The remaining value of this division is assigned to the variable subdivision.
In case the sum of all interviews is an even number (subdivision=0), the Section Product A is shown. In case the sum of all interviews is an odd number (subdivision=1), the Section Product B is shown.

Custom Variable placeholder

These placeholders get replaced by the value of a custom variable, created by a value assignment. All custom variables start with the prefix “custom”, followed by the variable name.

Note: Certain special characters and also blank spaces will convert to an underscore for the placeholder. For example, if your custom variable is named “My Own Variable” this will convert to {{custom.my_own_variable}}

Updated on February 21, 2020

Was this article helpful?

Related Articles