Difference between revisions of "QAS getByQuestionnaireResourceId"
Line 1: | Line 1: | ||
'''QAS_getByQuestionnaireResourceId<br>'''Get all answer sheets of a specific Questionnaire by Questionnaire resource Id. | '''QAS_getByQuestionnaireResourceId<br>'''Get all answer sheets of a specific Questionnaire by Questionnaire resource Id. | ||
− | <br> '''Syntax<br>'''QAS_getByQuestionnaireResourceId(questionnaireResourceId) <br>'''Arguments<br>'''- questionnaireResourceId: is a number expression, it is resource id of Questionnaire. <br>'''Return value<br>'''This function returns <u>'''an array of answer sheet objects'''</u> {{QAS_1},{QAS_2},{QAS_3},…...). If no answer sheets exists then it will return an <u>'''empty array'''</u>.<br>See <u>'''QAS_new()'''</u>to get more understanding of a QAS object and know how to get value of items of a QAS object. | + | <br> '''Syntax<br>''' QAS_getByQuestionnaireResourceId(questionnaireResourceId) <br>'''Arguments<br>''' - questionnaireResourceId: is a number expression, it is resource id of Questionnaire. <br>'''Return value<br>''' This function returns <u>'''an array of answer sheet objects'''</u> {{QAS_1},{QAS_2},{QAS_3},…...). If no answer sheets exists then it will return an <u>'''empty array'''</u>.<br> See <u>'''QAS_new()'''</u>to get more understanding of a QAS object and know how to get value of items of a QAS object. |
<br> '''Example:<br>'''array All_QASs = QAS_getByQuestionnaireResourceId(37244945);<br>print(All_QASs); <br> // ---- Result: <br> {{15,90267303,37244945,37244953,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},0b0f4d6f-97de-488c-80d6-5f843363f046,{1,1,1,0,0,0,0,1,40},1,0},<br> {15,90267304,37244945,37244954,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},ab9826c5-1556-418d-a00e-0a1b20ae41a2,{1,1,1,0,0,0,0,1,40},1,0},<br> {15,90267305,37244945,37244955,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},c50290a0-fd28-40a2-a112-2249cff6217d,{1,1,1,0,0,0,0,1,40},1,0}} | <br> '''Example:<br>'''array All_QASs = QAS_getByQuestionnaireResourceId(37244945);<br>print(All_QASs); <br> // ---- Result: <br> {{15,90267303,37244945,37244953,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},0b0f4d6f-97de-488c-80d6-5f843363f046,{1,1,1,0,0,0,0,1,40},1,0},<br> {15,90267304,37244945,37244954,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},ab9826c5-1556-418d-a00e-0a1b20ae41a2,{1,1,1,0,0,0,0,1,40},1,0},<br> {15,90267305,37244945,37244955,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},c50290a0-fd28-40a2-a112-2249cff6217d,{1,1,1,0,0,0,0,1,40},1,0}} |
Revision as of 08:23, 21 July 2011
QAS_getByQuestionnaireResourceId
Get all answer sheets of a specific Questionnaire by Questionnaire resource Id.
Syntax
QAS_getByQuestionnaireResourceId(questionnaireResourceId)
Arguments
- questionnaireResourceId: is a number expression, it is resource id of Questionnaire.
Return value
This function returns an array of answer sheet objects {{QAS_1},{QAS_2},{QAS_3},…...). If no answer sheets exists then it will return an empty array.
See QAS_new()to get more understanding of a QAS object and know how to get value of items of a QAS object.
Example:
array All_QASs = QAS_getByQuestionnaireResourceId(37244945);
print(All_QASs);
// ---- Result:
{{15,90267303,37244945,37244953,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},0b0f4d6f-97de-488c-80d6-5f843363f046,{1,1,1,0,0,0,0,1,40},1,0},
{15,90267304,37244945,37244954,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},ab9826c5-1556-418d-a00e-0a1b20ae41a2,{1,1,1,0,0,0,0,1,40},1,0},
{15,90267305,37244945,37244955,False,1,False,{1,1,1,1,0,0,0,1,40},{1,1,1,1,0,0,0,1,40},c50290a0-fd28-40a2-a112-2249cff6217d,{1,1,1,0,0,0,0,1,40},1,0}}
array QAS_object = All_QASs[0];
print(QAS_object[QAS_ID]); // --- Result: 90267303
print(QAS_object[QAS_USER_RESOURCE_ID]); // --- Result: 37244953
print(QAS_object[QAS_TEST]); // --- Result: False
print(QAS_object[QAS_STATUS]); // --- Result: 1
print(QAS_object[QAS_COMPLETED]); // --- Result: False
print(QAS_object[QAS_STARTDATE]); // --- Result: {1,1,1,1,0,0,0,1,40}
print(QAS_object[QAS_ENDDATE]); // --- Result: {1,1,1,1,0,0,0,1,40}
Availability
Version 5.8.1
Questionnaire_Functions