Question getTopSelectedAnswers

From Catglobe Wiki
Revision as of 09:53, 7 March 2011 by 127.0.0.1 (talk | contribs) (jrfconvert import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Question_getTopSelectedAnswers

Return top selected answers of a multi question

Syntax

Question_getTopSelectedAnswers(question,position,length)

Arguments

  • question: is an array. It must be a multi 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