Often there is a need to define variables within the survey source file that:
- Are not part of the questionnaire. If not part of the questionnaire, then it's possible the survey designer will not want them in the final data output.
- Do not provide any useful data for reporting survey results. Perhaps the variable is used for controlling a skip pattern, calculating a value for use elsewhere in the survey, or even determining which text or content to show on screen.
These variables are called system variables. System variables are utility variables stored in a reporting chapter generally hidden from client view. To denote a variable as a system variable, use the tag systemvar
that accepts 'y' (yes) and 'n' (no) inputs. When systemvar: y
is applied, the variable is placed within the System fields chapter in the Field Selector. System variables are excluded by default from any data exports and are not included in the data map layout for fixed field exports. You can apply the systemvar
tag to a question, class, or table, or include it under the set defaults
widget.
Example
In the following example, we have a ranking question with three options, and the rank: 1-3
tag indicates the respondent may rank just one or two of them if preferred. If the respondent ranks two options, the client would like the third option to be auto-coded as rank 3, rather than be left blank in the data.
To accomplish this, we create a variable called Q2_UNRANKED to determine the unranked option using a conditioned coded variable. Then, we use set value
to populate Q2RANK3 using Q2_UNRANKED.
Because we created Q2_UNRANKED purely for programming reasons, we include the systemvar: y
tag.
In the Reporting Field Tree, the Q2RANK variables are in the Survey fields chapter, while Q2_UNRANKED is placed in System fields due to the systemvar: y
tag:
Comments
0 comments
Please sign in to leave a comment.