Difference between revisions of "QAS getByQuestionnaireResourceId"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
'''QAS_getByQuestionnaireResourceId<br>'''Get all answer sheets of a specific Questionnaire by Questionaire resource Id.
+
'''<span />'''  
  
'''Syntax<br>'''&nbsp;&nbsp;&nbsp; QAS_getByQuestionnaireResourceId(questionnaireResourceId)<br>'''Arguments<br>'''&nbsp;&nbsp;&nbsp; questionnaireResourceId: is a number expression, it is resource id of Questionnaire.'''Return value<br>''''''Return Value'''
+
        QAS_getByQuestionnaireResourceId&lt;o:p&gt;&lt;/o:p&gt;
  
&nbsp; 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'''.<br>&nbsp;&nbsp;&nbsp;&nbsp;See '''QAS_new() '''to get more understanding of a QAS object and know how to get value of items of a QAS object.
+
<span>Get all answer sheets of a specific
 +
</span>
  
'''Example:<br>'''array All_QASs = QAS_getByQuestionnaireResourceId(37244945);<br>print(All_QASs);&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; // ---- Result:&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''{'''{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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {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>array QAS_object = All_QASs[0];<br>print(QAS_object[QAS_ID]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; // --- Result:&nbsp; 90267303&nbsp; <br>print(QAS_object[QAS_USER_RESOURCE_ID]);&nbsp;&nbsp; // --- Result:&nbsp; 37244953<br>print(QAS_object[QAS_TEST]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;// --- Result:&nbsp; False<br>print(QAS_object[QAS_STATUS]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;// --- Result:&nbsp; 1<br>print(QAS_object[QAS_COMPLETED]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // --- Result:&nbsp; False<br>print(QAS_object[QAS_STARTDATE]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // --- Result:&nbsp; {1,1,1,1,0,0,0,1,40}<br>print(QAS_object[QAS_ENDDATE]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // --- Result:&nbsp; {1,1,1,1,0,0,0,1,40} <br>
+
        Questionnaire by Questionaire resource Id.
  
'''Availability'''<br>Version 5.8.1<br>
+
'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'''
 +
 
 +
'''<span>Syntax</span>'''
 +
 
 +
<span>
 +
</span>
 +
 
 +
        QAS_getByQuestionnaireResourceId(questionnaireResourceId)&lt;o:p&gt;&lt;/o:p&gt;
 +
 
 +
<span>'''Arguments'''</span>
 +
 
 +
<span>- questionnaireResourceId: is a number
 +
</span>
 +
 
 +
        expression, it is resource id of Questionnaire.&lt;o:p&gt;&lt;/o:p&gt;
 +
 
 +
'''<span>Return value</span>'''
 +
 
 +
<span>This function returns an
 +
</span>
 +
 
 +
        '''array of answer sheet objects''' {{QAS_1},{QAS_2},{QAS_3},…...). If no answer
 +
      sheets exists then it will return an '''empty array'''.&lt;o:p&gt;&lt;/o:p&gt;
 +
 
 +
<span>See
 +
</span>
 +
 
 +
        QAS_new()''' to get more understanding of a QAS object and know how to get '''
 +
      value of items of a QAS object.&lt;o:p&gt;&lt;/o:p&gt;
 +
 
 +
'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'''
 +
 
 +
'''<span>Example:</span>'''
 +
 
 +
<span>array All_QASs =
 +
</span>
 +
 
 +
        QAS_getByQuestionnaireResourceId(37244945);
 +
 
 +
<span>print(All_QASs); <span style="mso-spacerun: yes;">
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
 +
 
 +
<span><span style="mso-spacerun: yes;">&nbsp;</span>// ---- Result:</span>
 +
 
 +
'''<span>{</span><span>{</span>'''<span>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'''<span style="color: red;">}</span>''',<br> '''<span style="color: red;">{</span>'''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'''<span style="color: red;">}</span>''',<br> '''<span style="color: red;">{</span>'''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="color: red;">}</span>'''</span>'''<span>}</span>'''
 +
 
 +
<span>array QAS_object = All_QASs[0];</span>
 +
 
 +
<span>print(QAS_object[QAS_ID]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
</span></span>
 +
 
 +
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// --- Result:<span style="mso-spacerun: yes;">&nbsp;
 +
      </span>90267303
 +
 
 +
<span>print(QAS_object[QAS_USER_RESOURCE_ID]);
 +
</span>
 +
 
 +
        <span style="mso-spacerun: yes;">&nbsp;&nbsp;</span>// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span>37244953
 +
 
 +
<span>print(QAS_object[QAS_TEST]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
</span></span>
 +
 
 +
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span> False
 +
 
 +
<span>print(QAS_object[QAS_STATUS]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
</span></span>
 +
 
 +
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span>1
 +
 
 +
<span>print(QAS_object[QAS_COMPLETED]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span>False</span>
 +
 
 +
<span>print(QAS_object[QAS_STARTDATE]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</span>// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span>{1,1,1,1,0,0,0,1,40}</span>
 +
 
 +
<span>print(QAS_object[QAS_ENDDATE]);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
</span></span>
 +
 
 +
        &nbsp;&nbsp;&nbsp;// --- Result:<span style="mso-spacerun: yes;">&nbsp; </span> {1,1,1,1,0,0,0,1,40}
 +
 
 +
'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span style="color: rgb(128, 0, 64); font-family: "arial","sans-serif"; font-size: 10pt; mso-fareast-font-family: "times new roman";" /&gt;'''
 +
 
 +
'''<span>Availability</span>'''  
 +
 
 +
<span>Version 5.8.1</span>

Revision as of 06:10, 21 July 2011

       QAS_getByQuestionnaireResourceId<o:p></o:p>

Get all answer sheets of a specific

       Questionnaire by Questionaire resource Id.

       

Syntax

       QAS_getByQuestionnaireResourceId(questionnaireResourceId)<o:p></o:p>

Arguments

- questionnaireResourceId: is a number

       expression, it is resource id of Questionnaire.<o:p></o:p>

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.<o:p></o:p>

See

       QAS_new() to get more understanding of a QAS object and know how to get 
      value of items of a QAS object.<o:p></o:p>

       

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}

        <span style="color: rgb(128, 0, 64); font-family: "arial","sans-serif"; font-size: 10pt; mso-fareast-font-family: "times new roman";" />

Availability

Version 5.8.1