Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

QAS new: Difference between revisions

From Catglobe Wiki
Cg_pham (talk | contribs)
No edit summary
Cg_pham (talk | contribs)
No edit summary
Line 1: Line 1:
[[Category:Questionnaire_Functions]]
{{HelpFiles}}  
{{HelpFiles}}


====QAS_new====
==== QAS_new ====


Create a questionnaire answer sheet object
Create a questionnaire answer sheet object  


'''Syntax'''
'''Syntax'''  


QAS_new(''questionnaireResourceId, userResourceId'')
QAS_new(''questionnaireResourceId, userResourceId'')  


or  
or  


QAS_new(''questionnaireResourceId'')
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'''


'''Arguments'''
An array, it is a questionnaire answer sheet object, which contains the following items:


* ''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:
{| cellspacing="0" cellpadding="2" border="1" width="875" style="border-collapse:collapse; border:1px solid #010101" class="tableintopic"
|- align="left" valign="top"
| bgcolor="#C0C0C0" width="292" style="border:1px solid #010101;" |
'''Index'''


<table cellspacing="0" cellpadding="2" border="1" width="875" style="border-collapse:collapse; border:1px solid #010101" class="tableintopic">
| bgcolor="#C0C0C0" width="116" style="border:1px solid #010101;" |
<tbody><tr align="left" valign="top">
'''Data type'''
<td bgcolor="#C0C0C0" width="292" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Index</strong></p>
</td>
<td bgcolor="#C0C0C0" width="116" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Data type</strong></p>
</td>
<td bgcolor="#C0C0C0" width="467" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Value</strong></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_ID</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">number</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">Primary key</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_QUESTIONNAIRE_RESOURCE_ID</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">number</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">Questionnaire's resource id</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_USER_RESOURCE_ID</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">number</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">User's resource id</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_TEST</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">bool</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">If it is a test answer sheet</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_STATUS</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">number</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">Questionnaire answer sheet's status, it should be compared to/assigned with defined constants </span></p>
<p class="bodytext"><span class="normalise">(see getRPQStatus function for more information)</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_COMPLETED</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">bool</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">If the answer sheet is completed</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_STARTDATE</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">array</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">Start date</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">QAS_ENDDATE</span></p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">array</span></p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext"><span class="normalise">End date</span></p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext">QAS_CATI_APPOINTMENT</p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext">array</p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext">Next contact datetime</p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext">QAS_CATI_LIST_TYPE</p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext">number</p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext">1: CATI_MAIN, 2: CATI_ONGOING, 3: CATI_APPOINMENT, 4: CATI_FINISHED, 5: CATI_RETRY</p>
</td>
</tr>
<tr align="left" valign="top">
<td width="292" style="border:1px solid #010101;"><p class="bodytext">QAS_CATI_TIMES_CALLED</p>
</td>
<td width="116" style="border:1px solid #010101;"><p class="bodytext">number</p>
</td>
<td width="467" style="border:1px solid #010101;"><p class="bodytext">times called</p>
</td>
</tr>


</tbody></table>
| bgcolor="#C0C0C0" width="467" style="border:1px solid #010101;" |
'''Value'''


Example
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_ID</span>


array qas1 = QAS_new(33702597);
| width="116" style="border:1px solid #010101;" |
<span class="normalise">number</span>


qas1[QAS_TEST] = true;
| width="467" style="border:1px solid #010101;" |
<span class="normalise">Primary key</span>


QAS_save(qas1);
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_QUESTIONNAIRE_RESOURCE_ID</span>


array qas2 = QAS_new(33702597, 53468);
| width="116" style="border:1px solid #010101;" |
<span class="normalise">number</span>


QAS_save(qas2);
| width="467" style="border:1px solid #010101;" |
<span class="normalise">Questionnaire's resource id</span>


'''Availability'''
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_USER_RESOURCE_ID</span>


Version 5.6
| width="116" style="border:1px solid #010101;" |
__NOTOC__
<span class="normalise">number</span>
<!-- imported from file: 8060.htm-->
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">User's resource id</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_TEST</span>
 
| width="116" style="border:1px solid #010101;" |
<span class="normalise">bool</span>
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">If it is a test answer sheet</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_STATUS</span>
 
| width="116" style="border:1px solid #010101;" |
<span class="normalise">number</span>
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">Questionnaire answer sheet's status, it should be compared to/assigned with defined constants </span>
 
<span class="normalise">(see getRPQStatus function for more information)</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_COMPLETED</span>
 
| width="116" style="border:1px solid #010101;" |
<span class="normalise">bool</span>
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">If the answer sheet is completed</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_STARTDATE</span>
 
| width="116" style="border:1px solid #010101;" |
<span class="normalise">array</span>
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">Start date</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
<span class="normalise">QAS_ENDDATE</span>
 
| width="116" style="border:1px solid #010101;" |
<span class="normalise">array</span>
 
| width="467" style="border:1px solid #010101;" |
<span class="normalise">End date</span>
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
QAS_CATI_APPOINTMENT
 
| width="116" style="border:1px solid #010101;" |
array
 
| width="467" style="border:1px solid #010101;" |
Next contact datetime
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
QAS_CATI_LIST_TYPE
 
| width="116" style="border:1px solid #010101;" |
number
 
| width="467" style="border:1px solid #010101;" |
1: CATI_MAIN, 2: CATI_ONGOING, 3: CATI_APPOINMENT, 4: CATI_FINISHED, 5: CATI_RETRY
 
|- align="left" valign="top"
| width="292" style="border:1px solid #010101;" |
QAS_CATI_TIMES_CALLED
 
| width="116" style="border:1px solid #010101;" |
number
 
| width="467" style="border:1px solid #010101;" |
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 __NOTOC__ <!-- imported from file: 8060.htm-->  
 
[[Category:Questionnaire_Functions]]

Revision as of 07:20, 28 December 2011



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_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

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