|
|
(11 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | {{HelpFiles}} |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | '''QAS_getByQuestionnaireResourceId''' |
− | <b><span
| + | |
− | style="font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
| + | Get all answer sheets of a specific Questionnaire by Questionnaire resource Id. |
− | "Times New Roman";mso-bidi-font-family:"Times New Roman";color:#333399">
| + | |
− | QAS_getByQuestionnaireResourceId</span></b></p>
| + | '''Syntax''' |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | QAS_getByQuestionnaireResourceId(questionnaireResourceId) |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| + | |
− | "Times New Roman";color:black">Get all answer sheets of a specific
| + | '''Arguments''' |
− | Questionnaire by Questionaire resource Id.</span></p>
| + | |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | questionnaireResourceId: is a number expression, it is resource id of Questionnaire. |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | |
− | <b>
| + | '''Return value''' |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| + | |
− | "Times New Roman";color:#800040"></span></b></p>
| + | <nowiki>Array of answer sheet objects(include Test QASs) {{QAS_1},{QAS_2},{QAS_3},…...)</nowiki> |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | If no answer sheets exists then it will return an empty array. |
− | <b>
| + | |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| + | See [[QAS_new]] to get more understanding of a QAS object and know how to get value of items of a QAS object. |
− | "Times New Roman";color:#800040">Syntax</span></b><span style="font-size:10.0pt;
| + | |
− | font-family:"Tahoma","sans-serif";mso-fareast-font-family:"Times New Roman";
| + | In later version, return value is array of [[QAS_class]] |
− | color:black"></span></p>
| + | |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | <br> '''Example:<br>''' |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | <source lang="javascript"> |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| + | array All_QASs = QAS_getByQuestionnaireResourceId(37244945); |
− | "Times New Roman";color:black">
| + | print(All_QASs); |
− | QAS_getByQuestionnaireResourceId(questionnaireResourceId)</span></p>
| + | /*old return: { |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | {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}, |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | {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}, |
− | <b>
| + | {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} |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| + | }*/ |
− | "Times New Roman";color:#800040">Arguments</span></b><span style="font-size:
| + | //new return: {QAS, QAS, QAS} |
− | 10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:"Times New Roman";
| + | |
− | color:black"></span></p>
| + | //old way to get items value of QAS object |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | array QAS_object = All_QASs[0]; |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | print(QAS_object[QAS_ID]);//90267303 |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| + | print(QAS_object[QAS_USER_RESOURCE_ID]);//37244953 |
− | "Times New Roman";color:black">- questionnaireResourceId: is a number
| + | print(QAS_object[QAS_TEST]);//False |
− | expression, it is resource id of Questionnaire.</span></p>
| + | print(QAS_object[QAS_STATUS]);//1 |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:0in;
| + | print(QAS_object[QAS_COMPLETED]);//False |
− | margin-left:0in;margin-bottom:.0001pt;line-height:normal;vertical-align:baseline">
| + | print(QAS_object[QAS_STARTDATE]);//{1,1,1,1,0,0,0,1,40} |
− | <b>
| + | print(QAS_object[QAS_ENDDATE]);//Result: {1,1,1,1,0,0,0,1,40} |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| + | |
− | "Times New Roman";color:#800040">Return value</span></b><span style="font-size:
| + | //new way to get items value of QAS class |
− | 10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:"Times New Roman";
| + | QAS qas = All_QASs[0]; |
− | color:black"></span></p>
| + | print(qas.Id);//90267303 |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | print(qas.UserResourceId);//37244953 |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| + | print(qas.Test);//False |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| + | print(qas.Status);//1 |
− | "Times New Roman";color:black">This function returns an
| + | print(qas.Completed);//False |
− | <b style="mso-bidi-font-weight:
| + | print(qas.StartDate);//{1,1,1,1,0,0,0,1,40} |
− | normal">array of answer sheet objects</b> {{QAS_1},{QAS_2},{QAS_3},…...). If no answer
| + | print(qas.EndDate);//Result: {1,1,1,1,0,0,0,1,40} |
− | sheets exists then it will return an <b style="mso-bidi-font-weight:
| + | </source> |
− | normal">empty array</b>.</span></p>
| + | '''Availability<br>'''Version 5.8.1 |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| + | |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">See <b style="mso-bidi-font-weight:normal">
| |
− | QAS_new()</b> to get more understanding of a QAS object and know how to get
| |
− | value of items of a QAS object.</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <b>
| |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:#800040"></span></b></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <b>
| |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:#800040">Example:</span></b><span style="font-size:
| |
− | 10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:"Times New Roman";
| |
− | color:black"></span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">array All_QASs =
| |
− | QAS_getByQuestionnaireResourceId(37244945);</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(All_QASs); <span style="mso-spacerun:yes">
| |
− | </span></span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black"><span style="mso-spacerun:yes"> </span>// ----
| |
− | Result: </span>
| |
− | </p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <b style="mso-bidi-font-weight:normal">
| |
− | <span style="font-size:16.0pt;font-family:
| |
− | "Courier New"">{</span><span
| |
− | style="font-family:"Courier New";color:red">{</span></b><span style="font-family:
| |
− | "Courier New"">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<b
| |
− | style="mso-bidi-font-weight:normal"><span style="color:red">}</span></b>,<br />
| |
− | <b style="mso-bidi-font-weight:normal"><span style="color:red">{</span></b>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<b
| |
− | style="mso-bidi-font-weight:normal"><span style="color:red">}</span></b>,<br />
| |
− | <b style="mso-bidi-font-weight:normal"><span style="color:red">{</span></b>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<b
| |
− | style="mso-bidi-font-weight:normal"><span style="color:red">}</span></b></span><b
| |
− | style="mso-bidi-font-weight:normal"><span style="font-size:16.0pt;font-family:
| |
− | "Courier New"">}</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";
| |
− | mso-fareast-font-family:"Times New Roman";color:black"></span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">array QAS_object = All_QASs[0];</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_ID]);<span
| |
− | style="mso-spacerun:yes">
| |
− | </span>// --- Result:<span style="mso-spacerun:yes">
| |
− | </span>90267303<span style="mso-spacerun:yes"> </span></span>
| |
− | </p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_USER_RESOURCE_ID]);
| |
− | <span style="mso-spacerun:yes"> </span>// --- Result:<span
| |
− | style="mso-spacerun:yes"> </span>37244953</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_TEST]);<span
| |
− | style="mso-spacerun:yes">
| |
− | </span>// --- Result:<span style="mso-spacerun:yes"> </span>
| |
− | False</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_STATUS]);<span
| |
− | style="mso-spacerun:yes">
| |
− | </span>// --- Result:<span style="mso-spacerun:yes"> </span>1</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_COMPLETED]);<span
| |
− | style="mso-spacerun:yes"> </span>//
| |
− | --- Result:<span style="mso-spacerun:yes"> </span>False</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_STARTDATE]);<span
| |
− | style="mso-spacerun:yes"> </span>//
| |
− | --- Result:<span style="mso-spacerun:yes"> </span>{1,1,1,1,0,0,0,1,40}</span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">print(QAS_object[QAS_ENDDATE]);<span
| |
− | style="mso-spacerun:yes">
| |
− | </span>// --- Result:<span style="mso-spacerun:yes"> </span>
| |
− | {1,1,1,1,0,0,0,1,40}<b> </b></span>
| |
− | </p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <b>
| |
− | <span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:#800040">Availability</span></b><span style="font-size:
| |
− | 10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:"Times New Roman";
| |
− | color:black"></span></p>
| |
− | <p style="margin-top:6.0pt;margin-right:0in;margin-bottom:6.0pt;
| |
− | margin-left:0in;line-height:normal;vertical-align:baseline">
| |
− | <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-font-family:
| |
− | "Times New Roman";color:black">Version 5.8.1</span></p>
| |
| [[Category:Questionnaire_Functions]] | | [[Category:Questionnaire_Functions]] |
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
Array of answer sheet objects(include Test QASs) {{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.
In later version, return value is array of QAS_class
Example:
array All_QASs = QAS_getByQuestionnaireResourceId(37244945);
print(All_QASs);
/*old return: {
{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}
}*/
//new return: {QAS, QAS, QAS}
//old way to get items value of QAS object
array QAS_object = All_QASs[0];
print(QAS_object[QAS_ID]);//90267303
print(QAS_object[QAS_USER_RESOURCE_ID]);//37244953
print(QAS_object[QAS_TEST]);//False
print(QAS_object[QAS_STATUS]);//1
print(QAS_object[QAS_COMPLETED]);//False
print(QAS_object[QAS_STARTDATE]);//{1,1,1,1,0,0,0,1,40}
print(QAS_object[QAS_ENDDATE]);//Result: {1,1,1,1,0,0,0,1,40}
//new way to get items value of QAS class
QAS qas = All_QASs[0];
print(qas.Id);//90267303
print(qas.UserResourceId);//37244953
print(qas.Test);//False
print(qas.Status);//1
print(qas.Completed);//False
print(qas.StartDate);//{1,1,1,1,0,0,0,1,40}
print(qas.EndDate);//Result: {1,1,1,1,0,0,0,1,40}
Availability
Version 5.8.1