Referencing
You can "quote" a block by its REF. By default, REF is 'Q' + block position. You can rename this REF in the header of each block.
Answers to questions, items and zones also have a REF, but this one is uneditable. This REF is 'F' for field, 'I' for item, 'A' for answer and 'Z' for zone + position.
This function is used to quote answers to closed questions (simple type), to battery of items, open questions and hotspot zones.
This referencing system can be used to refer to previous user responses as well as the texts associated with those responses. It facilitates content personalization and tracking the respondent’s journey throughout the questionnaire.
If a reference answer is a freeField, the entered value will be returned.
Usage
Quoting answers is used in question labels and transitions but also answers to questions, items or zones.
Loop support
Inside a loop, the current iteration is resolved automatically from the context: you don't need to write it. The iteration variables of a loop are addressed with the loop's REF followed by the variable, e.g. [G1.VAR_1] returns the value of variable 1 of loop G1 for the iteration being displayed.
The LOOPn notation is reserved for accessing the data of a block in a specific iteration of a loop, e.g. [Q2.LOOP1] or [Q7.LOOP3.A001]. Iterations are numbered from 1: LOOP1 is the first iteration, LOOP2 the second, and so on.
The Q2.LOOP1.ANSWER notation belongs to scripting and does not exist in referencing: write [Q2.LOOP1].
LOOPn can no longer be combined with loop variables: [G1.LOOP2.VAR_2] is not supported. Use [G1.VAR_2], which always resolves to the current iteration.
Syntax
Basic referencing
[Q1]- Quote all answers to Q1 question, separated by a comma[Q2.I1]- Quote answers to Q2 first item, separated by a comma[Q3.Z4]- Quote the answer to Q3 fourth zone[Q7.A001]- Quote the first respondent answer to Q7 question[Q2.I2.TEXT]- Quote the label of item n°2 (the one with REF I2)
[Q5.A003] refers to the third answer that the respondent has ticked, not the third in chronological order.
Question types
Profile question
[Q1]- Returns all answers of the user separated by a comma ("Answer 1, Answer 2, Answer 3")[Q1.A002]- Returns only the second answer of the user (e.g "Answer 2"), IF ANY[Q1.A3]- Returns only the value of the answer A3 (e.g "Answer 3"), ONLY IF SELECTED BY THE USER[Q1.TEXT]- Returns the text of a question[Q1.A1.TEXT]- Returns the text of an answer
Battery of items
[Q2.I1]- Returns all answers separated by a comma for Item 1 ("Answer 1, Answer 2, Answer 3")[Q2.I2.A002]- Returns only the second answer of the user for Item 2 (e.g "Answer 2"), IF ANY[Q2.I4.A3]- Returns only the value of the answer A3 at Item 4 (e.g "Answer 3"), ONLY IF SELECTED BY THE USER[Q2.TEXT]- Returns the text of the main question of the battery[Q2.I1.TEXT]- Returns the text of an item[Q2.A1.TEXT]- Returns the text of thane answer
Hotspot
[Q3.Z1]- Returns the answer for a zone (hotspot can only have 1 answer)[Q3.Z2.A001]- Returns only the first answer of the user for Zone 2 (e.g "Answer 2"), IF ANY[Q3.Z4.A3]- Returns only the value of the answer A3 at Zone 4 (e.g "Answer 3"), ONLY IF SELECTED BY THE USER[Q3.TEXT]- Returns the text of the main question of the hotspot[Q3.Z1.TEXT]- Returns the text (name) of a zone[Q3.A1.TEXT]- Returns the text of an answer
Open question
[Q4.TEXT]- Returns the text of the main question[Q4.F1]- Returns the answer for a field (e.g "field value 1")[Q4.F1.TEXT]- Returns the text of a field (e.g "Name")
Adaptive
[Q5]- Returns the answer of the adaptive question (e.g "My name is John")[Q5.TEXT]- Returns the text of the adaptive question (e.g "What is your name?")
Loop references
[G1.VAR_1]- Returns the value of variable 1 of loopG1for the current iteration (resolved automatically from the context)[Q2.LOOP1]- Returns the answer to Q2 given during the first iteration of the loop[Q2.LOOP2]- Returns the answer to Q2 given during the second iteration of the loop[Q7.LOOP3.A001]- Returns the respondent's first answer to Q7 during the third iteration of the loop
Global variables
[VAR_1]- Returns the first global variable
URL parameters
[PARAM_ID]- Returns the value of the 'id' parameter[PARAM_LANG]- Returns the value of the 'lang' parameter
Examples
Thank you [Q1.F1] for participating in our survey, can you tell us what is your favorite color?
Your favorite color is [Q2.A001], can you rate those items?.
You rated item 1 with a score of [Q3.I1].