Difference between revisions of "QAS new"
(→QAS_new) |
CGHelpdesk (talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | == QAS_new == | |
− | |||
− | |||
Create a questionnaire answer sheet object | Create a questionnaire answer sheet object | ||
− | + | ===Syntax=== | |
QAS_new(''questionnaireResourceId, userResourceId'') | QAS_new(''questionnaireResourceId, userResourceId'') | ||
Line 13: | Line 11: | ||
QAS_new(''questionnaireResourceId'') | QAS_new(''questionnaireResourceId'') | ||
− | + | ===Arguments=== | |
*''questionnaireResourceId'': is a ''number ''expression. It is the questionnaire's resource id | *''questionnaireResourceId'': is a ''number ''expression. It is the questionnaire's resource id | ||
*''userResourecId'': is a ''number ''expression. It is the user's resource id | *''userResourecId'': is a ''number ''expression. It is the user's resource id | ||
− | + | ===Return value=== | |
An array, it is a questionnaire answer sheet object, which contains the following items: | An array, it is a questionnaire answer sheet object, which contains the following items: | ||
Line 116: | Line 114: | ||
| width="467" style="border:1px solid #010101;" | | | width="467" style="border:1px solid #010101;" | | ||
<span class="normalise">End date</span> | <span class="normalise">End date</span> | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="292" style="border:1px solid #010101;" | | ||
+ | <span class="normalise">QAS_GUID</span> | ||
+ | |||
+ | | width="116" style="border:1px solid #010101;" | | ||
+ | <span class="normalise">string</span> | ||
+ | |||
+ | | width="467" style="border:1px solid #010101;" | | ||
+ | <span class="normalise">The unique id of qas</span> | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
Line 149: | Line 157: | ||
|} | |} | ||
− | + | ===Example=== | |
array qas1 = QAS_new(33702597); | array qas1 = QAS_new(33702597); |
Revision as of 12:27, 26 September 2013
QAS_new
Create a questionnaire answer sheet object
Syntax
QAS_new(questionnaireResourceId, userResourceId)
or
QAS_new(questionnaireResourceId)
Arguments
- questionnaireResourceId: is a number expression. It is the questionnaire's resource id
- userResourecId: is a number expression. It is the user's resource id
Return value
An array, it is a questionnaire answer sheet object, which contains the following items:
Index |
Data type |
Value |
QAS_ID |
number |
Primary key |
QAS_QUESTIONNAIRE_RESOURCE_ID |
number |
Questionnaire's resource id |
QAS_USER_RESOURCE_ID |
number |
User's resource id |
QAS_TEST |
bool |
If it is a test answer sheet |
QAS_STATUS |
number |
Questionnaire answer sheet's status, it should be compared to/assigned with defined constants (see getRPQStatus function for more information) |
QAS_COMPLETED |
bool |
If the answer sheet is completed |
QAS_STARTDATE |
array |
Start date |
QAS_ENDDATE |
array |
End date |
QAS_GUID |
string |
The unique id of qas |
QAS_CATI_APPOINTMENT |
array |
Next contact datetime |
QAS_CATI_LIST_TYPE |
number |
1: CATI_MAIN, 2: CATI_ONGOING, 3: CATI_APPOINMENT, 4: CATI_FINISHED, 5: CATI_RETRY NOTE! If the QAS is actually part of a CATI run, then this item should only be updated when the value is CATI_FINISHED, or when the CATI is not running, otherwise the CATI system may get confused. |
QAS_CATI_TIMES_CALLED |
number |
times called |
Example
array qas1 = QAS_new(33702597);
qas1[QAS_TEST] = true;
QAS_save(qas1);
array qas2 = QAS_new(33702597, 53468);
QAS_save(qas2);
Availability
Version 5.6