Difference between revisions of "GetQuestionProperties"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
==== getQuestionProperties<br/> ====
+
====getQuestionProperties====
  
 
Return value property of question.
 
Return value property of question.
  
'''Syntax'''
+
===Syntax===
  
getQuestionProperties(question_name);
+
getQuestionProperties(questionName);
  
'''Arguments'''
+
===Arguments===
  
question_name: Is a name of question.
+
questionName: Is a name of question.
  
'''Return type'''
+
===Return type===
  
array of&nbsp;QuestionProperty object.
+
array of '''QuestionProperty''' object.
  
'''Examples:'''
+
===Examples====
 
<div>Code:</div><div><br/></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>setRPQId(370222122);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>array listOfQuestionProperty = getQuestionProperties("Q6_Awareness");</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp><br/></samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>for(number i = 0; i < listOfQuestionProperty.Count; i++)</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>{</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;QuestionProperty qp = listOfQuestionProperty[i];</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("------" + i.ToString() + "-----");</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;//</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp><br/></samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("Id: " + qp.Id);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionID: " + qp.QuestionID);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionPropertyType: " + qp.QuestionPropertyType);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionPropertyTypeAsString: " + qp.QuestionPropertyTypeAsString);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("Value: " + qp.Value);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>}</samp></span></span></div><div><br/></div><div>Result&nbsp;:</div><div><pre style="font-family:monospace,fixed">------0-----
 
<div>Code:</div><div><br/></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>setRPQId(370222122);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>array listOfQuestionProperty = getQuestionProperties("Q6_Awareness");</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp><br/></samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>for(number i = 0; i < listOfQuestionProperty.Count; i++)</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>{</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;QuestionProperty qp = listOfQuestionProperty[i];</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("------" + i.ToString() + "-----");</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;//</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp><br/></samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("Id: " + qp.Id);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionID: " + qp.QuestionID);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionPropertyType: " + qp.QuestionPropertyType);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("QuestionPropertyTypeAsString: " + qp.QuestionPropertyTypeAsString);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>&nbsp; &nbsp; &nbsp; &nbsp;print("Value: " + qp.Value);</samp></span></span></div><div><span style="font-family:courier new,courier,monospace;"><span style="font-size:medium;"><samp>}</samp></span></span></div><div><br/></div><div>Result&nbsp;:</div><div><pre style="font-family:monospace,fixed">------0-----
 
Id: 93490
 
Id: 93490
Line 34: Line 34:
 
QuestionPropertyTypeAsString: NoMulti
 
QuestionPropertyTypeAsString: NoMulti
 
Value: [32]</pre></div>
 
Value: [32]</pre></div>
'''Availability'''
 
 
Version 5.8
 

Revision as of 09:39, 13 November 2015

getQuestionProperties

Return value property of question.

Syntax

getQuestionProperties(questionName);

Arguments

questionName: Is a name of question.

Return type

array of QuestionProperty object.

Examples=

Code:

setRPQId(370222122);
array listOfQuestionProperty = getQuestionProperties("Q6_Awareness");

for(number i = 0; i < listOfQuestionProperty.Count; i++)
{
        QuestionProperty qp = listOfQuestionProperty[i];
       print("------" + i.ToString() + "-----");
       //

       print("Id: " + qp.Id);
       print("QuestionID: " + qp.QuestionID);
       print("QuestionPropertyType: " + qp.QuestionPropertyType);
       print("QuestionPropertyTypeAsString: " + qp.QuestionPropertyTypeAsString);
       print("Value: " + qp.Value);
}

Result :
------0-----
Id: 93490
QuestionID: 1489
QuestionPropertyType: 65
QuestionPropertyTypeAsString: AnswerOptionColumns
Value: 4
------1-----
Id: 5849
QuestionID: 1489
QuestionPropertyType: 3
QuestionPropertyTypeAsString: RotateAnswerOptions
Value: [1,2,34,3,35,36,4,5,6,7,37,8,9,10,11,12,13,14,15,16,17,18,19,20,21,38,22,23,24,25,39,26,27,28,33,29,30]
------2-----
Id: 5850
QuestionID: 1489
QuestionPropertyType: 7
QuestionPropertyTypeAsString: NoMulti
Value: [32]