Open Text Question
Question ID: "name".
Figure 1 - "name" Question ID
Figure 2 - Open text Result
Date
Question ID: "birthday".
Figure 3 - "birthday" Question ID
Figure 4 - Date result
The date format will depend on survey language.
Note: The Date question property is only available when using the Optimized Database format.
Single Question
Question ID: "gender". Codes: M (Male) and F (Female).
Figure 5 - "gender" Question ID
Figure 6 - Single question result
Single Question with Boolean Property Set
Question ID: "license". Single questions with the Boolean property set will be fixed to having two answers in the answerlists with code 1 (true) and 0 (false).
Figure 7 - "license" Question ID
Figure 8 - Single Question with Boolean Property Set result
Note: The Boolean question property is only available when using the Optimized Database format.
Multi Question
Question ID: "cars". Codes: "1","2","3","4","5","6","7".
Figure 9 - "cars" Question ID
Figure 10 - Multi Question
Open Text List
Question ID: "carscharacteristics". Codes: "1","2","3","4","5","6","7".
Figure 11 - "carscharacteristics" Question ID
Figure 12 - Open Text List
Geolocation Question
Question ID: "position"
Figure 13 - "position" Question ID
Figure 14 - Geolaction question
Grid Question
Question ID: "importance". Codes in answer list: "1","2","3","4","5","6","7". Code in scale: "1","2","3","4".
Figure 15 - "importance" Question ID
Figure 16 - Grid Question
Other Specify Items
Single, Multi, Numeric Lists, Open Text Lists, Ranking, Grid and 3D Grid questions can all have elements in the answer list with the "Other" property set. This means the answer alternative will be presented with a text box such that the respondent can specify an "other" answer alternative.
You refer to this response with the id qID_code_other, for example q1_98_other for the other text box for answer alternative with code 98 on question q1. Here, for the other, specify alternative on a multi question cars:
Figure 17 - "Other" property set
Figure 18 - Other
Loops
The same methods may be used on a loop node as on a single question. They return the same items as the single, except for label, which will return the loop's ID (not the loop's title, which is only used in reporting).
Figure 19 - Loop ID
Below are the results from the first iteration of the loop:
Figure 20 - Loop
The first four methods (get, label, value and valueLabel) can only be used inside the loop and will give results for the current iteration. domainValues and domainLabels can also be used outside of the loop.
3D Grid
None of the methods apply directly to 3D grids. Instead, refer to the questions contained in the 3D grid by their question IDs.
An other specify item on a 3D grid can be accessed in a similar way to other specify on other questions:
f("qid_code_other").get()qid would then be the question id of the 3D grid, and code would be the code of the answer with other specify.
Implicit Conversion of Arrays to Strings
The arrays in the previous examples are all presented in a string context (text substitution with ^) so they are converted into strings. When an array (the result from applying categories, categoryLabels, values, domainValues or domainLabels) is converted into a string, the elements are presented separated by commas.
In this grid, where the default codes ("1","2","3",…) are used both in answers and in scale, what methods do you have to use on
f("importance")["2"]to get the label
- "Important"
- "Design"
Figure 21 - What methods you have to use to get "Important" and "Design" labels
The answers are given in APPENDIX A Answers to Exercises.