Difference between revisions of "Question getTopSelectedAnswers"

From Catglobe Wiki
Jump to: navigation, search
(Question_getTopSelectedAnswers)
Line 4: Line 4:
 
====Question_getTopSelectedAnswers====
 
====Question_getTopSelectedAnswers====
  
Return top selected answers of a multi question
+
Return top selected answers of a multi or multi grid question
  
 
'''Syntax'''
 
'''Syntax'''
Line 12: Line 12:
 
'''Arguments'''
 
'''Arguments'''
  
* question: is an array. It must be a multi question
+
* question: is an question array. It must be a multi question or multi grid question
 
* position: is a number
 
* position: is a number
 
* length: is a number
 
* length: is a number

Revision as of 09:20, 30 December 2011



Question_getTopSelectedAnswers

Return top selected answers of a multi or multi grid question

Syntax

Question_getTopSelectedAnswers(question,position,length)

Arguments

  • question: is an question array. It must be a multi question or multi grid question
  • position: is a number
  • length: is a number

Return type

array

Examples

setRPQId(123456);

print(Question_getTopSelectedAnswers(questionA,0,3));

//or print(topAnswer(questionA,2,3));

Result:

Suppose Multi question have 5 AO 1,2,3,4,5.

1.Example 1 : If user chose 3 then 4 then 2 then 1 then 5, it would return {3,4,2}. If user chose 3 then 1, it will return {3,1}

2.Example 2 : If user chose 3 then 4 then 2 then 1 then 5, it would return {2,1,5}. If user chose 3 then 1, it will return {}

Availability

Version 5.7