Question getTopSelectedAnswers
Revision as of 09:20, 30 December 2011 by Cg huyphong (talk | contribs) (→Question_getTopSelectedAnswers)
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