How to use system variables
drespResearch Studio 6 has included a set of system variables that can be used for different purposes, e.g.:
- Time stamps, giving you the possibility to monitor and calculate the time used between two measuring points. This can enable you to spot straight liners, or calculate the cost in an omnibus survey
- A random variable to filter questions or sections randomly or any question element randomly, e.g. stimulus material, which brands to monitor, etc.
A list of the most relevant system variables is shown below:
System variable name |
Description of variable |
Example of return value |
sys_timenowh |
Timer, giving you time now in the format of hh:mm. Can be used in data type: Time) |
1630 |
sys_timenowf |
(Timer, giving you time now in the format of hhmmss. Can be used in data type: Numeric) |
163015 |
sys_dayofweek |
(Returning the day number, starting with Monday as number 1): |
4 |
sys_date |
(Returning the date today as a numeric variable in the format: yyyymmdd) |
20110217 |
sys_week |
(Returning the today's week of year as a numeric variable) |
7 |
sys_method |
(Returning the DC method: Cati=1, Web=2, Scan=3) |
2 |
sys_rotseed |
(Returning the rotation seed variable) |
-842352752 |
sys_random |
(Returning you a 3 digit random variable between 0 and 999) |
847 |
sys_respguid |
(Returning the unique identifier for THIS respondent. Text variable) |
0 |
sys_timestarth |
(Returning the time of the start of the interview on a format of hh:mm. Can be used in data type: Time) |
990 |
sys_timestartf |
(Returning the time of the start of the interview on a format of hhmmss. Can be used in data type: Numeric) |
163011 |
sys_elapsedtime |
(Returning the time in seconds since the start of the interview. Can be used in data type: Numeric) |
4 |
How to use the system variables
- Specify where you want to import / use a system variable
- Create a question open question (text) or numeric question (remember to specify enough digits)
- Select the row element
- In the options menu specify the following
- Sys_variablename e (Verify and Enter) or
- Sys_variablename c (Continue)
- This question may now be used in logics, references etc.